AWS SDK for C++

AWS SDK for C++ Version 1.11.785

Loading...
Searching...
No Matches
Rule.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/events/CloudWatchEvents_EXPORTS.h>
9#include <aws/events/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 CloudWatchEvents {
21namespace Model {
22
29class Rule {
30 public:
31 AWS_CLOUDWATCHEVENTS_API Rule() = default;
32 AWS_CLOUDWATCHEVENTS_API Rule(Aws::Utils::Json::JsonView jsonValue);
33 AWS_CLOUDWATCHEVENTS_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_CLOUDWATCHEVENTS_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
96 inline RuleState GetState() const { return m_state; }
97 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
98 inline void SetState(RuleState value) {
99 m_stateHasBeenSet = true;
100 m_state = value;
101 }
102 inline Rule& WithState(RuleState value) {
103 SetState(value);
104 return *this;
105 }
107
109
112 inline const Aws::String& GetDescription() const { return m_description; }
113 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
114 template <typename DescriptionT = Aws::String>
115 void SetDescription(DescriptionT&& value) {
116 m_descriptionHasBeenSet = true;
117 m_description = std::forward<DescriptionT>(value);
118 }
119 template <typename DescriptionT = Aws::String>
120 Rule& WithDescription(DescriptionT&& value) {
121 SetDescription(std::forward<DescriptionT>(value));
122 return *this;
123 }
125
127
133 inline const Aws::String& GetScheduleExpression() const { return m_scheduleExpression; }
134 inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; }
135 template <typename ScheduleExpressionT = Aws::String>
136 void SetScheduleExpression(ScheduleExpressionT&& value) {
137 m_scheduleExpressionHasBeenSet = true;
138 m_scheduleExpression = std::forward<ScheduleExpressionT>(value);
139 }
140 template <typename ScheduleExpressionT = Aws::String>
141 Rule& WithScheduleExpression(ScheduleExpressionT&& value) {
142 SetScheduleExpression(std::forward<ScheduleExpressionT>(value));
143 return *this;
144 }
146
148
156 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
157 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
158 template <typename RoleArnT = Aws::String>
159 void SetRoleArn(RoleArnT&& value) {
160 m_roleArnHasBeenSet = true;
161 m_roleArn = std::forward<RoleArnT>(value);
162 }
163 template <typename RoleArnT = Aws::String>
164 Rule& WithRoleArn(RoleArnT&& value) {
165 SetRoleArn(std::forward<RoleArnT>(value));
166 return *this;
167 }
169
171
176 inline const Aws::String& GetManagedBy() const { return m_managedBy; }
177 inline bool ManagedByHasBeenSet() const { return m_managedByHasBeenSet; }
178 template <typename ManagedByT = Aws::String>
179 void SetManagedBy(ManagedByT&& value) {
180 m_managedByHasBeenSet = true;
181 m_managedBy = std::forward<ManagedByT>(value);
182 }
183 template <typename ManagedByT = Aws::String>
184 Rule& WithManagedBy(ManagedByT&& value) {
185 SetManagedBy(std::forward<ManagedByT>(value));
186 return *this;
187 }
189
191
195 inline const Aws::String& GetEventBusName() const { return m_eventBusName; }
196 inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; }
197 template <typename EventBusNameT = Aws::String>
198 void SetEventBusName(EventBusNameT&& value) {
199 m_eventBusNameHasBeenSet = true;
200 m_eventBusName = std::forward<EventBusNameT>(value);
201 }
202 template <typename EventBusNameT = Aws::String>
203 Rule& WithEventBusName(EventBusNameT&& value) {
204 SetEventBusName(std::forward<EventBusNameT>(value));
205 return *this;
206 }
208 private:
209 Aws::String m_name;
210
211 Aws::String m_arn;
212
213 Aws::String m_eventPattern;
214
216
217 Aws::String m_description;
218
219 Aws::String m_scheduleExpression;
220
221 Aws::String m_roleArn;
222
223 Aws::String m_managedBy;
224
225 Aws::String m_eventBusName;
226 bool m_nameHasBeenSet = false;
227 bool m_arnHasBeenSet = false;
228 bool m_eventPatternHasBeenSet = false;
229 bool m_stateHasBeenSet = false;
230 bool m_descriptionHasBeenSet = false;
231 bool m_scheduleExpressionHasBeenSet = false;
232 bool m_roleArnHasBeenSet = false;
233 bool m_managedByHasBeenSet = false;
234 bool m_eventBusNameHasBeenSet = false;
235};
236
237} // namespace Model
238} // namespace CloudWatchEvents
239} // namespace Aws
const Aws::String & GetArn() const
Definition Rule.h:58
Rule & WithEventPattern(EventPatternT &&value)
Definition Rule.h:86
void SetScheduleExpression(ScheduleExpressionT &&value)
Definition Rule.h:136
void SetState(RuleState value)
Definition Rule.h:98
void SetEventPattern(EventPatternT &&value)
Definition Rule.h:81
Rule & WithScheduleExpression(ScheduleExpressionT &&value)
Definition Rule.h:141
const Aws::String & GetEventPattern() const
Definition Rule.h:78
Rule & WithDescription(DescriptionT &&value)
Definition Rule.h:120
AWS_CLOUDWATCHEVENTS_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
Rule & WithRoleArn(RoleArnT &&value)
Definition Rule.h:164
void SetArn(ArnT &&value)
Definition Rule.h:61
bool DescriptionHasBeenSet() const
Definition Rule.h:113
const Aws::String & GetScheduleExpression() const
Definition Rule.h:133
AWS_CLOUDWATCHEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const
Rule & WithName(NameT &&value)
Definition Rule.h:48
void SetDescription(DescriptionT &&value)
Definition Rule.h:115
Rule & WithState(RuleState value)
Definition Rule.h:102
Rule & WithEventBusName(EventBusNameT &&value)
Definition Rule.h:203
bool ScheduleExpressionHasBeenSet() const
Definition Rule.h:134
bool EventPatternHasBeenSet() const
Definition Rule.h:79
const Aws::String & GetEventBusName() const
Definition Rule.h:195
AWS_CLOUDWATCHEVENTS_API Rule(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetManagedBy() const
Definition Rule.h:176
void SetRoleArn(RoleArnT &&value)
Definition Rule.h:159
AWS_CLOUDWATCHEVENTS_API Rule()=default
const Aws::String & GetDescription() const
Definition Rule.h:112
Rule & WithManagedBy(ManagedByT &&value)
Definition Rule.h:184
RuleState GetState() const
Definition Rule.h:96
Rule & WithArn(ArnT &&value)
Definition Rule.h:66
void SetName(NameT &&value)
Definition Rule.h:43
const Aws::String & GetRoleArn() const
Definition Rule.h:156
void SetManagedBy(ManagedByT &&value)
Definition Rule.h:179
bool EventBusNameHasBeenSet() const
Definition Rule.h:196
void SetEventBusName(EventBusNameT &&value)
Definition Rule.h:198
const Aws::String & GetName() const
Definition Rule.h:40
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue