AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Rule.h
1
6#pragma once
7#include <aws/events/CloudWatchEvents_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/events/model/RuleState.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace CloudWatchEvents
23{
24namespace Model
25{
26
33 class Rule
34 {
35 public:
36 AWS_CLOUDWATCHEVENTS_API Rule() = default;
37 AWS_CLOUDWATCHEVENTS_API Rule(Aws::Utils::Json::JsonView jsonValue);
38 AWS_CLOUDWATCHEVENTS_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_CLOUDWATCHEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const;
40
41
43
46 inline const Aws::String& GetName() const { return m_name; }
47 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 template<typename NameT = Aws::String>
49 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
50 template<typename NameT = Aws::String>
51 Rule& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
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) { m_arnHasBeenSet = true; m_arn = std::forward<ArnT>(value); }
62 template<typename ArnT = Aws::String>
63 Rule& WithArn(ArnT&& value) { SetArn(std::forward<ArnT>(value)); return *this;}
65
67
72 inline const Aws::String& GetEventPattern() const { return m_eventPattern; }
73 inline bool EventPatternHasBeenSet() const { return m_eventPatternHasBeenSet; }
74 template<typename EventPatternT = Aws::String>
75 void SetEventPattern(EventPatternT&& value) { m_eventPatternHasBeenSet = true; m_eventPattern = std::forward<EventPatternT>(value); }
76 template<typename EventPatternT = Aws::String>
77 Rule& WithEventPattern(EventPatternT&& value) { SetEventPattern(std::forward<EventPatternT>(value)); return *this;}
79
81
84 inline RuleState GetState() const { return m_state; }
85 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
86 inline void SetState(RuleState value) { m_stateHasBeenSet = true; m_state = value; }
87 inline Rule& WithState(RuleState value) { SetState(value); return *this;}
89
91
94 inline const Aws::String& GetDescription() const { return m_description; }
95 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
96 template<typename DescriptionT = Aws::String>
97 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
98 template<typename DescriptionT = Aws::String>
99 Rule& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
101
103
109 inline const Aws::String& GetScheduleExpression() const { return m_scheduleExpression; }
110 inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; }
111 template<typename ScheduleExpressionT = Aws::String>
112 void SetScheduleExpression(ScheduleExpressionT&& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = std::forward<ScheduleExpressionT>(value); }
113 template<typename ScheduleExpressionT = Aws::String>
114 Rule& WithScheduleExpression(ScheduleExpressionT&& value) { SetScheduleExpression(std::forward<ScheduleExpressionT>(value)); return *this;}
116
118
126 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
127 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
128 template<typename RoleArnT = Aws::String>
129 void SetRoleArn(RoleArnT&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::forward<RoleArnT>(value); }
130 template<typename RoleArnT = Aws::String>
131 Rule& WithRoleArn(RoleArnT&& value) { SetRoleArn(std::forward<RoleArnT>(value)); return *this;}
133
135
140 inline const Aws::String& GetManagedBy() const { return m_managedBy; }
141 inline bool ManagedByHasBeenSet() const { return m_managedByHasBeenSet; }
142 template<typename ManagedByT = Aws::String>
143 void SetManagedBy(ManagedByT&& value) { m_managedByHasBeenSet = true; m_managedBy = std::forward<ManagedByT>(value); }
144 template<typename ManagedByT = Aws::String>
145 Rule& WithManagedBy(ManagedByT&& value) { SetManagedBy(std::forward<ManagedByT>(value)); return *this;}
147
149
153 inline const Aws::String& GetEventBusName() const { return m_eventBusName; }
154 inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; }
155 template<typename EventBusNameT = Aws::String>
156 void SetEventBusName(EventBusNameT&& value) { m_eventBusNameHasBeenSet = true; m_eventBusName = std::forward<EventBusNameT>(value); }
157 template<typename EventBusNameT = Aws::String>
158 Rule& WithEventBusName(EventBusNameT&& value) { SetEventBusName(std::forward<EventBusNameT>(value)); return *this;}
160 private:
161
162 Aws::String m_name;
163 bool m_nameHasBeenSet = false;
164
165 Aws::String m_arn;
166 bool m_arnHasBeenSet = false;
167
168 Aws::String m_eventPattern;
169 bool m_eventPatternHasBeenSet = false;
170
172 bool m_stateHasBeenSet = false;
173
174 Aws::String m_description;
175 bool m_descriptionHasBeenSet = false;
176
177 Aws::String m_scheduleExpression;
178 bool m_scheduleExpressionHasBeenSet = false;
179
180 Aws::String m_roleArn;
181 bool m_roleArnHasBeenSet = false;
182
183 Aws::String m_managedBy;
184 bool m_managedByHasBeenSet = false;
185
186 Aws::String m_eventBusName;
187 bool m_eventBusNameHasBeenSet = false;
188 };
189
190} // namespace Model
191} // namespace CloudWatchEvents
192} // namespace Aws
const Aws::String & GetArn() const
Definition Rule.h:58
Rule & WithEventPattern(EventPatternT &&value)
Definition Rule.h:77
void SetScheduleExpression(ScheduleExpressionT &&value)
Definition Rule.h:112
void SetState(RuleState value)
Definition Rule.h:86
void SetEventPattern(EventPatternT &&value)
Definition Rule.h:75
Rule & WithScheduleExpression(ScheduleExpressionT &&value)
Definition Rule.h:114
const Aws::String & GetEventPattern() const
Definition Rule.h:72
Rule & WithDescription(DescriptionT &&value)
Definition Rule.h:99
AWS_CLOUDWATCHEVENTS_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
Rule & WithRoleArn(RoleArnT &&value)
Definition Rule.h:131
void SetArn(ArnT &&value)
Definition Rule.h:61
bool DescriptionHasBeenSet() const
Definition Rule.h:95
const Aws::String & GetScheduleExpression() const
Definition Rule.h:109
AWS_CLOUDWATCHEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const
Rule & WithName(NameT &&value)
Definition Rule.h:51
void SetDescription(DescriptionT &&value)
Definition Rule.h:97
Rule & WithState(RuleState value)
Definition Rule.h:87
Rule & WithEventBusName(EventBusNameT &&value)
Definition Rule.h:158
bool ScheduleExpressionHasBeenSet() const
Definition Rule.h:110
bool EventPatternHasBeenSet() const
Definition Rule.h:73
const Aws::String & GetEventBusName() const
Definition Rule.h:153
AWS_CLOUDWATCHEVENTS_API Rule(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetManagedBy() const
Definition Rule.h:140
void SetRoleArn(RoleArnT &&value)
Definition Rule.h:129
AWS_CLOUDWATCHEVENTS_API Rule()=default
const Aws::String & GetDescription() const
Definition Rule.h:94
Rule & WithManagedBy(ManagedByT &&value)
Definition Rule.h:145
RuleState GetState() const
Definition Rule.h:84
Rule & WithArn(ArnT &&value)
Definition Rule.h:63
void SetName(NameT &&value)
Definition Rule.h:49
const Aws::String & GetRoleArn() const
Definition Rule.h:126
void SetManagedBy(ManagedByT &&value)
Definition Rule.h:143
bool EventBusNameHasBeenSet() const
Definition Rule.h:154
void SetEventBusName(EventBusNameT &&value)
Definition Rule.h:156
const Aws::String & GetName() const
Definition Rule.h:46
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue