AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
GetMetricStatisticsRequest.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/monitoring/CloudWatchRequest.h>
11#include <aws/monitoring/CloudWatch_EXPORTS.h>
12#include <aws/monitoring/model/Dimension.h>
13#include <aws/monitoring/model/StandardUnit.h>
14#include <aws/monitoring/model/Statistic.h>
15
16#include <utility>
17
18namespace Aws {
19namespace CloudWatch {
20namespace Model {
21
25 public:
26 AWS_CLOUDWATCH_API GetMetricStatisticsRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "GetMetricStatistics"; }
33
34 AWS_CLOUDWATCH_API Aws::String SerializePayload() const override;
35
37
39
42 inline const Aws::String& GetNamespace() const { return m_namespace; }
43 inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
44 template <typename NamespaceT = Aws::String>
45 void SetNamespace(NamespaceT&& value) {
46 m_namespaceHasBeenSet = true;
47 m_namespace = std::forward<NamespaceT>(value);
48 }
49 template <typename NamespaceT = Aws::String>
51 SetNamespace(std::forward<NamespaceT>(value));
52 return *this;
53 }
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) {
64 m_metricNameHasBeenSet = true;
65 m_metricName = std::forward<MetricNameT>(value);
66 }
67 template <typename MetricNameT = Aws::String>
69 SetMetricName(std::forward<MetricNameT>(value));
70 return *this;
71 }
73
75
87 inline const Aws::Vector<Dimension>& GetDimensions() const { return m_dimensions; }
88 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
89 template <typename DimensionsT = Aws::Vector<Dimension>>
90 void SetDimensions(DimensionsT&& value) {
91 m_dimensionsHasBeenSet = true;
92 m_dimensions = std::forward<DimensionsT>(value);
93 }
94 template <typename DimensionsT = Aws::Vector<Dimension>>
96 SetDimensions(std::forward<DimensionsT>(value));
97 return *this;
98 }
99 template <typename DimensionsT = Dimension>
101 m_dimensionsHasBeenSet = true;
102 m_dimensions.emplace_back(std::forward<DimensionsT>(value));
103 return *this;
104 }
106
108
129 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
130 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
131 template <typename StartTimeT = Aws::Utils::DateTime>
132 void SetStartTime(StartTimeT&& value) {
133 m_startTimeHasBeenSet = true;
134 m_startTime = std::forward<StartTimeT>(value);
135 }
136 template <typename StartTimeT = Aws::Utils::DateTime>
138 SetStartTime(std::forward<StartTimeT>(value));
139 return *this;
140 }
142
144
150 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
151 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
152 template <typename EndTimeT = Aws::Utils::DateTime>
153 void SetEndTime(EndTimeT&& value) {
154 m_endTimeHasBeenSet = true;
155 m_endTime = std::forward<EndTimeT>(value);
156 }
157 template <typename EndTimeT = Aws::Utils::DateTime>
159 SetEndTime(std::forward<EndTimeT>(value));
160 return *this;
161 }
163
165
180 inline int GetPeriod() const { return m_period; }
181 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
182 inline void SetPeriod(int value) {
183 m_periodHasBeenSet = true;
184 m_period = value;
185 }
187 SetPeriod(value);
188 return *this;
189 }
191
193
199 inline const Aws::Vector<Statistic>& GetStatistics() const { return m_statistics; }
200 inline bool StatisticsHasBeenSet() const { return m_statisticsHasBeenSet; }
201 template <typename StatisticsT = Aws::Vector<Statistic>>
202 void SetStatistics(StatisticsT&& value) {
203 m_statisticsHasBeenSet = true;
204 m_statistics = std::forward<StatisticsT>(value);
205 }
206 template <typename StatisticsT = Aws::Vector<Statistic>>
208 SetStatistics(std::forward<StatisticsT>(value));
209 return *this;
210 }
212 m_statisticsHasBeenSet = true;
213 m_statistics.push_back(value);
214 return *this;
215 }
217
219
226 inline const Aws::Vector<Aws::String>& GetExtendedStatistics() const { return m_extendedStatistics; }
227 inline bool ExtendedStatisticsHasBeenSet() const { return m_extendedStatisticsHasBeenSet; }
228 template <typename ExtendedStatisticsT = Aws::Vector<Aws::String>>
229 void SetExtendedStatistics(ExtendedStatisticsT&& value) {
230 m_extendedStatisticsHasBeenSet = true;
231 m_extendedStatistics = std::forward<ExtendedStatisticsT>(value);
232 }
233 template <typename ExtendedStatisticsT = Aws::Vector<Aws::String>>
235 SetExtendedStatistics(std::forward<ExtendedStatisticsT>(value));
236 return *this;
237 }
238 template <typename ExtendedStatisticsT = Aws::String>
239 GetMetricStatisticsRequest& AddExtendedStatistics(ExtendedStatisticsT&& value) {
240 m_extendedStatisticsHasBeenSet = true;
241 m_extendedStatistics.emplace_back(std::forward<ExtendedStatisticsT>(value));
242 return *this;
243 }
245
247
255 inline StandardUnit GetUnit() const { return m_unit; }
256 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
257 inline void SetUnit(StandardUnit value) {
258 m_unitHasBeenSet = true;
259 m_unit = value;
260 }
262 SetUnit(value);
263 return *this;
264 }
266 private:
267 Aws::String m_namespace;
268
269 Aws::String m_metricName;
270
271 Aws::Vector<Dimension> m_dimensions;
272
273 Aws::Utils::DateTime m_startTime{};
274
275 Aws::Utils::DateTime m_endTime{};
276
277 int m_period{0};
278
279 Aws::Vector<Statistic> m_statistics;
280
281 Aws::Vector<Aws::String> m_extendedStatistics;
282
284 bool m_namespaceHasBeenSet = false;
285 bool m_metricNameHasBeenSet = false;
286 bool m_dimensionsHasBeenSet = false;
287 bool m_startTimeHasBeenSet = false;
288 bool m_endTimeHasBeenSet = false;
289 bool m_periodHasBeenSet = false;
290 bool m_statisticsHasBeenSet = false;
291 bool m_extendedStatisticsHasBeenSet = false;
292 bool m_unitHasBeenSet = false;
293};
294
295} // namespace Model
296} // namespace CloudWatch
297} // 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)
AWS_CLOUDWATCH_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
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)
virtual const char * GetServiceRequestName() const override
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector