AWS SDK for C++

AWS SDK for C++ Version 1.11.770

Loading...
Searching...
No Matches
CreateAutomationRuleRequest.h
1
6#pragma once
7#include <aws/compute-optimizer-automation/ComputeOptimizerAutomationRequest.h>
8#include <aws/compute-optimizer-automation/ComputeOptimizerAutomation_EXPORTS.h>
9#include <aws/compute-optimizer-automation/model/Criteria.h>
10#include <aws/compute-optimizer-automation/model/OrganizationConfiguration.h>
11#include <aws/compute-optimizer-automation/model/RecommendedActionType.h>
12#include <aws/compute-optimizer-automation/model/RuleStatus.h>
13#include <aws/compute-optimizer-automation/model/RuleType.h>
14#include <aws/compute-optimizer-automation/model/Schedule.h>
15#include <aws/compute-optimizer-automation/model/Tag.h>
16#include <aws/core/utils/UUID.h>
17#include <aws/core/utils/memory/stl/AWSString.h>
18#include <aws/core/utils/memory/stl/AWSVector.h>
19
20#include <utility>
21
22namespace Aws {
23namespace ComputeOptimizerAutomation {
24namespace Model {
25
29 public:
30 AWS_COMPUTEOPTIMIZERAUTOMATION_API CreateAutomationRuleRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "CreateAutomationRule"; }
37
38 AWS_COMPUTEOPTIMIZERAUTOMATION_API Aws::String SerializePayload() const override;
39
40 AWS_COMPUTEOPTIMIZERAUTOMATION_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
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>
55 SetName(std::forward<NameT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetDescription() const { return m_description; }
65 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
66 template <typename DescriptionT = Aws::String>
67 void SetDescription(DescriptionT&& value) {
68 m_descriptionHasBeenSet = true;
69 m_description = std::forward<DescriptionT>(value);
70 }
71 template <typename DescriptionT = Aws::String>
73 SetDescription(std::forward<DescriptionT>(value));
74 return *this;
75 }
77
79
83 inline RuleType GetRuleType() const { return m_ruleType; }
84 inline bool RuleTypeHasBeenSet() const { return m_ruleTypeHasBeenSet; }
85 inline void SetRuleType(RuleType value) {
86 m_ruleTypeHasBeenSet = true;
87 m_ruleType = value;
88 }
90 SetRuleType(value);
91 return *this;
92 }
94
96
100 inline const OrganizationConfiguration& GetOrganizationConfiguration() const { return m_organizationConfiguration; }
101 inline bool OrganizationConfigurationHasBeenSet() const { return m_organizationConfigurationHasBeenSet; }
102 template <typename OrganizationConfigurationT = OrganizationConfiguration>
103 void SetOrganizationConfiguration(OrganizationConfigurationT&& value) {
104 m_organizationConfigurationHasBeenSet = true;
105 m_organizationConfiguration = std::forward<OrganizationConfigurationT>(value);
106 }
107 template <typename OrganizationConfigurationT = OrganizationConfiguration>
108 CreateAutomationRuleRequest& WithOrganizationConfiguration(OrganizationConfigurationT&& value) {
109 SetOrganizationConfiguration(std::forward<OrganizationConfigurationT>(value));
110 return *this;
111 }
113
115
122 inline const Aws::String& GetPriority() const { return m_priority; }
123 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
124 template <typename PriorityT = Aws::String>
125 void SetPriority(PriorityT&& value) {
126 m_priorityHasBeenSet = true;
127 m_priority = std::forward<PriorityT>(value);
128 }
129 template <typename PriorityT = Aws::String>
131 SetPriority(std::forward<PriorityT>(value));
132 return *this;
133 }
135
137
140 inline const Aws::Vector<RecommendedActionType>& GetRecommendedActionTypes() const { return m_recommendedActionTypes; }
141 inline bool RecommendedActionTypesHasBeenSet() const { return m_recommendedActionTypesHasBeenSet; }
142 template <typename RecommendedActionTypesT = Aws::Vector<RecommendedActionType>>
143 void SetRecommendedActionTypes(RecommendedActionTypesT&& value) {
144 m_recommendedActionTypesHasBeenSet = true;
145 m_recommendedActionTypes = std::forward<RecommendedActionTypesT>(value);
146 }
147 template <typename RecommendedActionTypesT = Aws::Vector<RecommendedActionType>>
148 CreateAutomationRuleRequest& WithRecommendedActionTypes(RecommendedActionTypesT&& value) {
149 SetRecommendedActionTypes(std::forward<RecommendedActionTypesT>(value));
150 return *this;
151 }
153 m_recommendedActionTypesHasBeenSet = true;
154 m_recommendedActionTypes.push_back(value);
155 return *this;
156 }
158
160
166 inline const Criteria& GetCriteria() const { return m_criteria; }
167 inline bool CriteriaHasBeenSet() const { return m_criteriaHasBeenSet; }
168 template <typename CriteriaT = Criteria>
169 void SetCriteria(CriteriaT&& value) {
170 m_criteriaHasBeenSet = true;
171 m_criteria = std::forward<CriteriaT>(value);
172 }
173 template <typename CriteriaT = Criteria>
175 SetCriteria(std::forward<CriteriaT>(value));
176 return *this;
177 }
179
181
184 inline const Schedule& GetSchedule() const { return m_schedule; }
185 inline bool ScheduleHasBeenSet() const { return m_scheduleHasBeenSet; }
186 template <typename ScheduleT = Schedule>
187 void SetSchedule(ScheduleT&& value) {
188 m_scheduleHasBeenSet = true;
189 m_schedule = std::forward<ScheduleT>(value);
190 }
191 template <typename ScheduleT = Schedule>
193 SetSchedule(std::forward<ScheduleT>(value));
194 return *this;
195 }
197
199
202 inline RuleStatus GetStatus() const { return m_status; }
203 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
204 inline void SetStatus(RuleStatus value) {
205 m_statusHasBeenSet = true;
206 m_status = value;
207 }
209 SetStatus(value);
210 return *this;
211 }
213
215
218 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
219 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
220 template <typename TagsT = Aws::Vector<Tag>>
221 void SetTags(TagsT&& value) {
222 m_tagsHasBeenSet = true;
223 m_tags = std::forward<TagsT>(value);
224 }
225 template <typename TagsT = Aws::Vector<Tag>>
227 SetTags(std::forward<TagsT>(value));
228 return *this;
229 }
230 template <typename TagsT = Tag>
232 m_tagsHasBeenSet = true;
233 m_tags.emplace_back(std::forward<TagsT>(value));
234 return *this;
235 }
237
239
242 inline const Aws::String& GetClientToken() const { return m_clientToken; }
243 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
244 template <typename ClientTokenT = Aws::String>
245 void SetClientToken(ClientTokenT&& value) {
246 m_clientTokenHasBeenSet = true;
247 m_clientToken = std::forward<ClientTokenT>(value);
248 }
249 template <typename ClientTokenT = Aws::String>
251 SetClientToken(std::forward<ClientTokenT>(value));
252 return *this;
253 }
255 private:
256 Aws::String m_name;
257
258 Aws::String m_description;
259
260 RuleType m_ruleType{RuleType::NOT_SET};
261
262 OrganizationConfiguration m_organizationConfiguration;
263
264 Aws::String m_priority;
265
266 Aws::Vector<RecommendedActionType> m_recommendedActionTypes;
267
268 Criteria m_criteria;
269
270 Schedule m_schedule;
271
273
274 Aws::Vector<Tag> m_tags;
275
277 bool m_nameHasBeenSet = false;
278 bool m_descriptionHasBeenSet = false;
279 bool m_ruleTypeHasBeenSet = false;
280 bool m_organizationConfigurationHasBeenSet = false;
281 bool m_priorityHasBeenSet = false;
282 bool m_recommendedActionTypesHasBeenSet = false;
283 bool m_criteriaHasBeenSet = false;
284 bool m_scheduleHasBeenSet = false;
285 bool m_statusHasBeenSet = false;
286 bool m_tagsHasBeenSet = false;
287 bool m_clientTokenHasBeenSet = true;
288};
289
290} // namespace Model
291} // namespace ComputeOptimizerAutomation
292} // namespace Aws
CreateAutomationRuleRequest & WithRecommendedActionTypes(RecommendedActionTypesT &&value)
AWS_COMPUTEOPTIMIZERAUTOMATION_API CreateAutomationRuleRequest()=default
CreateAutomationRuleRequest & WithOrganizationConfiguration(OrganizationConfigurationT &&value)
CreateAutomationRuleRequest & WithDescription(DescriptionT &&value)
const Aws::Vector< RecommendedActionType > & GetRecommendedActionTypes() const
CreateAutomationRuleRequest & AddRecommendedActionTypes(RecommendedActionType value)
CreateAutomationRuleRequest & WithClientToken(ClientTokenT &&value)
AWS_COMPUTEOPTIMIZERAUTOMATION_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_COMPUTEOPTIMIZERAUTOMATION_API Aws::String SerializePayload() const override
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector