AWS SDK for C++

AWS SDK for C++ Version 1.11.900

Loading...
Searching...
No Matches
MetricMetadata.h
1
6#pragma once
7#include <aws/cloudwatchomni/CloudWatchOmni_EXPORTS.h>
8#include <aws/cloudwatchomni/model/MetricSemantics.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/crt/cbor/Cbor.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Cbor {
18class CborValue;
19} // namespace Cbor
20} // namespace Utils
21namespace CloudWatchOmni {
22namespace Model {
23
31 public:
32 AWS_CLOUDWATCHOMNI_API MetricMetadata() = default;
33 AWS_CLOUDWATCHOMNI_API MetricMetadata(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
34 AWS_CLOUDWATCHOMNI_API MetricMetadata& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
35 AWS_CLOUDWATCHOMNI_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
36
38
41 inline const Aws::String& GetName() const { return m_name; }
42 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
43 template <typename NameT = Aws::String>
44 void SetName(NameT&& value) {
45 m_nameHasBeenSet = true;
46 m_name = std::forward<NameT>(value);
47 }
48 template <typename NameT = Aws::String>
49 MetricMetadata& WithName(NameT&& value) {
50 SetName(std::forward<NameT>(value));
51 return *this;
52 }
54
56
60 inline const Aws::String& GetPreferredStat() const { return m_preferredStat; }
61 inline bool PreferredStatHasBeenSet() const { return m_preferredStatHasBeenSet; }
62 template <typename PreferredStatT = Aws::String>
63 void SetPreferredStat(PreferredStatT&& value) {
64 m_preferredStatHasBeenSet = true;
65 m_preferredStat = std::forward<PreferredStatT>(value);
66 }
67 template <typename PreferredStatT = Aws::String>
68 MetricMetadata& WithPreferredStat(PreferredStatT&& value) {
69 SetPreferredStat(std::forward<PreferredStatT>(value));
70 return *this;
71 }
73
75
80 inline const Aws::String& GetMetricType() const { return m_metricType; }
81 inline bool MetricTypeHasBeenSet() const { return m_metricTypeHasBeenSet; }
82 template <typename MetricTypeT = Aws::String>
83 void SetMetricType(MetricTypeT&& value) {
84 m_metricTypeHasBeenSet = true;
85 m_metricType = std::forward<MetricTypeT>(value);
86 }
87 template <typename MetricTypeT = Aws::String>
88 MetricMetadata& WithMetricType(MetricTypeT&& value) {
89 SetMetricType(std::forward<MetricTypeT>(value));
90 return *this;
91 }
93
95
105 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
106 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
107 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
108 void SetAttributes(AttributesT&& value) {
109 m_attributesHasBeenSet = true;
110 m_attributes = std::forward<AttributesT>(value);
111 }
112 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
113 MetricMetadata& WithAttributes(AttributesT&& value) {
114 SetAttributes(std::forward<AttributesT>(value));
115 return *this;
116 }
117 template <typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
118 MetricMetadata& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
119 m_attributesHasBeenSet = true;
120 m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value));
121 return *this;
122 }
124
126
129 inline const MetricSemantics& GetSemantics() const { return m_semantics; }
130 inline bool SemanticsHasBeenSet() const { return m_semanticsHasBeenSet; }
131 template <typename SemanticsT = MetricSemantics>
132 void SetSemantics(SemanticsT&& value) {
133 m_semanticsHasBeenSet = true;
134 m_semantics = std::forward<SemanticsT>(value);
135 }
136 template <typename SemanticsT = MetricSemantics>
137 MetricMetadata& WithSemantics(SemanticsT&& value) {
138 SetSemantics(std::forward<SemanticsT>(value));
139 return *this;
140 }
142 private:
143 Aws::String m_name;
144
145 Aws::String m_preferredStat;
146
147 Aws::String m_metricType;
148
150
151 MetricSemantics m_semantics;
152 bool m_nameHasBeenSet = false;
153 bool m_preferredStatHasBeenSet = false;
154 bool m_metricTypeHasBeenSet = false;
155 bool m_attributesHasBeenSet = false;
156 bool m_semanticsHasBeenSet = false;
157};
158
159} // namespace Model
160} // namespace CloudWatchOmni
161} // namespace Aws
void SetPreferredStat(PreferredStatT &&value)
const MetricSemantics & GetSemantics() const
MetricMetadata & WithSemantics(SemanticsT &&value)
AWS_CLOUDWATCHOMNI_API MetricMetadata()=default
AWS_CLOUDWATCHOMNI_API MetricMetadata(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
MetricMetadata & WithName(NameT &&value)
MetricMetadata & AddAttributes(AttributesKeyT &&key, AttributesValueT &&value)
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
AWS_CLOUDWATCHOMNI_API MetricMetadata & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const Aws::String & GetMetricType() const
MetricMetadata & WithMetricType(MetricTypeT &&value)
const Aws::String & GetPreferredStat() const
MetricMetadata & WithPreferredStat(PreferredStatT &&value)
AWS_CLOUDWATCHOMNI_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
MetricMetadata & WithAttributes(AttributesT &&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