/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::ElasticsearchService::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateElasticsearchDomainRequest::CreateElasticsearchDomainRequest() : m_domainNameHasBeenSet(false), m_elasticsearchVersionHasBeenSet(false), m_elasticsearchClusterConfigHasBeenSet(false), m_eBSOptionsHasBeenSet(false), m_accessPoliciesHasBeenSet(false), m_snapshotOptionsHasBeenSet(false), m_vPCOptionsHasBeenSet(false), m_cognitoOptionsHasBeenSet(false), m_encryptionAtRestOptionsHasBeenSet(false), m_nodeToNodeEncryptionOptionsHasBeenSet(false), m_advancedOptionsHasBeenSet(false), m_logPublishingOptionsHasBeenSet(false), m_domainEndpointOptionsHasBeenSet(false), m_advancedSecurityOptionsHasBeenSet(false), m_autoTuneOptionsHasBeenSet(false), m_tagListHasBeenSet(false) { } Aws::String CreateElasticsearchDomainRequest::SerializePayload() const { JsonValue payload; if(m_domainNameHasBeenSet) { payload.WithString("DomainName", m_domainName); } if(m_elasticsearchVersionHasBeenSet) { payload.WithString("ElasticsearchVersion", m_elasticsearchVersion); } if(m_elasticsearchClusterConfigHasBeenSet) { payload.WithObject("ElasticsearchClusterConfig", m_elasticsearchClusterConfig.Jsonize()); } if(m_eBSOptionsHasBeenSet) { payload.WithObject("EBSOptions", m_eBSOptions.Jsonize()); } if(m_accessPoliciesHasBeenSet) { payload.WithString("AccessPolicies", m_accessPolicies); } if(m_snapshotOptionsHasBeenSet) { payload.WithObject("SnapshotOptions", m_snapshotOptions.Jsonize()); } if(m_vPCOptionsHasBeenSet) { payload.WithObject("VPCOptions", m_vPCOptions.Jsonize()); } if(m_cognitoOptionsHasBeenSet) { payload.WithObject("CognitoOptions", m_cognitoOptions.Jsonize()); } if(m_encryptionAtRestOptionsHasBeenSet) { payload.WithObject("EncryptionAtRestOptions", m_encryptionAtRestOptions.Jsonize()); } if(m_nodeToNodeEncryptionOptionsHasBeenSet) { payload.WithObject("NodeToNodeEncryptionOptions", m_nodeToNodeEncryptionOptions.Jsonize()); } if(m_advancedOptionsHasBeenSet) { JsonValue advancedOptionsJsonMap; for(auto& advancedOptionsItem : m_advancedOptions) { advancedOptionsJsonMap.WithString(advancedOptionsItem.first, advancedOptionsItem.second); } payload.WithObject("AdvancedOptions", std::move(advancedOptionsJsonMap)); } if(m_logPublishingOptionsHasBeenSet) { JsonValue logPublishingOptionsJsonMap; for(auto& logPublishingOptionsItem : m_logPublishingOptions) { logPublishingOptionsJsonMap.WithObject(LogTypeMapper::GetNameForLogType(logPublishingOptionsItem.first), logPublishingOptionsItem.second.Jsonize()); } payload.WithObject("LogPublishingOptions", std::move(logPublishingOptionsJsonMap)); } if(m_domainEndpointOptionsHasBeenSet) { payload.WithObject("DomainEndpointOptions", m_domainEndpointOptions.Jsonize()); } if(m_advancedSecurityOptionsHasBeenSet) { payload.WithObject("AdvancedSecurityOptions", m_advancedSecurityOptions.Jsonize()); } if(m_autoTuneOptionsHasBeenSet) { payload.WithObject("AutoTuneOptions", m_autoTuneOptions.Jsonize()); } if(m_tagListHasBeenSet) { Aws::Utils::Array tagListJsonList(m_tagList.size()); for(unsigned tagListIndex = 0; tagListIndex < tagListJsonList.GetLength(); ++tagListIndex) { tagListJsonList[tagListIndex].AsObject(m_tagList[tagListIndex].Jsonize()); } payload.WithArray("TagList", std::move(tagListJsonList)); } return payload.View().WriteReadable(); }