AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
MetricDataQuery.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/crt/cbor/Cbor.h>
9#include <aws/monitoring/CloudWatch_EXPORTS.h>
10#include <aws/monitoring/model/MetricStat.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Cbor {
17class CborValue;
18} // namespace Cbor
19} // namespace Utils
20namespace CloudWatch {
21namespace Model {
22
53 public:
54 AWS_CLOUDWATCH_API MetricDataQuery() = default;
55 AWS_CLOUDWATCH_API MetricDataQuery(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
56 AWS_CLOUDWATCH_API MetricDataQuery& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
57 AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
58
60
68 inline const Aws::String& GetId() const { return m_id; }
69 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
70 template <typename IdT = Aws::String>
71 void SetId(IdT&& value) {
72 m_idHasBeenSet = true;
73 m_id = std::forward<IdT>(value);
74 }
75 template <typename IdT = Aws::String>
76 MetricDataQuery& WithId(IdT&& value) {
77 SetId(std::forward<IdT>(value));
78 return *this;
79 }
81
83
90 inline const MetricStat& GetMetricStat() const { return m_metricStat; }
91 inline bool MetricStatHasBeenSet() const { return m_metricStatHasBeenSet; }
92 template <typename MetricStatT = MetricStat>
93 void SetMetricStat(MetricStatT&& value) {
94 m_metricStatHasBeenSet = true;
95 m_metricStat = std::forward<MetricStatT>(value);
96 }
97 template <typename MetricStatT = MetricStat>
98 MetricDataQuery& WithMetricStat(MetricStatT&& value) {
99 SetMetricStat(std::forward<MetricStatT>(value));
100 return *this;
101 }
103
105
120 inline const Aws::String& GetExpression() const { return m_expression; }
121 inline bool ExpressionHasBeenSet() const { return m_expressionHasBeenSet; }
122 template <typename ExpressionT = Aws::String>
123 void SetExpression(ExpressionT&& value) {
124 m_expressionHasBeenSet = true;
125 m_expression = std::forward<ExpressionT>(value);
126 }
127 template <typename ExpressionT = Aws::String>
128 MetricDataQuery& WithExpression(ExpressionT&& value) {
129 SetExpression(std::forward<ExpressionT>(value));
130 return *this;
131 }
133
135
145 inline const Aws::String& GetLabel() const { return m_label; }
146 inline bool LabelHasBeenSet() const { return m_labelHasBeenSet; }
147 template <typename LabelT = Aws::String>
148 void SetLabel(LabelT&& value) {
149 m_labelHasBeenSet = true;
150 m_label = std::forward<LabelT>(value);
151 }
152 template <typename LabelT = Aws::String>
153 MetricDataQuery& WithLabel(LabelT&& value) {
154 SetLabel(std::forward<LabelT>(value));
155 return *this;
156 }
158
160
170 inline bool GetReturnData() const { return m_returnData; }
171 inline bool ReturnDataHasBeenSet() const { return m_returnDataHasBeenSet; }
172 inline void SetReturnData(bool value) {
173 m_returnDataHasBeenSet = true;
174 m_returnData = value;
175 }
176 inline MetricDataQuery& WithReturnData(bool value) {
177 SetReturnData(value);
178 return *this;
179 }
181
183
192 inline int64_t GetPeriod() const { return m_period; }
193 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
194 inline void SetPeriod(int64_t value) {
195 m_periodHasBeenSet = true;
196 m_period = value;
197 }
198 inline MetricDataQuery& WithPeriod(int64_t value) {
199 SetPeriod(value);
200 return *this;
201 }
203
205
212 inline const Aws::String& GetAccountId() const { return m_accountId; }
213 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
214 template <typename AccountIdT = Aws::String>
215 void SetAccountId(AccountIdT&& value) {
216 m_accountIdHasBeenSet = true;
217 m_accountId = std::forward<AccountIdT>(value);
218 }
219 template <typename AccountIdT = Aws::String>
220 MetricDataQuery& WithAccountId(AccountIdT&& value) {
221 SetAccountId(std::forward<AccountIdT>(value));
222 return *this;
223 }
225 private:
226 Aws::String m_id;
227
228 MetricStat m_metricStat;
229
230 Aws::String m_expression;
231
232 Aws::String m_label;
233
234 bool m_returnData{false};
235
236 int64_t m_period{0};
237
238 Aws::String m_accountId;
239 bool m_idHasBeenSet = false;
240 bool m_metricStatHasBeenSet = false;
241 bool m_expressionHasBeenSet = false;
242 bool m_labelHasBeenSet = false;
243 bool m_returnDataHasBeenSet = false;
244 bool m_periodHasBeenSet = false;
245 bool m_accountIdHasBeenSet = false;
246};
247
248} // namespace Model
249} // namespace CloudWatch
250} // namespace Aws
AWS_CLOUDWATCH_API MetricDataQuery(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const Aws::String & GetLabel() const
const MetricStat & GetMetricStat() const
MetricDataQuery & WithAccountId(AccountIdT &&value)
const Aws::String & GetExpression() const
void SetExpression(ExpressionT &&value)
const Aws::String & GetAccountId() const
AWS_CLOUDWATCH_API MetricDataQuery()=default
MetricDataQuery & WithMetricStat(MetricStatT &&value)
AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
MetricDataQuery & WithExpression(ExpressionT &&value)
void SetMetricStat(MetricStatT &&value)
AWS_CLOUDWATCH_API MetricDataQuery & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const Aws::String & GetId() const
MetricDataQuery & WithPeriod(int64_t value)
MetricDataQuery & WithReturnData(bool value)
MetricDataQuery & WithId(IdT &&value)
MetricDataQuery & WithLabel(LabelT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String