/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::IoT::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateDomainConfigurationRequest::CreateDomainConfigurationRequest() : m_domainConfigurationNameHasBeenSet(false), m_domainNameHasBeenSet(false), m_serverCertificateArnsHasBeenSet(false), m_validationCertificateArnHasBeenSet(false), m_authorizerConfigHasBeenSet(false), m_serviceType(ServiceType::NOT_SET), m_serviceTypeHasBeenSet(false), m_tagsHasBeenSet(false), m_tlsConfigHasBeenSet(false) { } Aws::String CreateDomainConfigurationRequest::SerializePayload() const { JsonValue payload; if(m_domainNameHasBeenSet) { payload.WithString("domainName", m_domainName); } if(m_serverCertificateArnsHasBeenSet) { Aws::Utils::Array serverCertificateArnsJsonList(m_serverCertificateArns.size()); for(unsigned serverCertificateArnsIndex = 0; serverCertificateArnsIndex < serverCertificateArnsJsonList.GetLength(); ++serverCertificateArnsIndex) { serverCertificateArnsJsonList[serverCertificateArnsIndex].AsString(m_serverCertificateArns[serverCertificateArnsIndex]); } payload.WithArray("serverCertificateArns", std::move(serverCertificateArnsJsonList)); } if(m_validationCertificateArnHasBeenSet) { payload.WithString("validationCertificateArn", m_validationCertificateArn); } if(m_authorizerConfigHasBeenSet) { payload.WithObject("authorizerConfig", m_authorizerConfig.Jsonize()); } if(m_serviceTypeHasBeenSet) { payload.WithString("serviceType", ServiceTypeMapper::GetNameForServiceType(m_serviceType)); } if(m_tagsHasBeenSet) { Aws::Utils::Array tagsJsonList(m_tags.size()); for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex) { tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize()); } payload.WithArray("tags", std::move(tagsJsonList)); } if(m_tlsConfigHasBeenSet) { payload.WithObject("tlsConfig", m_tlsConfig.Jsonize()); } return payload.View().WriteReadable(); }