AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
MetricValue.h
1
6#pragma once
7#include <aws/iot/IoT_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace IoT
23{
24namespace Model
25{
26
34 {
35 public:
36 AWS_IOT_API MetricValue() = default;
40
41
43
47 inline long long GetCount() const { return m_count; }
48 inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
49 inline void SetCount(long long value) { m_countHasBeenSet = true; m_count = value; }
50 inline MetricValue& WithCount(long long value) { SetCount(value); return *this;}
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) { m_cidrsHasBeenSet = true; m_cidrs = std::forward<CidrsT>(value); }
62 template<typename CidrsT = Aws::Vector<Aws::String>>
63 MetricValue& WithCidrs(CidrsT&& value) { SetCidrs(std::forward<CidrsT>(value)); return *this;}
64 template<typename CidrsT = Aws::String>
65 MetricValue& AddCidrs(CidrsT&& value) { m_cidrsHasBeenSet = true; m_cidrs.emplace_back(std::forward<CidrsT>(value)); return *this; }
67
69
73 inline const Aws::Vector<int>& GetPorts() const { return m_ports; }
74 inline bool PortsHasBeenSet() const { return m_portsHasBeenSet; }
75 template<typename PortsT = Aws::Vector<int>>
76 void SetPorts(PortsT&& value) { m_portsHasBeenSet = true; m_ports = std::forward<PortsT>(value); }
77 template<typename PortsT = Aws::Vector<int>>
78 MetricValue& WithPorts(PortsT&& value) { SetPorts(std::forward<PortsT>(value)); return *this;}
79 inline MetricValue& AddPorts(int value) { m_portsHasBeenSet = true; m_ports.push_back(value); return *this; }
81
83
86 inline double GetNumber() const { return m_number; }
87 inline bool NumberHasBeenSet() const { return m_numberHasBeenSet; }
88 inline void SetNumber(double value) { m_numberHasBeenSet = true; m_number = value; }
89 inline MetricValue& WithNumber(double value) { SetNumber(value); return *this;}
91
93
96 inline const Aws::Vector<double>& GetNumbers() const { return m_numbers; }
97 inline bool NumbersHasBeenSet() const { return m_numbersHasBeenSet; }
98 template<typename NumbersT = Aws::Vector<double>>
99 void SetNumbers(NumbersT&& value) { m_numbersHasBeenSet = true; m_numbers = std::forward<NumbersT>(value); }
100 template<typename NumbersT = Aws::Vector<double>>
101 MetricValue& WithNumbers(NumbersT&& value) { SetNumbers(std::forward<NumbersT>(value)); return *this;}
102 inline MetricValue& AddNumbers(double value) { m_numbersHasBeenSet = true; m_numbers.push_back(value); return *this; }
104
106
109 inline const Aws::Vector<Aws::String>& GetStrings() const { return m_strings; }
110 inline bool StringsHasBeenSet() const { return m_stringsHasBeenSet; }
111 template<typename StringsT = Aws::Vector<Aws::String>>
112 void SetStrings(StringsT&& value) { m_stringsHasBeenSet = true; m_strings = std::forward<StringsT>(value); }
113 template<typename StringsT = Aws::Vector<Aws::String>>
114 MetricValue& WithStrings(StringsT&& value) { SetStrings(std::forward<StringsT>(value)); return *this;}
115 template<typename StringsT = Aws::String>
116 MetricValue& AddStrings(StringsT&& value) { m_stringsHasBeenSet = true; m_strings.emplace_back(std::forward<StringsT>(value)); return *this; }
118 private:
119
120 long long m_count{0};
121 bool m_countHasBeenSet = false;
122
124 bool m_cidrsHasBeenSet = false;
125
126 Aws::Vector<int> m_ports;
127 bool m_portsHasBeenSet = false;
128
129 double m_number{0.0};
130 bool m_numberHasBeenSet = false;
131
132 Aws::Vector<double> m_numbers;
133 bool m_numbersHasBeenSet = false;
134
135 Aws::Vector<Aws::String> m_strings;
136 bool m_stringsHasBeenSet = false;
137 };
138
139} // namespace Model
140} // namespace IoT
141} // namespace Aws
MetricValue & WithCount(long long value)
Definition MetricValue.h:50
void SetCount(long long value)
Definition MetricValue.h:49
MetricValue & WithNumber(double value)
Definition MetricValue.h:89
void SetStrings(StringsT &&value)
MetricValue & AddPorts(int value)
Definition MetricValue.h:79
void SetCidrs(CidrsT &&value)
Definition MetricValue.h:61
const Aws::Vector< double > & GetNumbers() const
Definition MetricValue.h:96
MetricValue & AddNumbers(double value)
const Aws::Vector< int > & GetPorts() const
Definition MetricValue.h:73
MetricValue & WithNumbers(NumbersT &&value)
MetricValue & WithStrings(StringsT &&value)
long long GetCount() const
Definition MetricValue.h:47
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:76
MetricValue & AddStrings(StringsT &&value)
const Aws::Vector< Aws::String > & GetStrings() const
MetricValue & WithCidrs(CidrsT &&value)
Definition MetricValue.h:63
void SetNumber(double value)
Definition MetricValue.h:88
AWS_IOT_API MetricValue(Aws::Utils::Json::JsonView jsonValue)
MetricValue & AddCidrs(CidrsT &&value)
Definition MetricValue.h:65
void SetNumbers(NumbersT &&value)
Definition MetricValue.h:99
const Aws::Vector< Aws::String > & GetCidrs() const
Definition MetricValue.h:58
MetricValue & WithPorts(PortsT &&value)
Definition MetricValue.h:78
AWS_IOT_API MetricValue()=default
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue