AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
Rule.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/eventbridge/EventBridge_EXPORTS.h>
9#include <aws/eventbridge/model/RuleState.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace EventBridge {
21namespace Model {
22
29class Rule {
30 public:
31 AWS_EVENTBRIDGE_API Rule() = default;
32 AWS_EVENTBRIDGE_API Rule(Aws::Utils::Json::JsonView jsonValue);
33 AWS_EVENTBRIDGE_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_EVENTBRIDGE_API Aws::Utils::Json::JsonValue Jsonize() const;
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 Rule& WithName(NameT&& value) {
49 SetName(std::forward<NameT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::String& GetArn() const { return m_arn; }
59 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
60 template <typename ArnT = Aws::String>
61 void SetArn(ArnT&& value) {
62 m_arnHasBeenSet = true;
63 m_arn = std::forward<ArnT>(value);
64 }
65 template <typename ArnT = Aws::String>
66 Rule& WithArn(ArnT&& value) {
67 SetArn(std::forward<ArnT>(value));
68 return *this;
69 }
71
73
78 inline const Aws::String& GetEventPattern() const { return m_eventPattern; }
79 inline bool EventPatternHasBeenSet() const { return m_eventPatternHasBeenSet; }
80 template <typename EventPatternT = Aws::String>
81 void SetEventPattern(EventPatternT&& value) {
82 m_eventPatternHasBeenSet = true;
83 m_eventPattern = std::forward<EventPatternT>(value);
84 }
85 template <typename EventPatternT = Aws::String>
86 Rule& WithEventPattern(EventPatternT&& value) {
87 SetEventPattern(std::forward<EventPatternT>(value));
88 return *this;
89 }
91
93
117 inline RuleState GetState() const { return m_state; }
118 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
119 inline void SetState(RuleState value) {
120 m_stateHasBeenSet = true;
121 m_state = value;
122 }
123 inline Rule& WithState(RuleState value) {
124 SetState(value);
125 return *this;
126 }
128
130
133 inline const Aws::String& GetDescription() const { return m_description; }
134 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
135 template <typename DescriptionT = Aws::String>
136 void SetDescription(DescriptionT&& value) {
137 m_descriptionHasBeenSet = true;
138 m_description = std::forward<DescriptionT>(value);
139 }
140 template <typename DescriptionT = Aws::String>
141 Rule& WithDescription(DescriptionT&& value) {
142 SetDescription(std::forward<DescriptionT>(value));
143 return *this;
144 }
146
148
154 inline const Aws::String& GetScheduleExpression() const { return m_scheduleExpression; }
155 inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; }
156 template <typename ScheduleExpressionT = Aws::String>
157 void SetScheduleExpression(ScheduleExpressionT&& value) {
158 m_scheduleExpressionHasBeenSet = true;
159 m_scheduleExpression = std::forward<ScheduleExpressionT>(value);
160 }
161 template <typename ScheduleExpressionT = Aws::String>
162 Rule& WithScheduleExpression(ScheduleExpressionT&& value) {
163 SetScheduleExpression(std::forward<ScheduleExpressionT>(value));
164 return *this;
165 }
167
169
177 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
178 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
179 template <typename RoleArnT = Aws::String>
180 void SetRoleArn(RoleArnT&& value) {
181 m_roleArnHasBeenSet = true;
182 m_roleArn = std::forward<RoleArnT>(value);
183 }
184 template <typename RoleArnT = Aws::String>
185 Rule& WithRoleArn(RoleArnT&& value) {
186 SetRoleArn(std::forward<RoleArnT>(value));
187 return *this;
188 }
190
192
197 inline const Aws::String& GetManagedBy() const { return m_managedBy; }
198 inline bool ManagedByHasBeenSet() const { return m_managedByHasBeenSet; }
199 template <typename ManagedByT = Aws::String>
200 void SetManagedBy(ManagedByT&& value) {
201 m_managedByHasBeenSet = true;
202 m_managedBy = std::forward<ManagedByT>(value);
203 }
204 template <typename ManagedByT = Aws::String>
205 Rule& WithManagedBy(ManagedByT&& value) {
206 SetManagedBy(std::forward<ManagedByT>(value));
207 return *this;
208 }
210
212
216 inline const Aws::String& GetEventBusName() const { return m_eventBusName; }
217 inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; }
218 template <typename EventBusNameT = Aws::String>
219 void SetEventBusName(EventBusNameT&& value) {
220 m_eventBusNameHasBeenSet = true;
221 m_eventBusName = std::forward<EventBusNameT>(value);
222 }
223 template <typename EventBusNameT = Aws::String>
224 Rule& WithEventBusName(EventBusNameT&& value) {
225 SetEventBusName(std::forward<EventBusNameT>(value));
226 return *this;
227 }
229 private:
230 Aws::String m_name;
231
232 Aws::String m_arn;
233
234 Aws::String m_eventPattern;
235
237
238 Aws::String m_description;
239
240 Aws::String m_scheduleExpression;
241
242 Aws::String m_roleArn;
243
244 Aws::String m_managedBy;
245
246 Aws::String m_eventBusName;
247 bool m_nameHasBeenSet = false;
248 bool m_arnHasBeenSet = false;
249 bool m_eventPatternHasBeenSet = false;
250 bool m_stateHasBeenSet = false;
251 bool m_descriptionHasBeenSet = false;
252 bool m_scheduleExpressionHasBeenSet = false;
253 bool m_roleArnHasBeenSet = false;
254 bool m_managedByHasBeenSet = false;
255 bool m_eventBusNameHasBeenSet = false;
256};
257
258} // namespace Model
259} // namespace EventBridge
260} // namespace Aws
bool NameHasBeenSet() const
Definition Rule.h:41
bool ArnHasBeenSet() const
Definition Rule.h:59
bool EventBusNameHasBeenSet() const
Definition Rule.h:217
Rule & WithScheduleExpression(ScheduleExpressionT &&value)
Definition Rule.h:162
Rule & WithState(RuleState value)
Definition Rule.h:123
void SetManagedBy(ManagedByT &&value)
Definition Rule.h:200
Rule & WithRoleArn(RoleArnT &&value)
Definition Rule.h:185
Rule & WithDescription(DescriptionT &&value)
Definition Rule.h:141
AWS_EVENTBRIDGE_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetManagedBy() const
Definition Rule.h:197
Rule & WithArn(ArnT &&value)
Definition Rule.h:66
void SetEventPattern(EventPatternT &&value)
Definition Rule.h:81
AWS_EVENTBRIDGE_API Rule()=default
bool DescriptionHasBeenSet() const
Definition Rule.h:134
const Aws::String & GetDescription() const
Definition Rule.h:133
bool RoleArnHasBeenSet() const
Definition Rule.h:178
const Aws::String & GetScheduleExpression() const
Definition Rule.h:154
bool ManagedByHasBeenSet() const
Definition Rule.h:198
bool StateHasBeenSet() const
Definition Rule.h:118
AWS_EVENTBRIDGE_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetArn(ArnT &&value)
Definition Rule.h:61
Rule & WithEventBusName(EventBusNameT &&value)
Definition Rule.h:224
void SetRoleArn(RoleArnT &&value)
Definition Rule.h:180
bool ScheduleExpressionHasBeenSet() const
Definition Rule.h:155
const Aws::String & GetArn() const
Definition Rule.h:58
void SetScheduleExpression(ScheduleExpressionT &&value)
Definition Rule.h:157
void SetState(RuleState value)
Definition Rule.h:119
const Aws::String & GetEventBusName() const
Definition Rule.h:216
void SetName(NameT &&value)
Definition Rule.h:43
bool EventPatternHasBeenSet() const
Definition Rule.h:79
const Aws::String & GetName() const
Definition Rule.h:40
Rule & WithEventPattern(EventPatternT &&value)
Definition Rule.h:86
RuleState GetState() const
Definition Rule.h:117
const Aws::String & GetEventPattern() const
Definition Rule.h:78
void SetEventBusName(EventBusNameT &&value)
Definition Rule.h:219
AWS_EVENTBRIDGE_API Rule(Aws::Utils::Json::JsonView jsonValue)
Rule & WithName(NameT &&value)
Definition Rule.h:48
Rule & WithManagedBy(ManagedByT &&value)
Definition Rule.h:205
void SetDescription(DescriptionT &&value)
Definition Rule.h:136
const Aws::String & GetRoleArn() const
Definition Rule.h:177
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue