1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/redshift/model/BatchModifyClusterSnapshotsRequest.h> 7 #include <aws/core/utils/StringUtils.h> 8 #include <aws/core/utils/memory/stl/AWSStringStream.h> 9 10 using namespace Aws::Redshift::Model; 11 using namespace Aws::Utils; 12 BatchModifyClusterSnapshotsRequest()13BatchModifyClusterSnapshotsRequest::BatchModifyClusterSnapshotsRequest() : 14 m_snapshotIdentifierListHasBeenSet(false), 15 m_manualSnapshotRetentionPeriod(0), 16 m_manualSnapshotRetentionPeriodHasBeenSet(false), 17 m_force(false), 18 m_forceHasBeenSet(false) 19 { 20 } 21 SerializePayload() const22Aws::String BatchModifyClusterSnapshotsRequest::SerializePayload() const 23 { 24 Aws::StringStream ss; 25 ss << "Action=BatchModifyClusterSnapshots&"; 26 if(m_snapshotIdentifierListHasBeenSet) 27 { 28 unsigned snapshotIdentifierListCount = 1; 29 for(auto& item : m_snapshotIdentifierList) 30 { 31 ss << "SnapshotIdentifierList.member." << snapshotIdentifierListCount << "=" 32 << StringUtils::URLEncode(item.c_str()) << "&"; 33 snapshotIdentifierListCount++; 34 } 35 } 36 37 if(m_manualSnapshotRetentionPeriodHasBeenSet) 38 { 39 ss << "ManualSnapshotRetentionPeriod=" << m_manualSnapshotRetentionPeriod << "&"; 40 } 41 42 if(m_forceHasBeenSet) 43 { 44 ss << "Force=" << std::boolalpha << m_force << "&"; 45 } 46 47 ss << "Version=2012-12-01"; 48 return ss.str(); 49 } 50 51 DumpBodyToUrl(Aws::Http::URI & uri) const52void BatchModifyClusterSnapshotsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const 53 { 54 uri.SetQueryString(SerializePayload()); 55 } 56