AWS SDK for C++

AWS SDK for C++ Version 1.11.788

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/events/CloudWatchEventsRequest.h>
10#include <aws/events/CloudWatchEvents_EXPORTS.h>
11#include <aws/events/model/RuleState.h>
12#include <aws/events/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace CloudWatchEvents {
18namespace Model {
19
23 public:
24 AWS_CLOUDWATCHEVENTS_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_CLOUDWATCHEVENTS_API Aws::String SerializePayload() const override;
33
34 AWS_CLOUDWATCHEVENTS_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
79 inline const Aws::String& GetEventPattern() const { return m_eventPattern; }
80 inline bool EventPatternHasBeenSet() const { return m_eventPatternHasBeenSet; }
81 template <typename EventPatternT = Aws::String>
82 void SetEventPattern(EventPatternT&& value) {
83 m_eventPatternHasBeenSet = true;
84 m_eventPattern = std::forward<EventPatternT>(value);
85 }
86 template <typename EventPatternT = Aws::String>
87 PutRuleRequest& WithEventPattern(EventPatternT&& value) {
88 SetEventPattern(std::forward<EventPatternT>(value));
89 return *this;
90 }
92
94
97 inline RuleState GetState() const { return m_state; }
98 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
99 inline void SetState(RuleState value) {
100 m_stateHasBeenSet = true;
101 m_state = value;
102 }
104 SetState(value);
105 return *this;
106 }
108
110
113 inline const Aws::String& GetDescription() const { return m_description; }
114 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
115 template <typename DescriptionT = Aws::String>
116 void SetDescription(DescriptionT&& value) {
117 m_descriptionHasBeenSet = true;
118 m_description = std::forward<DescriptionT>(value);
119 }
120 template <typename DescriptionT = Aws::String>
121 PutRuleRequest& WithDescription(DescriptionT&& value) {
122 SetDescription(std::forward<DescriptionT>(value));
123 return *this;
124 }
126
128
136 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
137 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
138 template <typename RoleArnT = Aws::String>
139 void SetRoleArn(RoleArnT&& value) {
140 m_roleArnHasBeenSet = true;
141 m_roleArn = std::forward<RoleArnT>(value);
142 }
143 template <typename RoleArnT = Aws::String>
144 PutRuleRequest& WithRoleArn(RoleArnT&& value) {
145 SetRoleArn(std::forward<RoleArnT>(value));
146 return *this;
147 }
149
151
154 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
155 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
156 template <typename TagsT = Aws::Vector<Tag>>
157 void SetTags(TagsT&& value) {
158 m_tagsHasBeenSet = true;
159 m_tags = std::forward<TagsT>(value);
160 }
161 template <typename TagsT = Aws::Vector<Tag>>
162 PutRuleRequest& WithTags(TagsT&& value) {
163 SetTags(std::forward<TagsT>(value));
164 return *this;
165 }
166 template <typename TagsT = Tag>
167 PutRuleRequest& AddTags(TagsT&& value) {
168 m_tagsHasBeenSet = true;
169 m_tags.emplace_back(std::forward<TagsT>(value));
170 return *this;
171 }
173
175
179 inline const Aws::String& GetEventBusName() const { return m_eventBusName; }
180 inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; }
181 template <typename EventBusNameT = Aws::String>
182 void SetEventBusName(EventBusNameT&& value) {
183 m_eventBusNameHasBeenSet = true;
184 m_eventBusName = std::forward<EventBusNameT>(value);
185 }
186 template <typename EventBusNameT = Aws::String>
187 PutRuleRequest& WithEventBusName(EventBusNameT&& value) {
188 SetEventBusName(std::forward<EventBusNameT>(value));
189 return *this;
190 }
192 private:
193 Aws::String m_name;
194
195 Aws::String m_scheduleExpression;
196
197 Aws::String m_eventPattern;
198
200
201 Aws::String m_description;
202
203 Aws::String m_roleArn;
204
205 Aws::Vector<Tag> m_tags;
206
207 Aws::String m_eventBusName;
208 bool m_nameHasBeenSet = false;
209 bool m_scheduleExpressionHasBeenSet = false;
210 bool m_eventPatternHasBeenSet = false;
211 bool m_stateHasBeenSet = false;
212 bool m_descriptionHasBeenSet = false;
213 bool m_roleArnHasBeenSet = false;
214 bool m_tagsHasBeenSet = false;
215 bool m_eventBusNameHasBeenSet = false;
216};
217
218} // namespace Model
219} // namespace CloudWatchEvents
220} // namespace Aws
PutRuleRequest & WithState(RuleState value)
PutRuleRequest & WithEventPattern(EventPatternT &&value)
const Aws::Vector< Tag > & GetTags() const
AWS_CLOUDWATCHEVENTS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::String & GetScheduleExpression() const
const Aws::String & GetEventPattern() const
virtual const char * GetServiceRequestName() const override
PutRuleRequest & AddTags(TagsT &&value)
PutRuleRequest & WithTags(TagsT &&value)
PutRuleRequest & WithRoleArn(RoleArnT &&value)
PutRuleRequest & WithName(NameT &&value)
void SetScheduleExpression(ScheduleExpressionT &&value)
AWS_CLOUDWATCHEVENTS_API PutRuleRequest()=default
const Aws::String & GetEventBusName() const
PutRuleRequest & WithDescription(DescriptionT &&value)
void SetEventBusName(EventBusNameT &&value)
AWS_CLOUDWATCHEVENTS_API Aws::String SerializePayload() const override
PutRuleRequest & WithEventBusName(EventBusNameT &&value)
void SetEventPattern(EventPatternT &&value)
PutRuleRequest & WithScheduleExpression(ScheduleExpressionT &&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