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-appconfig/source/model/ConfigurationProfileSummary.cpp

128 lines
2.9 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/appconfig/model/ConfigurationProfileSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AppConfig
{
namespace Model
{
ConfigurationProfileSummary::ConfigurationProfileSummary() :
m_applicationIdHasBeenSet(false),
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_locationUriHasBeenSet(false),
m_validatorTypesHasBeenSet(false)
{
}
ConfigurationProfileSummary::ConfigurationProfileSummary(JsonView jsonValue) :
m_applicationIdHasBeenSet(false),
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_locationUriHasBeenSet(false),
m_validatorTypesHasBeenSet(false)
{
*this = jsonValue;
}
ConfigurationProfileSummary& ConfigurationProfileSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ApplicationId"))
{
m_applicationId = jsonValue.GetString("ApplicationId");
m_applicationIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("LocationUri"))
{
m_locationUri = jsonValue.GetString("LocationUri");
m_locationUriHasBeenSet = true;
}
if(jsonValue.ValueExists("ValidatorTypes"))
{
Array<JsonView> validatorTypesJsonList = jsonValue.GetArray("ValidatorTypes");
for(unsigned validatorTypesIndex = 0; validatorTypesIndex < validatorTypesJsonList.GetLength(); ++validatorTypesIndex)
{
m_validatorTypes.push_back(ValidatorTypeMapper::GetValidatorTypeForName(validatorTypesJsonList[validatorTypesIndex].AsString()));
}
m_validatorTypesHasBeenSet = true;
}
return *this;
}
JsonValue ConfigurationProfileSummary::Jsonize() const
{
JsonValue payload;
if(m_applicationIdHasBeenSet)
{
payload.WithString("ApplicationId", m_applicationId);
}
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_locationUriHasBeenSet)
{
payload.WithString("LocationUri", m_locationUri);
}
if(m_validatorTypesHasBeenSet)
{
Array<JsonValue> validatorTypesJsonList(m_validatorTypes.size());
for(unsigned validatorTypesIndex = 0; validatorTypesIndex < validatorTypesJsonList.GetLength(); ++validatorTypesIndex)
{
validatorTypesJsonList[validatorTypesIndex].AsString(ValidatorTypeMapper::GetNameForValidatorType(m_validatorTypes[validatorTypesIndex]));
}
payload.WithArray("ValidatorTypes", std::move(validatorTypesJsonList));
}
return payload;
}
} // namespace Model
} // namespace AppConfig
} // namespace Aws