All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.codepipeline.model.ActionDeclaration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS CodePipeline module holds the client classes that are used for communicating with AWS CodePipeline

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2015-2020 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.codepipeline.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Represents information about an action declaration. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ActionDeclaration implements Serializable, Cloneable, StructuredPojo { /** *

* The action declaration's name. *

*/ private String name; /** *

* Specifies the action type and the provider of the action. *

*/ private ActionTypeId actionTypeId; /** *

* The order in which actions are run. *

*/ private Integer runOrder; /** *

* The action's configuration. These are key-value pairs that specify input values for an action. For more * information, see Action Structure Requirements in CodePipeline. For the list of configuration properties for the AWS * CloudFormation action type in CodePipeline, see Configuration Properties Reference in the AWS CloudFormation User Guide. For template snippets with * examples, see Using Parameter Override Functions with CodePipeline Pipelines in the AWS CloudFormation User Guide. *

*

* The values can be represented in either JSON or YAML format. For example, the JSON configuration item format is * as follows: *

*

* JSON: *

*

* "Configuration" : { Key : Value }, *

*/ private java.util.Map configuration; /** *

* The name or ID of the result of the action declaration, such as a test or build artifact. *

*/ private java.util.List outputArtifacts; /** *

* The name or ID of the artifact consumed by the action, such as a test or build artifact. *

*/ private java.util.List inputArtifacts; /** *

* The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for the * pipeline. *

*/ private String roleArn; /** *

* The action declaration's AWS Region, such as us-east-1. *

*/ private String region; /** *

* The variable namespace associated with the action. All variables produced as output by this action fall under * this namespace. *

*/ private String namespace; /** *

* The action declaration's name. *

* * @param name * The action declaration's name. */ public void setName(String name) { this.name = name; } /** *

* The action declaration's name. *

* * @return The action declaration's name. */ public String getName() { return this.name; } /** *

* The action declaration's name. *

* * @param name * The action declaration's name. * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withName(String name) { setName(name); return this; } /** *

* Specifies the action type and the provider of the action. *

* * @param actionTypeId * Specifies the action type and the provider of the action. */ public void setActionTypeId(ActionTypeId actionTypeId) { this.actionTypeId = actionTypeId; } /** *

* Specifies the action type and the provider of the action. *

* * @return Specifies the action type and the provider of the action. */ public ActionTypeId getActionTypeId() { return this.actionTypeId; } /** *

* Specifies the action type and the provider of the action. *

* * @param actionTypeId * Specifies the action type and the provider of the action. * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withActionTypeId(ActionTypeId actionTypeId) { setActionTypeId(actionTypeId); return this; } /** *

* The order in which actions are run. *

* * @param runOrder * The order in which actions are run. */ public void setRunOrder(Integer runOrder) { this.runOrder = runOrder; } /** *

* The order in which actions are run. *

* * @return The order in which actions are run. */ public Integer getRunOrder() { return this.runOrder; } /** *

* The order in which actions are run. *

* * @param runOrder * The order in which actions are run. * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withRunOrder(Integer runOrder) { setRunOrder(runOrder); return this; } /** *

* The action's configuration. These are key-value pairs that specify input values for an action. For more * information, see Action Structure Requirements in CodePipeline. For the list of configuration properties for the AWS * CloudFormation action type in CodePipeline, see Configuration Properties Reference in the AWS CloudFormation User Guide. For template snippets with * examples, see Using Parameter Override Functions with CodePipeline Pipelines in the AWS CloudFormation User Guide. *

*

* The values can be represented in either JSON or YAML format. For example, the JSON configuration item format is * as follows: *

*

* JSON: *

*

* "Configuration" : { Key : Value }, *

* * @return The action's configuration. These are key-value pairs that specify input values for an action. For more * information, see Action Structure Requirements in CodePipeline. For the list of configuration properties for the AWS * CloudFormation action type in CodePipeline, see Configuration Properties Reference in the AWS CloudFormation User Guide. For template * snippets with examples, see Using Parameter Override Functions with CodePipeline Pipelines in the AWS CloudFormation User * Guide.

*

* The values can be represented in either JSON or YAML format. For example, the JSON configuration item * format is as follows: *

*

* JSON: *

*

* "Configuration" : { Key : Value }, */ public java.util.Map getConfiguration() { return configuration; } /** *

* The action's configuration. These are key-value pairs that specify input values for an action. For more * information, see Action Structure Requirements in CodePipeline. For the list of configuration properties for the AWS * CloudFormation action type in CodePipeline, see Configuration Properties Reference in the AWS CloudFormation User Guide. For template snippets with * examples, see Using Parameter Override Functions with CodePipeline Pipelines in the AWS CloudFormation User Guide. *

*

* The values can be represented in either JSON or YAML format. For example, the JSON configuration item format is * as follows: *

*

* JSON: *

*

* "Configuration" : { Key : Value }, *

* * @param configuration * The action's configuration. These are key-value pairs that specify input values for an action. For more * information, see Action Structure Requirements in CodePipeline. For the list of configuration properties for the AWS * CloudFormation action type in CodePipeline, see Configuration Properties Reference in the AWS CloudFormation User Guide. For template snippets * with examples, see Using Parameter Override Functions with CodePipeline Pipelines in the AWS CloudFormation User * Guide.

*

* The values can be represented in either JSON or YAML format. For example, the JSON configuration item * format is as follows: *

*

* JSON: *

*

* "Configuration" : { Key : Value }, */ public void setConfiguration(java.util.Map configuration) { this.configuration = configuration; } /** *

* The action's configuration. These are key-value pairs that specify input values for an action. For more * information, see Action Structure Requirements in CodePipeline. For the list of configuration properties for the AWS * CloudFormation action type in CodePipeline, see Configuration Properties Reference in the AWS CloudFormation User Guide. For template snippets with * examples, see Using Parameter Override Functions with CodePipeline Pipelines in the AWS CloudFormation User Guide. *

*

* The values can be represented in either JSON or YAML format. For example, the JSON configuration item format is * as follows: *

*

* JSON: *

*

* "Configuration" : { Key : Value }, *

* * @param configuration * The action's configuration. These are key-value pairs that specify input values for an action. For more * information, see Action Structure Requirements in CodePipeline. For the list of configuration properties for the AWS * CloudFormation action type in CodePipeline, see Configuration Properties Reference in the AWS CloudFormation User Guide. For template snippets * with examples, see Using Parameter Override Functions with CodePipeline Pipelines in the AWS CloudFormation User * Guide.

*

* The values can be represented in either JSON or YAML format. For example, the JSON configuration item * format is as follows: *

*

* JSON: *

*

* "Configuration" : { Key : Value }, * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withConfiguration(java.util.Map configuration) { setConfiguration(configuration); return this; } /** * Add a single Configuration entry * * @see ActionDeclaration#withConfiguration * @returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration addConfigurationEntry(String key, String value) { if (null == this.configuration) { this.configuration = new java.util.HashMap(); } if (this.configuration.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.configuration.put(key, value); return this; } /** * Removes all the entries added into Configuration. * * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration clearConfigurationEntries() { this.configuration = null; return this; } /** *

* The name or ID of the result of the action declaration, such as a test or build artifact. *

* * @return The name or ID of the result of the action declaration, such as a test or build artifact. */ public java.util.List getOutputArtifacts() { return outputArtifacts; } /** *

* The name or ID of the result of the action declaration, such as a test or build artifact. *

* * @param outputArtifacts * The name or ID of the result of the action declaration, such as a test or build artifact. */ public void setOutputArtifacts(java.util.Collection outputArtifacts) { if (outputArtifacts == null) { this.outputArtifacts = null; return; } this.outputArtifacts = new java.util.ArrayList(outputArtifacts); } /** *

* The name or ID of the result of the action declaration, such as a test or build artifact. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setOutputArtifacts(java.util.Collection)} or {@link #withOutputArtifacts(java.util.Collection)} if you * want to override the existing values. *

* * @param outputArtifacts * The name or ID of the result of the action declaration, such as a test or build artifact. * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withOutputArtifacts(OutputArtifact... outputArtifacts) { if (this.outputArtifacts == null) { setOutputArtifacts(new java.util.ArrayList(outputArtifacts.length)); } for (OutputArtifact ele : outputArtifacts) { this.outputArtifacts.add(ele); } return this; } /** *

* The name or ID of the result of the action declaration, such as a test or build artifact. *

* * @param outputArtifacts * The name or ID of the result of the action declaration, such as a test or build artifact. * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withOutputArtifacts(java.util.Collection outputArtifacts) { setOutputArtifacts(outputArtifacts); return this; } /** *

* The name or ID of the artifact consumed by the action, such as a test or build artifact. *

* * @return The name or ID of the artifact consumed by the action, such as a test or build artifact. */ public java.util.List getInputArtifacts() { return inputArtifacts; } /** *

* The name or ID of the artifact consumed by the action, such as a test or build artifact. *

* * @param inputArtifacts * The name or ID of the artifact consumed by the action, such as a test or build artifact. */ public void setInputArtifacts(java.util.Collection inputArtifacts) { if (inputArtifacts == null) { this.inputArtifacts = null; return; } this.inputArtifacts = new java.util.ArrayList(inputArtifacts); } /** *

* The name or ID of the artifact consumed by the action, such as a test or build artifact. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setInputArtifacts(java.util.Collection)} or {@link #withInputArtifacts(java.util.Collection)} if you want * to override the existing values. *

* * @param inputArtifacts * The name or ID of the artifact consumed by the action, such as a test or build artifact. * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withInputArtifacts(InputArtifact... inputArtifacts) { if (this.inputArtifacts == null) { setInputArtifacts(new java.util.ArrayList(inputArtifacts.length)); } for (InputArtifact ele : inputArtifacts) { this.inputArtifacts.add(ele); } return this; } /** *

* The name or ID of the artifact consumed by the action, such as a test or build artifact. *

* * @param inputArtifacts * The name or ID of the artifact consumed by the action, such as a test or build artifact. * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withInputArtifacts(java.util.Collection inputArtifacts) { setInputArtifacts(inputArtifacts); return this; } /** *

* The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for the * pipeline. *

* * @param roleArn * The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for * the pipeline. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for the * pipeline. *

* * @return The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn * for the pipeline. */ public String getRoleArn() { return this.roleArn; } /** *

* The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for the * pipeline. *

* * @param roleArn * The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for * the pipeline. * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* The action declaration's AWS Region, such as us-east-1. *

* * @param region * The action declaration's AWS Region, such as us-east-1. */ public void setRegion(String region) { this.region = region; } /** *

* The action declaration's AWS Region, such as us-east-1. *

* * @return The action declaration's AWS Region, such as us-east-1. */ public String getRegion() { return this.region; } /** *

* The action declaration's AWS Region, such as us-east-1. *

* * @param region * The action declaration's AWS Region, such as us-east-1. * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withRegion(String region) { setRegion(region); return this; } /** *

* The variable namespace associated with the action. All variables produced as output by this action fall under * this namespace. *

* * @param namespace * The variable namespace associated with the action. All variables produced as output by this action fall * under this namespace. */ public void setNamespace(String namespace) { this.namespace = namespace; } /** *

* The variable namespace associated with the action. All variables produced as output by this action fall under * this namespace. *

* * @return The variable namespace associated with the action. All variables produced as output by this action fall * under this namespace. */ public String getNamespace() { return this.namespace; } /** *

* The variable namespace associated with the action. All variables produced as output by this action fall under * this namespace. *

* * @param namespace * The variable namespace associated with the action. All variables produced as output by this action fall * under this namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public ActionDeclaration withNamespace(String namespace) { setNamespace(namespace); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getActionTypeId() != null) sb.append("ActionTypeId: ").append(getActionTypeId()).append(","); if (getRunOrder() != null) sb.append("RunOrder: ").append(getRunOrder()).append(","); if (getConfiguration() != null) sb.append("Configuration: ").append(getConfiguration()).append(","); if (getOutputArtifacts() != null) sb.append("OutputArtifacts: ").append(getOutputArtifacts()).append(","); if (getInputArtifacts() != null) sb.append("InputArtifacts: ").append(getInputArtifacts()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ActionDeclaration == false) return false; ActionDeclaration other = (ActionDeclaration) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getActionTypeId() == null ^ this.getActionTypeId() == null) return false; if (other.getActionTypeId() != null && other.getActionTypeId().equals(this.getActionTypeId()) == false) return false; if (other.getRunOrder() == null ^ this.getRunOrder() == null) return false; if (other.getRunOrder() != null && other.getRunOrder().equals(this.getRunOrder()) == false) return false; if (other.getConfiguration() == null ^ this.getConfiguration() == null) return false; if (other.getConfiguration() != null && other.getConfiguration().equals(this.getConfiguration()) == false) return false; if (other.getOutputArtifacts() == null ^ this.getOutputArtifacts() == null) return false; if (other.getOutputArtifacts() != null && other.getOutputArtifacts().equals(this.getOutputArtifacts()) == false) return false; if (other.getInputArtifacts() == null ^ this.getInputArtifacts() == null) return false; if (other.getInputArtifacts() != null && other.getInputArtifacts().equals(this.getInputArtifacts()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getNamespace() == null ^ this.getNamespace() == null) return false; if (other.getNamespace() != null && other.getNamespace().equals(this.getNamespace()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getActionTypeId() == null) ? 0 : getActionTypeId().hashCode()); hashCode = prime * hashCode + ((getRunOrder() == null) ? 0 : getRunOrder().hashCode()); hashCode = prime * hashCode + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode()); hashCode = prime * hashCode + ((getOutputArtifacts() == null) ? 0 : getOutputArtifacts().hashCode()); hashCode = prime * hashCode + ((getInputArtifacts() == null) ? 0 : getInputArtifacts().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); return hashCode; } @Override public ActionDeclaration clone() { try { return (ActionDeclaration) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.codepipeline.model.transform.ActionDeclarationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy