AWS SDK for C++

AWS SDK for C++ Version 1.11.772

Loading...
Searching...
No Matches
AutomationRule.h
1
6#pragma once
7#include <aws/compute-optimizer-automation/ComputeOptimizerAutomation_EXPORTS.h>
8#include <aws/compute-optimizer-automation/model/OrganizationConfiguration.h>
9#include <aws/compute-optimizer-automation/model/RecommendedActionType.h>
10#include <aws/compute-optimizer-automation/model/RuleStatus.h>
11#include <aws/compute-optimizer-automation/model/RuleType.h>
12#include <aws/compute-optimizer-automation/model/Schedule.h>
13#include <aws/core/utils/DateTime.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 ComputeOptimizerAutomation {
27namespace Model {
28
36 public:
37 AWS_COMPUTEOPTIMIZERAUTOMATION_API AutomationRule() = default;
38 AWS_COMPUTEOPTIMIZERAUTOMATION_API AutomationRule(Aws::Utils::Json::JsonView jsonValue);
39 AWS_COMPUTEOPTIMIZERAUTOMATION_API AutomationRule& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_COMPUTEOPTIMIZERAUTOMATION_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
46 inline const Aws::String& GetRuleArn() const { return m_ruleArn; }
47 inline bool RuleArnHasBeenSet() const { return m_ruleArnHasBeenSet; }
48 template <typename RuleArnT = Aws::String>
49 void SetRuleArn(RuleArnT&& value) {
50 m_ruleArnHasBeenSet = true;
51 m_ruleArn = std::forward<RuleArnT>(value);
52 }
53 template <typename RuleArnT = Aws::String>
54 AutomationRule& WithRuleArn(RuleArnT&& value) {
55 SetRuleArn(std::forward<RuleArnT>(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 AutomationRule& WithRuleId(RuleIdT&& value) {
73 SetRuleId(std::forward<RuleIdT>(value));
74 return *this;
75 }
77
79
82 inline const Aws::String& GetName() const { return m_name; }
83 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
84 template <typename NameT = Aws::String>
85 void SetName(NameT&& value) {
86 m_nameHasBeenSet = true;
87 m_name = std::forward<NameT>(value);
88 }
89 template <typename NameT = Aws::String>
90 AutomationRule& WithName(NameT&& value) {
91 SetName(std::forward<NameT>(value));
92 return *this;
93 }
95
97
100 inline const Aws::String& GetDescription() const { return m_description; }
101 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
102 template <typename DescriptionT = Aws::String>
103 void SetDescription(DescriptionT&& value) {
104 m_descriptionHasBeenSet = true;
105 m_description = std::forward<DescriptionT>(value);
106 }
107 template <typename DescriptionT = Aws::String>
108 AutomationRule& WithDescription(DescriptionT&& value) {
109 SetDescription(std::forward<DescriptionT>(value));
110 return *this;
111 }
113
115
118 inline RuleType GetRuleType() const { return m_ruleType; }
119 inline bool RuleTypeHasBeenSet() const { return m_ruleTypeHasBeenSet; }
120 inline void SetRuleType(RuleType value) {
121 m_ruleTypeHasBeenSet = true;
122 m_ruleType = value;
123 }
125 SetRuleType(value);
126 return *this;
127 }
129
131
134 inline long long GetRuleRevision() const { return m_ruleRevision; }
135 inline bool RuleRevisionHasBeenSet() const { return m_ruleRevisionHasBeenSet; }
136 inline void SetRuleRevision(long long value) {
137 m_ruleRevisionHasBeenSet = true;
138 m_ruleRevision = value;
139 }
140 inline AutomationRule& WithRuleRevision(long long value) {
141 SetRuleRevision(value);
142 return *this;
143 }
145
147
151 inline const Aws::String& GetAccountId() const { return m_accountId; }
152 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
153 template <typename AccountIdT = Aws::String>
154 void SetAccountId(AccountIdT&& value) {
155 m_accountIdHasBeenSet = true;
156 m_accountId = std::forward<AccountIdT>(value);
157 }
158 template <typename AccountIdT = Aws::String>
159 AutomationRule& WithAccountId(AccountIdT&& value) {
160 SetAccountId(std::forward<AccountIdT>(value));
161 return *this;
162 }
164
166
169 inline const OrganizationConfiguration& GetOrganizationConfiguration() const { return m_organizationConfiguration; }
170 inline bool OrganizationConfigurationHasBeenSet() const { return m_organizationConfigurationHasBeenSet; }
171 template <typename OrganizationConfigurationT = OrganizationConfiguration>
172 void SetOrganizationConfiguration(OrganizationConfigurationT&& value) {
173 m_organizationConfigurationHasBeenSet = true;
174 m_organizationConfiguration = std::forward<OrganizationConfigurationT>(value);
175 }
176 template <typename OrganizationConfigurationT = OrganizationConfiguration>
177 AutomationRule& WithOrganizationConfiguration(OrganizationConfigurationT&& value) {
178 SetOrganizationConfiguration(std::forward<OrganizationConfigurationT>(value));
179 return *this;
180 }
182
184
191 inline const Aws::String& GetPriority() const { return m_priority; }
192 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
193 template <typename PriorityT = Aws::String>
194 void SetPriority(PriorityT&& value) {
195 m_priorityHasBeenSet = true;
196 m_priority = std::forward<PriorityT>(value);
197 }
198 template <typename PriorityT = Aws::String>
199 AutomationRule& WithPriority(PriorityT&& value) {
200 SetPriority(std::forward<PriorityT>(value));
201 return *this;
202 }
204
206
209 inline const Aws::Vector<RecommendedActionType>& GetRecommendedActionTypes() const { return m_recommendedActionTypes; }
210 inline bool RecommendedActionTypesHasBeenSet() const { return m_recommendedActionTypesHasBeenSet; }
211 template <typename RecommendedActionTypesT = Aws::Vector<RecommendedActionType>>
212 void SetRecommendedActionTypes(RecommendedActionTypesT&& value) {
213 m_recommendedActionTypesHasBeenSet = true;
214 m_recommendedActionTypes = std::forward<RecommendedActionTypesT>(value);
215 }
216 template <typename RecommendedActionTypesT = Aws::Vector<RecommendedActionType>>
217 AutomationRule& WithRecommendedActionTypes(RecommendedActionTypesT&& value) {
218 SetRecommendedActionTypes(std::forward<RecommendedActionTypesT>(value));
219 return *this;
220 }
222 m_recommendedActionTypesHasBeenSet = true;
223 m_recommendedActionTypes.push_back(value);
224 return *this;
225 }
227
229
232 inline const Schedule& GetSchedule() const { return m_schedule; }
233 inline bool ScheduleHasBeenSet() const { return m_scheduleHasBeenSet; }
234 template <typename ScheduleT = Schedule>
235 void SetSchedule(ScheduleT&& value) {
236 m_scheduleHasBeenSet = true;
237 m_schedule = std::forward<ScheduleT>(value);
238 }
239 template <typename ScheduleT = Schedule>
240 AutomationRule& WithSchedule(ScheduleT&& value) {
241 SetSchedule(std::forward<ScheduleT>(value));
242 return *this;
243 }
245
247
250 inline RuleStatus GetStatus() const { return m_status; }
251 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
252 inline void SetStatus(RuleStatus value) {
253 m_statusHasBeenSet = true;
254 m_status = value;
255 }
257 SetStatus(value);
258 return *this;
259 }
261
263
266 inline const Aws::Utils::DateTime& GetCreatedTimestamp() const { return m_createdTimestamp; }
267 inline bool CreatedTimestampHasBeenSet() const { return m_createdTimestampHasBeenSet; }
268 template <typename CreatedTimestampT = Aws::Utils::DateTime>
269 void SetCreatedTimestamp(CreatedTimestampT&& value) {
270 m_createdTimestampHasBeenSet = true;
271 m_createdTimestamp = std::forward<CreatedTimestampT>(value);
272 }
273 template <typename CreatedTimestampT = Aws::Utils::DateTime>
274 AutomationRule& WithCreatedTimestamp(CreatedTimestampT&& value) {
275 SetCreatedTimestamp(std::forward<CreatedTimestampT>(value));
276 return *this;
277 }
279
281
284 inline const Aws::Utils::DateTime& GetLastUpdatedTimestamp() const { return m_lastUpdatedTimestamp; }
285 inline bool LastUpdatedTimestampHasBeenSet() const { return m_lastUpdatedTimestampHasBeenSet; }
286 template <typename LastUpdatedTimestampT = Aws::Utils::DateTime>
287 void SetLastUpdatedTimestamp(LastUpdatedTimestampT&& value) {
288 m_lastUpdatedTimestampHasBeenSet = true;
289 m_lastUpdatedTimestamp = std::forward<LastUpdatedTimestampT>(value);
290 }
291 template <typename LastUpdatedTimestampT = Aws::Utils::DateTime>
292 AutomationRule& WithLastUpdatedTimestamp(LastUpdatedTimestampT&& value) {
293 SetLastUpdatedTimestamp(std::forward<LastUpdatedTimestampT>(value));
294 return *this;
295 }
297 private:
298 Aws::String m_ruleArn;
299
300 Aws::String m_ruleId;
301
302 Aws::String m_name;
303
304 Aws::String m_description;
305
306 RuleType m_ruleType{RuleType::NOT_SET};
307
308 long long m_ruleRevision{0};
309
310 Aws::String m_accountId;
311
312 OrganizationConfiguration m_organizationConfiguration;
313
314 Aws::String m_priority;
315
316 Aws::Vector<RecommendedActionType> m_recommendedActionTypes;
317
318 Schedule m_schedule;
319
321
322 Aws::Utils::DateTime m_createdTimestamp{};
323
324 Aws::Utils::DateTime m_lastUpdatedTimestamp{};
325 bool m_ruleArnHasBeenSet = false;
326 bool m_ruleIdHasBeenSet = false;
327 bool m_nameHasBeenSet = false;
328 bool m_descriptionHasBeenSet = false;
329 bool m_ruleTypeHasBeenSet = false;
330 bool m_ruleRevisionHasBeenSet = false;
331 bool m_accountIdHasBeenSet = false;
332 bool m_organizationConfigurationHasBeenSet = false;
333 bool m_priorityHasBeenSet = false;
334 bool m_recommendedActionTypesHasBeenSet = false;
335 bool m_scheduleHasBeenSet = false;
336 bool m_statusHasBeenSet = false;
337 bool m_createdTimestampHasBeenSet = false;
338 bool m_lastUpdatedTimestampHasBeenSet = false;
339};
340
341} // namespace Model
342} // namespace ComputeOptimizerAutomation
343} // namespace Aws
const OrganizationConfiguration & GetOrganizationConfiguration() const
AutomationRule & WithDescription(DescriptionT &&value)
AutomationRule & AddRecommendedActionTypes(RecommendedActionType value)
AutomationRule & WithOrganizationConfiguration(OrganizationConfigurationT &&value)
AWS_COMPUTEOPTIMIZERAUTOMATION_API AutomationRule(Aws::Utils::Json::JsonView jsonValue)
AWS_COMPUTEOPTIMIZERAUTOMATION_API AutomationRule & operator=(Aws::Utils::Json::JsonView jsonValue)
AutomationRule & WithPriority(PriorityT &&value)
AutomationRule & WithAccountId(AccountIdT &&value)
void SetRecommendedActionTypes(RecommendedActionTypesT &&value)
AWS_COMPUTEOPTIMIZERAUTOMATION_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_COMPUTEOPTIMIZERAUTOMATION_API AutomationRule()=default
void SetLastUpdatedTimestamp(LastUpdatedTimestampT &&value)
const Aws::Vector< RecommendedActionType > & GetRecommendedActionTypes() const
AutomationRule & WithSchedule(ScheduleT &&value)
const Aws::Utils::DateTime & GetCreatedTimestamp() const
const Aws::Utils::DateTime & GetLastUpdatedTimestamp() const
AutomationRule & WithCreatedTimestamp(CreatedTimestampT &&value)
AutomationRule & WithRecommendedActionTypes(RecommendedActionTypesT &&value)
void SetOrganizationConfiguration(OrganizationConfigurationT &&value)
AutomationRule & WithLastUpdatedTimestamp(LastUpdatedTimestampT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue