AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
Rule.h
1
6#pragma once
7#include <aws/connect/Connect_EXPORTS.h>
8#include <aws/connect/model/RuleAction.h>
9#include <aws/connect/model/RulePublishStatus.h>
10#include <aws/connect/model/RuleTriggerEventSource.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace Connect {
26namespace Model {
27
33class Rule {
34 public:
35 AWS_CONNECT_API Rule() = default;
36 AWS_CONNECT_API Rule(Aws::Utils::Json::JsonView jsonValue);
37 AWS_CONNECT_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_CONNECT_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline const Aws::String& GetName() const { return m_name; }
45 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
46 template <typename NameT = Aws::String>
47 void SetName(NameT&& value) {
48 m_nameHasBeenSet = true;
49 m_name = std::forward<NameT>(value);
50 }
51 template <typename NameT = Aws::String>
52 Rule& WithName(NameT&& value) {
53 SetName(std::forward<NameT>(value));
54 return *this;
55 }
57
59
62 inline const Aws::String& GetRuleId() const { return m_ruleId; }
63 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
64 template <typename RuleIdT = Aws::String>
65 void SetRuleId(RuleIdT&& value) {
66 m_ruleIdHasBeenSet = true;
67 m_ruleId = std::forward<RuleIdT>(value);
68 }
69 template <typename RuleIdT = Aws::String>
70 Rule& WithRuleId(RuleIdT&& value) {
71 SetRuleId(std::forward<RuleIdT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::String& GetRuleArn() const { return m_ruleArn; }
81 inline bool RuleArnHasBeenSet() const { return m_ruleArnHasBeenSet; }
82 template <typename RuleArnT = Aws::String>
83 void SetRuleArn(RuleArnT&& value) {
84 m_ruleArnHasBeenSet = true;
85 m_ruleArn = std::forward<RuleArnT>(value);
86 }
87 template <typename RuleArnT = Aws::String>
88 Rule& WithRuleArn(RuleArnT&& value) {
89 SetRuleArn(std::forward<RuleArnT>(value));
90 return *this;
91 }
93
95
98 inline const RuleTriggerEventSource& GetTriggerEventSource() const { return m_triggerEventSource; }
99 inline bool TriggerEventSourceHasBeenSet() const { return m_triggerEventSourceHasBeenSet; }
100 template <typename TriggerEventSourceT = RuleTriggerEventSource>
101 void SetTriggerEventSource(TriggerEventSourceT&& value) {
102 m_triggerEventSourceHasBeenSet = true;
103 m_triggerEventSource = std::forward<TriggerEventSourceT>(value);
104 }
105 template <typename TriggerEventSourceT = RuleTriggerEventSource>
106 Rule& WithTriggerEventSource(TriggerEventSourceT&& value) {
107 SetTriggerEventSource(std::forward<TriggerEventSourceT>(value));
108 return *this;
109 }
111
113
116 inline const Aws::String& GetFunction() const { return m_function; }
117 inline bool FunctionHasBeenSet() const { return m_functionHasBeenSet; }
118 template <typename FunctionT = Aws::String>
119 void SetFunction(FunctionT&& value) {
120 m_functionHasBeenSet = true;
121 m_function = std::forward<FunctionT>(value);
122 }
123 template <typename FunctionT = Aws::String>
124 Rule& WithFunction(FunctionT&& value) {
125 SetFunction(std::forward<FunctionT>(value));
126 return *this;
127 }
129
131
134 inline const Aws::Vector<RuleAction>& GetActions() const { return m_actions; }
135 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
136 template <typename ActionsT = Aws::Vector<RuleAction>>
137 void SetActions(ActionsT&& value) {
138 m_actionsHasBeenSet = true;
139 m_actions = std::forward<ActionsT>(value);
140 }
141 template <typename ActionsT = Aws::Vector<RuleAction>>
142 Rule& WithActions(ActionsT&& value) {
143 SetActions(std::forward<ActionsT>(value));
144 return *this;
145 }
146 template <typename ActionsT = RuleAction>
147 Rule& AddActions(ActionsT&& value) {
148 m_actionsHasBeenSet = true;
149 m_actions.emplace_back(std::forward<ActionsT>(value));
150 return *this;
151 }
153
155
158 inline RulePublishStatus GetPublishStatus() const { return m_publishStatus; }
159 inline bool PublishStatusHasBeenSet() const { return m_publishStatusHasBeenSet; }
161 m_publishStatusHasBeenSet = true;
162 m_publishStatus = value;
163 }
165 SetPublishStatus(value);
166 return *this;
167 }
169
171
174 inline const Aws::Utils::DateTime& GetCreatedTime() const { return m_createdTime; }
175 inline bool CreatedTimeHasBeenSet() const { return m_createdTimeHasBeenSet; }
176 template <typename CreatedTimeT = Aws::Utils::DateTime>
177 void SetCreatedTime(CreatedTimeT&& value) {
178 m_createdTimeHasBeenSet = true;
179 m_createdTime = std::forward<CreatedTimeT>(value);
180 }
181 template <typename CreatedTimeT = Aws::Utils::DateTime>
182 Rule& WithCreatedTime(CreatedTimeT&& value) {
183 SetCreatedTime(std::forward<CreatedTimeT>(value));
184 return *this;
185 }
187
189
192 inline const Aws::Utils::DateTime& GetLastUpdatedTime() const { return m_lastUpdatedTime; }
193 inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }
194 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
195 void SetLastUpdatedTime(LastUpdatedTimeT&& value) {
196 m_lastUpdatedTimeHasBeenSet = true;
197 m_lastUpdatedTime = std::forward<LastUpdatedTimeT>(value);
198 }
199 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
200 Rule& WithLastUpdatedTime(LastUpdatedTimeT&& value) {
201 SetLastUpdatedTime(std::forward<LastUpdatedTimeT>(value));
202 return *this;
203 }
205
207
210 inline const Aws::String& GetLastUpdatedBy() const { return m_lastUpdatedBy; }
211 inline bool LastUpdatedByHasBeenSet() const { return m_lastUpdatedByHasBeenSet; }
212 template <typename LastUpdatedByT = Aws::String>
213 void SetLastUpdatedBy(LastUpdatedByT&& value) {
214 m_lastUpdatedByHasBeenSet = true;
215 m_lastUpdatedBy = std::forward<LastUpdatedByT>(value);
216 }
217 template <typename LastUpdatedByT = Aws::String>
218 Rule& WithLastUpdatedBy(LastUpdatedByT&& value) {
219 SetLastUpdatedBy(std::forward<LastUpdatedByT>(value));
220 return *this;
221 }
223
225
229 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
230 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
231 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
232 void SetTags(TagsT&& value) {
233 m_tagsHasBeenSet = true;
234 m_tags = std::forward<TagsT>(value);
235 }
236 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
237 Rule& WithTags(TagsT&& value) {
238 SetTags(std::forward<TagsT>(value));
239 return *this;
240 }
241 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
242 Rule& AddTags(TagsKeyT&& key, TagsValueT&& value) {
243 m_tagsHasBeenSet = true;
244 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
245 return *this;
246 }
248 private:
249 Aws::String m_name;
250
251 Aws::String m_ruleId;
252
253 Aws::String m_ruleArn;
254
255 RuleTriggerEventSource m_triggerEventSource;
256
257 Aws::String m_function;
258
259 Aws::Vector<RuleAction> m_actions;
260
262
263 Aws::Utils::DateTime m_createdTime{};
264
265 Aws::Utils::DateTime m_lastUpdatedTime{};
266
267 Aws::String m_lastUpdatedBy;
268
270 bool m_nameHasBeenSet = false;
271 bool m_ruleIdHasBeenSet = false;
272 bool m_ruleArnHasBeenSet = false;
273 bool m_triggerEventSourceHasBeenSet = false;
274 bool m_functionHasBeenSet = false;
275 bool m_actionsHasBeenSet = false;
276 bool m_publishStatusHasBeenSet = false;
277 bool m_createdTimeHasBeenSet = false;
278 bool m_lastUpdatedTimeHasBeenSet = false;
279 bool m_lastUpdatedByHasBeenSet = false;
280 bool m_tagsHasBeenSet = false;
281};
282
283} // namespace Model
284} // namespace Connect
285} // namespace Aws
Rule & WithLastUpdatedTime(LastUpdatedTimeT &&value)
Definition Rule.h:200
Rule & WithName(NameT &&value)
Definition Rule.h:52
Rule & WithRuleId(RuleIdT &&value)
Definition Rule.h:70
RulePublishStatus GetPublishStatus() const
Definition Rule.h:158
void SetFunction(FunctionT &&value)
Definition Rule.h:119
const Aws::Vector< RuleAction > & GetActions() const
Definition Rule.h:134
bool PublishStatusHasBeenSet() const
Definition Rule.h:159
Rule & WithRuleArn(RuleArnT &&value)
Definition Rule.h:88
bool TriggerEventSourceHasBeenSet() const
Definition Rule.h:99
bool CreatedTimeHasBeenSet() const
Definition Rule.h:175
const Aws::String & GetFunction() const
Definition Rule.h:116
bool FunctionHasBeenSet() const
Definition Rule.h:117
Rule & WithLastUpdatedBy(LastUpdatedByT &&value)
Definition Rule.h:218
Rule & WithFunction(FunctionT &&value)
Definition Rule.h:124
void SetTags(TagsT &&value)
Definition Rule.h:232
const RuleTriggerEventSource & GetTriggerEventSource() const
Definition Rule.h:98
const Aws::Utils::DateTime & GetCreatedTime() const
Definition Rule.h:174
bool NameHasBeenSet() const
Definition Rule.h:45
bool TagsHasBeenSet() const
Definition Rule.h:230
void SetLastUpdatedBy(LastUpdatedByT &&value)
Definition Rule.h:213
Rule & WithActions(ActionsT &&value)
Definition Rule.h:142
AWS_CONNECT_API Rule(Aws::Utils::Json::JsonView jsonValue)
void SetCreatedTime(CreatedTimeT &&value)
Definition Rule.h:177
void SetTriggerEventSource(TriggerEventSourceT &&value)
Definition Rule.h:101
void SetLastUpdatedTime(LastUpdatedTimeT &&value)
Definition Rule.h:195
void SetActions(ActionsT &&value)
Definition Rule.h:137
Rule & AddActions(ActionsT &&value)
Definition Rule.h:147
Rule & WithCreatedTime(CreatedTimeT &&value)
Definition Rule.h:182
bool LastUpdatedTimeHasBeenSet() const
Definition Rule.h:193
bool LastUpdatedByHasBeenSet() const
Definition Rule.h:211
const Aws::String & GetLastUpdatedBy() const
Definition Rule.h:210
AWS_CONNECT_API Rule()=default
Rule & WithTags(TagsT &&value)
Definition Rule.h:237
const Aws::String & GetRuleArn() const
Definition Rule.h:80
Rule & WithTriggerEventSource(TriggerEventSourceT &&value)
Definition Rule.h:106
void SetName(NameT &&value)
Definition Rule.h:47
AWS_CONNECT_API Aws::Utils::Json::JsonValue Jsonize() const
void SetPublishStatus(RulePublishStatus value)
Definition Rule.h:160
const Aws::Utils::DateTime & GetLastUpdatedTime() const
Definition Rule.h:192
void SetRuleId(RuleIdT &&value)
Definition Rule.h:65
Rule & WithPublishStatus(RulePublishStatus value)
Definition Rule.h:164
void SetRuleArn(RuleArnT &&value)
Definition Rule.h:83
Rule & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Rule.h:242
bool ActionsHasBeenSet() const
Definition Rule.h:135
AWS_CONNECT_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
bool RuleIdHasBeenSet() const
Definition Rule.h:63
const Aws::String & GetRuleId() const
Definition Rule.h:62
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Rule.h:229
bool RuleArnHasBeenSet() const
Definition Rule.h:81
const Aws::String & GetName() const
Definition Rule.h:44
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue