AWS SDK for C++

AWS SDK for C++ Version 1.11.752

Loading...
Searching...
No Matches
CustomizedMetricSpecification.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/autoscaling/model/MetricDimension.h>
9#include <aws/autoscaling/model/MetricStatistic.h>
10#include <aws/autoscaling/model/TargetTrackingMetricDataQuery.h>
11#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Xml {
20class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace AutoScaling {
24namespace Model {
25
51 public:
52 AWS_AUTOSCALING_API CustomizedMetricSpecification() = default;
53 AWS_AUTOSCALING_API CustomizedMetricSpecification(const Aws::Utils::Xml::XmlNode& xmlNode);
55
56 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
57 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
58
60
67 inline const Aws::String& GetMetricName() const { return m_metricName; }
68 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
69 template <typename MetricNameT = Aws::String>
70 void SetMetricName(MetricNameT&& value) {
71 m_metricNameHasBeenSet = true;
72 m_metricName = std::forward<MetricNameT>(value);
73 }
74 template <typename MetricNameT = Aws::String>
76 SetMetricName(std::forward<MetricNameT>(value));
77 return *this;
78 }
80
82
85 inline const Aws::String& GetNamespace() const { return m_namespace; }
86 inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
87 template <typename NamespaceT = Aws::String>
88 void SetNamespace(NamespaceT&& value) {
89 m_namespaceHasBeenSet = true;
90 m_namespace = std::forward<NamespaceT>(value);
91 }
92 template <typename NamespaceT = Aws::String>
94 SetNamespace(std::forward<NamespaceT>(value));
95 return *this;
96 }
98
100
105 inline const Aws::Vector<MetricDimension>& GetDimensions() const { return m_dimensions; }
106 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
107 template <typename DimensionsT = Aws::Vector<MetricDimension>>
108 void SetDimensions(DimensionsT&& value) {
109 m_dimensionsHasBeenSet = true;
110 m_dimensions = std::forward<DimensionsT>(value);
111 }
112 template <typename DimensionsT = Aws::Vector<MetricDimension>>
114 SetDimensions(std::forward<DimensionsT>(value));
115 return *this;
116 }
117 template <typename DimensionsT = MetricDimension>
119 m_dimensionsHasBeenSet = true;
120 m_dimensions.emplace_back(std::forward<DimensionsT>(value));
121 return *this;
122 }
124
126
129 inline MetricStatistic GetStatistic() const { return m_statistic; }
130 inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; }
131 inline void SetStatistic(MetricStatistic value) {
132 m_statisticHasBeenSet = true;
133 m_statistic = value;
134 }
136 SetStatistic(value);
137 return *this;
138 }
140
142
148 inline const Aws::String& GetUnit() const { return m_unit; }
149 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
150 template <typename UnitT = Aws::String>
151 void SetUnit(UnitT&& value) {
152 m_unitHasBeenSet = true;
153 m_unit = std::forward<UnitT>(value);
154 }
155 template <typename UnitT = Aws::String>
157 SetUnit(std::forward<UnitT>(value));
158 return *this;
159 }
161
163
171 inline int GetPeriod() const { return m_period; }
172 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
173 inline void SetPeriod(int value) {
174 m_periodHasBeenSet = true;
175 m_period = value;
176 }
178 SetPeriod(value);
179 return *this;
180 }
182
184
188 inline const Aws::Vector<TargetTrackingMetricDataQuery>& GetMetrics() const { return m_metrics; }
189 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
190 template <typename MetricsT = Aws::Vector<TargetTrackingMetricDataQuery>>
191 void SetMetrics(MetricsT&& value) {
192 m_metricsHasBeenSet = true;
193 m_metrics = std::forward<MetricsT>(value);
194 }
195 template <typename MetricsT = Aws::Vector<TargetTrackingMetricDataQuery>>
197 SetMetrics(std::forward<MetricsT>(value));
198 return *this;
199 }
200 template <typename MetricsT = TargetTrackingMetricDataQuery>
202 m_metricsHasBeenSet = true;
203 m_metrics.emplace_back(std::forward<MetricsT>(value));
204 return *this;
205 }
207 private:
208 Aws::String m_metricName;
209
210 Aws::String m_namespace;
211
212 Aws::Vector<MetricDimension> m_dimensions;
213
215
216 Aws::String m_unit;
217
218 int m_period{0};
219
221 bool m_metricNameHasBeenSet = false;
222 bool m_namespaceHasBeenSet = false;
223 bool m_dimensionsHasBeenSet = false;
224 bool m_statisticHasBeenSet = false;
225 bool m_unitHasBeenSet = false;
226 bool m_periodHasBeenSet = false;
227 bool m_metricsHasBeenSet = false;
228};
229
230} // namespace Model
231} // namespace AutoScaling
232} // namespace Aws
const Aws::Vector< MetricDimension > & GetDimensions() const
const Aws::Vector< TargetTrackingMetricDataQuery > & GetMetrics() const
CustomizedMetricSpecification & WithUnit(UnitT &&value)
CustomizedMetricSpecification & AddMetrics(MetricsT &&value)
CustomizedMetricSpecification & WithNamespace(NamespaceT &&value)
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_AUTOSCALING_API CustomizedMetricSpecification()=default
AWS_AUTOSCALING_API CustomizedMetricSpecification(const Aws::Utils::Xml::XmlNode &xmlNode)
CustomizedMetricSpecification & AddDimensions(DimensionsT &&value)
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &oStream, const char *location) const
CustomizedMetricSpecification & WithStatistic(MetricStatistic value)
CustomizedMetricSpecification & WithMetricName(MetricNameT &&value)
CustomizedMetricSpecification & WithMetrics(MetricsT &&value)
CustomizedMetricSpecification & WithDimensions(DimensionsT &&value)
AWS_AUTOSCALING_API CustomizedMetricSpecification & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream