AWS SDK for C++

AWS SDK for C++ Version 1.11.899

Loading...
Searching...
No Matches
CreateAlertRequest.h
1
6#pragma once
7#include <aws/cloudwatchomni/CloudWatchOmniRequest.h>
8#include <aws/cloudwatchomni/CloudWatchOmni_EXPORTS.h>
9#include <aws/cloudwatchomni/model/NotificationRule.h>
10#include <aws/cloudwatchomni/model/Rule.h>
11#include <aws/core/utils/UUID.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace CloudWatchOmni {
20namespace Model {
21
25 public:
26 AWS_CLOUDWATCHOMNI_API CreateAlertRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreateAlert"; }
33
34 AWS_CLOUDWATCHOMNI_API Aws::String SerializePayload() const override;
35
36 AWS_CLOUDWATCHOMNI_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
37
39
42 inline const Aws::String& GetSpaceId() const { return m_spaceId; }
43 inline bool SpaceIdHasBeenSet() const { return m_spaceIdHasBeenSet; }
44 template <typename SpaceIdT = Aws::String>
45 void SetSpaceId(SpaceIdT&& value) {
46 m_spaceIdHasBeenSet = true;
47 m_spaceId = std::forward<SpaceIdT>(value);
48 }
49 template <typename SpaceIdT = Aws::String>
50 CreateAlertRequest& WithSpaceId(SpaceIdT&& value) {
51 SetSpaceId(std::forward<SpaceIdT>(value));
52 return *this;
53 }
55
57
62 inline const Aws::String& GetProfileId() const { return m_profileId; }
63 inline bool ProfileIdHasBeenSet() const { return m_profileIdHasBeenSet; }
64 template <typename ProfileIdT = Aws::String>
65 void SetProfileId(ProfileIdT&& value) {
66 m_profileIdHasBeenSet = true;
67 m_profileId = std::forward<ProfileIdT>(value);
68 }
69 template <typename ProfileIdT = Aws::String>
70 CreateAlertRequest& WithProfileId(ProfileIdT&& value) {
71 SetProfileId(std::forward<ProfileIdT>(value));
72 return *this;
73 }
75
77
83 inline const Aws::String& GetName() const { return m_name; }
84 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
85 template <typename NameT = Aws::String>
86 void SetName(NameT&& value) {
87 m_nameHasBeenSet = true;
88 m_name = std::forward<NameT>(value);
89 }
90 template <typename NameT = Aws::String>
91 CreateAlertRequest& WithName(NameT&& value) {
92 SetName(std::forward<NameT>(value));
93 return *this;
94 }
96
98
101 inline const Aws::String& GetDescription() const { return m_description; }
102 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
103 template <typename DescriptionT = Aws::String>
104 void SetDescription(DescriptionT&& value) {
105 m_descriptionHasBeenSet = true;
106 m_description = std::forward<DescriptionT>(value);
107 }
108 template <typename DescriptionT = Aws::String>
109 CreateAlertRequest& WithDescription(DescriptionT&& value) {
110 SetDescription(std::forward<DescriptionT>(value));
111 return *this;
112 }
114
116
119 inline const Rule& GetRule() const { return m_rule; }
120 inline bool RuleHasBeenSet() const { return m_ruleHasBeenSet; }
121 template <typename RuleT = Rule>
122 void SetRule(RuleT&& value) {
123 m_ruleHasBeenSet = true;
124 m_rule = std::forward<RuleT>(value);
125 }
126 template <typename RuleT = Rule>
127 CreateAlertRequest& WithRule(RuleT&& value) {
128 SetRule(std::forward<RuleT>(value));
129 return *this;
130 }
132
134
138 inline bool GetNotificationsEnabled() const { return m_notificationsEnabled; }
139 inline bool NotificationsEnabledHasBeenSet() const { return m_notificationsEnabledHasBeenSet; }
140 inline void SetNotificationsEnabled(bool value) {
141 m_notificationsEnabledHasBeenSet = true;
142 m_notificationsEnabled = value;
143 }
146 return *this;
147 }
149
151
154 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
155 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
156 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
157 void SetTags(TagsT&& value) {
158 m_tagsHasBeenSet = true;
159 m_tags = std::forward<TagsT>(value);
160 }
161 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
162 CreateAlertRequest& WithTags(TagsT&& value) {
163 SetTags(std::forward<TagsT>(value));
164 return *this;
165 }
166 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
167 CreateAlertRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
168 m_tagsHasBeenSet = true;
169 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
170 return *this;
171 }
173
175
179 inline const Aws::Vector<NotificationRule>& GetNotificationRules() const { return m_notificationRules; }
180 inline bool NotificationRulesHasBeenSet() const { return m_notificationRulesHasBeenSet; }
181 template <typename NotificationRulesT = Aws::Vector<NotificationRule>>
182 void SetNotificationRules(NotificationRulesT&& value) {
183 m_notificationRulesHasBeenSet = true;
184 m_notificationRules = std::forward<NotificationRulesT>(value);
185 }
186 template <typename NotificationRulesT = Aws::Vector<NotificationRule>>
187 CreateAlertRequest& WithNotificationRules(NotificationRulesT&& value) {
188 SetNotificationRules(std::forward<NotificationRulesT>(value));
189 return *this;
190 }
191 template <typename NotificationRulesT = NotificationRule>
192 CreateAlertRequest& AddNotificationRules(NotificationRulesT&& value) {
193 m_notificationRulesHasBeenSet = true;
194 m_notificationRules.emplace_back(std::forward<NotificationRulesT>(value));
195 return *this;
196 }
198
200
205 inline const Aws::String& GetClientToken() const { return m_clientToken; }
206 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
207 template <typename ClientTokenT = Aws::String>
208 void SetClientToken(ClientTokenT&& value) {
209 m_clientTokenHasBeenSet = true;
210 m_clientToken = std::forward<ClientTokenT>(value);
211 }
212 template <typename ClientTokenT = Aws::String>
213 CreateAlertRequest& WithClientToken(ClientTokenT&& value) {
214 SetClientToken(std::forward<ClientTokenT>(value));
215 return *this;
216 }
218 private:
219 Aws::String m_spaceId;
220
221 Aws::String m_profileId;
222
223 Aws::String m_name;
224
225 Aws::String m_description;
226
227 Rule m_rule;
228
229 bool m_notificationsEnabled{false};
230
232
233 Aws::Vector<NotificationRule> m_notificationRules;
234
236 bool m_spaceIdHasBeenSet = false;
237 bool m_profileIdHasBeenSet = false;
238 bool m_nameHasBeenSet = false;
239 bool m_descriptionHasBeenSet = false;
240 bool m_ruleHasBeenSet = false;
241 bool m_notificationsEnabledHasBeenSet = false;
242 bool m_tagsHasBeenSet = false;
243 bool m_notificationRulesHasBeenSet = false;
244 bool m_clientTokenHasBeenSet = true;
245};
246
247} // namespace Model
248} // namespace CloudWatchOmni
249} // namespace Aws
CreateAlertRequest & WithTags(TagsT &&value)
AWS_CLOUDWATCHOMNI_API CreateAlertRequest()=default
CreateAlertRequest & WithProfileId(ProfileIdT &&value)
void SetNotificationRules(NotificationRulesT &&value)
CreateAlertRequest & WithNotificationRules(NotificationRulesT &&value)
const Aws::Vector< NotificationRule > & GetNotificationRules() const
CreateAlertRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
virtual const char * GetServiceRequestName() const override
CreateAlertRequest & WithDescription(DescriptionT &&value)
AWS_CLOUDWATCHOMNI_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateAlertRequest & WithNotificationsEnabled(bool value)
CreateAlertRequest & WithRule(RuleT &&value)
AWS_CLOUDWATCHOMNI_API Aws::String SerializePayload() const override
CreateAlertRequest & WithSpaceId(SpaceIdT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateAlertRequest & WithClientToken(ClientTokenT &&value)
CreateAlertRequest & AddNotificationRules(NotificationRulesT &&value)
CreateAlertRequest & WithName(NameT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
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
std::vector< T, Aws::Allocator< T > > Vector