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

com.amazonaws.services.codepipeline.model.PipelineDeclaration 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.11.7
Show newest version
/*
 * Copyright 2010-2016 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;

/**
 * 

* Represents the structure of actions and stages to be performed in the * pipeline. *

*/ public class PipelineDeclaration implements Serializable, Cloneable { /** *

* The name of the action to be performed. *

*/ private String name; /** *

* The Amazon Resource Name (ARN) for AWS CodePipeline to use to either * perform actions with no actionRoleArn, or to use to assume roles for * actions with an actionRoleArn. *

*/ private String roleArn; private ArtifactStore artifactStore; /** *

* The stage in which to perform the action. *

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

* The version number of the pipeline. A new pipeline always has a version * number of 1. This number is automatically incremented when a pipeline is * updated. *

*/ private Integer version; /** *

* The name of the action to be performed. *

* * @param name * The name of the action to be performed. */ public void setName(String name) { this.name = name; } /** *

* The name of the action to be performed. *

* * @return The name of the action to be performed. */ public String getName() { return this.name; } /** *

* The name of the action to be performed. *

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

* The Amazon Resource Name (ARN) for AWS CodePipeline to use to either * perform actions with no actionRoleArn, or to use to assume roles for * actions with an actionRoleArn. *

* * @param roleArn * The Amazon Resource Name (ARN) for AWS CodePipeline to use to * either perform actions with no actionRoleArn, or to use to assume * roles for actions with an actionRoleArn. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The Amazon Resource Name (ARN) for AWS CodePipeline to use to either * perform actions with no actionRoleArn, or to use to assume roles for * actions with an actionRoleArn. *

* * @return The Amazon Resource Name (ARN) for AWS CodePipeline to use to * either perform actions with no actionRoleArn, or to use to assume * roles for actions with an actionRoleArn. */ public String getRoleArn() { return this.roleArn; } /** *

* The Amazon Resource Name (ARN) for AWS CodePipeline to use to either * perform actions with no actionRoleArn, or to use to assume roles for * actions with an actionRoleArn. *

* * @param roleArn * The Amazon Resource Name (ARN) for AWS CodePipeline to use to * either perform actions with no actionRoleArn, or to use to assume * roles for actions with an actionRoleArn. * @return Returns a reference to this object so that method calls can be * chained together. */ public PipelineDeclaration withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** * @param artifactStore */ public void setArtifactStore(ArtifactStore artifactStore) { this.artifactStore = artifactStore; } /** * @return */ public ArtifactStore getArtifactStore() { return this.artifactStore; } /** * @param artifactStore * @return Returns a reference to this object so that method calls can be * chained together. */ public PipelineDeclaration withArtifactStore(ArtifactStore artifactStore) { setArtifactStore(artifactStore); return this; } /** *

* The stage in which to perform the action. *

* * @return The stage in which to perform the action. */ public java.util.List getStages() { return stages; } /** *

* The stage in which to perform the action. *

* * @param stages * The stage in which to perform the action. */ public void setStages(java.util.Collection stages) { if (stages == null) { this.stages = null; return; } this.stages = new java.util.ArrayList(stages); } /** *

* The stage in which to perform the action. *

*

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

* * @param stages * The stage in which to perform the action. * @return Returns a reference to this object so that method calls can be * chained together. */ public PipelineDeclaration withStages(StageDeclaration... stages) { if (this.stages == null) { setStages(new java.util.ArrayList(stages.length)); } for (StageDeclaration ele : stages) { this.stages.add(ele); } return this; } /** *

* The stage in which to perform the action. *

* * @param stages * The stage in which to perform the action. * @return Returns a reference to this object so that method calls can be * chained together. */ public PipelineDeclaration withStages( java.util.Collection stages) { setStages(stages); return this; } /** *

* The version number of the pipeline. A new pipeline always has a version * number of 1. This number is automatically incremented when a pipeline is * updated. *

* * @param version * The version number of the pipeline. A new pipeline always has a * version number of 1. This number is automatically incremented when * a pipeline is updated. */ public void setVersion(Integer version) { this.version = version; } /** *

* The version number of the pipeline. A new pipeline always has a version * number of 1. This number is automatically incremented when a pipeline is * updated. *

* * @return The version number of the pipeline. A new pipeline always has a * version number of 1. This number is automatically incremented * when a pipeline is updated. */ public Integer getVersion() { return this.version; } /** *

* The version number of the pipeline. A new pipeline always has a version * number of 1. This number is automatically incremented when a pipeline is * updated. *

* * @param version * The version number of the pipeline. A new pipeline always has a * version number of 1. This number is automatically incremented when * a pipeline is updated. * @return Returns a reference to this object so that method calls can be * chained together. */ public PipelineDeclaration withVersion(Integer version) { setVersion(version); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @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: " + getName() + ","); if (getRoleArn() != null) sb.append("RoleArn: " + getRoleArn() + ","); if (getArtifactStore() != null) sb.append("ArtifactStore: " + getArtifactStore() + ","); if (getStages() != null) sb.append("Stages: " + getStages() + ","); if (getVersion() != null) sb.append("Version: " + getVersion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PipelineDeclaration == false) return false; PipelineDeclaration other = (PipelineDeclaration) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == 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.getArtifactStore() == null ^ this.getArtifactStore() == null) return false; if (other.getArtifactStore() != null && other.getArtifactStore().equals(this.getArtifactStore()) == false) return false; if (other.getStages() == null ^ this.getStages() == null) return false; if (other.getStages() != null && other.getStages().equals(this.getStages()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == 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 + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getArtifactStore() == null) ? 0 : getArtifactStore() .hashCode()); hashCode = prime * hashCode + ((getStages() == null) ? 0 : getStages().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); return hashCode; } @Override public PipelineDeclaration clone() { try { return (PipelineDeclaration) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy