/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::EC2::Model; using namespace Aws::Utils; AllocateAddressRequest::AllocateAddressRequest() : m_domain(DomainType::NOT_SET), m_domainHasBeenSet(false), m_addressHasBeenSet(false), m_publicIpv4PoolHasBeenSet(false), m_networkBorderGroupHasBeenSet(false), m_customerOwnedIpv4PoolHasBeenSet(false), m_dryRun(false), m_dryRunHasBeenSet(false), m_tagSpecificationsHasBeenSet(false) { } Aws::String AllocateAddressRequest::SerializePayload() const { Aws::StringStream ss; ss << "Action=AllocateAddress&"; if(m_domainHasBeenSet) { ss << "Domain=" << DomainTypeMapper::GetNameForDomainType(m_domain) << "&"; } if(m_addressHasBeenSet) { ss << "Address=" << StringUtils::URLEncode(m_address.c_str()) << "&"; } if(m_publicIpv4PoolHasBeenSet) { ss << "PublicIpv4Pool=" << StringUtils::URLEncode(m_publicIpv4Pool.c_str()) << "&"; } if(m_networkBorderGroupHasBeenSet) { ss << "NetworkBorderGroup=" << StringUtils::URLEncode(m_networkBorderGroup.c_str()) << "&"; } if(m_customerOwnedIpv4PoolHasBeenSet) { ss << "CustomerOwnedIpv4Pool=" << StringUtils::URLEncode(m_customerOwnedIpv4Pool.c_str()) << "&"; } if(m_dryRunHasBeenSet) { ss << "DryRun=" << std::boolalpha << m_dryRun << "&"; } if(m_tagSpecificationsHasBeenSet) { unsigned tagSpecificationsCount = 1; for(auto& item : m_tagSpecifications) { item.OutputToStream(ss, "TagSpecification.", tagSpecificationsCount, ""); tagSpecificationsCount++; } } ss << "Version=2016-11-15"; return ss.str(); } void AllocateAddressRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const { uri.SetQueryString(SerializePayload()); }