AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
Datapoint.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/crt/cbor/Cbor.h>
11#include <aws/monitoring/CloudWatch_EXPORTS.h>
12#include <aws/monitoring/model/StandardUnit.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Cbor {
19class CborValue;
20} // namespace Cbor
21} // namespace Utils
22namespace CloudWatch {
23namespace Model {
24
31class Datapoint {
32 public:
33 AWS_CLOUDWATCH_API Datapoint() = default;
34 AWS_CLOUDWATCH_API Datapoint(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
35 AWS_CLOUDWATCH_API Datapoint& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
36 AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
37
39
42 inline const Aws::Utils::DateTime& GetTimestamp() const { return m_timestamp; }
43 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
44 template <typename TimestampT = Aws::Utils::DateTime>
45 void SetTimestamp(TimestampT&& value) {
46 m_timestampHasBeenSet = true;
47 m_timestamp = std::forward<TimestampT>(value);
48 }
49 template <typename TimestampT = Aws::Utils::DateTime>
50 Datapoint& WithTimestamp(TimestampT&& value) {
51 SetTimestamp(std::forward<TimestampT>(value));
52 return *this;
53 }
55
57
61 inline double GetSampleCount() const { return m_sampleCount; }
62 inline bool SampleCountHasBeenSet() const { return m_sampleCountHasBeenSet; }
63 inline void SetSampleCount(double value) {
64 m_sampleCountHasBeenSet = true;
65 m_sampleCount = value;
66 }
67 inline Datapoint& WithSampleCount(double value) {
68 SetSampleCount(value);
69 return *this;
70 }
72
74
77 inline double GetAverage() const { return m_average; }
78 inline bool AverageHasBeenSet() const { return m_averageHasBeenSet; }
79 inline void SetAverage(double value) {
80 m_averageHasBeenSet = true;
81 m_average = value;
82 }
83 inline Datapoint& WithAverage(double value) {
84 SetAverage(value);
85 return *this;
86 }
88
90
93 inline double GetSum() const { return m_sum; }
94 inline bool SumHasBeenSet() const { return m_sumHasBeenSet; }
95 inline void SetSum(double value) {
96 m_sumHasBeenSet = true;
97 m_sum = value;
98 }
99 inline Datapoint& WithSum(double value) {
100 SetSum(value);
101 return *this;
102 }
104
106
109 inline double GetMinimum() const { return m_minimum; }
110 inline bool MinimumHasBeenSet() const { return m_minimumHasBeenSet; }
111 inline void SetMinimum(double value) {
112 m_minimumHasBeenSet = true;
113 m_minimum = value;
114 }
115 inline Datapoint& WithMinimum(double value) {
116 SetMinimum(value);
117 return *this;
118 }
120
122
125 inline double GetMaximum() const { return m_maximum; }
126 inline bool MaximumHasBeenSet() const { return m_maximumHasBeenSet; }
127 inline void SetMaximum(double value) {
128 m_maximumHasBeenSet = true;
129 m_maximum = value;
130 }
131 inline Datapoint& WithMaximum(double value) {
132 SetMaximum(value);
133 return *this;
134 }
136
138
141 inline StandardUnit GetUnit() const { return m_unit; }
142 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
143 inline void SetUnit(StandardUnit value) {
144 m_unitHasBeenSet = true;
145 m_unit = value;
146 }
148 SetUnit(value);
149 return *this;
150 }
152
154
157 inline const Aws::Map<Aws::String, double>& GetExtendedStatistics() const { return m_extendedStatistics; }
158 inline bool ExtendedStatisticsHasBeenSet() const { return m_extendedStatisticsHasBeenSet; }
159 template <typename ExtendedStatisticsT = Aws::Map<Aws::String, double>>
160 void SetExtendedStatistics(ExtendedStatisticsT&& value) {
161 m_extendedStatisticsHasBeenSet = true;
162 m_extendedStatistics = std::forward<ExtendedStatisticsT>(value);
163 }
164 template <typename ExtendedStatisticsT = Aws::Map<Aws::String, double>>
165 Datapoint& WithExtendedStatistics(ExtendedStatisticsT&& value) {
166 SetExtendedStatistics(std::forward<ExtendedStatisticsT>(value));
167 return *this;
168 }
169 inline Datapoint& AddExtendedStatistics(Aws::String key, double value) {
170 m_extendedStatisticsHasBeenSet = true;
171 m_extendedStatistics.emplace(key, value);
172 return *this;
173 }
175 private:
176 Aws::Utils::DateTime m_timestamp{};
177
178 double m_sampleCount{0.0};
179
180 double m_average{0.0};
181
182 double m_sum{0.0};
183
184 double m_minimum{0.0};
185
186 double m_maximum{0.0};
187
189
190 Aws::Map<Aws::String, double> m_extendedStatistics;
191 bool m_timestampHasBeenSet = false;
192 bool m_sampleCountHasBeenSet = false;
193 bool m_averageHasBeenSet = false;
194 bool m_sumHasBeenSet = false;
195 bool m_minimumHasBeenSet = false;
196 bool m_maximumHasBeenSet = false;
197 bool m_unitHasBeenSet = false;
198 bool m_extendedStatisticsHasBeenSet = false;
199};
200
201} // namespace Model
202} // namespace CloudWatch
203} // namespace Aws
Datapoint & WithSum(double value)
Definition Datapoint.h:99
void SetSampleCount(double value)
Definition Datapoint.h:63
AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
bool ExtendedStatisticsHasBeenSet() const
Definition Datapoint.h:158
void SetMinimum(double value)
Definition Datapoint.h:111
Datapoint & WithMaximum(double value)
Definition Datapoint.h:131
void SetAverage(double value)
Definition Datapoint.h:79
void SetExtendedStatistics(ExtendedStatisticsT &&value)
Definition Datapoint.h:160
Datapoint & AddExtendedStatistics(Aws::String key, double value)
Definition Datapoint.h:169
StandardUnit GetUnit() const
Definition Datapoint.h:141
void SetUnit(StandardUnit value)
Definition Datapoint.h:143
Datapoint & WithExtendedStatistics(ExtendedStatisticsT &&value)
Definition Datapoint.h:165
void SetTimestamp(TimestampT &&value)
Definition Datapoint.h:45
const Aws::Utils::DateTime & GetTimestamp() const
Definition Datapoint.h:42
Datapoint & WithMinimum(double value)
Definition Datapoint.h:115
Datapoint & WithUnit(StandardUnit value)
Definition Datapoint.h:147
AWS_CLOUDWATCH_API Datapoint(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_CLOUDWATCH_API Datapoint & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
Datapoint & WithTimestamp(TimestampT &&value)
Definition Datapoint.h:50
AWS_CLOUDWATCH_API Datapoint()=default
void SetMaximum(double value)
Definition Datapoint.h:127
Datapoint & WithSampleCount(double value)
Definition Datapoint.h:67
Datapoint & WithAverage(double value)
Definition Datapoint.h:83
const Aws::Map< Aws::String, double > & GetExtendedStatistics() const
Definition Datapoint.h:157
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