/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.budgets.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateBudgetActionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { private String accountId; private String budgetName; private String notificationType; /** *
* The type of action. This defines the type of tasks that can be carried out by this action. This field also * determines the format for definition. *
*/ private String actionType; private ActionThreshold actionThreshold; private Definition definition; /** ** The role passed for action execution and reversion. Roles and actions must be in the same account. *
*/ private String executionRoleArn; /** ** This specifies if the action needs manual or automatic approval. *
*/ private String approvalModel; private java.util.List* The type of action. This defines the type of tasks that can be carried out by this action. This field also * determines the format for definition. *
* * @param actionType * The type of action. This defines the type of tasks that can be carried out by this action. This field also * determines the format for definition. * @see ActionType */ public void setActionType(String actionType) { this.actionType = actionType; } /** ** The type of action. This defines the type of tasks that can be carried out by this action. This field also * determines the format for definition. *
* * @return The type of action. This defines the type of tasks that can be carried out by this action. This field * also determines the format for definition. * @see ActionType */ public String getActionType() { return this.actionType; } /** ** The type of action. This defines the type of tasks that can be carried out by this action. This field also * determines the format for definition. *
* * @param actionType * The type of action. This defines the type of tasks that can be carried out by this action. This field also * determines the format for definition. * @return Returns a reference to this object so that method calls can be chained together. * @see ActionType */ public CreateBudgetActionRequest withActionType(String actionType) { setActionType(actionType); return this; } /** ** The type of action. This defines the type of tasks that can be carried out by this action. This field also * determines the format for definition. *
* * @param actionType * The type of action. This defines the type of tasks that can be carried out by this action. This field also * determines the format for definition. * @return Returns a reference to this object so that method calls can be chained together. * @see ActionType */ public CreateBudgetActionRequest withActionType(ActionType actionType) { this.actionType = actionType.toString(); return this; } /** * @param actionThreshold */ public void setActionThreshold(ActionThreshold actionThreshold) { this.actionThreshold = actionThreshold; } /** * @return */ public ActionThreshold getActionThreshold() { return this.actionThreshold; } /** * @param actionThreshold * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBudgetActionRequest withActionThreshold(ActionThreshold actionThreshold) { setActionThreshold(actionThreshold); return this; } /** * @param definition */ public void setDefinition(Definition definition) { this.definition = definition; } /** * @return */ public Definition getDefinition() { return this.definition; } /** * @param definition * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBudgetActionRequest withDefinition(Definition definition) { setDefinition(definition); return this; } /** ** The role passed for action execution and reversion. Roles and actions must be in the same account. *
* * @param executionRoleArn * The role passed for action execution and reversion. Roles and actions must be in the same account. */ public void setExecutionRoleArn(String executionRoleArn) { this.executionRoleArn = executionRoleArn; } /** ** The role passed for action execution and reversion. Roles and actions must be in the same account. *
* * @return The role passed for action execution and reversion. Roles and actions must be in the same account. */ public String getExecutionRoleArn() { return this.executionRoleArn; } /** ** The role passed for action execution and reversion. Roles and actions must be in the same account. *
* * @param executionRoleArn * The role passed for action execution and reversion. Roles and actions must be in the same account. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBudgetActionRequest withExecutionRoleArn(String executionRoleArn) { setExecutionRoleArn(executionRoleArn); return this; } /** ** This specifies if the action needs manual or automatic approval. *
* * @param approvalModel * This specifies if the action needs manual or automatic approval. * @see ApprovalModel */ public void setApprovalModel(String approvalModel) { this.approvalModel = approvalModel; } /** ** This specifies if the action needs manual or automatic approval. *
* * @return This specifies if the action needs manual or automatic approval. * @see ApprovalModel */ public String getApprovalModel() { return this.approvalModel; } /** ** This specifies if the action needs manual or automatic approval. *
* * @param approvalModel * This specifies if the action needs manual or automatic approval. * @return Returns a reference to this object so that method calls can be chained together. * @see ApprovalModel */ public CreateBudgetActionRequest withApprovalModel(String approvalModel) { setApprovalModel(approvalModel); return this; } /** ** This specifies if the action needs manual or automatic approval. *
* * @param approvalModel * This specifies if the action needs manual or automatic approval. * @return Returns a reference to this object so that method calls can be chained together. * @see ApprovalModel */ public CreateBudgetActionRequest withApprovalModel(ApprovalModel approvalModel) { this.approvalModel = approvalModel.toString(); return this; } /** * @return */ public java.util.List* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSubscribers(java.util.Collection)} or {@link #withSubscribers(java.util.Collection)} if you want to * override the existing values. *
* * @param subscribers * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBudgetActionRequest withSubscribers(Subscriber... subscribers) { if (this.subscribers == null) { setSubscribers(new java.util.ArrayList