AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
PutRuleRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/eventbridge/EventBridgeRequest.h>
10#include <aws/eventbridge/EventBridge_EXPORTS.h>
11#include <aws/eventbridge/model/RuleState.h>
12#include <aws/eventbridge/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace EventBridge {
18namespace Model {
19
23 public:
24 AWS_EVENTBRIDGE_API PutRuleRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "PutRule"; }
31
32 AWS_EVENTBRIDGE_API Aws::String SerializePayload() const override;
33
34 AWS_EVENTBRIDGE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
35
37
40 inline const Aws::String& GetName() const { return m_name; }
41 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
42 template <typename NameT = Aws::String>
43 void SetName(NameT&& value) {
44 m_nameHasBeenSet = true;
45 m_name = std::forward<NameT>(value);
46 }
47 template <typename NameT = Aws::String>
48 PutRuleRequest& WithName(NameT&& value) {
49 SetName(std::forward<NameT>(value));
50 return *this;
51 }
53
55
59 inline const Aws::String& GetScheduleExpression() const { return m_scheduleExpression; }
60 inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; }
61 template <typename ScheduleExpressionT = Aws::String>
62 void SetScheduleExpression(ScheduleExpressionT&& value) {
63 m_scheduleExpressionHasBeenSet = true;
64 m_scheduleExpression = std::forward<ScheduleExpressionT>(value);
65 }
66 template <typename ScheduleExpressionT = Aws::String>
67 PutRuleRequest& WithScheduleExpression(ScheduleExpressionT&& value) {
68 SetScheduleExpression(std::forward<ScheduleExpressionT>(value));
69 return *this;
70 }
72
74
80 inline const Aws::String& GetEventPattern() const { return m_eventPattern; }
81 inline bool EventPatternHasBeenSet() const { return m_eventPatternHasBeenSet; }
82 template <typename EventPatternT = Aws::String>
83 void SetEventPattern(EventPatternT&& value) {
84 m_eventPatternHasBeenSet = true;
85 m_eventPattern = std::forward<EventPatternT>(value);
86 }
87 template <typename EventPatternT = Aws::String>
88 PutRuleRequest& WithEventPattern(EventPatternT&& value) {
89 SetEventPattern(std::forward<EventPatternT>(value));
90 return *this;
91 }
93
95
119 inline RuleState GetState() const { return m_state; }
120 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
121 inline void SetState(RuleState value) {
122 m_stateHasBeenSet = true;
123 m_state = value;
124 }
126 SetState(value);
127 return *this;
128 }
130
132
135 inline const Aws::String& GetDescription() const { return m_description; }
136 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
137 template <typename DescriptionT = Aws::String>
138 void SetDescription(DescriptionT&& value) {
139 m_descriptionHasBeenSet = true;
140 m_description = std::forward<DescriptionT>(value);
141 }
142 template <typename DescriptionT = Aws::String>
143 PutRuleRequest& WithDescription(DescriptionT&& value) {
144 SetDescription(std::forward<DescriptionT>(value));
145 return *this;
146 }
148
150
158 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
159 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
160 template <typename RoleArnT = Aws::String>
161 void SetRoleArn(RoleArnT&& value) {
162 m_roleArnHasBeenSet = true;
163 m_roleArn = std::forward<RoleArnT>(value);
164 }
165 template <typename RoleArnT = Aws::String>
166 PutRuleRequest& WithRoleArn(RoleArnT&& value) {
167 SetRoleArn(std::forward<RoleArnT>(value));
168 return *this;
169 }
171
173
176 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
177 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
178 template <typename TagsT = Aws::Vector<Tag>>
179 void SetTags(TagsT&& value) {
180 m_tagsHasBeenSet = true;
181 m_tags = std::forward<TagsT>(value);
182 }
183 template <typename TagsT = Aws::Vector<Tag>>
184 PutRuleRequest& WithTags(TagsT&& value) {
185 SetTags(std::forward<TagsT>(value));
186 return *this;
187 }
188 template <typename TagsT = Tag>
189 PutRuleRequest& AddTags(TagsT&& value) {
190 m_tagsHasBeenSet = true;
191 m_tags.emplace_back(std::forward<TagsT>(value));
192 return *this;
193 }
195
197
201 inline const Aws::String& GetEventBusName() const { return m_eventBusName; }
202 inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; }
203 template <typename EventBusNameT = Aws::String>
204 void SetEventBusName(EventBusNameT&& value) {
205 m_eventBusNameHasBeenSet = true;
206 m_eventBusName = std::forward<EventBusNameT>(value);
207 }
208 template <typename EventBusNameT = Aws::String>
209 PutRuleRequest& WithEventBusName(EventBusNameT&& value) {
210 SetEventBusName(std::forward<EventBusNameT>(value));
211 return *this;
212 }
214 private:
215 Aws::String m_name;
216
217 Aws::String m_scheduleExpression;
218
219 Aws::String m_eventPattern;
220
222
223 Aws::String m_description;
224
225 Aws::String m_roleArn;
226
227 Aws::Vector<Tag> m_tags;
228
229 Aws::String m_eventBusName;
230 bool m_nameHasBeenSet = false;
231 bool m_scheduleExpressionHasBeenSet = false;
232 bool m_eventPatternHasBeenSet = false;
233 bool m_stateHasBeenSet = false;
234 bool m_descriptionHasBeenSet = false;
235 bool m_roleArnHasBeenSet = false;
236 bool m_tagsHasBeenSet = false;
237 bool m_eventBusNameHasBeenSet = false;
238};
239
240} // namespace Model
241} // namespace EventBridge
242} // namespace Aws
const Aws::String & GetName() const
const Aws::String & GetEventPattern() const
void SetScheduleExpression(ScheduleExpressionT &&value)
PutRuleRequest & WithName(NameT &&value)
PutRuleRequest & WithEventPattern(EventPatternT &&value)
AWS_EVENTBRIDGE_API Aws::String SerializePayload() const override
PutRuleRequest & WithDescription(DescriptionT &&value)
PutRuleRequest & AddTags(TagsT &&value)
PutRuleRequest & WithEventBusName(EventBusNameT &&value)
const Aws::String & GetRoleArn() const
virtual const char * GetServiceRequestName() const override
const Aws::String & GetScheduleExpression() const
void SetEventPattern(EventPatternT &&value)
PutRuleRequest & WithScheduleExpression(ScheduleExpressionT &&value)
const Aws::String & GetEventBusName() const
void SetDescription(DescriptionT &&value)
AWS_EVENTBRIDGE_API PutRuleRequest()=default
PutRuleRequest & WithTags(TagsT &&value)
const Aws::String & GetDescription() const
PutRuleRequest & WithState(RuleState value)
const Aws::Vector< Tag > & GetTags() const
void SetEventBusName(EventBusNameT &&value)
AWS_EVENTBRIDGE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutRuleRequest & WithRoleArn(RoleArnT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector