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-eks/source/model/EncryptionConfig.cpp

83 lines
1.7 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/eks/model/EncryptionConfig.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace EKS
{
namespace Model
{
EncryptionConfig::EncryptionConfig() :
m_resourcesHasBeenSet(false),
m_providerHasBeenSet(false)
{
}
EncryptionConfig::EncryptionConfig(JsonView jsonValue) :
m_resourcesHasBeenSet(false),
m_providerHasBeenSet(false)
{
*this = jsonValue;
}
EncryptionConfig& EncryptionConfig::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("resources"))
{
Array<JsonView> resourcesJsonList = jsonValue.GetArray("resources");
for(unsigned resourcesIndex = 0; resourcesIndex < resourcesJsonList.GetLength(); ++resourcesIndex)
{
m_resources.push_back(resourcesJsonList[resourcesIndex].AsString());
}
m_resourcesHasBeenSet = true;
}
if(jsonValue.ValueExists("provider"))
{
m_provider = jsonValue.GetObject("provider");
m_providerHasBeenSet = true;
}
return *this;
}
JsonValue EncryptionConfig::Jsonize() const
{
JsonValue payload;
if(m_resourcesHasBeenSet)
{
Array<JsonValue> resourcesJsonList(m_resources.size());
for(unsigned resourcesIndex = 0; resourcesIndex < resourcesJsonList.GetLength(); ++resourcesIndex)
{
resourcesJsonList[resourcesIndex].AsString(m_resources[resourcesIndex]);
}
payload.WithArray("resources", std::move(resourcesJsonList));
}
if(m_providerHasBeenSet)
{
payload.WithObject("provider", m_provider.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace EKS
} // namespace Aws