AWS SDK for C++

AWS SDK for C++ Version 1.11.899

Loading...
Searching...
No Matches
AlertCondition.h
1
6#pragma once
7#include <aws/cloudwatchomni/CloudWatchOmni_EXPORTS.h>
8#include <aws/cloudwatchomni/model/Comparator.h>
9#include <aws/cloudwatchomni/model/ThresholdMode.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/crt/cbor/Cbor.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Cbor {
18class CborValue;
19} // namespace Cbor
20} // namespace Utils
21namespace CloudWatchOmni {
22namespace Model {
23
37 public:
38 AWS_CLOUDWATCHOMNI_API AlertCondition() = default;
39 AWS_CLOUDWATCHOMNI_API AlertCondition(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
40 AWS_CLOUDWATCHOMNI_API AlertCondition& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
41 AWS_CLOUDWATCHOMNI_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
42
44
47 inline ThresholdMode GetThresholdMode() const { return m_thresholdMode; }
48 inline bool ThresholdModeHasBeenSet() const { return m_thresholdModeHasBeenSet; }
49 inline void SetThresholdMode(ThresholdMode value) {
50 m_thresholdModeHasBeenSet = true;
51 m_thresholdMode = value;
52 }
54 SetThresholdMode(value);
55 return *this;
56 }
58
60
63 inline const Aws::String& GetThresholdField() const { return m_thresholdField; }
64 inline bool ThresholdFieldHasBeenSet() const { return m_thresholdFieldHasBeenSet; }
65 template <typename ThresholdFieldT = Aws::String>
66 void SetThresholdField(ThresholdFieldT&& value) {
67 m_thresholdFieldHasBeenSet = true;
68 m_thresholdField = std::forward<ThresholdFieldT>(value);
69 }
70 template <typename ThresholdFieldT = Aws::String>
71 AlertCondition& WithThresholdField(ThresholdFieldT&& value) {
72 SetThresholdField(std::forward<ThresholdFieldT>(value));
73 return *this;
74 }
76
78
81 inline Comparator GetComparator() const { return m_comparator; }
82 inline bool ComparatorHasBeenSet() const { return m_comparatorHasBeenSet; }
83 inline void SetComparator(Comparator value) {
84 m_comparatorHasBeenSet = true;
85 m_comparator = value;
86 }
88 SetComparator(value);
89 return *this;
90 }
92
94
97 inline double GetWarningThreshold() const { return m_warningThreshold; }
98 inline bool WarningThresholdHasBeenSet() const { return m_warningThresholdHasBeenSet; }
99 inline void SetWarningThreshold(double value) {
100 m_warningThresholdHasBeenSet = true;
101 m_warningThreshold = value;
102 }
103 inline AlertCondition& WithWarningThreshold(double value) {
104 SetWarningThreshold(value);
105 return *this;
106 }
108
110
113 inline double GetCriticalThreshold() const { return m_criticalThreshold; }
114 inline bool CriticalThresholdHasBeenSet() const { return m_criticalThresholdHasBeenSet; }
115 inline void SetCriticalThreshold(double value) {
116 m_criticalThresholdHasBeenSet = true;
117 m_criticalThreshold = value;
118 }
119 inline AlertCondition& WithCriticalThreshold(double value) {
121 return *this;
122 }
124 private:
125 ThresholdMode m_thresholdMode{ThresholdMode::NOT_SET};
126
127 Aws::String m_thresholdField;
128
129 Comparator m_comparator{Comparator::NOT_SET};
130
131 double m_warningThreshold{0.0};
132
133 double m_criticalThreshold{0.0};
134 bool m_thresholdModeHasBeenSet = false;
135 bool m_thresholdFieldHasBeenSet = false;
136 bool m_comparatorHasBeenSet = false;
137 bool m_warningThresholdHasBeenSet = false;
138 bool m_criticalThresholdHasBeenSet = false;
139};
140
141} // namespace Model
142} // namespace CloudWatchOmni
143} // namespace Aws
AlertCondition & WithThresholdMode(ThresholdMode value)
AWS_CLOUDWATCHOMNI_API AlertCondition & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const Aws::String & GetThresholdField() const
AlertCondition & WithComparator(Comparator value)
AlertCondition & WithWarningThreshold(double value)
AWS_CLOUDWATCHOMNI_API AlertCondition()=default
void SetThresholdMode(ThresholdMode value)
AlertCondition & WithThresholdField(ThresholdFieldT &&value)
void SetThresholdField(ThresholdFieldT &&value)
AWS_CLOUDWATCHOMNI_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
AWS_CLOUDWATCHOMNI_API AlertCondition(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AlertCondition & WithCriticalThreshold(double value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String