AWS SDK for C++

AWS SDK for C++ Version 1.11.900

Loading...
Searching...
No Matches
Alert.h
1
6#pragma once
7#include <aws/cloudwatchomni/CloudWatchOmni_EXPORTS.h>
8#include <aws/cloudwatchomni/model/AlertStateInfo.h>
9#include <aws/cloudwatchomni/model/NotificationRule.h>
10#include <aws/cloudwatchomni/model/NotificationStatus.h>
11#include <aws/cloudwatchomni/model/Rule.h>
12#include <aws/core/utils/DateTime.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15#include <aws/crt/cbor/Cbor.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Cbor {
22class CborValue;
23} // namespace Cbor
24} // namespace Utils
25namespace CloudWatchOmni {
26namespace Model {
27
36class Alert {
37 public:
38 AWS_CLOUDWATCHOMNI_API Alert() = default;
39 AWS_CLOUDWATCHOMNI_API Alert(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
40 AWS_CLOUDWATCHOMNI_API Alert& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
41 AWS_CLOUDWATCHOMNI_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
42
44
47 inline const Aws::String& GetName() const { return m_name; }
48 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
49 template <typename NameT = Aws::String>
50 void SetName(NameT&& value) {
51 m_nameHasBeenSet = true;
52 m_name = std::forward<NameT>(value);
53 }
54 template <typename NameT = Aws::String>
55 Alert& WithName(NameT&& value) {
56 SetName(std::forward<NameT>(value));
57 return *this;
58 }
60
62
67 inline const Aws::String& GetAlertId() const { return m_alertId; }
68 inline bool AlertIdHasBeenSet() const { return m_alertIdHasBeenSet; }
69 template <typename AlertIdT = Aws::String>
70 void SetAlertId(AlertIdT&& value) {
71 m_alertIdHasBeenSet = true;
72 m_alertId = std::forward<AlertIdT>(value);
73 }
74 template <typename AlertIdT = Aws::String>
75 Alert& WithAlertId(AlertIdT&& value) {
76 SetAlertId(std::forward<AlertIdT>(value));
77 return *this;
78 }
80
82
85 inline const Aws::String& GetDescription() const { return m_description; }
86 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
87 template <typename DescriptionT = Aws::String>
88 void SetDescription(DescriptionT&& value) {
89 m_descriptionHasBeenSet = true;
90 m_description = std::forward<DescriptionT>(value);
91 }
92 template <typename DescriptionT = Aws::String>
93 Alert& WithDescription(DescriptionT&& value) {
94 SetDescription(std::forward<DescriptionT>(value));
95 return *this;
96 }
98
100
103 inline const Aws::String& GetAccountId() const { return m_accountId; }
104 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
105 template <typename AccountIdT = Aws::String>
106 void SetAccountId(AccountIdT&& value) {
107 m_accountIdHasBeenSet = true;
108 m_accountId = std::forward<AccountIdT>(value);
109 }
110 template <typename AccountIdT = Aws::String>
111 Alert& WithAccountId(AccountIdT&& value) {
112 SetAccountId(std::forward<AccountIdT>(value));
113 return *this;
114 }
116
118
121 inline const Aws::String& GetSpaceId() const { return m_spaceId; }
122 inline bool SpaceIdHasBeenSet() const { return m_spaceIdHasBeenSet; }
123 template <typename SpaceIdT = Aws::String>
124 void SetSpaceId(SpaceIdT&& value) {
125 m_spaceIdHasBeenSet = true;
126 m_spaceId = std::forward<SpaceIdT>(value);
127 }
128 template <typename SpaceIdT = Aws::String>
129 Alert& WithSpaceId(SpaceIdT&& value) {
130 SetSpaceId(std::forward<SpaceIdT>(value));
131 return *this;
132 }
134
136
139 inline const Aws::String& GetProfileId() const { return m_profileId; }
140 inline bool ProfileIdHasBeenSet() const { return m_profileIdHasBeenSet; }
141 template <typename ProfileIdT = Aws::String>
142 void SetProfileId(ProfileIdT&& value) {
143 m_profileIdHasBeenSet = true;
144 m_profileId = std::forward<ProfileIdT>(value);
145 }
146 template <typename ProfileIdT = Aws::String>
147 Alert& WithProfileId(ProfileIdT&& value) {
148 SetProfileId(std::forward<ProfileIdT>(value));
149 return *this;
150 }
152
154
157 inline const Rule& GetRule() const { return m_rule; }
158 inline bool RuleHasBeenSet() const { return m_ruleHasBeenSet; }
159 template <typename RuleT = Rule>
160 void SetRule(RuleT&& value) {
161 m_ruleHasBeenSet = true;
162 m_rule = std::forward<RuleT>(value);
163 }
164 template <typename RuleT = Rule>
165 Alert& WithRule(RuleT&& value) {
166 SetRule(std::forward<RuleT>(value));
167 return *this;
168 }
170
172
175 inline NotificationStatus GetNotificationStatus() const { return m_notificationStatus; }
176 inline bool NotificationStatusHasBeenSet() const { return m_notificationStatusHasBeenSet; }
178 m_notificationStatusHasBeenSet = true;
179 m_notificationStatus = value;
180 }
183 return *this;
184 }
186
188
197 inline const AlertStateInfo& GetState() const { return m_state; }
198 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
199 template <typename StateT = AlertStateInfo>
200 void SetState(StateT&& value) {
201 m_stateHasBeenSet = true;
202 m_state = std::forward<StateT>(value);
203 }
204 template <typename StateT = AlertStateInfo>
205 Alert& WithState(StateT&& value) {
206 SetState(std::forward<StateT>(value));
207 return *this;
208 }
210
212
215 inline const Aws::Vector<NotificationRule>& GetNotificationRules() const { return m_notificationRules; }
216 inline bool NotificationRulesHasBeenSet() const { return m_notificationRulesHasBeenSet; }
217 template <typename NotificationRulesT = Aws::Vector<NotificationRule>>
218 void SetNotificationRules(NotificationRulesT&& value) {
219 m_notificationRulesHasBeenSet = true;
220 m_notificationRules = std::forward<NotificationRulesT>(value);
221 }
222 template <typename NotificationRulesT = Aws::Vector<NotificationRule>>
223 Alert& WithNotificationRules(NotificationRulesT&& value) {
224 SetNotificationRules(std::forward<NotificationRulesT>(value));
225 return *this;
226 }
227 template <typename NotificationRulesT = NotificationRule>
228 Alert& AddNotificationRules(NotificationRulesT&& value) {
229 m_notificationRulesHasBeenSet = true;
230 m_notificationRules.emplace_back(std::forward<NotificationRulesT>(value));
231 return *this;
232 }
234
236
239 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
240 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
241 template <typename CreatedAtT = Aws::Utils::DateTime>
242 void SetCreatedAt(CreatedAtT&& value) {
243 m_createdAtHasBeenSet = true;
244 m_createdAt = std::forward<CreatedAtT>(value);
245 }
246 template <typename CreatedAtT = Aws::Utils::DateTime>
247 Alert& WithCreatedAt(CreatedAtT&& value) {
248 SetCreatedAt(std::forward<CreatedAtT>(value));
249 return *this;
250 }
252
254
257 inline const Aws::Utils::DateTime& GetUpdatedAt() const { return m_updatedAt; }
258 inline bool UpdatedAtHasBeenSet() const { return m_updatedAtHasBeenSet; }
259 template <typename UpdatedAtT = Aws::Utils::DateTime>
260 void SetUpdatedAt(UpdatedAtT&& value) {
261 m_updatedAtHasBeenSet = true;
262 m_updatedAt = std::forward<UpdatedAtT>(value);
263 }
264 template <typename UpdatedAtT = Aws::Utils::DateTime>
265 Alert& WithUpdatedAt(UpdatedAtT&& value) {
266 SetUpdatedAt(std::forward<UpdatedAtT>(value));
267 return *this;
268 }
270
272
275 inline const Aws::String& GetAlertArn() const { return m_alertArn; }
276 inline bool AlertArnHasBeenSet() const { return m_alertArnHasBeenSet; }
277 template <typename AlertArnT = Aws::String>
278 void SetAlertArn(AlertArnT&& value) {
279 m_alertArnHasBeenSet = true;
280 m_alertArn = std::forward<AlertArnT>(value);
281 }
282 template <typename AlertArnT = Aws::String>
283 Alert& WithAlertArn(AlertArnT&& value) {
284 SetAlertArn(std::forward<AlertArnT>(value));
285 return *this;
286 }
288 private:
289 Aws::String m_name;
290
291 Aws::String m_alertId;
292
293 Aws::String m_description;
294
295 Aws::String m_accountId;
296
297 Aws::String m_spaceId;
298
299 Aws::String m_profileId;
300
301 Rule m_rule;
302
304
305 AlertStateInfo m_state;
306
307 Aws::Vector<NotificationRule> m_notificationRules;
308
309 Aws::Utils::DateTime m_createdAt{};
310
311 Aws::Utils::DateTime m_updatedAt{};
312
313 Aws::String m_alertArn;
314 bool m_nameHasBeenSet = false;
315 bool m_alertIdHasBeenSet = false;
316 bool m_descriptionHasBeenSet = false;
317 bool m_accountIdHasBeenSet = false;
318 bool m_spaceIdHasBeenSet = false;
319 bool m_profileIdHasBeenSet = false;
320 bool m_ruleHasBeenSet = false;
321 bool m_notificationStatusHasBeenSet = false;
322 bool m_stateHasBeenSet = false;
323 bool m_notificationRulesHasBeenSet = false;
324 bool m_createdAtHasBeenSet = false;
325 bool m_updatedAtHasBeenSet = false;
326 bool m_alertArnHasBeenSet = false;
327};
328
329} // namespace Model
330} // namespace CloudWatchOmni
331} // namespace Aws
void SetNotificationRules(NotificationRulesT &&value)
Definition Alert.h:218
void SetRule(RuleT &&value)
Definition Alert.h:160
const Aws::String & GetSpaceId() const
Definition Alert.h:121
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Alert.h:239
const AlertStateInfo & GetState() const
Definition Alert.h:197
const Aws::Vector< NotificationRule > & GetNotificationRules() const
Definition Alert.h:215
AWS_CLOUDWATCHOMNI_API Alert(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
NotificationStatus GetNotificationStatus() const
Definition Alert.h:175
void SetState(StateT &&value)
Definition Alert.h:200
Alert & WithNotificationRules(NotificationRulesT &&value)
Definition Alert.h:223
void SetAccountId(AccountIdT &&value)
Definition Alert.h:106
Alert & WithDescription(DescriptionT &&value)
Definition Alert.h:93
void SetSpaceId(SpaceIdT &&value)
Definition Alert.h:124
Alert & WithNotificationStatus(NotificationStatus value)
Definition Alert.h:181
const Aws::String & GetProfileId() const
Definition Alert.h:139
void SetUpdatedAt(UpdatedAtT &&value)
Definition Alert.h:260
bool NotificationRulesHasBeenSet() const
Definition Alert.h:216
void SetDescription(DescriptionT &&value)
Definition Alert.h:88
const Aws::String & GetAlertId() const
Definition Alert.h:67
void SetAlertArn(AlertArnT &&value)
Definition Alert.h:278
AWS_CLOUDWATCHOMNI_API Alert()=default
Alert & WithUpdatedAt(UpdatedAtT &&value)
Definition Alert.h:265
void SetNotificationStatus(NotificationStatus value)
Definition Alert.h:177
bool DescriptionHasBeenSet() const
Definition Alert.h:86
bool NotificationStatusHasBeenSet() const
Definition Alert.h:176
Alert & WithName(NameT &&value)
Definition Alert.h:55
Alert & WithProfileId(ProfileIdT &&value)
Definition Alert.h:147
const Aws::String & GetDescription() const
Definition Alert.h:85
Alert & AddNotificationRules(NotificationRulesT &&value)
Definition Alert.h:228
const Rule & GetRule() const
Definition Alert.h:157
void SetName(NameT &&value)
Definition Alert.h:50
Alert & WithAlertArn(AlertArnT &&value)
Definition Alert.h:283
const Aws::String & GetAccountId() const
Definition Alert.h:103
AWS_CLOUDWATCHOMNI_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
Alert & WithCreatedAt(CreatedAtT &&value)
Definition Alert.h:247
Alert & WithAccountId(AccountIdT &&value)
Definition Alert.h:111
Alert & WithRule(RuleT &&value)
Definition Alert.h:165
void SetProfileId(ProfileIdT &&value)
Definition Alert.h:142
void SetCreatedAt(CreatedAtT &&value)
Definition Alert.h:242
const Aws::Utils::DateTime & GetUpdatedAt() const
Definition Alert.h:257
Alert & WithSpaceId(SpaceIdT &&value)
Definition Alert.h:129
void SetAlertId(AlertIdT &&value)
Definition Alert.h:70
const Aws::String & GetAlertArn() const
Definition Alert.h:275
AWS_CLOUDWATCHOMNI_API Alert & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
Alert & WithAlertId(AlertIdT &&value)
Definition Alert.h:75
const Aws::String & GetName() const
Definition Alert.h:47
Alert & WithState(StateT &&value)
Definition Alert.h:205
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector