AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CustomizedMetricSpecification.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/autoscaling/model/MetricStatistic.h>
12#include <aws/autoscaling/model/MetricDimension.h>
13#include <aws/autoscaling/model/TargetTrackingMetricDataQuery.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Xml
21{
22 class XmlNode;
23} // namespace Xml
24} // namespace Utils
25namespace AutoScaling
26{
27namespace Model
28{
29
55 {
56 public:
57 AWS_AUTOSCALING_API CustomizedMetricSpecification() = default;
58 AWS_AUTOSCALING_API CustomizedMetricSpecification(const Aws::Utils::Xml::XmlNode& xmlNode);
60
61 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
62 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
63
64
66
73 inline const Aws::String& GetMetricName() const { return m_metricName; }
74 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
75 template<typename MetricNameT = Aws::String>
76 void SetMetricName(MetricNameT&& value) { m_metricNameHasBeenSet = true; m_metricName = std::forward<MetricNameT>(value); }
77 template<typename MetricNameT = Aws::String>
78 CustomizedMetricSpecification& WithMetricName(MetricNameT&& value) { SetMetricName(std::forward<MetricNameT>(value)); return *this;}
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) { m_namespaceHasBeenSet = true; m_namespace = std::forward<NamespaceT>(value); }
89 template<typename NamespaceT = Aws::String>
90 CustomizedMetricSpecification& WithNamespace(NamespaceT&& value) { SetNamespace(std::forward<NamespaceT>(value)); return *this;}
92
94
99 inline const Aws::Vector<MetricDimension>& GetDimensions() const { return m_dimensions; }
100 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
101 template<typename DimensionsT = Aws::Vector<MetricDimension>>
102 void SetDimensions(DimensionsT&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::forward<DimensionsT>(value); }
103 template<typename DimensionsT = Aws::Vector<MetricDimension>>
104 CustomizedMetricSpecification& WithDimensions(DimensionsT&& value) { SetDimensions(std::forward<DimensionsT>(value)); return *this;}
105 template<typename DimensionsT = MetricDimension>
106 CustomizedMetricSpecification& AddDimensions(DimensionsT&& value) { m_dimensionsHasBeenSet = true; m_dimensions.emplace_back(std::forward<DimensionsT>(value)); return *this; }
108
110
113 inline MetricStatistic GetStatistic() const { return m_statistic; }
114 inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; }
115 inline void SetStatistic(MetricStatistic value) { m_statisticHasBeenSet = true; m_statistic = value; }
118
120
126 inline const Aws::String& GetUnit() const { return m_unit; }
127 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
128 template<typename UnitT = Aws::String>
129 void SetUnit(UnitT&& value) { m_unitHasBeenSet = true; m_unit = std::forward<UnitT>(value); }
130 template<typename UnitT = Aws::String>
131 CustomizedMetricSpecification& WithUnit(UnitT&& value) { SetUnit(std::forward<UnitT>(value)); return *this;}
133
135
143 inline int GetPeriod() const { return m_period; }
144 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
145 inline void SetPeriod(int value) { m_periodHasBeenSet = true; m_period = value; }
146 inline CustomizedMetricSpecification& WithPeriod(int value) { SetPeriod(value); return *this;}
148
150
154 inline const Aws::Vector<TargetTrackingMetricDataQuery>& GetMetrics() const { return m_metrics; }
155 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
156 template<typename MetricsT = Aws::Vector<TargetTrackingMetricDataQuery>>
157 void SetMetrics(MetricsT&& value) { m_metricsHasBeenSet = true; m_metrics = std::forward<MetricsT>(value); }
158 template<typename MetricsT = Aws::Vector<TargetTrackingMetricDataQuery>>
159 CustomizedMetricSpecification& WithMetrics(MetricsT&& value) { SetMetrics(std::forward<MetricsT>(value)); return *this;}
160 template<typename MetricsT = TargetTrackingMetricDataQuery>
161 CustomizedMetricSpecification& AddMetrics(MetricsT&& value) { m_metricsHasBeenSet = true; m_metrics.emplace_back(std::forward<MetricsT>(value)); return *this; }
163 private:
164
165 Aws::String m_metricName;
166 bool m_metricNameHasBeenSet = false;
167
168 Aws::String m_namespace;
169 bool m_namespaceHasBeenSet = false;
170
171 Aws::Vector<MetricDimension> m_dimensions;
172 bool m_dimensionsHasBeenSet = false;
173
175 bool m_statisticHasBeenSet = false;
176
177 Aws::String m_unit;
178 bool m_unitHasBeenSet = false;
179
180 int m_period{0};
181 bool m_periodHasBeenSet = false;
182
184 bool m_metricsHasBeenSet = false;
185 };
186
187} // namespace Model
188} // namespace AutoScaling
189} // 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