1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/budgets/Budgets_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/budgets/model/NotificationType.h>
10 #include <aws/budgets/model/ActionType.h>
11 #include <aws/budgets/model/ActionThreshold.h>
12 #include <aws/budgets/model/Definition.h>
13 #include <aws/budgets/model/ApprovalModel.h>
14 #include <aws/budgets/model/ActionStatus.h>
15 #include <aws/core/utils/memory/stl/AWSVector.h>
16 #include <aws/budgets/model/Subscriber.h>
17 #include <utility>
18 
19 namespace Aws
20 {
21 namespace Utils
22 {
23 namespace Json
24 {
25   class JsonValue;
26   class JsonView;
27 } // namespace Json
28 } // namespace Utils
29 namespace Budgets
30 {
31 namespace Model
32 {
33 
34   /**
35    * <p> A budget action resource. </p><p><h3>See Also:</h3>   <a
36    * href="http://docs.aws.amazon.com/goto/WebAPI/budgets-2016-10-20/Action">AWS API
37    * Reference</a></p>
38    */
39   class AWS_BUDGETS_API Action
40   {
41   public:
42     Action();
43     Action(Aws::Utils::Json::JsonView jsonValue);
44     Action& operator=(Aws::Utils::Json::JsonView jsonValue);
45     Aws::Utils::Json::JsonValue Jsonize() const;
46 
47 
48     /**
49      * <p> A system-generated universally unique identifier (UUID) for the action. </p>
50      */
GetActionId()51     inline const Aws::String& GetActionId() const{ return m_actionId; }
52 
53     /**
54      * <p> A system-generated universally unique identifier (UUID) for the action. </p>
55      */
ActionIdHasBeenSet()56     inline bool ActionIdHasBeenSet() const { return m_actionIdHasBeenSet; }
57 
58     /**
59      * <p> A system-generated universally unique identifier (UUID) for the action. </p>
60      */
SetActionId(const Aws::String & value)61     inline void SetActionId(const Aws::String& value) { m_actionIdHasBeenSet = true; m_actionId = value; }
62 
63     /**
64      * <p> A system-generated universally unique identifier (UUID) for the action. </p>
65      */
SetActionId(Aws::String && value)66     inline void SetActionId(Aws::String&& value) { m_actionIdHasBeenSet = true; m_actionId = std::move(value); }
67 
68     /**
69      * <p> A system-generated universally unique identifier (UUID) for the action. </p>
70      */
SetActionId(const char * value)71     inline void SetActionId(const char* value) { m_actionIdHasBeenSet = true; m_actionId.assign(value); }
72 
73     /**
74      * <p> A system-generated universally unique identifier (UUID) for the action. </p>
75      */
WithActionId(const Aws::String & value)76     inline Action& WithActionId(const Aws::String& value) { SetActionId(value); return *this;}
77 
78     /**
79      * <p> A system-generated universally unique identifier (UUID) for the action. </p>
80      */
WithActionId(Aws::String && value)81     inline Action& WithActionId(Aws::String&& value) { SetActionId(std::move(value)); return *this;}
82 
83     /**
84      * <p> A system-generated universally unique identifier (UUID) for the action. </p>
85      */
WithActionId(const char * value)86     inline Action& WithActionId(const char* value) { SetActionId(value); return *this;}
87 
88 
89 
GetBudgetName()90     inline const Aws::String& GetBudgetName() const{ return m_budgetName; }
91 
92 
BudgetNameHasBeenSet()93     inline bool BudgetNameHasBeenSet() const { return m_budgetNameHasBeenSet; }
94 
95 
SetBudgetName(const Aws::String & value)96     inline void SetBudgetName(const Aws::String& value) { m_budgetNameHasBeenSet = true; m_budgetName = value; }
97 
98 
SetBudgetName(Aws::String && value)99     inline void SetBudgetName(Aws::String&& value) { m_budgetNameHasBeenSet = true; m_budgetName = std::move(value); }
100 
101 
SetBudgetName(const char * value)102     inline void SetBudgetName(const char* value) { m_budgetNameHasBeenSet = true; m_budgetName.assign(value); }
103 
104 
WithBudgetName(const Aws::String & value)105     inline Action& WithBudgetName(const Aws::String& value) { SetBudgetName(value); return *this;}
106 
107 
WithBudgetName(Aws::String && value)108     inline Action& WithBudgetName(Aws::String&& value) { SetBudgetName(std::move(value)); return *this;}
109 
110 
WithBudgetName(const char * value)111     inline Action& WithBudgetName(const char* value) { SetBudgetName(value); return *this;}
112 
113 
114 
GetNotificationType()115     inline const NotificationType& GetNotificationType() const{ return m_notificationType; }
116 
117 
NotificationTypeHasBeenSet()118     inline bool NotificationTypeHasBeenSet() const { return m_notificationTypeHasBeenSet; }
119 
120 
SetNotificationType(const NotificationType & value)121     inline void SetNotificationType(const NotificationType& value) { m_notificationTypeHasBeenSet = true; m_notificationType = value; }
122 
123 
SetNotificationType(NotificationType && value)124     inline void SetNotificationType(NotificationType&& value) { m_notificationTypeHasBeenSet = true; m_notificationType = std::move(value); }
125 
126 
WithNotificationType(const NotificationType & value)127     inline Action& WithNotificationType(const NotificationType& value) { SetNotificationType(value); return *this;}
128 
129 
WithNotificationType(NotificationType && value)130     inline Action& WithNotificationType(NotificationType&& value) { SetNotificationType(std::move(value)); return *this;}
131 
132 
133     /**
134      * <p> The type of action. This defines the type of tasks that can be carried out
135      * by this action. This field also determines the format for definition. </p>
136      */
GetActionType()137     inline const ActionType& GetActionType() const{ return m_actionType; }
138 
139     /**
140      * <p> The type of action. This defines the type of tasks that can be carried out
141      * by this action. This field also determines the format for definition. </p>
142      */
ActionTypeHasBeenSet()143     inline bool ActionTypeHasBeenSet() const { return m_actionTypeHasBeenSet; }
144 
145     /**
146      * <p> The type of action. This defines the type of tasks that can be carried out
147      * by this action. This field also determines the format for definition. </p>
148      */
SetActionType(const ActionType & value)149     inline void SetActionType(const ActionType& value) { m_actionTypeHasBeenSet = true; m_actionType = value; }
150 
151     /**
152      * <p> The type of action. This defines the type of tasks that can be carried out
153      * by this action. This field also determines the format for definition. </p>
154      */
SetActionType(ActionType && value)155     inline void SetActionType(ActionType&& value) { m_actionTypeHasBeenSet = true; m_actionType = std::move(value); }
156 
157     /**
158      * <p> The type of action. This defines the type of tasks that can be carried out
159      * by this action. This field also determines the format for definition. </p>
160      */
WithActionType(const ActionType & value)161     inline Action& WithActionType(const ActionType& value) { SetActionType(value); return *this;}
162 
163     /**
164      * <p> The type of action. This defines the type of tasks that can be carried out
165      * by this action. This field also determines the format for definition. </p>
166      */
WithActionType(ActionType && value)167     inline Action& WithActionType(ActionType&& value) { SetActionType(std::move(value)); return *this;}
168 
169 
170     /**
171      * <p> The trigger threshold of the action. </p>
172      */
GetActionThreshold()173     inline const ActionThreshold& GetActionThreshold() const{ return m_actionThreshold; }
174 
175     /**
176      * <p> The trigger threshold of the action. </p>
177      */
ActionThresholdHasBeenSet()178     inline bool ActionThresholdHasBeenSet() const { return m_actionThresholdHasBeenSet; }
179 
180     /**
181      * <p> The trigger threshold of the action. </p>
182      */
SetActionThreshold(const ActionThreshold & value)183     inline void SetActionThreshold(const ActionThreshold& value) { m_actionThresholdHasBeenSet = true; m_actionThreshold = value; }
184 
185     /**
186      * <p> The trigger threshold of the action. </p>
187      */
SetActionThreshold(ActionThreshold && value)188     inline void SetActionThreshold(ActionThreshold&& value) { m_actionThresholdHasBeenSet = true; m_actionThreshold = std::move(value); }
189 
190     /**
191      * <p> The trigger threshold of the action. </p>
192      */
WithActionThreshold(const ActionThreshold & value)193     inline Action& WithActionThreshold(const ActionThreshold& value) { SetActionThreshold(value); return *this;}
194 
195     /**
196      * <p> The trigger threshold of the action. </p>
197      */
WithActionThreshold(ActionThreshold && value)198     inline Action& WithActionThreshold(ActionThreshold&& value) { SetActionThreshold(std::move(value)); return *this;}
199 
200 
201     /**
202      * <p> Where you specify all of the type-specific parameters. </p>
203      */
GetDefinition()204     inline const Definition& GetDefinition() const{ return m_definition; }
205 
206     /**
207      * <p> Where you specify all of the type-specific parameters. </p>
208      */
DefinitionHasBeenSet()209     inline bool DefinitionHasBeenSet() const { return m_definitionHasBeenSet; }
210 
211     /**
212      * <p> Where you specify all of the type-specific parameters. </p>
213      */
SetDefinition(const Definition & value)214     inline void SetDefinition(const Definition& value) { m_definitionHasBeenSet = true; m_definition = value; }
215 
216     /**
217      * <p> Where you specify all of the type-specific parameters. </p>
218      */
SetDefinition(Definition && value)219     inline void SetDefinition(Definition&& value) { m_definitionHasBeenSet = true; m_definition = std::move(value); }
220 
221     /**
222      * <p> Where you specify all of the type-specific parameters. </p>
223      */
WithDefinition(const Definition & value)224     inline Action& WithDefinition(const Definition& value) { SetDefinition(value); return *this;}
225 
226     /**
227      * <p> Where you specify all of the type-specific parameters. </p>
228      */
WithDefinition(Definition && value)229     inline Action& WithDefinition(Definition&& value) { SetDefinition(std::move(value)); return *this;}
230 
231 
232     /**
233      * <p> The role passed for action execution and reversion. Roles and actions must
234      * be in the same account. </p>
235      */
GetExecutionRoleArn()236     inline const Aws::String& GetExecutionRoleArn() const{ return m_executionRoleArn; }
237 
238     /**
239      * <p> The role passed for action execution and reversion. Roles and actions must
240      * be in the same account. </p>
241      */
ExecutionRoleArnHasBeenSet()242     inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
243 
244     /**
245      * <p> The role passed for action execution and reversion. Roles and actions must
246      * be in the same account. </p>
247      */
SetExecutionRoleArn(const Aws::String & value)248     inline void SetExecutionRoleArn(const Aws::String& value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn = value; }
249 
250     /**
251      * <p> The role passed for action execution and reversion. Roles and actions must
252      * be in the same account. </p>
253      */
SetExecutionRoleArn(Aws::String && value)254     inline void SetExecutionRoleArn(Aws::String&& value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn = std::move(value); }
255 
256     /**
257      * <p> The role passed for action execution and reversion. Roles and actions must
258      * be in the same account. </p>
259      */
SetExecutionRoleArn(const char * value)260     inline void SetExecutionRoleArn(const char* value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn.assign(value); }
261 
262     /**
263      * <p> The role passed for action execution and reversion. Roles and actions must
264      * be in the same account. </p>
265      */
WithExecutionRoleArn(const Aws::String & value)266     inline Action& WithExecutionRoleArn(const Aws::String& value) { SetExecutionRoleArn(value); return *this;}
267 
268     /**
269      * <p> The role passed for action execution and reversion. Roles and actions must
270      * be in the same account. </p>
271      */
WithExecutionRoleArn(Aws::String && value)272     inline Action& WithExecutionRoleArn(Aws::String&& value) { SetExecutionRoleArn(std::move(value)); return *this;}
273 
274     /**
275      * <p> The role passed for action execution and reversion. Roles and actions must
276      * be in the same account. </p>
277      */
WithExecutionRoleArn(const char * value)278     inline Action& WithExecutionRoleArn(const char* value) { SetExecutionRoleArn(value); return *this;}
279 
280 
281     /**
282      * <p> This specifies if the action needs manual or automatic approval. </p>
283      */
GetApprovalModel()284     inline const ApprovalModel& GetApprovalModel() const{ return m_approvalModel; }
285 
286     /**
287      * <p> This specifies if the action needs manual or automatic approval. </p>
288      */
ApprovalModelHasBeenSet()289     inline bool ApprovalModelHasBeenSet() const { return m_approvalModelHasBeenSet; }
290 
291     /**
292      * <p> This specifies if the action needs manual or automatic approval. </p>
293      */
SetApprovalModel(const ApprovalModel & value)294     inline void SetApprovalModel(const ApprovalModel& value) { m_approvalModelHasBeenSet = true; m_approvalModel = value; }
295 
296     /**
297      * <p> This specifies if the action needs manual or automatic approval. </p>
298      */
SetApprovalModel(ApprovalModel && value)299     inline void SetApprovalModel(ApprovalModel&& value) { m_approvalModelHasBeenSet = true; m_approvalModel = std::move(value); }
300 
301     /**
302      * <p> This specifies if the action needs manual or automatic approval. </p>
303      */
WithApprovalModel(const ApprovalModel & value)304     inline Action& WithApprovalModel(const ApprovalModel& value) { SetApprovalModel(value); return *this;}
305 
306     /**
307      * <p> This specifies if the action needs manual or automatic approval. </p>
308      */
WithApprovalModel(ApprovalModel && value)309     inline Action& WithApprovalModel(ApprovalModel&& value) { SetApprovalModel(std::move(value)); return *this;}
310 
311 
312     /**
313      * <p> The status of action. </p>
314      */
GetStatus()315     inline const ActionStatus& GetStatus() const{ return m_status; }
316 
317     /**
318      * <p> The status of action. </p>
319      */
StatusHasBeenSet()320     inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
321 
322     /**
323      * <p> The status of action. </p>
324      */
SetStatus(const ActionStatus & value)325     inline void SetStatus(const ActionStatus& value) { m_statusHasBeenSet = true; m_status = value; }
326 
327     /**
328      * <p> The status of action. </p>
329      */
SetStatus(ActionStatus && value)330     inline void SetStatus(ActionStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
331 
332     /**
333      * <p> The status of action. </p>
334      */
WithStatus(const ActionStatus & value)335     inline Action& WithStatus(const ActionStatus& value) { SetStatus(value); return *this;}
336 
337     /**
338      * <p> The status of action. </p>
339      */
WithStatus(ActionStatus && value)340     inline Action& WithStatus(ActionStatus&& value) { SetStatus(std::move(value)); return *this;}
341 
342 
343 
GetSubscribers()344     inline const Aws::Vector<Subscriber>& GetSubscribers() const{ return m_subscribers; }
345 
346 
SubscribersHasBeenSet()347     inline bool SubscribersHasBeenSet() const { return m_subscribersHasBeenSet; }
348 
349 
SetSubscribers(const Aws::Vector<Subscriber> & value)350     inline void SetSubscribers(const Aws::Vector<Subscriber>& value) { m_subscribersHasBeenSet = true; m_subscribers = value; }
351 
352 
SetSubscribers(Aws::Vector<Subscriber> && value)353     inline void SetSubscribers(Aws::Vector<Subscriber>&& value) { m_subscribersHasBeenSet = true; m_subscribers = std::move(value); }
354 
355 
WithSubscribers(const Aws::Vector<Subscriber> & value)356     inline Action& WithSubscribers(const Aws::Vector<Subscriber>& value) { SetSubscribers(value); return *this;}
357 
358 
WithSubscribers(Aws::Vector<Subscriber> && value)359     inline Action& WithSubscribers(Aws::Vector<Subscriber>&& value) { SetSubscribers(std::move(value)); return *this;}
360 
361 
AddSubscribers(const Subscriber & value)362     inline Action& AddSubscribers(const Subscriber& value) { m_subscribersHasBeenSet = true; m_subscribers.push_back(value); return *this; }
363 
364 
AddSubscribers(Subscriber && value)365     inline Action& AddSubscribers(Subscriber&& value) { m_subscribersHasBeenSet = true; m_subscribers.push_back(std::move(value)); return *this; }
366 
367   private:
368 
369     Aws::String m_actionId;
370     bool m_actionIdHasBeenSet;
371 
372     Aws::String m_budgetName;
373     bool m_budgetNameHasBeenSet;
374 
375     NotificationType m_notificationType;
376     bool m_notificationTypeHasBeenSet;
377 
378     ActionType m_actionType;
379     bool m_actionTypeHasBeenSet;
380 
381     ActionThreshold m_actionThreshold;
382     bool m_actionThresholdHasBeenSet;
383 
384     Definition m_definition;
385     bool m_definitionHasBeenSet;
386 
387     Aws::String m_executionRoleArn;
388     bool m_executionRoleArnHasBeenSet;
389 
390     ApprovalModel m_approvalModel;
391     bool m_approvalModelHasBeenSet;
392 
393     ActionStatus m_status;
394     bool m_statusHasBeenSet;
395 
396     Aws::Vector<Subscriber> m_subscribers;
397     bool m_subscribersHasBeenSet;
398   };
399 
400 } // namespace Model
401 } // namespace Budgets
402 } // namespace Aws
403