This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-iot/source/model/ProvisioningTemplateSummary.cpp

135 lines
2.7 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/iot/model/ProvisioningTemplateSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace IoT
{
namespace Model
{
ProvisioningTemplateSummary::ProvisioningTemplateSummary() :
m_templateArnHasBeenSet(false),
m_templateNameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_lastModifiedDateHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false)
{
}
ProvisioningTemplateSummary::ProvisioningTemplateSummary(JsonView jsonValue) :
m_templateArnHasBeenSet(false),
m_templateNameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_lastModifiedDateHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false)
{
*this = jsonValue;
}
ProvisioningTemplateSummary& ProvisioningTemplateSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("templateArn"))
{
m_templateArn = jsonValue.GetString("templateArn");
m_templateArnHasBeenSet = true;
}
if(jsonValue.ValueExists("templateName"))
{
m_templateName = jsonValue.GetString("templateName");
m_templateNameHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("creationDate"))
{
m_creationDate = jsonValue.GetDouble("creationDate");
m_creationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("lastModifiedDate"))
{
m_lastModifiedDate = jsonValue.GetDouble("lastModifiedDate");
m_lastModifiedDateHasBeenSet = true;
}
if(jsonValue.ValueExists("enabled"))
{
m_enabled = jsonValue.GetBool("enabled");
m_enabledHasBeenSet = true;
}
return *this;
}
JsonValue ProvisioningTemplateSummary::Jsonize() const
{
JsonValue payload;
if(m_templateArnHasBeenSet)
{
payload.WithString("templateArn", m_templateArn);
}
if(m_templateNameHasBeenSet)
{
payload.WithString("templateName", m_templateName);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_creationDateHasBeenSet)
{
payload.WithDouble("creationDate", m_creationDate.SecondsWithMSPrecision());
}
if(m_lastModifiedDateHasBeenSet)
{
payload.WithDouble("lastModifiedDate", m_lastModifiedDate.SecondsWithMSPrecision());
}
if(m_enabledHasBeenSet)
{
payload.WithBool("enabled", m_enabled);
}
return payload;
}
} // namespace Model
} // namespace IoT
} // namespace Aws