AWS SDK for C++

AWS SDK for C++ Version 1.11.887

Loading...
Searching...
No Matches
Rule.h
1
6#pragma once
7#include <aws/connect/Connect_EXPORTS.h>
8#include <aws/connect/model/PreEvaluationFilters.h>
9#include <aws/connect/model/RuleAction.h>
10#include <aws/connect/model/RuleCapabilityTier.h>
11#include <aws/connect/model/RulePublishStatus.h>
12#include <aws/connect/model/RuleTriggerEventSource.h>
13#include <aws/core/utils/DateTime.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16#include <aws/core/utils/memory/stl/AWSVector.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Json {
23class JsonValue;
24class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace Connect {
28namespace Model {
29
35class Rule {
36 public:
37 AWS_CONNECT_API Rule() = default;
38 AWS_CONNECT_API Rule(Aws::Utils::Json::JsonView jsonValue);
39 AWS_CONNECT_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_CONNECT_API Aws::Utils::Json::JsonValue Jsonize() const;
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) {
50 m_nameHasBeenSet = true;
51 m_name = std::forward<NameT>(value);
52 }
53 template <typename NameT = Aws::String>
54 Rule& WithName(NameT&& value) {
55 SetName(std::forward<NameT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetRuleId() const { return m_ruleId; }
65 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
66 template <typename RuleIdT = Aws::String>
67 void SetRuleId(RuleIdT&& value) {
68 m_ruleIdHasBeenSet = true;
69 m_ruleId = std::forward<RuleIdT>(value);
70 }
71 template <typename RuleIdT = Aws::String>
72 Rule& WithRuleId(RuleIdT&& value) {
73 SetRuleId(std::forward<RuleIdT>(value));
74 return *this;
75 }
77
79
82 inline const Aws::String& GetRuleArn() const { return m_ruleArn; }
83 inline bool RuleArnHasBeenSet() const { return m_ruleArnHasBeenSet; }
84 template <typename RuleArnT = Aws::String>
85 void SetRuleArn(RuleArnT&& value) {
86 m_ruleArnHasBeenSet = true;
87 m_ruleArn = std::forward<RuleArnT>(value);
88 }
89 template <typename RuleArnT = Aws::String>
90 Rule& WithRuleArn(RuleArnT&& value) {
91 SetRuleArn(std::forward<RuleArnT>(value));
92 return *this;
93 }
95
97
100 inline const RuleTriggerEventSource& GetTriggerEventSource() const { return m_triggerEventSource; }
101 inline bool TriggerEventSourceHasBeenSet() const { return m_triggerEventSourceHasBeenSet; }
102 template <typename TriggerEventSourceT = RuleTriggerEventSource>
103 void SetTriggerEventSource(TriggerEventSourceT&& value) {
104 m_triggerEventSourceHasBeenSet = true;
105 m_triggerEventSource = std::forward<TriggerEventSourceT>(value);
106 }
107 template <typename TriggerEventSourceT = RuleTriggerEventSource>
108 Rule& WithTriggerEventSource(TriggerEventSourceT&& value) {
109 SetTriggerEventSource(std::forward<TriggerEventSourceT>(value));
110 return *this;
111 }
113
115
119 inline const Aws::Vector<RuleCapabilityTier>& GetRuleCapabilityTiers() const { return m_ruleCapabilityTiers; }
120 inline bool RuleCapabilityTiersHasBeenSet() const { return m_ruleCapabilityTiersHasBeenSet; }
121 template <typename RuleCapabilityTiersT = Aws::Vector<RuleCapabilityTier>>
122 void SetRuleCapabilityTiers(RuleCapabilityTiersT&& value) {
123 m_ruleCapabilityTiersHasBeenSet = true;
124 m_ruleCapabilityTiers = std::forward<RuleCapabilityTiersT>(value);
125 }
126 template <typename RuleCapabilityTiersT = Aws::Vector<RuleCapabilityTier>>
127 Rule& WithRuleCapabilityTiers(RuleCapabilityTiersT&& value) {
128 SetRuleCapabilityTiers(std::forward<RuleCapabilityTiersT>(value));
129 return *this;
130 }
132 m_ruleCapabilityTiersHasBeenSet = true;
133 m_ruleCapabilityTiers.push_back(value);
134 return *this;
135 }
137
139
142 inline const Aws::String& GetFunction() const { return m_function; }
143 inline bool FunctionHasBeenSet() const { return m_functionHasBeenSet; }
144 template <typename FunctionT = Aws::String>
145 void SetFunction(FunctionT&& value) {
146 m_functionHasBeenSet = true;
147 m_function = std::forward<FunctionT>(value);
148 }
149 template <typename FunctionT = Aws::String>
150 Rule& WithFunction(FunctionT&& value) {
151 SetFunction(std::forward<FunctionT>(value));
152 return *this;
153 }
155
157
160 inline const Aws::Vector<RuleAction>& GetActions() const { return m_actions; }
161 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
162 template <typename ActionsT = Aws::Vector<RuleAction>>
163 void SetActions(ActionsT&& value) {
164 m_actionsHasBeenSet = true;
165 m_actions = std::forward<ActionsT>(value);
166 }
167 template <typename ActionsT = Aws::Vector<RuleAction>>
168 Rule& WithActions(ActionsT&& value) {
169 SetActions(std::forward<ActionsT>(value));
170 return *this;
171 }
172 template <typename ActionsT = RuleAction>
173 Rule& AddActions(ActionsT&& value) {
174 m_actionsHasBeenSet = true;
175 m_actions.emplace_back(std::forward<ActionsT>(value));
176 return *this;
177 }
179
181
184 inline RulePublishStatus GetPublishStatus() const { return m_publishStatus; }
185 inline bool PublishStatusHasBeenSet() const { return m_publishStatusHasBeenSet; }
187 m_publishStatusHasBeenSet = true;
188 m_publishStatus = value;
189 }
191 SetPublishStatus(value);
192 return *this;
193 }
195
197
204 inline const PreEvaluationFilters& GetPreEvaluationFilters() const { return m_preEvaluationFilters; }
205 inline bool PreEvaluationFiltersHasBeenSet() const { return m_preEvaluationFiltersHasBeenSet; }
206 template <typename PreEvaluationFiltersT = PreEvaluationFilters>
207 void SetPreEvaluationFilters(PreEvaluationFiltersT&& value) {
208 m_preEvaluationFiltersHasBeenSet = true;
209 m_preEvaluationFilters = std::forward<PreEvaluationFiltersT>(value);
210 }
211 template <typename PreEvaluationFiltersT = PreEvaluationFilters>
212 Rule& WithPreEvaluationFilters(PreEvaluationFiltersT&& value) {
213 SetPreEvaluationFilters(std::forward<PreEvaluationFiltersT>(value));
214 return *this;
215 }
217
219
222 inline const Aws::Utils::DateTime& GetCreatedTime() const { return m_createdTime; }
223 inline bool CreatedTimeHasBeenSet() const { return m_createdTimeHasBeenSet; }
224 template <typename CreatedTimeT = Aws::Utils::DateTime>
225 void SetCreatedTime(CreatedTimeT&& value) {
226 m_createdTimeHasBeenSet = true;
227 m_createdTime = std::forward<CreatedTimeT>(value);
228 }
229 template <typename CreatedTimeT = Aws::Utils::DateTime>
230 Rule& WithCreatedTime(CreatedTimeT&& value) {
231 SetCreatedTime(std::forward<CreatedTimeT>(value));
232 return *this;
233 }
235
237
240 inline const Aws::Utils::DateTime& GetLastUpdatedTime() const { return m_lastUpdatedTime; }
241 inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }
242 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
243 void SetLastUpdatedTime(LastUpdatedTimeT&& value) {
244 m_lastUpdatedTimeHasBeenSet = true;
245 m_lastUpdatedTime = std::forward<LastUpdatedTimeT>(value);
246 }
247 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
248 Rule& WithLastUpdatedTime(LastUpdatedTimeT&& value) {
249 SetLastUpdatedTime(std::forward<LastUpdatedTimeT>(value));
250 return *this;
251 }
253
255
258 inline const Aws::String& GetLastUpdatedBy() const { return m_lastUpdatedBy; }
259 inline bool LastUpdatedByHasBeenSet() const { return m_lastUpdatedByHasBeenSet; }
260 template <typename LastUpdatedByT = Aws::String>
261 void SetLastUpdatedBy(LastUpdatedByT&& value) {
262 m_lastUpdatedByHasBeenSet = true;
263 m_lastUpdatedBy = std::forward<LastUpdatedByT>(value);
264 }
265 template <typename LastUpdatedByT = Aws::String>
266 Rule& WithLastUpdatedBy(LastUpdatedByT&& value) {
267 SetLastUpdatedBy(std::forward<LastUpdatedByT>(value));
268 return *this;
269 }
271
273
277 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
278 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
279 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
280 void SetTags(TagsT&& value) {
281 m_tagsHasBeenSet = true;
282 m_tags = std::forward<TagsT>(value);
283 }
284 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
285 Rule& WithTags(TagsT&& value) {
286 SetTags(std::forward<TagsT>(value));
287 return *this;
288 }
289 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
290 Rule& AddTags(TagsKeyT&& key, TagsValueT&& value) {
291 m_tagsHasBeenSet = true;
292 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
293 return *this;
294 }
296 private:
297 Aws::String m_name;
298
299 Aws::String m_ruleId;
300
301 Aws::String m_ruleArn;
302
303 RuleTriggerEventSource m_triggerEventSource;
304
305 Aws::Vector<RuleCapabilityTier> m_ruleCapabilityTiers;
306
307 Aws::String m_function;
308
309 Aws::Vector<RuleAction> m_actions;
310
312
313 PreEvaluationFilters m_preEvaluationFilters;
314
315 Aws::Utils::DateTime m_createdTime{};
316
317 Aws::Utils::DateTime m_lastUpdatedTime{};
318
319 Aws::String m_lastUpdatedBy;
320
322 bool m_nameHasBeenSet = false;
323 bool m_ruleIdHasBeenSet = false;
324 bool m_ruleArnHasBeenSet = false;
325 bool m_triggerEventSourceHasBeenSet = false;
326 bool m_ruleCapabilityTiersHasBeenSet = false;
327 bool m_functionHasBeenSet = false;
328 bool m_actionsHasBeenSet = false;
329 bool m_publishStatusHasBeenSet = false;
330 bool m_preEvaluationFiltersHasBeenSet = false;
331 bool m_createdTimeHasBeenSet = false;
332 bool m_lastUpdatedTimeHasBeenSet = false;
333 bool m_lastUpdatedByHasBeenSet = false;
334 bool m_tagsHasBeenSet = false;
335};
336
337} // namespace Model
338} // namespace Connect
339} // namespace Aws
Rule & WithLastUpdatedTime(LastUpdatedTimeT &&value)
Definition Rule.h:248
Rule & WithName(NameT &&value)
Definition Rule.h:54
Rule & WithRuleId(RuleIdT &&value)
Definition Rule.h:72
RulePublishStatus GetPublishStatus() const
Definition Rule.h:184
void SetFunction(FunctionT &&value)
Definition Rule.h:145
Rule & AddRuleCapabilityTiers(RuleCapabilityTier value)
Definition Rule.h:131
const Aws::Vector< RuleAction > & GetActions() const
Definition Rule.h:160
bool PublishStatusHasBeenSet() const
Definition Rule.h:185
Rule & WithRuleArn(RuleArnT &&value)
Definition Rule.h:90
bool TriggerEventSourceHasBeenSet() const
Definition Rule.h:101
bool CreatedTimeHasBeenSet() const
Definition Rule.h:223
const Aws::String & GetFunction() const
Definition Rule.h:142
bool FunctionHasBeenSet() const
Definition Rule.h:143
Rule & WithRuleCapabilityTiers(RuleCapabilityTiersT &&value)
Definition Rule.h:127
Rule & WithLastUpdatedBy(LastUpdatedByT &&value)
Definition Rule.h:266
Rule & WithFunction(FunctionT &&value)
Definition Rule.h:150
void SetTags(TagsT &&value)
Definition Rule.h:280
bool RuleCapabilityTiersHasBeenSet() const
Definition Rule.h:120
const RuleTriggerEventSource & GetTriggerEventSource() const
Definition Rule.h:100
void SetPreEvaluationFilters(PreEvaluationFiltersT &&value)
Definition Rule.h:207
bool PreEvaluationFiltersHasBeenSet() const
Definition Rule.h:205
Rule & WithPreEvaluationFilters(PreEvaluationFiltersT &&value)
Definition Rule.h:212
const Aws::Utils::DateTime & GetCreatedTime() const
Definition Rule.h:222
bool NameHasBeenSet() const
Definition Rule.h:47
bool TagsHasBeenSet() const
Definition Rule.h:278
void SetLastUpdatedBy(LastUpdatedByT &&value)
Definition Rule.h:261
Rule & WithActions(ActionsT &&value)
Definition Rule.h:168
AWS_CONNECT_API Rule(Aws::Utils::Json::JsonView jsonValue)
void SetCreatedTime(CreatedTimeT &&value)
Definition Rule.h:225
void SetTriggerEventSource(TriggerEventSourceT &&value)
Definition Rule.h:103
void SetLastUpdatedTime(LastUpdatedTimeT &&value)
Definition Rule.h:243
void SetActions(ActionsT &&value)
Definition Rule.h:163
Rule & AddActions(ActionsT &&value)
Definition Rule.h:173
Rule & WithCreatedTime(CreatedTimeT &&value)
Definition Rule.h:230
bool LastUpdatedTimeHasBeenSet() const
Definition Rule.h:241
bool LastUpdatedByHasBeenSet() const
Definition Rule.h:259
const Aws::String & GetLastUpdatedBy() const
Definition Rule.h:258
AWS_CONNECT_API Rule()=default
Rule & WithTags(TagsT &&value)
Definition Rule.h:285
const Aws::String & GetRuleArn() const
Definition Rule.h:82
const Aws::Vector< RuleCapabilityTier > & GetRuleCapabilityTiers() const
Definition Rule.h:119
Rule & WithTriggerEventSource(TriggerEventSourceT &&value)
Definition Rule.h:108
void SetName(NameT &&value)
Definition Rule.h:49
AWS_CONNECT_API Aws::Utils::Json::JsonValue Jsonize() const
void SetRuleCapabilityTiers(RuleCapabilityTiersT &&value)
Definition Rule.h:122
void SetPublishStatus(RulePublishStatus value)
Definition Rule.h:186
const Aws::Utils::DateTime & GetLastUpdatedTime() const
Definition Rule.h:240
void SetRuleId(RuleIdT &&value)
Definition Rule.h:67
Rule & WithPublishStatus(RulePublishStatus value)
Definition Rule.h:190
const PreEvaluationFilters & GetPreEvaluationFilters() const
Definition Rule.h:204
void SetRuleArn(RuleArnT &&value)
Definition Rule.h:85
Rule & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Rule.h:290
bool ActionsHasBeenSet() const
Definition Rule.h:161
AWS_CONNECT_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
bool RuleIdHasBeenSet() const
Definition Rule.h:65
const Aws::String & GetRuleId() const
Definition Rule.h:64
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Rule.h:277
bool RuleArnHasBeenSet() const
Definition Rule.h:83
const Aws::String & GetName() const
Definition Rule.h:46
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