AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
GetMetricDataRequest.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/LabelOptions.h>
13#include <aws/monitoring/model/MetricDataQuery.h>
14#include <aws/monitoring/model/ScanBy.h>
15
16#include <utility>
17
18namespace Aws {
19namespace CloudWatch {
20namespace Model {
21
25 public:
26 AWS_CLOUDWATCH_API GetMetricDataRequest() = 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 "GetMetricData"; }
33
34 AWS_CLOUDWATCH_API Aws::String SerializePayload() const override;
35
37
39
45 inline const Aws::Vector<MetricDataQuery>& GetMetricDataQueries() const { return m_metricDataQueries; }
46 inline bool MetricDataQueriesHasBeenSet() const { return m_metricDataQueriesHasBeenSet; }
47 template <typename MetricDataQueriesT = Aws::Vector<MetricDataQuery>>
48 void SetMetricDataQueries(MetricDataQueriesT&& value) {
49 m_metricDataQueriesHasBeenSet = true;
50 m_metricDataQueries = std::forward<MetricDataQueriesT>(value);
51 }
52 template <typename MetricDataQueriesT = Aws::Vector<MetricDataQuery>>
53 GetMetricDataRequest& WithMetricDataQueries(MetricDataQueriesT&& value) {
54 SetMetricDataQueries(std::forward<MetricDataQueriesT>(value));
55 return *this;
56 }
57 template <typename MetricDataQueriesT = MetricDataQuery>
58 GetMetricDataRequest& AddMetricDataQueries(MetricDataQueriesT&& value) {
59 m_metricDataQueriesHasBeenSet = true;
60 m_metricDataQueries.emplace_back(std::forward<MetricDataQueriesT>(value));
61 return *this;
62 }
64
66
90 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
91 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
92 template <typename StartTimeT = Aws::Utils::DateTime>
93 void SetStartTime(StartTimeT&& value) {
94 m_startTimeHasBeenSet = true;
95 m_startTime = std::forward<StartTimeT>(value);
96 }
97 template <typename StartTimeT = Aws::Utils::DateTime>
98 GetMetricDataRequest& WithStartTime(StartTimeT&& value) {
99 SetStartTime(std::forward<StartTimeT>(value));
100 return *this;
101 }
103
105
115 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
116 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
117 template <typename EndTimeT = Aws::Utils::DateTime>
118 void SetEndTime(EndTimeT&& value) {
119 m_endTimeHasBeenSet = true;
120 m_endTime = std::forward<EndTimeT>(value);
121 }
122 template <typename EndTimeT = Aws::Utils::DateTime>
124 SetEndTime(std::forward<EndTimeT>(value));
125 return *this;
126 }
128
130
134 inline const Aws::String& GetNextToken() const { return m_nextToken; }
135 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
136 template <typename NextTokenT = Aws::String>
137 void SetNextToken(NextTokenT&& value) {
138 m_nextTokenHasBeenSet = true;
139 m_nextToken = std::forward<NextTokenT>(value);
140 }
141 template <typename NextTokenT = Aws::String>
142 GetMetricDataRequest& WithNextToken(NextTokenT&& value) {
143 SetNextToken(std::forward<NextTokenT>(value));
144 return *this;
145 }
147
149
157 inline ScanBy GetScanBy() const { return m_scanBy; }
158 inline bool ScanByHasBeenSet() const { return m_scanByHasBeenSet; }
159 inline void SetScanBy(ScanBy value) {
160 m_scanByHasBeenSet = true;
161 m_scanBy = value;
162 }
164 SetScanBy(value);
165 return *this;
166 }
168
170
174 inline int GetMaxDatapoints() const { return m_maxDatapoints; }
175 inline bool MaxDatapointsHasBeenSet() const { return m_maxDatapointsHasBeenSet; }
176 inline void SetMaxDatapoints(int value) {
177 m_maxDatapointsHasBeenSet = true;
178 m_maxDatapoints = value;
179 }
181 SetMaxDatapoints(value);
182 return *this;
183 }
185
187
192 inline const LabelOptions& GetLabelOptions() const { return m_labelOptions; }
193 inline bool LabelOptionsHasBeenSet() const { return m_labelOptionsHasBeenSet; }
194 template <typename LabelOptionsT = LabelOptions>
195 void SetLabelOptions(LabelOptionsT&& value) {
196 m_labelOptionsHasBeenSet = true;
197 m_labelOptions = std::forward<LabelOptionsT>(value);
198 }
199 template <typename LabelOptionsT = LabelOptions>
200 GetMetricDataRequest& WithLabelOptions(LabelOptionsT&& value) {
201 SetLabelOptions(std::forward<LabelOptionsT>(value));
202 return *this;
203 }
205 private:
206 Aws::Vector<MetricDataQuery> m_metricDataQueries;
207
208 Aws::Utils::DateTime m_startTime{};
209
210 Aws::Utils::DateTime m_endTime{};
211
212 Aws::String m_nextToken;
213
214 ScanBy m_scanBy{ScanBy::NOT_SET};
215
216 int m_maxDatapoints{0};
217
218 LabelOptions m_labelOptions;
219 bool m_metricDataQueriesHasBeenSet = false;
220 bool m_startTimeHasBeenSet = false;
221 bool m_endTimeHasBeenSet = false;
222 bool m_nextTokenHasBeenSet = false;
223 bool m_scanByHasBeenSet = false;
224 bool m_maxDatapointsHasBeenSet = false;
225 bool m_labelOptionsHasBeenSet = false;
226};
227
228} // namespace Model
229} // namespace CloudWatch
230} // namespace Aws
GetMetricDataRequest & WithScanBy(ScanBy value)
GetMetricDataRequest & WithMaxDatapoints(int value)
GetMetricDataRequest & AddMetricDataQueries(MetricDataQueriesT &&value)
GetMetricDataRequest & WithStartTime(StartTimeT &&value)
void SetMetricDataQueries(MetricDataQueriesT &&value)
const Aws::Utils::DateTime & GetStartTime() const
virtual const char * GetServiceRequestName() const override
AWS_CLOUDWATCH_API GetMetricDataRequest()=default
GetMetricDataRequest & WithLabelOptions(LabelOptionsT &&value)
GetMetricDataRequest & WithMetricDataQueries(MetricDataQueriesT &&value)
GetMetricDataRequest & WithNextToken(NextTokenT &&value)
const Aws::Utils::DateTime & GetEndTime() const
AWS_CLOUDWATCH_API Aws::String SerializePayload() const override
GetMetricDataRequest & WithEndTime(EndTimeT &&value)
const Aws::Vector< MetricDataQuery > & GetMetricDataQueries() const
AWS_CLOUDWATCH_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() 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