AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
CloudWatchAlarmDefinition.h
1
6#pragma once
7#include <aws/elasticmapreduce/EMR_EXPORTS.h>
8#include <aws/elasticmapreduce/model/ComparisonOperator.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/elasticmapreduce/model/Statistic.h>
11#include <aws/elasticmapreduce/model/Unit.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/elasticmapreduce/model/MetricDimension.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace EMR
27{
28namespace Model
29{
30
39 {
40 public:
41 AWS_EMR_API CloudWatchAlarmDefinition() = default;
45
46
48
52 inline ComparisonOperator GetComparisonOperator() const { return m_comparisonOperator; }
53 inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
54 inline void SetComparisonOperator(ComparisonOperator value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; }
57
59
64 inline int GetEvaluationPeriods() const { return m_evaluationPeriods; }
65 inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; }
66 inline void SetEvaluationPeriods(int value) { m_evaluationPeriodsHasBeenSet = true; m_evaluationPeriods = value; }
67 inline CloudWatchAlarmDefinition& WithEvaluationPeriods(int value) { SetEvaluationPeriods(value); return *this;}
69
71
75 inline const Aws::String& GetMetricName() const { return m_metricName; }
76 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
77 template<typename MetricNameT = Aws::String>
78 void SetMetricName(MetricNameT&& value) { m_metricNameHasBeenSet = true; m_metricName = std::forward<MetricNameT>(value); }
79 template<typename MetricNameT = Aws::String>
80 CloudWatchAlarmDefinition& WithMetricName(MetricNameT&& value) { SetMetricName(std::forward<MetricNameT>(value)); return *this;}
82
84
88 inline const Aws::String& GetNamespace() const { return m_namespace; }
89 inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
90 template<typename NamespaceT = Aws::String>
91 void SetNamespace(NamespaceT&& value) { m_namespaceHasBeenSet = true; m_namespace = std::forward<NamespaceT>(value); }
92 template<typename NamespaceT = Aws::String>
93 CloudWatchAlarmDefinition& WithNamespace(NamespaceT&& value) { SetNamespace(std::forward<NamespaceT>(value)); return *this;}
95
97
102 inline int GetPeriod() const { return m_period; }
103 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
104 inline void SetPeriod(int value) { m_periodHasBeenSet = true; m_period = value; }
105 inline CloudWatchAlarmDefinition& WithPeriod(int value) { SetPeriod(value); return *this;}
107
109
113 inline Statistic GetStatistic() const { return m_statistic; }
114 inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; }
115 inline void SetStatistic(Statistic value) { m_statisticHasBeenSet = true; m_statistic = value; }
116 inline CloudWatchAlarmDefinition& WithStatistic(Statistic value) { SetStatistic(value); return *this;}
118
120
123 inline double GetThreshold() const { return m_threshold; }
124 inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
125 inline void SetThreshold(double value) { m_thresholdHasBeenSet = true; m_threshold = value; }
126 inline CloudWatchAlarmDefinition& WithThreshold(double value) { SetThreshold(value); return *this;}
128
130
135 inline Unit GetUnit() const { return m_unit; }
136 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
137 inline void SetUnit(Unit value) { m_unitHasBeenSet = true; m_unit = value; }
138 inline CloudWatchAlarmDefinition& WithUnit(Unit value) { SetUnit(value); return *this;}
140
142
145 inline const Aws::Vector<MetricDimension>& GetDimensions() const { return m_dimensions; }
146 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
147 template<typename DimensionsT = Aws::Vector<MetricDimension>>
148 void SetDimensions(DimensionsT&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::forward<DimensionsT>(value); }
149 template<typename DimensionsT = Aws::Vector<MetricDimension>>
150 CloudWatchAlarmDefinition& WithDimensions(DimensionsT&& value) { SetDimensions(std::forward<DimensionsT>(value)); return *this;}
151 template<typename DimensionsT = MetricDimension>
152 CloudWatchAlarmDefinition& AddDimensions(DimensionsT&& value) { m_dimensionsHasBeenSet = true; m_dimensions.emplace_back(std::forward<DimensionsT>(value)); return *this; }
154 private:
155
157 bool m_comparisonOperatorHasBeenSet = false;
158
159 int m_evaluationPeriods{0};
160 bool m_evaluationPeriodsHasBeenSet = false;
161
162 Aws::String m_metricName;
163 bool m_metricNameHasBeenSet = false;
164
165 Aws::String m_namespace;
166 bool m_namespaceHasBeenSet = false;
167
168 int m_period{0};
169 bool m_periodHasBeenSet = false;
170
171 Statistic m_statistic{Statistic::NOT_SET};
172 bool m_statisticHasBeenSet = false;
173
174 double m_threshold{0.0};
175 bool m_thresholdHasBeenSet = false;
176
177 Unit m_unit{Unit::NOT_SET};
178 bool m_unitHasBeenSet = false;
179
180 Aws::Vector<MetricDimension> m_dimensions;
181 bool m_dimensionsHasBeenSet = false;
182 };
183
184} // namespace Model
185} // namespace EMR
186} // 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