AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
CloudWatchAlarmDefinition.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/elasticmapreduce/EMR_EXPORTS.h>
10#include <aws/elasticmapreduce/model/ComparisonOperator.h>
11#include <aws/elasticmapreduce/model/MetricDimension.h>
12#include <aws/elasticmapreduce/model/Statistic.h>
13#include <aws/elasticmapreduce/model/Unit.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace EMR {
25namespace Model {
26
35 public:
36 AWS_EMR_API CloudWatchAlarmDefinition() = default;
40
42
46 inline ComparisonOperator GetComparisonOperator() const { return m_comparisonOperator; }
47 inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
49 m_comparisonOperatorHasBeenSet = true;
50 m_comparisonOperator = value;
51 }
54 return *this;
55 }
57
59
64 inline int GetEvaluationPeriods() const { return m_evaluationPeriods; }
65 inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; }
66 inline void SetEvaluationPeriods(int value) {
67 m_evaluationPeriodsHasBeenSet = true;
68 m_evaluationPeriods = value;
69 }
72 return *this;
73 }
75
77
81 inline const Aws::String& GetMetricName() const { return m_metricName; }
82 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
83 template <typename MetricNameT = Aws::String>
84 void SetMetricName(MetricNameT&& value) {
85 m_metricNameHasBeenSet = true;
86 m_metricName = std::forward<MetricNameT>(value);
87 }
88 template <typename MetricNameT = Aws::String>
90 SetMetricName(std::forward<MetricNameT>(value));
91 return *this;
92 }
94
96
100 inline const Aws::String& GetNamespace() const { return m_namespace; }
101 inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
102 template <typename NamespaceT = Aws::String>
103 void SetNamespace(NamespaceT&& value) {
104 m_namespaceHasBeenSet = true;
105 m_namespace = std::forward<NamespaceT>(value);
106 }
107 template <typename NamespaceT = Aws::String>
109 SetNamespace(std::forward<NamespaceT>(value));
110 return *this;
111 }
113
115
120 inline int GetPeriod() const { return m_period; }
121 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
122 inline void SetPeriod(int value) {
123 m_periodHasBeenSet = true;
124 m_period = value;
125 }
127 SetPeriod(value);
128 return *this;
129 }
131
133
137 inline Statistic GetStatistic() const { return m_statistic; }
138 inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; }
139 inline void SetStatistic(Statistic value) {
140 m_statisticHasBeenSet = true;
141 m_statistic = value;
142 }
144 SetStatistic(value);
145 return *this;
146 }
148
150
153 inline double GetThreshold() const { return m_threshold; }
154 inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
155 inline void SetThreshold(double value) {
156 m_thresholdHasBeenSet = true;
157 m_threshold = value;
158 }
160 SetThreshold(value);
161 return *this;
162 }
164
166
171 inline Unit GetUnit() const { return m_unit; }
172 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
173 inline void SetUnit(Unit value) {
174 m_unitHasBeenSet = true;
175 m_unit = value;
176 }
178 SetUnit(value);
179 return *this;
180 }
182
184
187 inline const Aws::Vector<MetricDimension>& GetDimensions() const { return m_dimensions; }
188 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
189 template <typename DimensionsT = Aws::Vector<MetricDimension>>
190 void SetDimensions(DimensionsT&& value) {
191 m_dimensionsHasBeenSet = true;
192 m_dimensions = std::forward<DimensionsT>(value);
193 }
194 template <typename DimensionsT = Aws::Vector<MetricDimension>>
196 SetDimensions(std::forward<DimensionsT>(value));
197 return *this;
198 }
199 template <typename DimensionsT = MetricDimension>
201 m_dimensionsHasBeenSet = true;
202 m_dimensions.emplace_back(std::forward<DimensionsT>(value));
203 return *this;
204 }
206 private:
208
209 int m_evaluationPeriods{0};
210
211 Aws::String m_metricName;
212
213 Aws::String m_namespace;
214
215 int m_period{0};
216
217 Statistic m_statistic{Statistic::NOT_SET};
218
219 double m_threshold{0.0};
220
221 Unit m_unit{Unit::NOT_SET};
222
223 Aws::Vector<MetricDimension> m_dimensions;
224 bool m_comparisonOperatorHasBeenSet = false;
225 bool m_evaluationPeriodsHasBeenSet = false;
226 bool m_metricNameHasBeenSet = false;
227 bool m_namespaceHasBeenSet = false;
228 bool m_periodHasBeenSet = false;
229 bool m_statisticHasBeenSet = false;
230 bool m_thresholdHasBeenSet = false;
231 bool m_unitHasBeenSet = false;
232 bool m_dimensionsHasBeenSet = false;
233};
234
235} // namespace Model
236} // namespace EMR
237} // namespace Aws
CloudWatchAlarmDefinition & WithPeriod(int value)
const Aws::Vector< MetricDimension > & GetDimensions() const
CloudWatchAlarmDefinition & WithEvaluationPeriods(int value)
CloudWatchAlarmDefinition & WithMetricName(MetricNameT &&value)
AWS_EMR_API CloudWatchAlarmDefinition & operator=(Aws::Utils::Json::JsonView jsonValue)
CloudWatchAlarmDefinition & WithUnit(Unit value)
AWS_EMR_API CloudWatchAlarmDefinition()=default
AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_EMR_API CloudWatchAlarmDefinition(Aws::Utils::Json::JsonView jsonValue)
CloudWatchAlarmDefinition & WithNamespace(NamespaceT &&value)
CloudWatchAlarmDefinition & WithComparisonOperator(ComparisonOperator value)
CloudWatchAlarmDefinition & WithStatistic(Statistic value)
CloudWatchAlarmDefinition & WithThreshold(double value)
CloudWatchAlarmDefinition & AddDimensions(DimensionsT &&value)
CloudWatchAlarmDefinition & WithDimensions(DimensionsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue