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/budgets/BudgetsRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/budgets/model/NotificationType.h>
11 #include <aws/budgets/model/ActionType.h>
12 #include <aws/budgets/model/ActionThreshold.h>
13 #include <aws/budgets/model/Definition.h>
14 #include <aws/budgets/model/ApprovalModel.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 Budgets
22 {
23 namespace Model
24 {
25 
26   /**
27    */
28   class AWS_BUDGETS_API CreateBudgetActionRequest : public BudgetsRequest
29   {
30   public:
31     CreateBudgetActionRequest();
32 
33     // Service request name is the Operation name which will send this request out,
34     // each operation should has unique request name, so that we can get operation's name from this request.
35     // Note: this is not true for response, multiple operations may have the same response name,
36     // so we can not get operation's name from response.
GetServiceRequestName()37     inline virtual const char* GetServiceRequestName() const override { return "CreateBudgetAction"; }
38 
39     Aws::String SerializePayload() const override;
40 
41     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
42 
43 
44 
GetAccountId()45     inline const Aws::String& GetAccountId() const{ return m_accountId; }
46 
47 
AccountIdHasBeenSet()48     inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
49 
50 
SetAccountId(const Aws::String & value)51     inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }
52 
53 
SetAccountId(Aws::String && value)54     inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); }
55 
56 
SetAccountId(const char * value)57     inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }
58 
59 
WithAccountId(const Aws::String & value)60     inline CreateBudgetActionRequest& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}
61 
62 
WithAccountId(Aws::String && value)63     inline CreateBudgetActionRequest& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;}
64 
65 
WithAccountId(const char * value)66     inline CreateBudgetActionRequest& WithAccountId(const char* value) { SetAccountId(value); return *this;}
67 
68 
69 
GetBudgetName()70     inline const Aws::String& GetBudgetName() const{ return m_budgetName; }
71 
72 
BudgetNameHasBeenSet()73     inline bool BudgetNameHasBeenSet() const { return m_budgetNameHasBeenSet; }
74 
75 
SetBudgetName(const Aws::String & value)76     inline void SetBudgetName(const Aws::String& value) { m_budgetNameHasBeenSet = true; m_budgetName = value; }
77 
78 
SetBudgetName(Aws::String && value)79     inline void SetBudgetName(Aws::String&& value) { m_budgetNameHasBeenSet = true; m_budgetName = std::move(value); }
80 
81 
SetBudgetName(const char * value)82     inline void SetBudgetName(const char* value) { m_budgetNameHasBeenSet = true; m_budgetName.assign(value); }
83 
84 
WithBudgetName(const Aws::String & value)85     inline CreateBudgetActionRequest& WithBudgetName(const Aws::String& value) { SetBudgetName(value); return *this;}
86 
87 
WithBudgetName(Aws::String && value)88     inline CreateBudgetActionRequest& WithBudgetName(Aws::String&& value) { SetBudgetName(std::move(value)); return *this;}
89 
90 
WithBudgetName(const char * value)91     inline CreateBudgetActionRequest& WithBudgetName(const char* value) { SetBudgetName(value); return *this;}
92 
93 
94 
GetNotificationType()95     inline const NotificationType& GetNotificationType() const{ return m_notificationType; }
96 
97 
NotificationTypeHasBeenSet()98     inline bool NotificationTypeHasBeenSet() const { return m_notificationTypeHasBeenSet; }
99 
100 
SetNotificationType(const NotificationType & value)101     inline void SetNotificationType(const NotificationType& value) { m_notificationTypeHasBeenSet = true; m_notificationType = value; }
102 
103 
SetNotificationType(NotificationType && value)104     inline void SetNotificationType(NotificationType&& value) { m_notificationTypeHasBeenSet = true; m_notificationType = std::move(value); }
105 
106 
WithNotificationType(const NotificationType & value)107     inline CreateBudgetActionRequest& WithNotificationType(const NotificationType& value) { SetNotificationType(value); return *this;}
108 
109 
WithNotificationType(NotificationType && value)110     inline CreateBudgetActionRequest& WithNotificationType(NotificationType&& value) { SetNotificationType(std::move(value)); return *this;}
111 
112 
113     /**
114      * <p> The type of action. This defines the type of tasks that can be carried out
115      * by this action. This field also determines the format for definition. </p>
116      */
GetActionType()117     inline const ActionType& GetActionType() const{ return m_actionType; }
118 
119     /**
120      * <p> The type of action. This defines the type of tasks that can be carried out
121      * by this action. This field also determines the format for definition. </p>
122      */
ActionTypeHasBeenSet()123     inline bool ActionTypeHasBeenSet() const { return m_actionTypeHasBeenSet; }
124 
125     /**
126      * <p> The type of action. This defines the type of tasks that can be carried out
127      * by this action. This field also determines the format for definition. </p>
128      */
SetActionType(const ActionType & value)129     inline void SetActionType(const ActionType& value) { m_actionTypeHasBeenSet = true; m_actionType = value; }
130 
131     /**
132      * <p> The type of action. This defines the type of tasks that can be carried out
133      * by this action. This field also determines the format for definition. </p>
134      */
SetActionType(ActionType && value)135     inline void SetActionType(ActionType&& value) { m_actionTypeHasBeenSet = true; m_actionType = std::move(value); }
136 
137     /**
138      * <p> The type of action. This defines the type of tasks that can be carried out
139      * by this action. This field also determines the format for definition. </p>
140      */
WithActionType(const ActionType & value)141     inline CreateBudgetActionRequest& WithActionType(const ActionType& value) { SetActionType(value); return *this;}
142 
143     /**
144      * <p> The type of action. This defines the type of tasks that can be carried out
145      * by this action. This field also determines the format for definition. </p>
146      */
WithActionType(ActionType && value)147     inline CreateBudgetActionRequest& WithActionType(ActionType&& value) { SetActionType(std::move(value)); return *this;}
148 
149 
150 
GetActionThreshold()151     inline const ActionThreshold& GetActionThreshold() const{ return m_actionThreshold; }
152 
153 
ActionThresholdHasBeenSet()154     inline bool ActionThresholdHasBeenSet() const { return m_actionThresholdHasBeenSet; }
155 
156 
SetActionThreshold(const ActionThreshold & value)157     inline void SetActionThreshold(const ActionThreshold& value) { m_actionThresholdHasBeenSet = true; m_actionThreshold = value; }
158 
159 
SetActionThreshold(ActionThreshold && value)160     inline void SetActionThreshold(ActionThreshold&& value) { m_actionThresholdHasBeenSet = true; m_actionThreshold = std::move(value); }
161 
162 
WithActionThreshold(const ActionThreshold & value)163     inline CreateBudgetActionRequest& WithActionThreshold(const ActionThreshold& value) { SetActionThreshold(value); return *this;}
164 
165 
WithActionThreshold(ActionThreshold && value)166     inline CreateBudgetActionRequest& WithActionThreshold(ActionThreshold&& value) { SetActionThreshold(std::move(value)); return *this;}
167 
168 
169 
GetDefinition()170     inline const Definition& GetDefinition() const{ return m_definition; }
171 
172 
DefinitionHasBeenSet()173     inline bool DefinitionHasBeenSet() const { return m_definitionHasBeenSet; }
174 
175 
SetDefinition(const Definition & value)176     inline void SetDefinition(const Definition& value) { m_definitionHasBeenSet = true; m_definition = value; }
177 
178 
SetDefinition(Definition && value)179     inline void SetDefinition(Definition&& value) { m_definitionHasBeenSet = true; m_definition = std::move(value); }
180 
181 
WithDefinition(const Definition & value)182     inline CreateBudgetActionRequest& WithDefinition(const Definition& value) { SetDefinition(value); return *this;}
183 
184 
WithDefinition(Definition && value)185     inline CreateBudgetActionRequest& WithDefinition(Definition&& value) { SetDefinition(std::move(value)); return *this;}
186 
187 
188     /**
189      * <p> The role passed for action execution and reversion. Roles and actions must
190      * be in the same account. </p>
191      */
GetExecutionRoleArn()192     inline const Aws::String& GetExecutionRoleArn() const{ return m_executionRoleArn; }
193 
194     /**
195      * <p> The role passed for action execution and reversion. Roles and actions must
196      * be in the same account. </p>
197      */
ExecutionRoleArnHasBeenSet()198     inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
199 
200     /**
201      * <p> The role passed for action execution and reversion. Roles and actions must
202      * be in the same account. </p>
203      */
SetExecutionRoleArn(const Aws::String & value)204     inline void SetExecutionRoleArn(const Aws::String& value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn = value; }
205 
206     /**
207      * <p> The role passed for action execution and reversion. Roles and actions must
208      * be in the same account. </p>
209      */
SetExecutionRoleArn(Aws::String && value)210     inline void SetExecutionRoleArn(Aws::String&& value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn = std::move(value); }
211 
212     /**
213      * <p> The role passed for action execution and reversion. Roles and actions must
214      * be in the same account. </p>
215      */
SetExecutionRoleArn(const char * value)216     inline void SetExecutionRoleArn(const char* value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn.assign(value); }
217 
218     /**
219      * <p> The role passed for action execution and reversion. Roles and actions must
220      * be in the same account. </p>
221      */
WithExecutionRoleArn(const Aws::String & value)222     inline CreateBudgetActionRequest& WithExecutionRoleArn(const Aws::String& value) { SetExecutionRoleArn(value); return *this;}
223 
224     /**
225      * <p> The role passed for action execution and reversion. Roles and actions must
226      * be in the same account. </p>
227      */
WithExecutionRoleArn(Aws::String && value)228     inline CreateBudgetActionRequest& WithExecutionRoleArn(Aws::String&& value) { SetExecutionRoleArn(std::move(value)); return *this;}
229 
230     /**
231      * <p> The role passed for action execution and reversion. Roles and actions must
232      * be in the same account. </p>
233      */
WithExecutionRoleArn(const char * value)234     inline CreateBudgetActionRequest& WithExecutionRoleArn(const char* value) { SetExecutionRoleArn(value); return *this;}
235 
236 
237     /**
238      * <p> This specifies if the action needs manual or automatic approval. </p>
239      */
GetApprovalModel()240     inline const ApprovalModel& GetApprovalModel() const{ return m_approvalModel; }
241 
242     /**
243      * <p> This specifies if the action needs manual or automatic approval. </p>
244      */
ApprovalModelHasBeenSet()245     inline bool ApprovalModelHasBeenSet() const { return m_approvalModelHasBeenSet; }
246 
247     /**
248      * <p> This specifies if the action needs manual or automatic approval. </p>
249      */
SetApprovalModel(const ApprovalModel & value)250     inline void SetApprovalModel(const ApprovalModel& value) { m_approvalModelHasBeenSet = true; m_approvalModel = value; }
251 
252     /**
253      * <p> This specifies if the action needs manual or automatic approval. </p>
254      */
SetApprovalModel(ApprovalModel && value)255     inline void SetApprovalModel(ApprovalModel&& value) { m_approvalModelHasBeenSet = true; m_approvalModel = std::move(value); }
256 
257     /**
258      * <p> This specifies if the action needs manual or automatic approval. </p>
259      */
WithApprovalModel(const ApprovalModel & value)260     inline CreateBudgetActionRequest& WithApprovalModel(const ApprovalModel& value) { SetApprovalModel(value); return *this;}
261 
262     /**
263      * <p> This specifies if the action needs manual or automatic approval. </p>
264      */
WithApprovalModel(ApprovalModel && value)265     inline CreateBudgetActionRequest& WithApprovalModel(ApprovalModel&& value) { SetApprovalModel(std::move(value)); return *this;}
266 
267 
268 
GetSubscribers()269     inline const Aws::Vector<Subscriber>& GetSubscribers() const{ return m_subscribers; }
270 
271 
SubscribersHasBeenSet()272     inline bool SubscribersHasBeenSet() const { return m_subscribersHasBeenSet; }
273 
274 
SetSubscribers(const Aws::Vector<Subscriber> & value)275     inline void SetSubscribers(const Aws::Vector<Subscriber>& value) { m_subscribersHasBeenSet = true; m_subscribers = value; }
276 
277 
SetSubscribers(Aws::Vector<Subscriber> && value)278     inline void SetSubscribers(Aws::Vector<Subscriber>&& value) { m_subscribersHasBeenSet = true; m_subscribers = std::move(value); }
279 
280 
WithSubscribers(const Aws::Vector<Subscriber> & value)281     inline CreateBudgetActionRequest& WithSubscribers(const Aws::Vector<Subscriber>& value) { SetSubscribers(value); return *this;}
282 
283 
WithSubscribers(Aws::Vector<Subscriber> && value)284     inline CreateBudgetActionRequest& WithSubscribers(Aws::Vector<Subscriber>&& value) { SetSubscribers(std::move(value)); return *this;}
285 
286 
AddSubscribers(const Subscriber & value)287     inline CreateBudgetActionRequest& AddSubscribers(const Subscriber& value) { m_subscribersHasBeenSet = true; m_subscribers.push_back(value); return *this; }
288 
289 
AddSubscribers(Subscriber && value)290     inline CreateBudgetActionRequest& AddSubscribers(Subscriber&& value) { m_subscribersHasBeenSet = true; m_subscribers.push_back(std::move(value)); return *this; }
291 
292   private:
293 
294     Aws::String m_accountId;
295     bool m_accountIdHasBeenSet;
296 
297     Aws::String m_budgetName;
298     bool m_budgetNameHasBeenSet;
299 
300     NotificationType m_notificationType;
301     bool m_notificationTypeHasBeenSet;
302 
303     ActionType m_actionType;
304     bool m_actionTypeHasBeenSet;
305 
306     ActionThreshold m_actionThreshold;
307     bool m_actionThresholdHasBeenSet;
308 
309     Definition m_definition;
310     bool m_definitionHasBeenSet;
311 
312     Aws::String m_executionRoleArn;
313     bool m_executionRoleArnHasBeenSet;
314 
315     ApprovalModel m_approvalModel;
316     bool m_approvalModelHasBeenSet;
317 
318     Aws::Vector<Subscriber> m_subscribers;
319     bool m_subscribersHasBeenSet;
320   };
321 
322 } // namespace Model
323 } // namespace Budgets
324 } // namespace Aws
325