AWS SDK for C++

AWS SDK for C++ Version 1.11.754

Loading...
Searching...
No Matches
CustomizedMetricSpecification.h
1
6#pragma once
7#include <aws/application-autoscaling/ApplicationAutoScaling_EXPORTS.h>
8#include <aws/application-autoscaling/model/MetricDimension.h>
9#include <aws/application-autoscaling/model/MetricStatistic.h>
10#include <aws/application-autoscaling/model/TargetTrackingMetricDataQuery.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace ApplicationAutoScaling {
24namespace Model {
25
51 public:
52 AWS_APPLICATIONAUTOSCALING_API CustomizedMetricSpecification() = default;
53 AWS_APPLICATIONAUTOSCALING_API CustomizedMetricSpecification(Aws::Utils::Json::JsonView jsonValue);
54 AWS_APPLICATIONAUTOSCALING_API CustomizedMetricSpecification& operator=(Aws::Utils::Json::JsonView jsonValue);
55 AWS_APPLICATIONAUTOSCALING_API Aws::Utils::Json::JsonValue Jsonize() const;
56
58
65 inline const Aws::String& GetMetricName() const { return m_metricName; }
66 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
67 template <typename MetricNameT = Aws::String>
68 void SetMetricName(MetricNameT&& value) {
69 m_metricNameHasBeenSet = true;
70 m_metricName = std::forward<MetricNameT>(value);
71 }
72 template <typename MetricNameT = Aws::String>
74 SetMetricName(std::forward<MetricNameT>(value));
75 return *this;
76 }
78
80
83 inline const Aws::String& GetNamespace() const { return m_namespace; }
84 inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
85 template <typename NamespaceT = Aws::String>
86 void SetNamespace(NamespaceT&& value) {
87 m_namespaceHasBeenSet = true;
88 m_namespace = std::forward<NamespaceT>(value);
89 }
90 template <typename NamespaceT = Aws::String>
92 SetNamespace(std::forward<NamespaceT>(value));
93 return *this;
94 }
96
98
103 inline const Aws::Vector<MetricDimension>& GetDimensions() const { return m_dimensions; }
104 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
105 template <typename DimensionsT = Aws::Vector<MetricDimension>>
106 void SetDimensions(DimensionsT&& value) {
107 m_dimensionsHasBeenSet = true;
108 m_dimensions = std::forward<DimensionsT>(value);
109 }
110 template <typename DimensionsT = Aws::Vector<MetricDimension>>
112 SetDimensions(std::forward<DimensionsT>(value));
113 return *this;
114 }
115 template <typename DimensionsT = MetricDimension>
117 m_dimensionsHasBeenSet = true;
118 m_dimensions.emplace_back(std::forward<DimensionsT>(value));
119 return *this;
120 }
122
124
127 inline MetricStatistic GetStatistic() const { return m_statistic; }
128 inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; }
129 inline void SetStatistic(MetricStatistic value) {
130 m_statisticHasBeenSet = true;
131 m_statistic = value;
132 }
134 SetStatistic(value);
135 return *this;
136 }
138
140
146 inline const Aws::String& GetUnit() const { return m_unit; }
147 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
148 template <typename UnitT = Aws::String>
149 void SetUnit(UnitT&& value) {
150 m_unitHasBeenSet = true;
151 m_unit = std::forward<UnitT>(value);
152 }
153 template <typename UnitT = Aws::String>
155 SetUnit(std::forward<UnitT>(value));
156 return *this;
157 }
159
161
165 inline const Aws::Vector<TargetTrackingMetricDataQuery>& GetMetrics() const { return m_metrics; }
166 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
167 template <typename MetricsT = Aws::Vector<TargetTrackingMetricDataQuery>>
168 void SetMetrics(MetricsT&& value) {
169 m_metricsHasBeenSet = true;
170 m_metrics = std::forward<MetricsT>(value);
171 }
172 template <typename MetricsT = Aws::Vector<TargetTrackingMetricDataQuery>>
174 SetMetrics(std::forward<MetricsT>(value));
175 return *this;
176 }
177 template <typename MetricsT = TargetTrackingMetricDataQuery>
179 m_metricsHasBeenSet = true;
180 m_metrics.emplace_back(std::forward<MetricsT>(value));
181 return *this;
182 }
184 private:
185 Aws::String m_metricName;
186
187 Aws::String m_namespace;
188
189 Aws::Vector<MetricDimension> m_dimensions;
190
192
193 Aws::String m_unit;
194
196 bool m_metricNameHasBeenSet = false;
197 bool m_namespaceHasBeenSet = false;
198 bool m_dimensionsHasBeenSet = false;
199 bool m_statisticHasBeenSet = false;
200 bool m_unitHasBeenSet = false;
201 bool m_metricsHasBeenSet = false;
202};
203
204} // namespace Model
205} // namespace ApplicationAutoScaling
206} // namespace Aws
CustomizedMetricSpecification & WithNamespace(NamespaceT &&value)
CustomizedMetricSpecification & WithDimensions(DimensionsT &&value)
CustomizedMetricSpecification & AddDimensions(DimensionsT &&value)
AWS_APPLICATIONAUTOSCALING_API CustomizedMetricSpecification & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_APPLICATIONAUTOSCALING_API CustomizedMetricSpecification(Aws::Utils::Json::JsonView jsonValue)
CustomizedMetricSpecification & WithStatistic(MetricStatistic value)
AWS_APPLICATIONAUTOSCALING_API CustomizedMetricSpecification()=default
CustomizedMetricSpecification & WithMetricName(MetricNameT &&value)
AWS_APPLICATIONAUTOSCALING_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< TargetTrackingMetricDataQuery > & GetMetrics() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue