AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
MetricTransformation.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/logs/CloudWatchLogs_EXPORTS.h>
10#include <aws/logs/model/StandardUnit.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace CloudWatchLogs {
22namespace Model {
23
31 public:
32 AWS_CLOUDWATCHLOGS_API MetricTransformation() = default;
33 AWS_CLOUDWATCHLOGS_API MetricTransformation(Aws::Utils::Json::JsonView jsonValue);
34 AWS_CLOUDWATCHLOGS_API MetricTransformation& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetMetricName() const { return m_metricName; }
42 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
43 template <typename MetricNameT = Aws::String>
44 void SetMetricName(MetricNameT&& value) {
45 m_metricNameHasBeenSet = true;
46 m_metricName = std::forward<MetricNameT>(value);
47 }
48 template <typename MetricNameT = Aws::String>
49 MetricTransformation& WithMetricName(MetricNameT&& value) {
50 SetMetricName(std::forward<MetricNameT>(value));
51 return *this;
52 }
54
56
61 inline const Aws::String& GetMetricNamespace() const { return m_metricNamespace; }
62 inline bool MetricNamespaceHasBeenSet() const { return m_metricNamespaceHasBeenSet; }
63 template <typename MetricNamespaceT = Aws::String>
64 void SetMetricNamespace(MetricNamespaceT&& value) {
65 m_metricNamespaceHasBeenSet = true;
66 m_metricNamespace = std::forward<MetricNamespaceT>(value);
67 }
68 template <typename MetricNamespaceT = Aws::String>
69 MetricTransformation& WithMetricNamespace(MetricNamespaceT&& value) {
70 SetMetricNamespace(std::forward<MetricNamespaceT>(value));
71 return *this;
72 }
74
76
80 inline const Aws::String& GetMetricValue() const { return m_metricValue; }
81 inline bool MetricValueHasBeenSet() const { return m_metricValueHasBeenSet; }
82 template <typename MetricValueT = Aws::String>
83 void SetMetricValue(MetricValueT&& value) {
84 m_metricValueHasBeenSet = true;
85 m_metricValue = std::forward<MetricValueT>(value);
86 }
87 template <typename MetricValueT = Aws::String>
88 MetricTransformation& WithMetricValue(MetricValueT&& value) {
89 SetMetricValue(std::forward<MetricValueT>(value));
90 return *this;
91 }
93
95
99 inline double GetDefaultValue() const { return m_defaultValue; }
100 inline bool DefaultValueHasBeenSet() const { return m_defaultValueHasBeenSet; }
101 inline void SetDefaultValue(double value) {
102 m_defaultValueHasBeenSet = true;
103 m_defaultValue = value;
104 }
106 SetDefaultValue(value);
107 return *this;
108 }
110
112
128 inline const Aws::Map<Aws::String, Aws::String>& GetDimensions() const { return m_dimensions; }
129 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
130 template <typename DimensionsT = Aws::Map<Aws::String, Aws::String>>
131 void SetDimensions(DimensionsT&& value) {
132 m_dimensionsHasBeenSet = true;
133 m_dimensions = std::forward<DimensionsT>(value);
134 }
135 template <typename DimensionsT = Aws::Map<Aws::String, Aws::String>>
136 MetricTransformation& WithDimensions(DimensionsT&& value) {
137 SetDimensions(std::forward<DimensionsT>(value));
138 return *this;
139 }
140 template <typename DimensionsKeyT = Aws::String, typename DimensionsValueT = Aws::String>
141 MetricTransformation& AddDimensions(DimensionsKeyT&& key, DimensionsValueT&& value) {
142 m_dimensionsHasBeenSet = true;
143 m_dimensions.emplace(std::forward<DimensionsKeyT>(key), std::forward<DimensionsValueT>(value));
144 return *this;
145 }
147
149
153 inline StandardUnit GetUnit() const { return m_unit; }
154 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
155 inline void SetUnit(StandardUnit value) {
156 m_unitHasBeenSet = true;
157 m_unit = value;
158 }
160 SetUnit(value);
161 return *this;
162 }
164 private:
165 Aws::String m_metricName;
166
167 Aws::String m_metricNamespace;
168
169 Aws::String m_metricValue;
170
171 double m_defaultValue{0.0};
172
174
176 bool m_metricNameHasBeenSet = false;
177 bool m_metricNamespaceHasBeenSet = false;
178 bool m_metricValueHasBeenSet = false;
179 bool m_defaultValueHasBeenSet = false;
180 bool m_dimensionsHasBeenSet = false;
181 bool m_unitHasBeenSet = false;
182};
183
184} // namespace Model
185} // namespace CloudWatchLogs
186} // namespace Aws
AWS_CLOUDWATCHLOGS_API MetricTransformation(Aws::Utils::Json::JsonView jsonValue)
MetricTransformation & WithMetricValue(MetricValueT &&value)
AWS_CLOUDWATCHLOGS_API MetricTransformation()=default
MetricTransformation & WithMetricNamespace(MetricNamespaceT &&value)
MetricTransformation & WithDimensions(DimensionsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetDimensions() const
AWS_CLOUDWATCHLOGS_API MetricTransformation & operator=(Aws::Utils::Json::JsonView jsonValue)
MetricTransformation & WithMetricName(MetricNameT &&value)
AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const
MetricTransformation & AddDimensions(DimensionsKeyT &&key, DimensionsValueT &&value)
MetricTransformation & WithDefaultValue(double value)
MetricTransformation & WithUnit(StandardUnit value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue