AWS SDK for C++

AWS SDK for C++ Version 1.11.849

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/RuleCapabilityTier.h>
10#include <aws/connect/model/RulePublishStatus.h>
11#include <aws/connect/model/RuleTriggerEventSource.h>
12#include <aws/core/utils/DateTime.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15#include <aws/core/utils/memory/stl/AWSVector.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace Connect {
27namespace Model {
28
34class Rule {
35 public:
36 AWS_CONNECT_API Rule() = default;
37 AWS_CONNECT_API Rule(Aws::Utils::Json::JsonView jsonValue);
38 AWS_CONNECT_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_CONNECT_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline const Aws::String& GetName() const { return m_name; }
46 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
47 template <typename NameT = Aws::String>
48 void SetName(NameT&& value) {
49 m_nameHasBeenSet = true;
50 m_name = std::forward<NameT>(value);
51 }
52 template <typename NameT = Aws::String>
53 Rule& WithName(NameT&& value) {
54 SetName(std::forward<NameT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetRuleId() const { return m_ruleId; }
64 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
65 template <typename RuleIdT = Aws::String>
66 void SetRuleId(RuleIdT&& value) {
67 m_ruleIdHasBeenSet = true;
68 m_ruleId = std::forward<RuleIdT>(value);
69 }
70 template <typename RuleIdT = Aws::String>
71 Rule& WithRuleId(RuleIdT&& value) {
72 SetRuleId(std::forward<RuleIdT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::String& GetRuleArn() const { return m_ruleArn; }
82 inline bool RuleArnHasBeenSet() const { return m_ruleArnHasBeenSet; }
83 template <typename RuleArnT = Aws::String>
84 void SetRuleArn(RuleArnT&& value) {
85 m_ruleArnHasBeenSet = true;
86 m_ruleArn = std::forward<RuleArnT>(value);
87 }
88 template <typename RuleArnT = Aws::String>
89 Rule& WithRuleArn(RuleArnT&& value) {
90 SetRuleArn(std::forward<RuleArnT>(value));
91 return *this;
92 }
94
96
99 inline const RuleTriggerEventSource& GetTriggerEventSource() const { return m_triggerEventSource; }
100 inline bool TriggerEventSourceHasBeenSet() const { return m_triggerEventSourceHasBeenSet; }
101 template <typename TriggerEventSourceT = RuleTriggerEventSource>
102 void SetTriggerEventSource(TriggerEventSourceT&& value) {
103 m_triggerEventSourceHasBeenSet = true;
104 m_triggerEventSource = std::forward<TriggerEventSourceT>(value);
105 }
106 template <typename TriggerEventSourceT = RuleTriggerEventSource>
107 Rule& WithTriggerEventSource(TriggerEventSourceT&& value) {
108 SetTriggerEventSource(std::forward<TriggerEventSourceT>(value));
109 return *this;
110 }
112
114
118 inline const Aws::Vector<RuleCapabilityTier>& GetRuleCapabilityTiers() const { return m_ruleCapabilityTiers; }
119 inline bool RuleCapabilityTiersHasBeenSet() const { return m_ruleCapabilityTiersHasBeenSet; }
120 template <typename RuleCapabilityTiersT = Aws::Vector<RuleCapabilityTier>>
121 void SetRuleCapabilityTiers(RuleCapabilityTiersT&& value) {
122 m_ruleCapabilityTiersHasBeenSet = true;
123 m_ruleCapabilityTiers = std::forward<RuleCapabilityTiersT>(value);
124 }
125 template <typename RuleCapabilityTiersT = Aws::Vector<RuleCapabilityTier>>
126 Rule& WithRuleCapabilityTiers(RuleCapabilityTiersT&& value) {
127 SetRuleCapabilityTiers(std::forward<RuleCapabilityTiersT>(value));
128 return *this;
129 }
131 m_ruleCapabilityTiersHasBeenSet = true;
132 m_ruleCapabilityTiers.push_back(value);
133 return *this;
134 }
136
138
141 inline const Aws::String& GetFunction() const { return m_function; }
142 inline bool FunctionHasBeenSet() const { return m_functionHasBeenSet; }
143 template <typename FunctionT = Aws::String>
144 void SetFunction(FunctionT&& value) {
145 m_functionHasBeenSet = true;
146 m_function = std::forward<FunctionT>(value);
147 }
148 template <typename FunctionT = Aws::String>
149 Rule& WithFunction(FunctionT&& value) {
150 SetFunction(std::forward<FunctionT>(value));
151 return *this;
152 }
154
156
159 inline const Aws::Vector<RuleAction>& GetActions() const { return m_actions; }
160 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
161 template <typename ActionsT = Aws::Vector<RuleAction>>
162 void SetActions(ActionsT&& value) {
163 m_actionsHasBeenSet = true;
164 m_actions = std::forward<ActionsT>(value);
165 }
166 template <typename ActionsT = Aws::Vector<RuleAction>>
167 Rule& WithActions(ActionsT&& value) {
168 SetActions(std::forward<ActionsT>(value));
169 return *this;
170 }
171 template <typename ActionsT = RuleAction>
172 Rule& AddActions(ActionsT&& value) {
173 m_actionsHasBeenSet = true;
174 m_actions.emplace_back(std::forward<ActionsT>(value));
175 return *this;
176 }
178
180
183 inline RulePublishStatus GetPublishStatus() const { return m_publishStatus; }
184 inline bool PublishStatusHasBeenSet() const { return m_publishStatusHasBeenSet; }
186 m_publishStatusHasBeenSet = true;
187 m_publishStatus = value;
188 }
190 SetPublishStatus(value);
191 return *this;
192 }
194
196
199 inline const Aws::Utils::DateTime& GetCreatedTime() const { return m_createdTime; }
200 inline bool CreatedTimeHasBeenSet() const { return m_createdTimeHasBeenSet; }
201 template <typename CreatedTimeT = Aws::Utils::DateTime>
202 void SetCreatedTime(CreatedTimeT&& value) {
203 m_createdTimeHasBeenSet = true;
204 m_createdTime = std::forward<CreatedTimeT>(value);
205 }
206 template <typename CreatedTimeT = Aws::Utils::DateTime>
207 Rule& WithCreatedTime(CreatedTimeT&& value) {
208 SetCreatedTime(std::forward<CreatedTimeT>(value));
209 return *this;
210 }
212
214
217 inline const Aws::Utils::DateTime& GetLastUpdatedTime() const { return m_lastUpdatedTime; }
218 inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }
219 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
220 void SetLastUpdatedTime(LastUpdatedTimeT&& value) {
221 m_lastUpdatedTimeHasBeenSet = true;
222 m_lastUpdatedTime = std::forward<LastUpdatedTimeT>(value);
223 }
224 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
225 Rule& WithLastUpdatedTime(LastUpdatedTimeT&& value) {
226 SetLastUpdatedTime(std::forward<LastUpdatedTimeT>(value));
227 return *this;
228 }
230
232
235 inline const Aws::String& GetLastUpdatedBy() const { return m_lastUpdatedBy; }
236 inline bool LastUpdatedByHasBeenSet() const { return m_lastUpdatedByHasBeenSet; }
237 template <typename LastUpdatedByT = Aws::String>
238 void SetLastUpdatedBy(LastUpdatedByT&& value) {
239 m_lastUpdatedByHasBeenSet = true;
240 m_lastUpdatedBy = std::forward<LastUpdatedByT>(value);
241 }
242 template <typename LastUpdatedByT = Aws::String>
243 Rule& WithLastUpdatedBy(LastUpdatedByT&& value) {
244 SetLastUpdatedBy(std::forward<LastUpdatedByT>(value));
245 return *this;
246 }
248
250
254 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
255 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
256 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
257 void SetTags(TagsT&& value) {
258 m_tagsHasBeenSet = true;
259 m_tags = std::forward<TagsT>(value);
260 }
261 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
262 Rule& WithTags(TagsT&& value) {
263 SetTags(std::forward<TagsT>(value));
264 return *this;
265 }
266 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
267 Rule& AddTags(TagsKeyT&& key, TagsValueT&& value) {
268 m_tagsHasBeenSet = true;
269 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
270 return *this;
271 }
273 private:
274 Aws::String m_name;
275
276 Aws::String m_ruleId;
277
278 Aws::String m_ruleArn;
279
280 RuleTriggerEventSource m_triggerEventSource;
281
282 Aws::Vector<RuleCapabilityTier> m_ruleCapabilityTiers;
283
284 Aws::String m_function;
285
286 Aws::Vector<RuleAction> m_actions;
287
289
290 Aws::Utils::DateTime m_createdTime{};
291
292 Aws::Utils::DateTime m_lastUpdatedTime{};
293
294 Aws::String m_lastUpdatedBy;
295
297 bool m_nameHasBeenSet = false;
298 bool m_ruleIdHasBeenSet = false;
299 bool m_ruleArnHasBeenSet = false;
300 bool m_triggerEventSourceHasBeenSet = false;
301 bool m_ruleCapabilityTiersHasBeenSet = false;
302 bool m_functionHasBeenSet = false;
303 bool m_actionsHasBeenSet = false;
304 bool m_publishStatusHasBeenSet = false;
305 bool m_createdTimeHasBeenSet = false;
306 bool m_lastUpdatedTimeHasBeenSet = false;
307 bool m_lastUpdatedByHasBeenSet = false;
308 bool m_tagsHasBeenSet = false;
309};
310
311} // namespace Model
312} // namespace Connect
313} // namespace Aws
Rule & WithLastUpdatedTime(LastUpdatedTimeT &&value)
Definition Rule.h:225
Rule & WithName(NameT &&value)
Definition Rule.h:53
Rule & WithRuleId(RuleIdT &&value)
Definition Rule.h:71
RulePublishStatus GetPublishStatus() const
Definition Rule.h:183
void SetFunction(FunctionT &&value)
Definition Rule.h:144
Rule & AddRuleCapabilityTiers(RuleCapabilityTier value)
Definition Rule.h:130
const Aws::Vector< RuleAction > & GetActions() const
Definition Rule.h:159
bool PublishStatusHasBeenSet() const
Definition Rule.h:184
Rule & WithRuleArn(RuleArnT &&value)
Definition Rule.h:89
bool TriggerEventSourceHasBeenSet() const
Definition Rule.h:100
bool CreatedTimeHasBeenSet() const
Definition Rule.h:200
const Aws::String & GetFunction() const
Definition Rule.h:141
bool FunctionHasBeenSet() const
Definition Rule.h:142
Rule & WithRuleCapabilityTiers(RuleCapabilityTiersT &&value)
Definition Rule.h:126
Rule & WithLastUpdatedBy(LastUpdatedByT &&value)
Definition Rule.h:243
Rule & WithFunction(FunctionT &&value)
Definition Rule.h:149
void SetTags(TagsT &&value)
Definition Rule.h:257
bool RuleCapabilityTiersHasBeenSet() const
Definition Rule.h:119
const RuleTriggerEventSource & GetTriggerEventSource() const
Definition Rule.h:99
const Aws::Utils::DateTime & GetCreatedTime() const
Definition Rule.h:199
bool NameHasBeenSet() const
Definition Rule.h:46
bool TagsHasBeenSet() const
Definition Rule.h:255
void SetLastUpdatedBy(LastUpdatedByT &&value)
Definition Rule.h:238
Rule & WithActions(ActionsT &&value)
Definition Rule.h:167
AWS_CONNECT_API Rule(Aws::Utils::Json::JsonView jsonValue)
void SetCreatedTime(CreatedTimeT &&value)
Definition Rule.h:202
void SetTriggerEventSource(TriggerEventSourceT &&value)
Definition Rule.h:102
void SetLastUpdatedTime(LastUpdatedTimeT &&value)
Definition Rule.h:220
void SetActions(ActionsT &&value)
Definition Rule.h:162
Rule & AddActions(ActionsT &&value)
Definition Rule.h:172
Rule & WithCreatedTime(CreatedTimeT &&value)
Definition Rule.h:207
bool LastUpdatedTimeHasBeenSet() const
Definition Rule.h:218
bool LastUpdatedByHasBeenSet() const
Definition Rule.h:236
const Aws::String & GetLastUpdatedBy() const
Definition Rule.h:235
AWS_CONNECT_API Rule()=default
Rule & WithTags(TagsT &&value)
Definition Rule.h:262
const Aws::String & GetRuleArn() const
Definition Rule.h:81
const Aws::Vector< RuleCapabilityTier > & GetRuleCapabilityTiers() const
Definition Rule.h:118
Rule & WithTriggerEventSource(TriggerEventSourceT &&value)
Definition Rule.h:107
void SetName(NameT &&value)
Definition Rule.h:48
AWS_CONNECT_API Aws::Utils::Json::JsonValue Jsonize() const
void SetRuleCapabilityTiers(RuleCapabilityTiersT &&value)
Definition Rule.h:121
void SetPublishStatus(RulePublishStatus value)
Definition Rule.h:185
const Aws::Utils::DateTime & GetLastUpdatedTime() const
Definition Rule.h:217
void SetRuleId(RuleIdT &&value)
Definition Rule.h:66
Rule & WithPublishStatus(RulePublishStatus value)
Definition Rule.h:189
void SetRuleArn(RuleArnT &&value)
Definition Rule.h:84
Rule & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Rule.h:267
bool ActionsHasBeenSet() const
Definition Rule.h:160
AWS_CONNECT_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
bool RuleIdHasBeenSet() const
Definition Rule.h:64
const Aws::String & GetRuleId() const
Definition Rule.h:63
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Rule.h:254
bool RuleArnHasBeenSet() const
Definition Rule.h:82
const Aws::String & GetName() const
Definition Rule.h:45
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