/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include using namespace Aws::IoT::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DescribeProvisioningTemplateResult::DescribeProvisioningTemplateResult() : m_defaultVersionId(0), m_enabled(false) { } DescribeProvisioningTemplateResult::DescribeProvisioningTemplateResult(const Aws::AmazonWebServiceResult& result) : m_defaultVersionId(0), m_enabled(false) { *this = result; } DescribeProvisioningTemplateResult& DescribeProvisioningTemplateResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("templateArn")) { m_templateArn = jsonValue.GetString("templateArn"); } if(jsonValue.ValueExists("templateName")) { m_templateName = jsonValue.GetString("templateName"); } if(jsonValue.ValueExists("description")) { m_description = jsonValue.GetString("description"); } if(jsonValue.ValueExists("creationDate")) { m_creationDate = jsonValue.GetDouble("creationDate"); } if(jsonValue.ValueExists("lastModifiedDate")) { m_lastModifiedDate = jsonValue.GetDouble("lastModifiedDate"); } if(jsonValue.ValueExists("defaultVersionId")) { m_defaultVersionId = jsonValue.GetInteger("defaultVersionId"); } if(jsonValue.ValueExists("templateBody")) { m_templateBody = jsonValue.GetString("templateBody"); } if(jsonValue.ValueExists("enabled")) { m_enabled = jsonValue.GetBool("enabled"); } if(jsonValue.ValueExists("provisioningRoleArn")) { m_provisioningRoleArn = jsonValue.GetString("provisioningRoleArn"); } if(jsonValue.ValueExists("preProvisioningHook")) { m_preProvisioningHook = jsonValue.GetObject("preProvisioningHook"); } return *this; }