1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/elasticache/model/DescribeSnapshotsRequest.h> 7 #include <aws/core/utils/StringUtils.h> 8 #include <aws/core/utils/memory/stl/AWSStringStream.h> 9 10 using namespace Aws::ElastiCache::Model; 11 using namespace Aws::Utils; 12 DescribeSnapshotsRequest()13DescribeSnapshotsRequest::DescribeSnapshotsRequest() : 14 m_replicationGroupIdHasBeenSet(false), 15 m_cacheClusterIdHasBeenSet(false), 16 m_snapshotNameHasBeenSet(false), 17 m_snapshotSourceHasBeenSet(false), 18 m_markerHasBeenSet(false), 19 m_maxRecords(0), 20 m_maxRecordsHasBeenSet(false), 21 m_showNodeGroupConfig(false), 22 m_showNodeGroupConfigHasBeenSet(false) 23 { 24 } 25 SerializePayload() const26Aws::String DescribeSnapshotsRequest::SerializePayload() const 27 { 28 Aws::StringStream ss; 29 ss << "Action=DescribeSnapshots&"; 30 if(m_replicationGroupIdHasBeenSet) 31 { 32 ss << "ReplicationGroupId=" << StringUtils::URLEncode(m_replicationGroupId.c_str()) << "&"; 33 } 34 35 if(m_cacheClusterIdHasBeenSet) 36 { 37 ss << "CacheClusterId=" << StringUtils::URLEncode(m_cacheClusterId.c_str()) << "&"; 38 } 39 40 if(m_snapshotNameHasBeenSet) 41 { 42 ss << "SnapshotName=" << StringUtils::URLEncode(m_snapshotName.c_str()) << "&"; 43 } 44 45 if(m_snapshotSourceHasBeenSet) 46 { 47 ss << "SnapshotSource=" << StringUtils::URLEncode(m_snapshotSource.c_str()) << "&"; 48 } 49 50 if(m_markerHasBeenSet) 51 { 52 ss << "Marker=" << StringUtils::URLEncode(m_marker.c_str()) << "&"; 53 } 54 55 if(m_maxRecordsHasBeenSet) 56 { 57 ss << "MaxRecords=" << m_maxRecords << "&"; 58 } 59 60 if(m_showNodeGroupConfigHasBeenSet) 61 { 62 ss << "ShowNodeGroupConfig=" << std::boolalpha << m_showNodeGroupConfig << "&"; 63 } 64 65 ss << "Version=2015-02-02"; 66 return ss.str(); 67 } 68 69 DumpBodyToUrl(Aws::Http::URI & uri) const70void DescribeSnapshotsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const 71 { 72 uri.SetQueryString(SerializePayload()); 73 } 74