AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
GetMetricDataRequest.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/AWSVector.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/monitoring/model/ScanBy.h>
13#include <aws/monitoring/model/LabelOptions.h>
14#include <aws/monitoring/model/MetricDataQuery.h>
15#include <utility>
16
17namespace Aws
18{
19namespace CloudWatch
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_CLOUDWATCH_API GetMetricDataRequest() = 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 "GetMetricData"; }
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
51 inline const Aws::Vector<MetricDataQuery>& GetMetricDataQueries() const { return m_metricDataQueries; }
52 inline bool MetricDataQueriesHasBeenSet() const { return m_metricDataQueriesHasBeenSet; }
53 template<typename MetricDataQueriesT = Aws::Vector<MetricDataQuery>>
54 void SetMetricDataQueries(MetricDataQueriesT&& value) { m_metricDataQueriesHasBeenSet = true; m_metricDataQueries = std::forward<MetricDataQueriesT>(value); }
55 template<typename MetricDataQueriesT = Aws::Vector<MetricDataQuery>>
56 GetMetricDataRequest& WithMetricDataQueries(MetricDataQueriesT&& value) { SetMetricDataQueries(std::forward<MetricDataQueriesT>(value)); return *this;}
57 template<typename MetricDataQueriesT = MetricDataQuery>
58 GetMetricDataRequest& AddMetricDataQueries(MetricDataQueriesT&& value) { m_metricDataQueriesHasBeenSet = true; m_metricDataQueries.emplace_back(std::forward<MetricDataQueriesT>(value)); return *this; }
60
62
86 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
87 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
88 template<typename StartTimeT = Aws::Utils::DateTime>
89 void SetStartTime(StartTimeT&& value) { m_startTimeHasBeenSet = true; m_startTime = std::forward<StartTimeT>(value); }
90 template<typename StartTimeT = Aws::Utils::DateTime>
91 GetMetricDataRequest& WithStartTime(StartTimeT&& value) { SetStartTime(std::forward<StartTimeT>(value)); return *this;}
93
95
105 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
106 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
107 template<typename EndTimeT = Aws::Utils::DateTime>
108 void SetEndTime(EndTimeT&& value) { m_endTimeHasBeenSet = true; m_endTime = std::forward<EndTimeT>(value); }
109 template<typename EndTimeT = Aws::Utils::DateTime>
110 GetMetricDataRequest& WithEndTime(EndTimeT&& value) { SetEndTime(std::forward<EndTimeT>(value)); return *this;}
112
114
118 inline const Aws::String& GetNextToken() const { return m_nextToken; }
119 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
120 template<typename NextTokenT = Aws::String>
121 void SetNextToken(NextTokenT&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::forward<NextTokenT>(value); }
122 template<typename NextTokenT = Aws::String>
123 GetMetricDataRequest& WithNextToken(NextTokenT&& value) { SetNextToken(std::forward<NextTokenT>(value)); return *this;}
125
127
135 inline ScanBy GetScanBy() const { return m_scanBy; }
136 inline bool ScanByHasBeenSet() const { return m_scanByHasBeenSet; }
137 inline void SetScanBy(ScanBy value) { m_scanByHasBeenSet = true; m_scanBy = value; }
138 inline GetMetricDataRequest& WithScanBy(ScanBy value) { SetScanBy(value); return *this;}
140
142
146 inline int GetMaxDatapoints() const { return m_maxDatapoints; }
147 inline bool MaxDatapointsHasBeenSet() const { return m_maxDatapointsHasBeenSet; }
148 inline void SetMaxDatapoints(int value) { m_maxDatapointsHasBeenSet = true; m_maxDatapoints = value; }
149 inline GetMetricDataRequest& WithMaxDatapoints(int value) { SetMaxDatapoints(value); return *this;}
151
153
158 inline const LabelOptions& GetLabelOptions() const { return m_labelOptions; }
159 inline bool LabelOptionsHasBeenSet() const { return m_labelOptionsHasBeenSet; }
160 template<typename LabelOptionsT = LabelOptions>
161 void SetLabelOptions(LabelOptionsT&& value) { m_labelOptionsHasBeenSet = true; m_labelOptions = std::forward<LabelOptionsT>(value); }
162 template<typename LabelOptionsT = LabelOptions>
163 GetMetricDataRequest& WithLabelOptions(LabelOptionsT&& value) { SetLabelOptions(std::forward<LabelOptionsT>(value)); return *this;}
165 private:
166
167 Aws::Vector<MetricDataQuery> m_metricDataQueries;
168 bool m_metricDataQueriesHasBeenSet = false;
169
170 Aws::Utils::DateTime m_startTime{};
171 bool m_startTimeHasBeenSet = false;
172
173 Aws::Utils::DateTime m_endTime{};
174 bool m_endTimeHasBeenSet = false;
175
176 Aws::String m_nextToken;
177 bool m_nextTokenHasBeenSet = false;
178
179 ScanBy m_scanBy{ScanBy::NOT_SET};
180 bool m_scanByHasBeenSet = false;
181
182 int m_maxDatapoints{0};
183 bool m_maxDatapointsHasBeenSet = false;
184
185 LabelOptions m_labelOptions;
186 bool m_labelOptionsHasBeenSet = false;
187 };
188
189} // namespace Model
190} // namespace CloudWatch
191} // 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 void DumpBodyToUrl(Aws::Http::URI &uri) const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector