AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
MetricDataResult.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/crt/cbor/Cbor.h>
11#include <aws/monitoring/CloudWatch_EXPORTS.h>
12#include <aws/monitoring/model/MessageData.h>
13#include <aws/monitoring/model/StatusCode.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Cbor {
20class CborValue;
21} // namespace Cbor
22} // namespace Utils
23namespace CloudWatch {
24namespace Model {
25
35 public:
36 AWS_CLOUDWATCH_API MetricDataResult() = default;
37 AWS_CLOUDWATCH_API MetricDataResult(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
38 AWS_CLOUDWATCH_API MetricDataResult& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
39 AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
40
42
45 inline const Aws::String& GetId() const { return m_id; }
46 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
47 template <typename IdT = Aws::String>
48 void SetId(IdT&& value) {
49 m_idHasBeenSet = true;
50 m_id = std::forward<IdT>(value);
51 }
52 template <typename IdT = Aws::String>
53 MetricDataResult& WithId(IdT&& value) {
54 SetId(std::forward<IdT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetLabel() const { return m_label; }
64 inline bool LabelHasBeenSet() const { return m_labelHasBeenSet; }
65 template <typename LabelT = Aws::String>
66 void SetLabel(LabelT&& value) {
67 m_labelHasBeenSet = true;
68 m_label = std::forward<LabelT>(value);
69 }
70 template <typename LabelT = Aws::String>
71 MetricDataResult& WithLabel(LabelT&& value) {
72 SetLabel(std::forward<LabelT>(value));
73 return *this;
74 }
76
78
83 inline const Aws::Vector<Aws::Utils::DateTime>& GetTimestamps() const { return m_timestamps; }
84 inline bool TimestampsHasBeenSet() const { return m_timestampsHasBeenSet; }
85 template <typename TimestampsT = Aws::Vector<Aws::Utils::DateTime>>
86 void SetTimestamps(TimestampsT&& value) {
87 m_timestampsHasBeenSet = true;
88 m_timestamps = std::forward<TimestampsT>(value);
89 }
90 template <typename TimestampsT = Aws::Vector<Aws::Utils::DateTime>>
91 MetricDataResult& WithTimestamps(TimestampsT&& value) {
92 SetTimestamps(std::forward<TimestampsT>(value));
93 return *this;
94 }
95 template <typename TimestampsT = Aws::Utils::DateTime>
96 MetricDataResult& AddTimestamps(TimestampsT&& value) {
97 m_timestampsHasBeenSet = true;
98 m_timestamps.emplace_back(std::forward<TimestampsT>(value));
99 return *this;
100 }
102
104
109 inline const Aws::Vector<double>& GetValues() const { return m_values; }
110 inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
111 template <typename ValuesT = Aws::Vector<double>>
112 void SetValues(ValuesT&& value) {
113 m_valuesHasBeenSet = true;
114 m_values = std::forward<ValuesT>(value);
115 }
116 template <typename ValuesT = Aws::Vector<double>>
117 MetricDataResult& WithValues(ValuesT&& value) {
118 SetValues(std::forward<ValuesT>(value));
119 return *this;
120 }
121 inline MetricDataResult& AddValues(double value) {
122 m_valuesHasBeenSet = true;
123 m_values.push_back(value);
124 return *this;
125 }
127
129
138 inline StatusCode GetStatusCode() const { return m_statusCode; }
139 inline bool StatusCodeHasBeenSet() const { return m_statusCodeHasBeenSet; }
140 inline void SetStatusCode(StatusCode value) {
141 m_statusCodeHasBeenSet = true;
142 m_statusCode = value;
143 }
145 SetStatusCode(value);
146 return *this;
147 }
149
151
154 inline const Aws::Vector<MessageData>& GetMessages() const { return m_messages; }
155 inline bool MessagesHasBeenSet() const { return m_messagesHasBeenSet; }
156 template <typename MessagesT = Aws::Vector<MessageData>>
157 void SetMessages(MessagesT&& value) {
158 m_messagesHasBeenSet = true;
159 m_messages = std::forward<MessagesT>(value);
160 }
161 template <typename MessagesT = Aws::Vector<MessageData>>
162 MetricDataResult& WithMessages(MessagesT&& value) {
163 SetMessages(std::forward<MessagesT>(value));
164 return *this;
165 }
166 template <typename MessagesT = MessageData>
167 MetricDataResult& AddMessages(MessagesT&& value) {
168 m_messagesHasBeenSet = true;
169 m_messages.emplace_back(std::forward<MessagesT>(value));
170 return *this;
171 }
173 private:
174 Aws::String m_id;
175
176 Aws::String m_label;
177
179
180 Aws::Vector<double> m_values;
181
182 StatusCode m_statusCode{StatusCode::NOT_SET};
183
184 Aws::Vector<MessageData> m_messages;
185 bool m_idHasBeenSet = false;
186 bool m_labelHasBeenSet = false;
187 bool m_timestampsHasBeenSet = false;
188 bool m_valuesHasBeenSet = false;
189 bool m_statusCodeHasBeenSet = false;
190 bool m_messagesHasBeenSet = false;
191};
192
193} // namespace Model
194} // namespace CloudWatch
195} // namespace Aws
MetricDataResult & AddValues(double value)
const Aws::Vector< double > & GetValues() const
AWS_CLOUDWATCH_API MetricDataResult()=default
MetricDataResult & WithMessages(MessagesT &&value)
MetricDataResult & WithValues(ValuesT &&value)
MetricDataResult & WithStatusCode(StatusCode value)
MetricDataResult & WithTimestamps(TimestampsT &&value)
MetricDataResult & WithId(IdT &&value)
const Aws::Vector< MessageData > & GetMessages() const
AWS_CLOUDWATCH_API MetricDataResult(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
MetricDataResult & WithLabel(LabelT &&value)
MetricDataResult & AddMessages(MessagesT &&value)
MetricDataResult & AddTimestamps(TimestampsT &&value)
const Aws::Vector< Aws::Utils::DateTime > & GetTimestamps() const
AWS_CLOUDWATCH_API MetricDataResult & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector