AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
CreateNotificationRuleRequest.h
1
6#pragma once
7#include <aws/codestar-notifications/CodeStarNotificationsRequest.h>
8#include <aws/codestar-notifications/CodeStarNotifications_EXPORTS.h>
9#include <aws/codestar-notifications/model/DetailType.h>
10#include <aws/codestar-notifications/model/NotificationRuleStatus.h>
11#include <aws/codestar-notifications/model/Target.h>
12#include <aws/core/utils/UUID.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15#include <aws/core/utils/memory/stl/AWSVector.h>
16
17#include <utility>
18
19namespace Aws {
20namespace CodeStarNotifications {
21namespace Model {
22
26 public:
27 AWS_CODESTARNOTIFICATIONS_API CreateNotificationRuleRequest() = 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 "CreateNotificationRule"; }
34
35 AWS_CODESTARNOTIFICATIONS_API Aws::String SerializePayload() const override;
36
38
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>
51 SetName(std::forward<NameT>(value));
52 return *this;
53 }
55
57
61 inline const Aws::Vector<Aws::String>& GetEventTypeIds() const { return m_eventTypeIds; }
62 inline bool EventTypeIdsHasBeenSet() const { return m_eventTypeIdsHasBeenSet; }
63 template <typename EventTypeIdsT = Aws::Vector<Aws::String>>
64 void SetEventTypeIds(EventTypeIdsT&& value) {
65 m_eventTypeIdsHasBeenSet = true;
66 m_eventTypeIds = std::forward<EventTypeIdsT>(value);
67 }
68 template <typename EventTypeIdsT = Aws::Vector<Aws::String>>
70 SetEventTypeIds(std::forward<EventTypeIdsT>(value));
71 return *this;
72 }
73 template <typename EventTypeIdsT = Aws::String>
75 m_eventTypeIdsHasBeenSet = true;
76 m_eventTypeIds.emplace_back(std::forward<EventTypeIdsT>(value));
77 return *this;
78 }
80
82
87 inline const Aws::String& GetResource() const { return m_resource; }
88 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
89 template <typename ResourceT = Aws::String>
90 void SetResource(ResourceT&& value) {
91 m_resourceHasBeenSet = true;
92 m_resource = std::forward<ResourceT>(value);
93 }
94 template <typename ResourceT = Aws::String>
96 SetResource(std::forward<ResourceT>(value));
97 return *this;
98 }
100
102
107 inline const Aws::Vector<Target>& GetTargets() const { return m_targets; }
108 inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
109 template <typename TargetsT = Aws::Vector<Target>>
110 void SetTargets(TargetsT&& value) {
111 m_targetsHasBeenSet = true;
112 m_targets = std::forward<TargetsT>(value);
113 }
114 template <typename TargetsT = Aws::Vector<Target>>
116 SetTargets(std::forward<TargetsT>(value));
117 return *this;
118 }
119 template <typename TargetsT = Target>
121 m_targetsHasBeenSet = true;
122 m_targets.emplace_back(std::forward<TargetsT>(value));
123 return *this;
124 }
126
128
135 inline DetailType GetDetailType() const { return m_detailType; }
136 inline bool DetailTypeHasBeenSet() const { return m_detailTypeHasBeenSet; }
137 inline void SetDetailType(DetailType value) {
138 m_detailTypeHasBeenSet = true;
139 m_detailType = value;
140 }
142 SetDetailType(value);
143 return *this;
144 }
146
148
157 inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
158 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
159 template <typename ClientRequestTokenT = Aws::String>
160 void SetClientRequestToken(ClientRequestTokenT&& value) {
161 m_clientRequestTokenHasBeenSet = true;
162 m_clientRequestToken = std::forward<ClientRequestTokenT>(value);
163 }
164 template <typename ClientRequestTokenT = Aws::String>
166 SetClientRequestToken(std::forward<ClientRequestTokenT>(value));
167 return *this;
168 }
170
172
176 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
177 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
178 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
179 void SetTags(TagsT&& value) {
180 m_tagsHasBeenSet = true;
181 m_tags = std::forward<TagsT>(value);
182 }
183 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
185 SetTags(std::forward<TagsT>(value));
186 return *this;
187 }
188 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
189 CreateNotificationRuleRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
190 m_tagsHasBeenSet = true;
191 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
192 return *this;
193 }
195
197
202 inline NotificationRuleStatus GetStatus() const { return m_status; }
203 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
205 m_statusHasBeenSet = true;
206 m_status = value;
207 }
209 SetStatus(value);
210 return *this;
211 }
213 private:
214 Aws::String m_name;
215
216 Aws::Vector<Aws::String> m_eventTypeIds;
217
218 Aws::String m_resource;
219
220 Aws::Vector<Target> m_targets;
221
222 DetailType m_detailType{DetailType::NOT_SET};
223
224 Aws::String m_clientRequestToken{Aws::Utils::UUID::PseudoRandomUUID()};
225
227
229 bool m_nameHasBeenSet = false;
230 bool m_eventTypeIdsHasBeenSet = false;
231 bool m_resourceHasBeenSet = false;
232 bool m_targetsHasBeenSet = false;
233 bool m_detailTypeHasBeenSet = false;
234 bool m_clientRequestTokenHasBeenSet = true;
235 bool m_tagsHasBeenSet = false;
236 bool m_statusHasBeenSet = false;
237};
238
239} // namespace Model
240} // namespace CodeStarNotifications
241} // namespace Aws
AWS_CODESTARNOTIFICATIONS_API CreateNotificationRuleRequest()=default
CreateNotificationRuleRequest & WithStatus(NotificationRuleStatus value)
CreateNotificationRuleRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
AWS_CODESTARNOTIFICATIONS_API Aws::String SerializePayload() const override
CreateNotificationRuleRequest & WithClientRequestToken(ClientRequestTokenT &&value)
CreateNotificationRuleRequest & AddEventTypeIds(EventTypeIdsT &&value)
CreateNotificationRuleRequest & WithEventTypeIds(EventTypeIdsT &&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
std::vector< T, Aws::Allocator< T > > Vector