AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
SummarizedCounter.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/shield/Shield_EXPORTS.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace Shield {
20namespace Model {
21
28 public:
29 AWS_SHIELD_API SummarizedCounter() = default;
32 AWS_SHIELD_API Aws::Utils::Json::JsonValue Jsonize() const;
33
35
38 inline const Aws::String& GetName() const { return m_name; }
39 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
40 template <typename NameT = Aws::String>
41 void SetName(NameT&& value) {
42 m_nameHasBeenSet = true;
43 m_name = std::forward<NameT>(value);
44 }
45 template <typename NameT = Aws::String>
46 SummarizedCounter& WithName(NameT&& value) {
47 SetName(std::forward<NameT>(value));
48 return *this;
49 }
51
53
56 inline double GetMax() const { return m_max; }
57 inline bool MaxHasBeenSet() const { return m_maxHasBeenSet; }
58 inline void SetMax(double value) {
59 m_maxHasBeenSet = true;
60 m_max = value;
61 }
62 inline SummarizedCounter& WithMax(double value) {
63 SetMax(value);
64 return *this;
65 }
67
69
72 inline double GetAverage() const { return m_average; }
73 inline bool AverageHasBeenSet() const { return m_averageHasBeenSet; }
74 inline void SetAverage(double value) {
75 m_averageHasBeenSet = true;
76 m_average = value;
77 }
78 inline SummarizedCounter& WithAverage(double value) {
79 SetAverage(value);
80 return *this;
81 }
83
85
88 inline double GetSum() const { return m_sum; }
89 inline bool SumHasBeenSet() const { return m_sumHasBeenSet; }
90 inline void SetSum(double value) {
91 m_sumHasBeenSet = true;
92 m_sum = value;
93 }
94 inline SummarizedCounter& WithSum(double value) {
95 SetSum(value);
96 return *this;
97 }
99
101
104 inline int GetN() const { return m_n; }
105 inline bool NHasBeenSet() const { return m_nHasBeenSet; }
106 inline void SetN(int value) {
107 m_nHasBeenSet = true;
108 m_n = value;
109 }
110 inline SummarizedCounter& WithN(int value) {
111 SetN(value);
112 return *this;
113 }
115
117
120 inline const Aws::String& GetUnit() const { return m_unit; }
121 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
122 template <typename UnitT = Aws::String>
123 void SetUnit(UnitT&& value) {
124 m_unitHasBeenSet = true;
125 m_unit = std::forward<UnitT>(value);
126 }
127 template <typename UnitT = Aws::String>
128 SummarizedCounter& WithUnit(UnitT&& value) {
129 SetUnit(std::forward<UnitT>(value));
130 return *this;
131 }
133 private:
134 Aws::String m_name;
135
136 double m_max{0.0};
137
138 double m_average{0.0};
139
140 double m_sum{0.0};
141
142 int m_n{0};
143
144 Aws::String m_unit;
145 bool m_nameHasBeenSet = false;
146 bool m_maxHasBeenSet = false;
147 bool m_averageHasBeenSet = false;
148 bool m_sumHasBeenSet = false;
149 bool m_nHasBeenSet = false;
150 bool m_unitHasBeenSet = false;
151};
152
153} // namespace Model
154} // namespace Shield
155} // namespace Aws
const Aws::String & GetName() const
SummarizedCounter & WithUnit(UnitT &&value)
const Aws::String & GetUnit() const
AWS_SHIELD_API SummarizedCounter & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_SHIELD_API Aws::Utils::Json::JsonValue Jsonize() const
SummarizedCounter & WithSum(double value)
AWS_SHIELD_API SummarizedCounter(Aws::Utils::Json::JsonView jsonValue)
SummarizedCounter & WithN(int value)
AWS_SHIELD_API SummarizedCounter()=default
SummarizedCounter & WithMax(double value)
SummarizedCounter & WithName(NameT &&value)
SummarizedCounter & WithAverage(double value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue