99 lines
2.2 KiB
C++
99 lines
2.2 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/iot/model/DescribeProvisioningTemplateResult.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
#include <aws/core/AmazonWebServiceResult.h>
|
|
#include <aws/core/utils/StringUtils.h>
|
|
#include <aws/core/utils/UnreferencedParam.h>
|
|
|
|
#include <utility>
|
|
|
|
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<JsonValue>& result) :
|
|
m_defaultVersionId(0),
|
|
m_enabled(false)
|
|
{
|
|
*this = result;
|
|
}
|
|
|
|
DescribeProvisioningTemplateResult& DescribeProvisioningTemplateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& 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;
|
|
}
|