AWS SDK for C++

AWS SDK for C++ Version 1.11.767

Loading...
Searching...
No Matches
MetricValue.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/iot/IoT_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace IoT {
21namespace Model {
22
30 public:
31 AWS_IOT_API MetricValue() = default;
35
37
41 inline long long GetCount() const { return m_count; }
42 inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
43 inline void SetCount(long long value) {
44 m_countHasBeenSet = true;
45 m_count = value;
46 }
47 inline MetricValue& WithCount(long long value) {
48 SetCount(value);
49 return *this;
50 }
52
54
58 inline const Aws::Vector<Aws::String>& GetCidrs() const { return m_cidrs; }
59 inline bool CidrsHasBeenSet() const { return m_cidrsHasBeenSet; }
60 template <typename CidrsT = Aws::Vector<Aws::String>>
61 void SetCidrs(CidrsT&& value) {
62 m_cidrsHasBeenSet = true;
63 m_cidrs = std::forward<CidrsT>(value);
64 }
65 template <typename CidrsT = Aws::Vector<Aws::String>>
66 MetricValue& WithCidrs(CidrsT&& value) {
67 SetCidrs(std::forward<CidrsT>(value));
68 return *this;
69 }
70 template <typename CidrsT = Aws::String>
71 MetricValue& AddCidrs(CidrsT&& value) {
72 m_cidrsHasBeenSet = true;
73 m_cidrs.emplace_back(std::forward<CidrsT>(value));
74 return *this;
75 }
77
79
83 inline const Aws::Vector<int>& GetPorts() const { return m_ports; }
84 inline bool PortsHasBeenSet() const { return m_portsHasBeenSet; }
85 template <typename PortsT = Aws::Vector<int>>
86 void SetPorts(PortsT&& value) {
87 m_portsHasBeenSet = true;
88 m_ports = std::forward<PortsT>(value);
89 }
90 template <typename PortsT = Aws::Vector<int>>
91 MetricValue& WithPorts(PortsT&& value) {
92 SetPorts(std::forward<PortsT>(value));
93 return *this;
94 }
95 inline MetricValue& AddPorts(int value) {
96 m_portsHasBeenSet = true;
97 m_ports.push_back(value);
98 return *this;
99 }
101
103
106 inline double GetNumber() const { return m_number; }
107 inline bool NumberHasBeenSet() const { return m_numberHasBeenSet; }
108 inline void SetNumber(double value) {
109 m_numberHasBeenSet = true;
110 m_number = value;
111 }
112 inline MetricValue& WithNumber(double value) {
113 SetNumber(value);
114 return *this;
115 }
117
119
122 inline const Aws::Vector<double>& GetNumbers() const { return m_numbers; }
123 inline bool NumbersHasBeenSet() const { return m_numbersHasBeenSet; }
124 template <typename NumbersT = Aws::Vector<double>>
125 void SetNumbers(NumbersT&& value) {
126 m_numbersHasBeenSet = true;
127 m_numbers = std::forward<NumbersT>(value);
128 }
129 template <typename NumbersT = Aws::Vector<double>>
130 MetricValue& WithNumbers(NumbersT&& value) {
131 SetNumbers(std::forward<NumbersT>(value));
132 return *this;
133 }
134 inline MetricValue& AddNumbers(double value) {
135 m_numbersHasBeenSet = true;
136 m_numbers.push_back(value);
137 return *this;
138 }
140
142
145 inline const Aws::Vector<Aws::String>& GetStrings() const { return m_strings; }
146 inline bool StringsHasBeenSet() const { return m_stringsHasBeenSet; }
147 template <typename StringsT = Aws::Vector<Aws::String>>
148 void SetStrings(StringsT&& value) {
149 m_stringsHasBeenSet = true;
150 m_strings = std::forward<StringsT>(value);
151 }
152 template <typename StringsT = Aws::Vector<Aws::String>>
153 MetricValue& WithStrings(StringsT&& value) {
154 SetStrings(std::forward<StringsT>(value));
155 return *this;
156 }
157 template <typename StringsT = Aws::String>
158 MetricValue& AddStrings(StringsT&& value) {
159 m_stringsHasBeenSet = true;
160 m_strings.emplace_back(std::forward<StringsT>(value));
161 return *this;
162 }
164 private:
165 long long m_count{0};
166
168
169 Aws::Vector<int> m_ports;
170
171 double m_number{0.0};
172
173 Aws::Vector<double> m_numbers;
174
175 Aws::Vector<Aws::String> m_strings;
176 bool m_countHasBeenSet = false;
177 bool m_cidrsHasBeenSet = false;
178 bool m_portsHasBeenSet = false;
179 bool m_numberHasBeenSet = false;
180 bool m_numbersHasBeenSet = false;
181 bool m_stringsHasBeenSet = false;
182};
183
184} // namespace Model
185} // namespace IoT
186} // namespace Aws
MetricValue & WithCount(long long value)
Definition MetricValue.h:47
void SetCount(long long value)
Definition MetricValue.h:43
MetricValue & WithNumber(double value)
void SetStrings(StringsT &&value)
MetricValue & AddPorts(int value)
Definition MetricValue.h:95
void SetCidrs(CidrsT &&value)
Definition MetricValue.h:61
const Aws::Vector< double > & GetNumbers() const
MetricValue & AddNumbers(double value)
const Aws::Vector< int > & GetPorts() const
Definition MetricValue.h:83
MetricValue & WithNumbers(NumbersT &&value)
MetricValue & WithStrings(StringsT &&value)
long long GetCount() const
Definition MetricValue.h:41
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_IOT_API MetricValue & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetPorts(PortsT &&value)
Definition MetricValue.h:86
MetricValue & AddStrings(StringsT &&value)
const Aws::Vector< Aws::String > & GetStrings() const
MetricValue & WithCidrs(CidrsT &&value)
Definition MetricValue.h:66
void SetNumber(double value)
AWS_IOT_API MetricValue(Aws::Utils::Json::JsonView jsonValue)
MetricValue & AddCidrs(CidrsT &&value)
Definition MetricValue.h:71
void SetNumbers(NumbersT &&value)
const Aws::Vector< Aws::String > & GetCidrs() const
Definition MetricValue.h:58
MetricValue & WithPorts(PortsT &&value)
Definition MetricValue.h:91
AWS_IOT_API MetricValue()=default
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue