AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateNotificationRuleRequest.h
1
6#pragma once
7#include <aws/codestar-notifications/CodeStarNotifications_EXPORTS.h>
8#include <aws/codestar-notifications/CodeStarNotificationsRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/codestar-notifications/model/DetailType.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/codestar-notifications/model/NotificationRuleStatus.h>
14#include <aws/codestar-notifications/model/Target.h>
15#include <utility>
16#include <aws/core/utils/UUID.h>
17
18namespace Aws
19{
20namespace CodeStarNotifications
21{
22namespace Model
23{
24
28 {
29 public:
30 AWS_CODESTARNOTIFICATIONS_API CreateNotificationRuleRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "CreateNotificationRule"; }
37
38 AWS_CODESTARNOTIFICATIONS_API Aws::String SerializePayload() const override;
39
40
42
46 inline const Aws::String& GetName() const { return m_name; }
47 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 template<typename NameT = Aws::String>
49 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
50 template<typename NameT = Aws::String>
51 CreateNotificationRuleRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
53
55
59 inline const Aws::Vector<Aws::String>& GetEventTypeIds() const { return m_eventTypeIds; }
60 inline bool EventTypeIdsHasBeenSet() const { return m_eventTypeIdsHasBeenSet; }
61 template<typename EventTypeIdsT = Aws::Vector<Aws::String>>
62 void SetEventTypeIds(EventTypeIdsT&& value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds = std::forward<EventTypeIdsT>(value); }
63 template<typename EventTypeIdsT = Aws::Vector<Aws::String>>
64 CreateNotificationRuleRequest& WithEventTypeIds(EventTypeIdsT&& value) { SetEventTypeIds(std::forward<EventTypeIdsT>(value)); return *this;}
65 template<typename EventTypeIdsT = Aws::String>
66 CreateNotificationRuleRequest& AddEventTypeIds(EventTypeIdsT&& value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds.emplace_back(std::forward<EventTypeIdsT>(value)); return *this; }
68
70
75 inline const Aws::String& GetResource() const { return m_resource; }
76 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
77 template<typename ResourceT = Aws::String>
78 void SetResource(ResourceT&& value) { m_resourceHasBeenSet = true; m_resource = std::forward<ResourceT>(value); }
79 template<typename ResourceT = Aws::String>
80 CreateNotificationRuleRequest& WithResource(ResourceT&& value) { SetResource(std::forward<ResourceT>(value)); return *this;}
82
84
88 inline const Aws::Vector<Target>& GetTargets() const { return m_targets; }
89 inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
90 template<typename TargetsT = Aws::Vector<Target>>
91 void SetTargets(TargetsT&& value) { m_targetsHasBeenSet = true; m_targets = std::forward<TargetsT>(value); }
92 template<typename TargetsT = Aws::Vector<Target>>
93 CreateNotificationRuleRequest& WithTargets(TargetsT&& value) { SetTargets(std::forward<TargetsT>(value)); return *this;}
94 template<typename TargetsT = Target>
95 CreateNotificationRuleRequest& AddTargets(TargetsT&& value) { m_targetsHasBeenSet = true; m_targets.emplace_back(std::forward<TargetsT>(value)); return *this; }
97
99
106 inline DetailType GetDetailType() const { return m_detailType; }
107 inline bool DetailTypeHasBeenSet() const { return m_detailTypeHasBeenSet; }
108 inline void SetDetailType(DetailType value) { m_detailTypeHasBeenSet = true; m_detailType = value; }
111
113
122 inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
123 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
124 template<typename ClientRequestTokenT = Aws::String>
125 void SetClientRequestToken(ClientRequestTokenT&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::forward<ClientRequestTokenT>(value); }
126 template<typename ClientRequestTokenT = Aws::String>
127 CreateNotificationRuleRequest& WithClientRequestToken(ClientRequestTokenT&& value) { SetClientRequestToken(std::forward<ClientRequestTokenT>(value)); return *this;}
129
131
135 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
136 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
137 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
138 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
139 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
140 CreateNotificationRuleRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
141 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
142 CreateNotificationRuleRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
143 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
144 }
146
148
153 inline NotificationRuleStatus GetStatus() const { return m_status; }
154 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
155 inline void SetStatus(NotificationRuleStatus value) { m_statusHasBeenSet = true; m_status = value; }
158 private:
159
160 Aws::String m_name;
161 bool m_nameHasBeenSet = false;
162
163 Aws::Vector<Aws::String> m_eventTypeIds;
164 bool m_eventTypeIdsHasBeenSet = false;
165
166 Aws::String m_resource;
167 bool m_resourceHasBeenSet = false;
168
169 Aws::Vector<Target> m_targets;
170 bool m_targetsHasBeenSet = false;
171
172 DetailType m_detailType{DetailType::NOT_SET};
173 bool m_detailTypeHasBeenSet = false;
174
175 Aws::String m_clientRequestToken{Aws::Utils::UUID::PseudoRandomUUID()};
176 bool m_clientRequestTokenHasBeenSet = true;
177
179 bool m_tagsHasBeenSet = false;
180
182 bool m_statusHasBeenSet = false;
183 };
184
185} // namespace Model
186} // namespace CodeStarNotifications
187} // 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