AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
GetMetricStatisticsRequest.h
1
6#pragma once
7#include <aws/monitoring/CloudWatch_EXPORTS.h>
8#include <aws/monitoring/CloudWatchRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/monitoring/model/StandardUnit.h>
13#include <aws/monitoring/model/Dimension.h>
14#include <aws/monitoring/model/Statistic.h>
15#include <utility>
16
17namespace Aws
18{
19namespace CloudWatch
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_CLOUDWATCH_API GetMetricStatisticsRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "GetMetricStatistics"; }
36
37 AWS_CLOUDWATCH_API Aws::String SerializePayload() const override;
38
39 protected:
40 AWS_CLOUDWATCH_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
41
42 public:
43
45
48 inline const Aws::String& GetNamespace() const { return m_namespace; }
49 inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
50 template<typename NamespaceT = Aws::String>
51 void SetNamespace(NamespaceT&& value) { m_namespaceHasBeenSet = true; m_namespace = std::forward<NamespaceT>(value); }
52 template<typename NamespaceT = Aws::String>
53 GetMetricStatisticsRequest& WithNamespace(NamespaceT&& value) { SetNamespace(std::forward<NamespaceT>(value)); return *this;}
55
57
60 inline const Aws::String& GetMetricName() const { return m_metricName; }
61 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
62 template<typename MetricNameT = Aws::String>
63 void SetMetricName(MetricNameT&& value) { m_metricNameHasBeenSet = true; m_metricName = std::forward<MetricNameT>(value); }
64 template<typename MetricNameT = Aws::String>
65 GetMetricStatisticsRequest& WithMetricName(MetricNameT&& value) { SetMetricName(std::forward<MetricNameT>(value)); return *this;}
67
69
81 inline const Aws::Vector<Dimension>& GetDimensions() const { return m_dimensions; }
82 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
83 template<typename DimensionsT = Aws::Vector<Dimension>>
84 void SetDimensions(DimensionsT&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::forward<DimensionsT>(value); }
85 template<typename DimensionsT = Aws::Vector<Dimension>>
86 GetMetricStatisticsRequest& WithDimensions(DimensionsT&& value) { SetDimensions(std::forward<DimensionsT>(value)); return *this;}
87 template<typename DimensionsT = Dimension>
88 GetMetricStatisticsRequest& AddDimensions(DimensionsT&& value) { m_dimensionsHasBeenSet = true; m_dimensions.emplace_back(std::forward<DimensionsT>(value)); return *this; }
90
92
113 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
114 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
115 template<typename StartTimeT = Aws::Utils::DateTime>
116 void SetStartTime(StartTimeT&& value) { m_startTimeHasBeenSet = true; m_startTime = std::forward<StartTimeT>(value); }
117 template<typename StartTimeT = Aws::Utils::DateTime>
118 GetMetricStatisticsRequest& WithStartTime(StartTimeT&& value) { SetStartTime(std::forward<StartTimeT>(value)); return *this;}
120
122
128 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
129 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
130 template<typename EndTimeT = Aws::Utils::DateTime>
131 void SetEndTime(EndTimeT&& value) { m_endTimeHasBeenSet = true; m_endTime = std::forward<EndTimeT>(value); }
132 template<typename EndTimeT = Aws::Utils::DateTime>
133 GetMetricStatisticsRequest& WithEndTime(EndTimeT&& value) { SetEndTime(std::forward<EndTimeT>(value)); return *this;}
135
137
152 inline int GetPeriod() const { return m_period; }
153 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
154 inline void SetPeriod(int value) { m_periodHasBeenSet = true; m_period = value; }
155 inline GetMetricStatisticsRequest& WithPeriod(int value) { SetPeriod(value); return *this;}
157
159
165 inline const Aws::Vector<Statistic>& GetStatistics() const { return m_statistics; }
166 inline bool StatisticsHasBeenSet() const { return m_statisticsHasBeenSet; }
167 template<typename StatisticsT = Aws::Vector<Statistic>>
168 void SetStatistics(StatisticsT&& value) { m_statisticsHasBeenSet = true; m_statistics = std::forward<StatisticsT>(value); }
169 template<typename StatisticsT = Aws::Vector<Statistic>>
170 GetMetricStatisticsRequest& WithStatistics(StatisticsT&& value) { SetStatistics(std::forward<StatisticsT>(value)); return *this;}
171 inline GetMetricStatisticsRequest& AddStatistics(Statistic value) { m_statisticsHasBeenSet = true; m_statistics.push_back(value); return *this; }
173
175
182 inline const Aws::Vector<Aws::String>& GetExtendedStatistics() const { return m_extendedStatistics; }
183 inline bool ExtendedStatisticsHasBeenSet() const { return m_extendedStatisticsHasBeenSet; }
184 template<typename ExtendedStatisticsT = Aws::Vector<Aws::String>>
185 void SetExtendedStatistics(ExtendedStatisticsT&& value) { m_extendedStatisticsHasBeenSet = true; m_extendedStatistics = std::forward<ExtendedStatisticsT>(value); }
186 template<typename ExtendedStatisticsT = Aws::Vector<Aws::String>>
187 GetMetricStatisticsRequest& WithExtendedStatistics(ExtendedStatisticsT&& value) { SetExtendedStatistics(std::forward<ExtendedStatisticsT>(value)); return *this;}
188 template<typename ExtendedStatisticsT = Aws::String>
189 GetMetricStatisticsRequest& AddExtendedStatistics(ExtendedStatisticsT&& value) { m_extendedStatisticsHasBeenSet = true; m_extendedStatistics.emplace_back(std::forward<ExtendedStatisticsT>(value)); return *this; }
191
193
201 inline StandardUnit GetUnit() const { return m_unit; }
202 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
203 inline void SetUnit(StandardUnit value) { m_unitHasBeenSet = true; m_unit = value; }
204 inline GetMetricStatisticsRequest& WithUnit(StandardUnit value) { SetUnit(value); return *this;}
206 private:
207
208 Aws::String m_namespace;
209 bool m_namespaceHasBeenSet = false;
210
211 Aws::String m_metricName;
212 bool m_metricNameHasBeenSet = false;
213
214 Aws::Vector<Dimension> m_dimensions;
215 bool m_dimensionsHasBeenSet = false;
216
217 Aws::Utils::DateTime m_startTime{};
218 bool m_startTimeHasBeenSet = false;
219
220 Aws::Utils::DateTime m_endTime{};
221 bool m_endTimeHasBeenSet = false;
222
223 int m_period{0};
224 bool m_periodHasBeenSet = false;
225
226 Aws::Vector<Statistic> m_statistics;
227 bool m_statisticsHasBeenSet = false;
228
229 Aws::Vector<Aws::String> m_extendedStatistics;
230 bool m_extendedStatisticsHasBeenSet = false;
231
233 bool m_unitHasBeenSet = false;
234 };
235
236} // namespace Model
237} // namespace CloudWatch
238} // namespace Aws
GetMetricStatisticsRequest & WithStatistics(StatisticsT &&value)
AWS_CLOUDWATCH_API GetMetricStatisticsRequest()=default
const Aws::Vector< Statistic > & GetStatistics() const
GetMetricStatisticsRequest & AddExtendedStatistics(ExtendedStatisticsT &&value)
GetMetricStatisticsRequest & AddDimensions(DimensionsT &&value)
GetMetricStatisticsRequest & WithMetricName(MetricNameT &&value)
GetMetricStatisticsRequest & WithUnit(StandardUnit value)
GetMetricStatisticsRequest & WithStartTime(StartTimeT &&value)
const Aws::Vector< Dimension > & GetDimensions() const
GetMetricStatisticsRequest & WithDimensions(DimensionsT &&value)
GetMetricStatisticsRequest & AddStatistics(Statistic value)
const Aws::Vector< Aws::String > & GetExtendedStatistics() const
GetMetricStatisticsRequest & WithExtendedStatistics(ExtendedStatisticsT &&value)
GetMetricStatisticsRequest & WithNamespace(NamespaceT &&value)
AWS_CLOUDWATCH_API Aws::String SerializePayload() const override
GetMetricStatisticsRequest & WithEndTime(EndTimeT &&value)
AWS_CLOUDWATCH_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
virtual const char * GetServiceRequestName() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector