1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/monitoring/model/GetMetricWidgetImageRequest.h> 7 #include <aws/core/utils/StringUtils.h> 8 #include <aws/core/utils/memory/stl/AWSStringStream.h> 9 10 using namespace Aws::CloudWatch::Model; 11 using namespace Aws::Utils; 12 GetMetricWidgetImageRequest()13GetMetricWidgetImageRequest::GetMetricWidgetImageRequest() : 14 m_metricWidgetHasBeenSet(false), 15 m_outputFormatHasBeenSet(false) 16 { 17 } 18 SerializePayload() const19Aws::String GetMetricWidgetImageRequest::SerializePayload() const 20 { 21 Aws::StringStream ss; 22 ss << "Action=GetMetricWidgetImage&"; 23 if(m_metricWidgetHasBeenSet) 24 { 25 ss << "MetricWidget=" << StringUtils::URLEncode(m_metricWidget.c_str()) << "&"; 26 } 27 28 if(m_outputFormatHasBeenSet) 29 { 30 ss << "OutputFormat=" << StringUtils::URLEncode(m_outputFormat.c_str()) << "&"; 31 } 32 33 ss << "Version=2010-08-01"; 34 return ss.str(); 35 } 36 37 DumpBodyToUrl(Aws::Http::URI & uri) const38void GetMetricWidgetImageRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const 39 { 40 uri.SetQueryString(SerializePayload()); 41 } 42