AWS SDK for C++

AWS SDK for C++ Version 1.11.718

Loading...
Searching...
No Matches
MetricStat.h
1
6#pragma once
7#include <aws/application-signals/ApplicationSignals_EXPORTS.h>
8#include <aws/application-signals/model/Metric.h>
9#include <aws/application-signals/model/StandardUnit.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace ApplicationSignals {
22namespace Model {
23
31 public:
32 AWS_APPLICATIONSIGNALS_API MetricStat() = default;
33 AWS_APPLICATIONSIGNALS_API MetricStat(Aws::Utils::Json::JsonView jsonValue);
34 AWS_APPLICATIONSIGNALS_API MetricStat& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_APPLICATIONSIGNALS_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
42 inline const Metric& GetMetric() const { return m_metric; }
43 inline bool MetricHasBeenSet() const { return m_metricHasBeenSet; }
44 template <typename MetricT = Metric>
45 void SetMetric(MetricT&& value) {
46 m_metricHasBeenSet = true;
47 m_metric = std::forward<MetricT>(value);
48 }
49 template <typename MetricT = Metric>
50 MetricStat& WithMetric(MetricT&& value) {
51 SetMetric(std::forward<MetricT>(value));
52 return *this;
53 }
55
57
66 inline int GetPeriod() const { return m_period; }
67 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
68 inline void SetPeriod(int value) {
69 m_periodHasBeenSet = true;
70 m_period = value;
71 }
72 inline MetricStat& WithPeriod(int value) {
73 SetPeriod(value);
74 return *this;
75 }
77
79
86 inline const Aws::String& GetStat() const { return m_stat; }
87 inline bool StatHasBeenSet() const { return m_statHasBeenSet; }
88 template <typename StatT = Aws::String>
89 void SetStat(StatT&& value) {
90 m_statHasBeenSet = true;
91 m_stat = std::forward<StatT>(value);
92 }
93 template <typename StatT = Aws::String>
94 MetricStat& WithStat(StatT&& value) {
95 SetStat(std::forward<StatT>(value));
96 return *this;
97 }
99
101
109 inline StandardUnit GetUnit() const { return m_unit; }
110 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
111 inline void SetUnit(StandardUnit value) {
112 m_unitHasBeenSet = true;
113 m_unit = value;
114 }
116 SetUnit(value);
117 return *this;
118 }
120 private:
121 Metric m_metric;
122
123 int m_period{0};
124
125 Aws::String m_stat;
126
128 bool m_metricHasBeenSet = false;
129 bool m_periodHasBeenSet = false;
130 bool m_statHasBeenSet = false;
131 bool m_unitHasBeenSet = false;
132};
133
134} // namespace Model
135} // namespace ApplicationSignals
136} // namespace Aws
AWS_APPLICATIONSIGNALS_API MetricStat()=default
AWS_APPLICATIONSIGNALS_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetStat() const
Definition MetricStat.h:86
AWS_APPLICATIONSIGNALS_API MetricStat & operator=(Aws::Utils::Json::JsonView jsonValue)
MetricStat & WithStat(StatT &&value)
Definition MetricStat.h:94
MetricStat & WithMetric(MetricT &&value)
Definition MetricStat.h:50
MetricStat & WithUnit(StandardUnit value)
Definition MetricStat.h:115
AWS_APPLICATIONSIGNALS_API MetricStat(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue