63 lines
1.5 KiB
C++
63 lines
1.5 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/iot/model/CreateProvisioningTemplateVersionResult.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;
|
|
|
|
CreateProvisioningTemplateVersionResult::CreateProvisioningTemplateVersionResult() :
|
|
m_versionId(0),
|
|
m_isDefaultVersion(false)
|
|
{
|
|
}
|
|
|
|
CreateProvisioningTemplateVersionResult::CreateProvisioningTemplateVersionResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
|
|
m_versionId(0),
|
|
m_isDefaultVersion(false)
|
|
{
|
|
*this = result;
|
|
}
|
|
|
|
CreateProvisioningTemplateVersionResult& CreateProvisioningTemplateVersionResult::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("versionId"))
|
|
{
|
|
m_versionId = jsonValue.GetInteger("versionId");
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("isDefaultVersion"))
|
|
{
|
|
m_isDefaultVersion = jsonValue.GetBool("isDefaultVersion");
|
|
|
|
}
|
|
|
|
|
|
|
|
return *this;
|
|
}
|