/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A budget action resource. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Action implements Serializable, Cloneable, StructuredPojo { /** ** A system-generated universally unique identifier (UUID) for the action. *
*/ private String actionId; 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; /** ** The trigger threshold of the action. *
*/ private ActionThreshold actionThreshold; /** ** Where you specify all of the type-specific parameters. *
*/ 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; /** ** The status of the action. *
*/ private String status; private java.util.List* A system-generated universally unique identifier (UUID) for the action. *
* * @param actionId * A system-generated universally unique identifier (UUID) for the action. */ public void setActionId(String actionId) { this.actionId = actionId; } /** ** A system-generated universally unique identifier (UUID) for the action. *
* * @return A system-generated universally unique identifier (UUID) for the action. */ public String getActionId() { return this.actionId; } /** ** A system-generated universally unique identifier (UUID) for the action. *
* * @param actionId * A system-generated universally unique identifier (UUID) for the action. * @return Returns a reference to this object so that method calls can be chained together. */ public Action withActionId(String actionId) { setActionId(actionId); return this; } /** * @param budgetName */ public void setBudgetName(String budgetName) { this.budgetName = budgetName; } /** * @return */ public String getBudgetName() { return this.budgetName; } /** * @param budgetName * @return Returns a reference to this object so that method calls can be chained together. */ public Action withBudgetName(String budgetName) { setBudgetName(budgetName); return this; } /** * @param notificationType * @see NotificationType */ public void setNotificationType(String notificationType) { this.notificationType = notificationType; } /** * @return * @see NotificationType */ public String getNotificationType() { return this.notificationType; } /** * @param notificationType * @return Returns a reference to this object so that method calls can be chained together. * @see NotificationType */ public Action withNotificationType(String notificationType) { setNotificationType(notificationType); return this; } /** * @param notificationType * @return Returns a reference to this object so that method calls can be chained together. * @see NotificationType */ public Action withNotificationType(NotificationType notificationType) { this.notificationType = notificationType.toString(); 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. * @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 Action 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 Action withActionType(ActionType actionType) { this.actionType = actionType.toString(); return this; } /** ** The trigger threshold of the action. *
* * @param actionThreshold * The trigger threshold of the action. */ public void setActionThreshold(ActionThreshold actionThreshold) { this.actionThreshold = actionThreshold; } /** ** The trigger threshold of the action. *
* * @return The trigger threshold of the action. */ public ActionThreshold getActionThreshold() { return this.actionThreshold; } /** ** The trigger threshold of the action. *
* * @param actionThreshold * The trigger threshold of the action. * @return Returns a reference to this object so that method calls can be chained together. */ public Action withActionThreshold(ActionThreshold actionThreshold) { setActionThreshold(actionThreshold); return this; } /** ** Where you specify all of the type-specific parameters. *
* * @param definition * Where you specify all of the type-specific parameters. */ public void setDefinition(Definition definition) { this.definition = definition; } /** ** Where you specify all of the type-specific parameters. *
* * @return Where you specify all of the type-specific parameters. */ public Definition getDefinition() { return this.definition; } /** ** Where you specify all of the type-specific parameters. *
* * @param definition * Where you specify all of the type-specific parameters. * @return Returns a reference to this object so that method calls can be chained together. */ public Action 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 Action 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 Action 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 Action withApprovalModel(ApprovalModel approvalModel) { this.approvalModel = approvalModel.toString(); return this; } /** ** The status of the action. *
* * @param status * The status of the action. * @see ActionStatus */ public void setStatus(String status) { this.status = status; } /** ** The status of the action. *
* * @return The status of the action. * @see ActionStatus */ public String getStatus() { return this.status; } /** ** The status of the action. *
* * @param status * The status of the action. * @return Returns a reference to this object so that method calls can be chained together. * @see ActionStatus */ public Action withStatus(String status) { setStatus(status); return this; } /** ** The status of the action. *
* * @param status * The status of the action. * @return Returns a reference to this object so that method calls can be chained together. * @see ActionStatus */ public Action withStatus(ActionStatus status) { this.status = status.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 Action withSubscribers(Subscriber... subscribers) { if (this.subscribers == null) { setSubscribers(new java.util.ArrayList