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

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

/*
 * Copyright 2014-2019 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; /** *

* The configuration information for the action type. *

*/ private ActionTypeId actionTypeId; /** *

* The order in which actions are run. *

*/ private Integer runOrder; /** *

* The action declaration's configuration. *

*/ 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 will perform 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 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; } /** *

* The configuration information for the action type. *

* * @param actionTypeId * The configuration information for the action type. */ public void setActionTypeId(ActionTypeId actionTypeId) { this.actionTypeId = actionTypeId; } /** *

* The configuration information for the action type. *

* * @return The configuration information for the action type. */ public ActionTypeId getActionTypeId() { return this.actionTypeId; } /** *

* The configuration information for the action type. *

* * @param actionTypeId * The configuration information for the action type. * @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 declaration's configuration. *

* * @return The action declaration's configuration. */ public java.util.Map getConfiguration() { return configuration; } /** *

* The action declaration's configuration. *

* * @param configuration * The action declaration's configuration. */ public void setConfiguration(java.util.Map configuration) { this.configuration = configuration; } /** *

* The action declaration's configuration. *

* * @param configuration * The action declaration's configuration. * @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; } 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 will perform the declared action. This is assumed through the roleArn for * the pipeline. *

* * @param roleArn * The ARN of the IAM service role that will perform 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 will perform the declared action. This is assumed through the roleArn for * the pipeline. *

* * @return The ARN of the IAM service role that will perform 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 will perform the declared action. This is assumed through the roleArn for * the pipeline. *

* * @param roleArn * The ARN of the IAM service role that will perform 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; } /** * 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()); 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; 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()); 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 - 2025 Weber Informatics LLC | Privacy Policy