/** * 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; CopySnapshotRequest::CopySnapshotRequest() : m_descriptionHasBeenSet(false), m_destinationOutpostArnHasBeenSet(false), m_destinationRegionHasBeenSet(false), m_encrypted(false), m_encryptedHasBeenSet(false), m_kmsKeyIdHasBeenSet(false), m_presignedUrlHasBeenSet(false), m_sourceRegionHasBeenSet(false), m_sourceSnapshotIdHasBeenSet(false), m_tagSpecificationsHasBeenSet(false), m_dryRun(false), m_dryRunHasBeenSet(false) { } Aws::String CopySnapshotRequest::SerializePayload() const { Aws::StringStream ss; ss << "Action=CopySnapshot&"; if(m_descriptionHasBeenSet) { ss << "Description=" << StringUtils::URLEncode(m_description.c_str()) << "&"; } if(m_destinationOutpostArnHasBeenSet) { ss << "DestinationOutpostArn=" << StringUtils::URLEncode(m_destinationOutpostArn.c_str()) << "&"; } if(m_encryptedHasBeenSet) { ss << "Encrypted=" << std::boolalpha << m_encrypted << "&"; } if(m_kmsKeyIdHasBeenSet) { ss << "KmsKeyId=" << StringUtils::URLEncode(m_kmsKeyId.c_str()) << "&"; } if(m_presignedUrlHasBeenSet) { ss << "PresignedUrl=" << StringUtils::URLEncode(m_presignedUrl.c_str()) << "&"; } if(m_sourceRegionHasBeenSet) { ss << "SourceRegion=" << StringUtils::URLEncode(m_sourceRegion.c_str()) << "&"; } if(m_sourceSnapshotIdHasBeenSet) { ss << "SourceSnapshotId=" << StringUtils::URLEncode(m_sourceSnapshotId.c_str()) << "&"; } if(m_tagSpecificationsHasBeenSet) { unsigned tagSpecificationsCount = 1; for(auto& item : m_tagSpecifications) { item.OutputToStream(ss, "TagSpecification.", tagSpecificationsCount, ""); tagSpecificationsCount++; } } if(m_dryRunHasBeenSet) { ss << "DryRun=" << std::boolalpha << m_dryRun << "&"; } ss << "Version=2016-11-15"; return ss.str(); } void CopySnapshotRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const { uri.SetQueryString(SerializePayload()); }