AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
49 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
50 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
51 inline CreateNotificationRuleRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
52 inline CreateNotificationRuleRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
53 inline CreateNotificationRuleRequest& WithName(const char* value) { SetName(value); return *this;}
55
57
61 inline const Aws::Vector<Aws::String>& GetEventTypeIds() const{ return m_eventTypeIds; }
62 inline bool EventTypeIdsHasBeenSet() const { return m_eventTypeIdsHasBeenSet; }
63 inline void SetEventTypeIds(const Aws::Vector<Aws::String>& value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds = value; }
64 inline void SetEventTypeIds(Aws::Vector<Aws::String>&& value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds = std::move(value); }
67 inline CreateNotificationRuleRequest& AddEventTypeIds(const Aws::String& value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds.push_back(value); return *this; }
68 inline CreateNotificationRuleRequest& AddEventTypeIds(Aws::String&& value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds.push_back(std::move(value)); return *this; }
69 inline CreateNotificationRuleRequest& AddEventTypeIds(const char* value) { m_eventTypeIdsHasBeenSet = true; m_eventTypeIds.push_back(value); return *this; }
71
73
78 inline const Aws::String& GetResource() const{ return m_resource; }
79 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
80 inline void SetResource(const Aws::String& value) { m_resourceHasBeenSet = true; m_resource = value; }
81 inline void SetResource(Aws::String&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); }
82 inline void SetResource(const char* value) { m_resourceHasBeenSet = true; m_resource.assign(value); }
83 inline CreateNotificationRuleRequest& WithResource(const Aws::String& value) { SetResource(value); return *this;}
84 inline CreateNotificationRuleRequest& WithResource(Aws::String&& value) { SetResource(std::move(value)); return *this;}
85 inline CreateNotificationRuleRequest& WithResource(const char* value) { SetResource(value); return *this;}
87
89
93 inline const Aws::Vector<Target>& GetTargets() const{ return m_targets; }
94 inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
95 inline void SetTargets(const Aws::Vector<Target>& value) { m_targetsHasBeenSet = true; m_targets = value; }
96 inline void SetTargets(Aws::Vector<Target>&& value) { m_targetsHasBeenSet = true; m_targets = std::move(value); }
97 inline CreateNotificationRuleRequest& WithTargets(const Aws::Vector<Target>& value) { SetTargets(value); return *this;}
98 inline CreateNotificationRuleRequest& WithTargets(Aws::Vector<Target>&& value) { SetTargets(std::move(value)); return *this;}
99 inline CreateNotificationRuleRequest& AddTargets(const Target& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; }
100 inline CreateNotificationRuleRequest& AddTargets(Target&& value) { m_targetsHasBeenSet = true; m_targets.push_back(std::move(value)); return *this; }
102
104
111 inline const DetailType& GetDetailType() const{ return m_detailType; }
112 inline bool DetailTypeHasBeenSet() const { return m_detailTypeHasBeenSet; }
113 inline void SetDetailType(const DetailType& value) { m_detailTypeHasBeenSet = true; m_detailType = value; }
114 inline void SetDetailType(DetailType&& value) { m_detailTypeHasBeenSet = true; m_detailType = std::move(value); }
115 inline CreateNotificationRuleRequest& WithDetailType(const DetailType& value) { SetDetailType(value); return *this;}
116 inline CreateNotificationRuleRequest& WithDetailType(DetailType&& value) { SetDetailType(std::move(value)); return *this;}
118
120
129 inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; }
130 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
131 inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; }
132 inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); }
133 inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); }
136 inline CreateNotificationRuleRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;}
138
140
144 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
145 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
146 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
147 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
149 inline CreateNotificationRuleRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
150 inline CreateNotificationRuleRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
151 inline CreateNotificationRuleRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
152 inline CreateNotificationRuleRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
153 inline CreateNotificationRuleRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
154 inline CreateNotificationRuleRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
155 inline CreateNotificationRuleRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
156 inline CreateNotificationRuleRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
158
160
165 inline const NotificationRuleStatus& GetStatus() const{ return m_status; }
166 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
167 inline void SetStatus(const NotificationRuleStatus& value) { m_statusHasBeenSet = true; m_status = value; }
168 inline void SetStatus(NotificationRuleStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
169 inline CreateNotificationRuleRequest& WithStatus(const NotificationRuleStatus& value) { SetStatus(value); return *this;}
170 inline CreateNotificationRuleRequest& WithStatus(NotificationRuleStatus&& value) { SetStatus(std::move(value)); return *this;}
172 private:
173
174 Aws::String m_name;
175 bool m_nameHasBeenSet = false;
176
177 Aws::Vector<Aws::String> m_eventTypeIds;
178 bool m_eventTypeIdsHasBeenSet = false;
179
180 Aws::String m_resource;
181 bool m_resourceHasBeenSet = false;
182
183 Aws::Vector<Target> m_targets;
184 bool m_targetsHasBeenSet = false;
185
186 DetailType m_detailType;
187 bool m_detailTypeHasBeenSet = false;
188
189 Aws::String m_clientRequestToken;
190 bool m_clientRequestTokenHasBeenSet = false;
191
193 bool m_tagsHasBeenSet = false;
194
195 NotificationRuleStatus m_status;
196 bool m_statusHasBeenSet = false;
197 };
198
199} // namespace Model
200} // namespace CodeStarNotifications
201} // namespace Aws
CreateNotificationRuleRequest & AddTags(Aws::String &&key, Aws::String &&value)
CreateNotificationRuleRequest & AddEventTypeIds(const char *value)
CreateNotificationRuleRequest & WithClientRequestToken(Aws::String &&value)
CreateNotificationRuleRequest & WithClientRequestToken(const char *value)
CreateNotificationRuleRequest & WithClientRequestToken(const Aws::String &value)
CreateNotificationRuleRequest & WithName(const Aws::String &value)
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
CreateNotificationRuleRequest & WithDetailType(DetailType &&value)
CreateNotificationRuleRequest & AddTags(const char *key, Aws::String &&value)
CreateNotificationRuleRequest & WithResource(const Aws::String &value)
CreateNotificationRuleRequest & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
CreateNotificationRuleRequest & AddEventTypeIds(const Aws::String &value)
AWS_CODESTARNOTIFICATIONS_API Aws::String SerializePayload() const override
CreateNotificationRuleRequest & AddTags(Aws::String &&key, const char *value)
CreateNotificationRuleRequest & AddEventTypeIds(Aws::String &&value)
CreateNotificationRuleRequest & WithEventTypeIds(const Aws::Vector< Aws::String > &value)
CreateNotificationRuleRequest & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
CreateNotificationRuleRequest & AddTags(const char *key, const char *value)
CreateNotificationRuleRequest & WithName(Aws::String &&value)
CreateNotificationRuleRequest & WithEventTypeIds(Aws::Vector< Aws::String > &&value)
CreateNotificationRuleRequest & WithStatus(NotificationRuleStatus &&value)
CreateNotificationRuleRequest & WithStatus(const NotificationRuleStatus &value)
CreateNotificationRuleRequest & AddTags(const Aws::String &key, const Aws::String &value)
CreateNotificationRuleRequest & AddTags(const Aws::String &key, Aws::String &&value)
CreateNotificationRuleRequest & AddTags(Aws::String &&key, const Aws::String &value)
CreateNotificationRuleRequest & WithDetailType(const DetailType &value)
CreateNotificationRuleRequest & AddTargets(const Target &value)
CreateNotificationRuleRequest & WithTargets(Aws::Vector< Target > &&value)
CreateNotificationRuleRequest & WithTargets(const Aws::Vector< Target > &value)
CreateNotificationRuleRequest & WithResource(Aws::String &&value)
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