AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
MetricV2.h
1
6#pragma once
7#include <aws/connect/Connect_EXPORTS.h>
8#include <aws/connect/model/MetricFilterV2.h>
9#include <aws/connect/model/ThresholdV2.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace Connect {
23namespace Model {
24
31class MetricV2 {
32 public:
33 AWS_CONNECT_API MetricV2() = default;
34 AWS_CONNECT_API MetricV2(Aws::Utils::Json::JsonView jsonValue);
35 AWS_CONNECT_API MetricV2& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_CONNECT_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetName() const { return m_name; }
43 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
44 template <typename NameT = Aws::String>
45 void SetName(NameT&& value) {
46 m_nameHasBeenSet = true;
47 m_name = std::forward<NameT>(value);
48 }
49 template <typename NameT = Aws::String>
50 MetricV2& WithName(NameT&& value) {
51 SetName(std::forward<NameT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::Vector<ThresholdV2>& GetThreshold() const { return m_threshold; }
61 inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
62 template <typename ThresholdT = Aws::Vector<ThresholdV2>>
63 void SetThreshold(ThresholdT&& value) {
64 m_thresholdHasBeenSet = true;
65 m_threshold = std::forward<ThresholdT>(value);
66 }
67 template <typename ThresholdT = Aws::Vector<ThresholdV2>>
68 MetricV2& WithThreshold(ThresholdT&& value) {
69 SetThreshold(std::forward<ThresholdT>(value));
70 return *this;
71 }
72 template <typename ThresholdT = ThresholdV2>
73 MetricV2& AddThreshold(ThresholdT&& value) {
74 m_thresholdHasBeenSet = true;
75 m_threshold.emplace_back(std::forward<ThresholdT>(value));
76 return *this;
77 }
79
81
85 inline const Aws::String& GetMetricId() const { return m_metricId; }
86 inline bool MetricIdHasBeenSet() const { return m_metricIdHasBeenSet; }
87 template <typename MetricIdT = Aws::String>
88 void SetMetricId(MetricIdT&& value) {
89 m_metricIdHasBeenSet = true;
90 m_metricId = std::forward<MetricIdT>(value);
91 }
92 template <typename MetricIdT = Aws::String>
93 MetricV2& WithMetricId(MetricIdT&& value) {
94 SetMetricId(std::forward<MetricIdT>(value));
95 return *this;
96 }
98
100
103 inline const Aws::Vector<MetricFilterV2>& GetMetricFilters() const { return m_metricFilters; }
104 inline bool MetricFiltersHasBeenSet() const { return m_metricFiltersHasBeenSet; }
105 template <typename MetricFiltersT = Aws::Vector<MetricFilterV2>>
106 void SetMetricFilters(MetricFiltersT&& value) {
107 m_metricFiltersHasBeenSet = true;
108 m_metricFilters = std::forward<MetricFiltersT>(value);
109 }
110 template <typename MetricFiltersT = Aws::Vector<MetricFilterV2>>
111 MetricV2& WithMetricFilters(MetricFiltersT&& value) {
112 SetMetricFilters(std::forward<MetricFiltersT>(value));
113 return *this;
114 }
115 template <typename MetricFiltersT = MetricFilterV2>
116 MetricV2& AddMetricFilters(MetricFiltersT&& value) {
117 m_metricFiltersHasBeenSet = true;
118 m_metricFilters.emplace_back(std::forward<MetricFiltersT>(value));
119 return *this;
120 }
122 private:
123 Aws::String m_name;
124
125 Aws::Vector<ThresholdV2> m_threshold;
126
127 Aws::String m_metricId;
128
129 Aws::Vector<MetricFilterV2> m_metricFilters;
130 bool m_nameHasBeenSet = false;
131 bool m_thresholdHasBeenSet = false;
132 bool m_metricIdHasBeenSet = false;
133 bool m_metricFiltersHasBeenSet = false;
134};
135
136} // namespace Model
137} // namespace Connect
138} // namespace Aws
MetricV2 & AddThreshold(ThresholdT &&value)
Definition MetricV2.h:73
const Aws::Vector< MetricFilterV2 > & GetMetricFilters() const
Definition MetricV2.h:103
void SetMetricId(MetricIdT &&value)
Definition MetricV2.h:88
bool MetricFiltersHasBeenSet() const
Definition MetricV2.h:104
bool ThresholdHasBeenSet() const
Definition MetricV2.h:61
AWS_CONNECT_API MetricV2 & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_CONNECT_API Aws::Utils::Json::JsonValue Jsonize() const
void SetName(NameT &&value)
Definition MetricV2.h:45
MetricV2 & WithThreshold(ThresholdT &&value)
Definition MetricV2.h:68
bool MetricIdHasBeenSet() const
Definition MetricV2.h:86
void SetMetricFilters(MetricFiltersT &&value)
Definition MetricV2.h:106
MetricV2 & WithMetricId(MetricIdT &&value)
Definition MetricV2.h:93
MetricV2 & AddMetricFilters(MetricFiltersT &&value)
Definition MetricV2.h:116
const Aws::String & GetMetricId() const
Definition MetricV2.h:85
MetricV2 & WithName(NameT &&value)
Definition MetricV2.h:50
AWS_CONNECT_API MetricV2(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetName() const
Definition MetricV2.h:42
const Aws::Vector< ThresholdV2 > & GetThreshold() const
Definition MetricV2.h:60
AWS_CONNECT_API MetricV2()=default
MetricV2 & WithMetricFilters(MetricFiltersT &&value)
Definition MetricV2.h:111
void SetThreshold(ThresholdT &&value)
Definition MetricV2.h:63
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue