AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
CompositeAlarm.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/ActionsSuppressedBy.h>
13#include <aws/monitoring/model/StateValue.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
32 public:
33 AWS_CLOUDWATCH_API CompositeAlarm() = default;
34 AWS_CLOUDWATCH_API CompositeAlarm(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
35 AWS_CLOUDWATCH_API CompositeAlarm& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
36 AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
37
39
43 inline bool GetActionsEnabled() const { return m_actionsEnabled; }
44 inline bool ActionsEnabledHasBeenSet() const { return m_actionsEnabledHasBeenSet; }
45 inline void SetActionsEnabled(bool value) {
46 m_actionsEnabledHasBeenSet = true;
47 m_actionsEnabled = value;
48 }
49 inline CompositeAlarm& WithActionsEnabled(bool value) {
50 SetActionsEnabled(value);
51 return *this;
52 }
54
56
60 inline const Aws::Vector<Aws::String>& GetAlarmActions() const { return m_alarmActions; }
61 inline bool AlarmActionsHasBeenSet() const { return m_alarmActionsHasBeenSet; }
62 template <typename AlarmActionsT = Aws::Vector<Aws::String>>
63 void SetAlarmActions(AlarmActionsT&& value) {
64 m_alarmActionsHasBeenSet = true;
65 m_alarmActions = std::forward<AlarmActionsT>(value);
66 }
67 template <typename AlarmActionsT = Aws::Vector<Aws::String>>
68 CompositeAlarm& WithAlarmActions(AlarmActionsT&& value) {
69 SetAlarmActions(std::forward<AlarmActionsT>(value));
70 return *this;
71 }
72 template <typename AlarmActionsT = Aws::String>
73 CompositeAlarm& AddAlarmActions(AlarmActionsT&& value) {
74 m_alarmActionsHasBeenSet = true;
75 m_alarmActions.emplace_back(std::forward<AlarmActionsT>(value));
76 return *this;
77 }
79
81
84 inline const Aws::String& GetAlarmArn() const { return m_alarmArn; }
85 inline bool AlarmArnHasBeenSet() const { return m_alarmArnHasBeenSet; }
86 template <typename AlarmArnT = Aws::String>
87 void SetAlarmArn(AlarmArnT&& value) {
88 m_alarmArnHasBeenSet = true;
89 m_alarmArn = std::forward<AlarmArnT>(value);
90 }
91 template <typename AlarmArnT = Aws::String>
92 CompositeAlarm& WithAlarmArn(AlarmArnT&& value) {
93 SetAlarmArn(std::forward<AlarmArnT>(value));
94 return *this;
95 }
97
99
102 inline const Aws::Utils::DateTime& GetAlarmConfigurationUpdatedTimestamp() const { return m_alarmConfigurationUpdatedTimestamp; }
103 inline bool AlarmConfigurationUpdatedTimestampHasBeenSet() const { return m_alarmConfigurationUpdatedTimestampHasBeenSet; }
104 template <typename AlarmConfigurationUpdatedTimestampT = Aws::Utils::DateTime>
105 void SetAlarmConfigurationUpdatedTimestamp(AlarmConfigurationUpdatedTimestampT&& value) {
106 m_alarmConfigurationUpdatedTimestampHasBeenSet = true;
107 m_alarmConfigurationUpdatedTimestamp = std::forward<AlarmConfigurationUpdatedTimestampT>(value);
108 }
109 template <typename AlarmConfigurationUpdatedTimestampT = Aws::Utils::DateTime>
110 CompositeAlarm& WithAlarmConfigurationUpdatedTimestamp(AlarmConfigurationUpdatedTimestampT&& value) {
111 SetAlarmConfigurationUpdatedTimestamp(std::forward<AlarmConfigurationUpdatedTimestampT>(value));
112 return *this;
113 }
115
117
120 inline const Aws::String& GetAlarmDescription() const { return m_alarmDescription; }
121 inline bool AlarmDescriptionHasBeenSet() const { return m_alarmDescriptionHasBeenSet; }
122 template <typename AlarmDescriptionT = Aws::String>
123 void SetAlarmDescription(AlarmDescriptionT&& value) {
124 m_alarmDescriptionHasBeenSet = true;
125 m_alarmDescription = std::forward<AlarmDescriptionT>(value);
126 }
127 template <typename AlarmDescriptionT = Aws::String>
128 CompositeAlarm& WithAlarmDescription(AlarmDescriptionT&& value) {
129 SetAlarmDescription(std::forward<AlarmDescriptionT>(value));
130 return *this;
131 }
133
135
138 inline const Aws::String& GetAlarmName() const { return m_alarmName; }
139 inline bool AlarmNameHasBeenSet() const { return m_alarmNameHasBeenSet; }
140 template <typename AlarmNameT = Aws::String>
141 void SetAlarmName(AlarmNameT&& value) {
142 m_alarmNameHasBeenSet = true;
143 m_alarmName = std::forward<AlarmNameT>(value);
144 }
145 template <typename AlarmNameT = Aws::String>
146 CompositeAlarm& WithAlarmName(AlarmNameT&& value) {
147 SetAlarmName(std::forward<AlarmNameT>(value));
148 return *this;
149 }
151
153
156 inline const Aws::String& GetAlarmRule() const { return m_alarmRule; }
157 inline bool AlarmRuleHasBeenSet() const { return m_alarmRuleHasBeenSet; }
158 template <typename AlarmRuleT = Aws::String>
159 void SetAlarmRule(AlarmRuleT&& value) {
160 m_alarmRuleHasBeenSet = true;
161 m_alarmRule = std::forward<AlarmRuleT>(value);
162 }
163 template <typename AlarmRuleT = Aws::String>
164 CompositeAlarm& WithAlarmRule(AlarmRuleT&& value) {
165 SetAlarmRule(std::forward<AlarmRuleT>(value));
166 return *this;
167 }
169
171
176 inline const Aws::Vector<Aws::String>& GetInsufficientDataActions() const { return m_insufficientDataActions; }
177 inline bool InsufficientDataActionsHasBeenSet() const { return m_insufficientDataActionsHasBeenSet; }
178 template <typename InsufficientDataActionsT = Aws::Vector<Aws::String>>
179 void SetInsufficientDataActions(InsufficientDataActionsT&& value) {
180 m_insufficientDataActionsHasBeenSet = true;
181 m_insufficientDataActions = std::forward<InsufficientDataActionsT>(value);
182 }
183 template <typename InsufficientDataActionsT = Aws::Vector<Aws::String>>
184 CompositeAlarm& WithInsufficientDataActions(InsufficientDataActionsT&& value) {
185 SetInsufficientDataActions(std::forward<InsufficientDataActionsT>(value));
186 return *this;
187 }
188 template <typename InsufficientDataActionsT = Aws::String>
189 CompositeAlarm& AddInsufficientDataActions(InsufficientDataActionsT&& value) {
190 m_insufficientDataActionsHasBeenSet = true;
191 m_insufficientDataActions.emplace_back(std::forward<InsufficientDataActionsT>(value));
192 return *this;
193 }
195
197
201 inline const Aws::Vector<Aws::String>& GetOKActions() const { return m_oKActions; }
202 inline bool OKActionsHasBeenSet() const { return m_oKActionsHasBeenSet; }
203 template <typename OKActionsT = Aws::Vector<Aws::String>>
204 void SetOKActions(OKActionsT&& value) {
205 m_oKActionsHasBeenSet = true;
206 m_oKActions = std::forward<OKActionsT>(value);
207 }
208 template <typename OKActionsT = Aws::Vector<Aws::String>>
209 CompositeAlarm& WithOKActions(OKActionsT&& value) {
210 SetOKActions(std::forward<OKActionsT>(value));
211 return *this;
212 }
213 template <typename OKActionsT = Aws::String>
214 CompositeAlarm& AddOKActions(OKActionsT&& value) {
215 m_oKActionsHasBeenSet = true;
216 m_oKActions.emplace_back(std::forward<OKActionsT>(value));
217 return *this;
218 }
220
222
225 inline const Aws::String& GetStateReason() const { return m_stateReason; }
226 inline bool StateReasonHasBeenSet() const { return m_stateReasonHasBeenSet; }
227 template <typename StateReasonT = Aws::String>
228 void SetStateReason(StateReasonT&& value) {
229 m_stateReasonHasBeenSet = true;
230 m_stateReason = std::forward<StateReasonT>(value);
231 }
232 template <typename StateReasonT = Aws::String>
233 CompositeAlarm& WithStateReason(StateReasonT&& value) {
234 SetStateReason(std::forward<StateReasonT>(value));
235 return *this;
236 }
238
240
243 inline const Aws::String& GetStateReasonData() const { return m_stateReasonData; }
244 inline bool StateReasonDataHasBeenSet() const { return m_stateReasonDataHasBeenSet; }
245 template <typename StateReasonDataT = Aws::String>
246 void SetStateReasonData(StateReasonDataT&& value) {
247 m_stateReasonDataHasBeenSet = true;
248 m_stateReasonData = std::forward<StateReasonDataT>(value);
249 }
250 template <typename StateReasonDataT = Aws::String>
251 CompositeAlarm& WithStateReasonData(StateReasonDataT&& value) {
252 SetStateReasonData(std::forward<StateReasonDataT>(value));
253 return *this;
254 }
256
258
262 inline const Aws::Utils::DateTime& GetStateUpdatedTimestamp() const { return m_stateUpdatedTimestamp; }
263 inline bool StateUpdatedTimestampHasBeenSet() const { return m_stateUpdatedTimestampHasBeenSet; }
264 template <typename StateUpdatedTimestampT = Aws::Utils::DateTime>
265 void SetStateUpdatedTimestamp(StateUpdatedTimestampT&& value) {
266 m_stateUpdatedTimestampHasBeenSet = true;
267 m_stateUpdatedTimestamp = std::forward<StateUpdatedTimestampT>(value);
268 }
269 template <typename StateUpdatedTimestampT = Aws::Utils::DateTime>
270 CompositeAlarm& WithStateUpdatedTimestamp(StateUpdatedTimestampT&& value) {
271 SetStateUpdatedTimestamp(std::forward<StateUpdatedTimestampT>(value));
272 return *this;
273 }
275
277
280 inline StateValue GetStateValue() const { return m_stateValue; }
281 inline bool StateValueHasBeenSet() const { return m_stateValueHasBeenSet; }
282 inline void SetStateValue(StateValue value) {
283 m_stateValueHasBeenSet = true;
284 m_stateValue = value;
285 }
287 SetStateValue(value);
288 return *this;
289 }
291
293
297 inline const Aws::Utils::DateTime& GetStateTransitionedTimestamp() const { return m_stateTransitionedTimestamp; }
298 inline bool StateTransitionedTimestampHasBeenSet() const { return m_stateTransitionedTimestampHasBeenSet; }
299 template <typename StateTransitionedTimestampT = Aws::Utils::DateTime>
300 void SetStateTransitionedTimestamp(StateTransitionedTimestampT&& value) {
301 m_stateTransitionedTimestampHasBeenSet = true;
302 m_stateTransitionedTimestamp = std::forward<StateTransitionedTimestampT>(value);
303 }
304 template <typename StateTransitionedTimestampT = Aws::Utils::DateTime>
305 CompositeAlarm& WithStateTransitionedTimestamp(StateTransitionedTimestampT&& value) {
306 SetStateTransitionedTimestamp(std::forward<StateTransitionedTimestampT>(value));
307 return *this;
308 }
310
312
325 inline ActionsSuppressedBy GetActionsSuppressedBy() const { return m_actionsSuppressedBy; }
326 inline bool ActionsSuppressedByHasBeenSet() const { return m_actionsSuppressedByHasBeenSet; }
328 m_actionsSuppressedByHasBeenSet = true;
329 m_actionsSuppressedBy = value;
330 }
333 return *this;
334 }
336
338
341 inline const Aws::String& GetActionsSuppressedReason() const { return m_actionsSuppressedReason; }
342 inline bool ActionsSuppressedReasonHasBeenSet() const { return m_actionsSuppressedReasonHasBeenSet; }
343 template <typename ActionsSuppressedReasonT = Aws::String>
344 void SetActionsSuppressedReason(ActionsSuppressedReasonT&& value) {
345 m_actionsSuppressedReasonHasBeenSet = true;
346 m_actionsSuppressedReason = std::forward<ActionsSuppressedReasonT>(value);
347 }
348 template <typename ActionsSuppressedReasonT = Aws::String>
349 CompositeAlarm& WithActionsSuppressedReason(ActionsSuppressedReasonT&& value) {
350 SetActionsSuppressedReason(std::forward<ActionsSuppressedReasonT>(value));
351 return *this;
352 }
354
356
361 inline const Aws::String& GetActionsSuppressor() const { return m_actionsSuppressor; }
362 inline bool ActionsSuppressorHasBeenSet() const { return m_actionsSuppressorHasBeenSet; }
363 template <typename ActionsSuppressorT = Aws::String>
364 void SetActionsSuppressor(ActionsSuppressorT&& value) {
365 m_actionsSuppressorHasBeenSet = true;
366 m_actionsSuppressor = std::forward<ActionsSuppressorT>(value);
367 }
368 template <typename ActionsSuppressorT = Aws::String>
369 CompositeAlarm& WithActionsSuppressor(ActionsSuppressorT&& value) {
370 SetActionsSuppressor(std::forward<ActionsSuppressorT>(value));
371 return *this;
372 }
374
376
383 inline int64_t GetActionsSuppressorWaitPeriod() const { return m_actionsSuppressorWaitPeriod; }
384 inline bool ActionsSuppressorWaitPeriodHasBeenSet() const { return m_actionsSuppressorWaitPeriodHasBeenSet; }
385 inline void SetActionsSuppressorWaitPeriod(int64_t value) {
386 m_actionsSuppressorWaitPeriodHasBeenSet = true;
387 m_actionsSuppressorWaitPeriod = value;
388 }
391 return *this;
392 }
394
396
403 inline int64_t GetActionsSuppressorExtensionPeriod() const { return m_actionsSuppressorExtensionPeriod; }
404 inline bool ActionsSuppressorExtensionPeriodHasBeenSet() const { return m_actionsSuppressorExtensionPeriodHasBeenSet; }
405 inline void SetActionsSuppressorExtensionPeriod(int64_t value) {
406 m_actionsSuppressorExtensionPeriodHasBeenSet = true;
407 m_actionsSuppressorExtensionPeriod = value;
408 }
411 return *this;
412 }
414 private:
415 bool m_actionsEnabled{false};
416
417 Aws::Vector<Aws::String> m_alarmActions;
418
419 Aws::String m_alarmArn;
420
421 Aws::Utils::DateTime m_alarmConfigurationUpdatedTimestamp{};
422
423 Aws::String m_alarmDescription;
424
425 Aws::String m_alarmName;
426
427 Aws::String m_alarmRule;
428
429 Aws::Vector<Aws::String> m_insufficientDataActions;
430
431 Aws::Vector<Aws::String> m_oKActions;
432
433 Aws::String m_stateReason;
434
435 Aws::String m_stateReasonData;
436
437 Aws::Utils::DateTime m_stateUpdatedTimestamp{};
438
439 StateValue m_stateValue{StateValue::NOT_SET};
440
441 Aws::Utils::DateTime m_stateTransitionedTimestamp{};
442
444
445 Aws::String m_actionsSuppressedReason;
446
447 Aws::String m_actionsSuppressor;
448
449 int64_t m_actionsSuppressorWaitPeriod{0};
450
451 int64_t m_actionsSuppressorExtensionPeriod{0};
452 bool m_actionsEnabledHasBeenSet = false;
453 bool m_alarmActionsHasBeenSet = false;
454 bool m_alarmArnHasBeenSet = false;
455 bool m_alarmConfigurationUpdatedTimestampHasBeenSet = false;
456 bool m_alarmDescriptionHasBeenSet = false;
457 bool m_alarmNameHasBeenSet = false;
458 bool m_alarmRuleHasBeenSet = false;
459 bool m_insufficientDataActionsHasBeenSet = false;
460 bool m_oKActionsHasBeenSet = false;
461 bool m_stateReasonHasBeenSet = false;
462 bool m_stateReasonDataHasBeenSet = false;
463 bool m_stateUpdatedTimestampHasBeenSet = false;
464 bool m_stateValueHasBeenSet = false;
465 bool m_stateTransitionedTimestampHasBeenSet = false;
466 bool m_actionsSuppressedByHasBeenSet = false;
467 bool m_actionsSuppressedReasonHasBeenSet = false;
468 bool m_actionsSuppressorHasBeenSet = false;
469 bool m_actionsSuppressorWaitPeriodHasBeenSet = false;
470 bool m_actionsSuppressorExtensionPeriodHasBeenSet = false;
471};
472
473} // namespace Model
474} // namespace CloudWatch
475} // namespace Aws
void SetStateUpdatedTimestamp(StateUpdatedTimestampT &&value)
const Aws::Utils::DateTime & GetAlarmConfigurationUpdatedTimestamp() const
void SetAlarmActions(AlarmActionsT &&value)
void SetInsufficientDataActions(InsufficientDataActionsT &&value)
const Aws::Utils::DateTime & GetStateUpdatedTimestamp() const
AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
const Aws::String & GetActionsSuppressedReason() const
CompositeAlarm & WithActionsSuppressedReason(ActionsSuppressedReasonT &&value)
const Aws::String & GetStateReasonData() const
const Aws::String & GetActionsSuppressor() const
void SetAlarmRule(AlarmRuleT &&value)
const Aws::Vector< Aws::String > & GetAlarmActions() const
CompositeAlarm & WithStateReason(StateReasonT &&value)
void SetStateTransitionedTimestamp(StateTransitionedTimestampT &&value)
CompositeAlarm & WithActionsEnabled(bool value)
CompositeAlarm & WithInsufficientDataActions(InsufficientDataActionsT &&value)
CompositeAlarm & WithActionsSuppressorWaitPeriod(int64_t value)
CompositeAlarm & WithAlarmName(AlarmNameT &&value)
CompositeAlarm & WithAlarmConfigurationUpdatedTimestamp(AlarmConfigurationUpdatedTimestampT &&value)
CompositeAlarm & WithStateReasonData(StateReasonDataT &&value)
const Aws::String & GetAlarmName() const
CompositeAlarm & WithStateUpdatedTimestamp(StateUpdatedTimestampT &&value)
void SetStateReasonData(StateReasonDataT &&value)
CompositeAlarm & AddAlarmActions(AlarmActionsT &&value)
void SetActionsSuppressor(ActionsSuppressorT &&value)
const Aws::Vector< Aws::String > & GetInsufficientDataActions() const
const Aws::String & GetAlarmArn() const
void SetAlarmConfigurationUpdatedTimestamp(AlarmConfigurationUpdatedTimestampT &&value)
CompositeAlarm & AddInsufficientDataActions(InsufficientDataActionsT &&value)
AWS_CLOUDWATCH_API CompositeAlarm & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetOKActions(OKActionsT &&value)
CompositeAlarm & WithStateValue(StateValue value)
const Aws::Vector< Aws::String > & GetOKActions() const
CompositeAlarm & WithAlarmActions(AlarmActionsT &&value)
CompositeAlarm & WithAlarmDescription(AlarmDescriptionT &&value)
const Aws::String & GetAlarmDescription() const
void SetAlarmDescription(AlarmDescriptionT &&value)
const Aws::String & GetStateReason() const
CompositeAlarm & WithActionsSuppressor(ActionsSuppressorT &&value)
CompositeAlarm & WithOKActions(OKActionsT &&value)
void SetActionsSuppressedReason(ActionsSuppressedReasonT &&value)
CompositeAlarm & WithActionsSuppressedBy(ActionsSuppressedBy value)
CompositeAlarm & WithStateTransitionedTimestamp(StateTransitionedTimestampT &&value)
AWS_CLOUDWATCH_API CompositeAlarm()=default
ActionsSuppressedBy GetActionsSuppressedBy() const
const Aws::String & GetAlarmRule() const
AWS_CLOUDWATCH_API CompositeAlarm(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
CompositeAlarm & WithAlarmArn(AlarmArnT &&value)
void SetActionsSuppressedBy(ActionsSuppressedBy value)
CompositeAlarm & WithAlarmRule(AlarmRuleT &&value)
void SetStateReason(StateReasonT &&value)
void SetActionsSuppressorWaitPeriod(int64_t value)
void SetAlarmName(AlarmNameT &&value)
CompositeAlarm & WithActionsSuppressorExtensionPeriod(int64_t value)
const Aws::Utils::DateTime & GetStateTransitionedTimestamp() const
void SetActionsSuppressorExtensionPeriod(int64_t value)
CompositeAlarm & AddOKActions(OKActionsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector