AWS SDK for C++

AWS SDK for C++ Version 1.11.867

Loading...
Searching...
No Matches
CreateMetricRequest.h
1
6#pragma once
7#include <aws/connect/ConnectRequest.h>
8#include <aws/connect/Connect_EXPORTS.h>
9#include <aws/connect/model/MetricCalculation.h>
10#include <aws/connect/model/MetricStatus.h>
11#include <aws/connect/model/MetricUnit.h>
12#include <aws/connect/model/TrendIndicator.h>
13#include <aws/core/utils/UUID.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Connect {
21namespace Model {
22
26 public:
27 AWS_CONNECT_API CreateMetricRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateMetric"; }
34
35 AWS_CONNECT_API Aws::String SerializePayload() const override;
36
38
43 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
44 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
45 template <typename InstanceIdT = Aws::String>
46 void SetInstanceId(InstanceIdT&& value) {
47 m_instanceIdHasBeenSet = true;
48 m_instanceId = std::forward<InstanceIdT>(value);
49 }
50 template <typename InstanceIdT = Aws::String>
51 CreateMetricRequest& WithInstanceId(InstanceIdT&& value) {
52 SetInstanceId(std::forward<InstanceIdT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetName() const { return m_name; }
62 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
63 template <typename NameT = Aws::String>
64 void SetName(NameT&& value) {
65 m_nameHasBeenSet = true;
66 m_name = std::forward<NameT>(value);
67 }
68 template <typename NameT = Aws::String>
69 CreateMetricRequest& WithName(NameT&& value) {
70 SetName(std::forward<NameT>(value));
71 return *this;
72 }
74
76
80 inline const MetricCalculation& GetMetricCalculation() const { return m_metricCalculation; }
81 inline bool MetricCalculationHasBeenSet() const { return m_metricCalculationHasBeenSet; }
82 template <typename MetricCalculationT = MetricCalculation>
83 void SetMetricCalculation(MetricCalculationT&& value) {
84 m_metricCalculationHasBeenSet = true;
85 m_metricCalculation = std::forward<MetricCalculationT>(value);
86 }
87 template <typename MetricCalculationT = MetricCalculation>
88 CreateMetricRequest& WithMetricCalculation(MetricCalculationT&& value) {
89 SetMetricCalculation(std::forward<MetricCalculationT>(value));
90 return *this;
91 }
93
95
98 inline MetricUnit GetUnit() const { return m_unit; }
99 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
100 inline void SetUnit(MetricUnit value) {
101 m_unitHasBeenSet = true;
102 m_unit = value;
103 }
105 SetUnit(value);
106 return *this;
107 }
109
111
116 inline MetricStatus GetStatus() const { return m_status; }
117 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
118 inline void SetStatus(MetricStatus value) {
119 m_statusHasBeenSet = true;
120 m_status = value;
121 }
123 SetStatus(value);
124 return *this;
125 }
127
129
136 inline const Aws::String& GetClientToken() const { return m_clientToken; }
137 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
138 template <typename ClientTokenT = Aws::String>
139 void SetClientToken(ClientTokenT&& value) {
140 m_clientTokenHasBeenSet = true;
141 m_clientToken = std::forward<ClientTokenT>(value);
142 }
143 template <typename ClientTokenT = Aws::String>
144 CreateMetricRequest& WithClientToken(ClientTokenT&& value) {
145 SetClientToken(std::forward<ClientTokenT>(value));
146 return *this;
147 }
149
151
154 inline const Aws::String& GetDescription() const { return m_description; }
155 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
156 template <typename DescriptionT = Aws::String>
157 void SetDescription(DescriptionT&& value) {
158 m_descriptionHasBeenSet = true;
159 m_description = std::forward<DescriptionT>(value);
160 }
161 template <typename DescriptionT = Aws::String>
162 CreateMetricRequest& WithDescription(DescriptionT&& value) {
163 SetDescription(std::forward<DescriptionT>(value));
164 return *this;
165 }
167
169
173 inline TrendIndicator GetPositiveTrendIndicator() const { return m_positiveTrendIndicator; }
174 inline bool PositiveTrendIndicatorHasBeenSet() const { return m_positiveTrendIndicatorHasBeenSet; }
176 m_positiveTrendIndicatorHasBeenSet = true;
177 m_positiveTrendIndicator = value;
178 }
181 return *this;
182 }
184
186
190 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
191 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
192 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
193 void SetTags(TagsT&& value) {
194 m_tagsHasBeenSet = true;
195 m_tags = std::forward<TagsT>(value);
196 }
197 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
199 SetTags(std::forward<TagsT>(value));
200 return *this;
201 }
202 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
203 CreateMetricRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
204 m_tagsHasBeenSet = true;
205 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
206 return *this;
207 }
209 private:
210 Aws::String m_instanceId;
211
212 Aws::String m_name;
213
214 MetricCalculation m_metricCalculation;
215
217
219
221
222 Aws::String m_description;
223
224 TrendIndicator m_positiveTrendIndicator{TrendIndicator::NOT_SET};
225
227 bool m_instanceIdHasBeenSet = false;
228 bool m_nameHasBeenSet = false;
229 bool m_metricCalculationHasBeenSet = false;
230 bool m_unitHasBeenSet = false;
231 bool m_statusHasBeenSet = false;
232 bool m_clientTokenHasBeenSet = true;
233 bool m_descriptionHasBeenSet = false;
234 bool m_positiveTrendIndicatorHasBeenSet = false;
235 bool m_tagsHasBeenSet = false;
236};
237
238} // namespace Model
239} // namespace Connect
240} // namespace Aws
const MetricCalculation & GetMetricCalculation() const
CreateMetricRequest & WithTags(TagsT &&value)
void SetPositiveTrendIndicator(TrendIndicator value)
CreateMetricRequest & WithName(NameT &&value)
CreateMetricRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateMetricRequest & WithStatus(MetricStatus value)
AWS_CONNECT_API Aws::String SerializePayload() const override
CreateMetricRequest & WithUnit(MetricUnit value)
CreateMetricRequest & WithInstanceId(InstanceIdT &&value)
CreateMetricRequest & WithPositiveTrendIndicator(TrendIndicator value)
CreateMetricRequest & WithClientToken(ClientTokenT &&value)
CreateMetricRequest & WithDescription(DescriptionT &&value)
AWS_CONNECT_API CreateMetricRequest()=default
const Aws::Map< Aws::String, Aws::String > & GetTags() const
virtual const char * GetServiceRequestName() const override
void SetMetricCalculation(MetricCalculationT &&value)
CreateMetricRequest & WithMetricCalculation(MetricCalculationT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
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