/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include 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")) { Aws::Utils::Array 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) { Aws::Utils::Array 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