/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::QuickSight::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateVPCConnectionRequest::CreateVPCConnectionRequest() : m_awsAccountIdHasBeenSet(false), m_vPCConnectionIdHasBeenSet(false), m_nameHasBeenSet(false), m_subnetIdsHasBeenSet(false), m_securityGroupIdsHasBeenSet(false), m_dnsResolversHasBeenSet(false), m_roleArnHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateVPCConnectionRequest::SerializePayload() const { JsonValue payload; if(m_vPCConnectionIdHasBeenSet) { payload.WithString("VPCConnectionId", m_vPCConnectionId); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_subnetIdsHasBeenSet) { Aws::Utils::Array subnetIdsJsonList(m_subnetIds.size()); for(unsigned subnetIdsIndex = 0; subnetIdsIndex < subnetIdsJsonList.GetLength(); ++subnetIdsIndex) { subnetIdsJsonList[subnetIdsIndex].AsString(m_subnetIds[subnetIdsIndex]); } payload.WithArray("SubnetIds", std::move(subnetIdsJsonList)); } if(m_securityGroupIdsHasBeenSet) { Aws::Utils::Array securityGroupIdsJsonList(m_securityGroupIds.size()); for(unsigned securityGroupIdsIndex = 0; securityGroupIdsIndex < securityGroupIdsJsonList.GetLength(); ++securityGroupIdsIndex) { securityGroupIdsJsonList[securityGroupIdsIndex].AsString(m_securityGroupIds[securityGroupIdsIndex]); } payload.WithArray("SecurityGroupIds", std::move(securityGroupIdsJsonList)); } if(m_dnsResolversHasBeenSet) { Aws::Utils::Array dnsResolversJsonList(m_dnsResolvers.size()); for(unsigned dnsResolversIndex = 0; dnsResolversIndex < dnsResolversJsonList.GetLength(); ++dnsResolversIndex) { dnsResolversJsonList[dnsResolversIndex].AsString(m_dnsResolvers[dnsResolversIndex]); } payload.WithArray("DnsResolvers", std::move(dnsResolversJsonList)); } if(m_roleArnHasBeenSet) { payload.WithString("RoleArn", m_roleArn); } 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)); } return payload.View().WriteReadable(); }