/* * 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.codepipeline.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Represents the structure of actions and stages to be performed in the pipeline. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PipelineDeclaration implements Serializable, Cloneable, StructuredPojo { /** ** The name of the pipeline. *
*/ private String name; /** *
* The Amazon Resource Name (ARN) for CodePipeline to use to either perform actions with no
* actionRoleArn
, or to use to assume roles for actions with an actionRoleArn
.
*
* Represents information about the S3 bucket where artifacts are stored for the pipeline. *
*
* You must include either artifactStore
or artifactStores
in your pipeline, but you
* cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores
.
*
* A mapping of artifactStore
objects and their corresponding Amazon Web Services Regions. There must
* be an artifact store for the pipeline Region and for each cross-region action in the pipeline.
*
* You must include either artifactStore
or artifactStores
in your pipeline, but you
* cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores
.
*
* The stage in which to perform the action. *
*/ private java.util.List* The version number of the pipeline. A new pipeline always has a version number of 1. This number is incremented * when a pipeline is updated. *
*/ private Integer version; /** ** The name of the pipeline. *
* * @param name * The name of the pipeline. */ public void setName(String name) { this.name = name; } /** ** The name of the pipeline. *
* * @return The name of the pipeline. */ public String getName() { return this.name; } /** ** The name of the pipeline. *
* * @param name * The name of the pipeline. * @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 CodePipeline to use to either perform actions with no
* actionRoleArn
, or to use to assume roles for actions with an actionRoleArn
.
*
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 CodePipeline to use to either perform actions with no
* actionRoleArn
, or to use to assume roles for actions with an actionRoleArn
.
*
actionRoleArn
, or to use to assume roles for actions with an actionRoleArn
.
*/
public String getRoleArn() {
return this.roleArn;
}
/**
*
* The Amazon Resource Name (ARN) for CodePipeline to use to either perform actions with no
* actionRoleArn
, or to use to assume roles for actions with an actionRoleArn
.
*
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;
}
/**
* * Represents information about the S3 bucket where artifacts are stored for the pipeline. *
*
* You must include either artifactStore
or artifactStores
in your pipeline, but you
* cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores
.
*
* You must include either artifactStore
or artifactStores
in your pipeline, but
* you cannot use both. If you create a cross-region action in your pipeline, you must use
* artifactStores
.
*
* Represents information about the S3 bucket where artifacts are stored for the pipeline. *
*
* You must include either artifactStore
or artifactStores
in your pipeline, but you
* cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores
.
*
* You must include either artifactStore
or artifactStores
in your pipeline, but
* you cannot use both. If you create a cross-region action in your pipeline, you must use
* artifactStores
.
*
* Represents information about the S3 bucket where artifacts are stored for the pipeline. *
*
* You must include either artifactStore
or artifactStores
in your pipeline, but you
* cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores
.
*
* You must include either artifactStore
or artifactStores
in your pipeline, but
* you cannot use both. If you create a cross-region action in your pipeline, you must use
* artifactStores
.
*
* A mapping of artifactStore
objects and their corresponding Amazon Web Services Regions. There must
* be an artifact store for the pipeline Region and for each cross-region action in the pipeline.
*
* You must include either artifactStore
or artifactStores
in your pipeline, but you
* cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores
.
*
artifactStore
objects and their corresponding Amazon Web Services Regions.
* There must be an artifact store for the pipeline Region and for each cross-region action in the
* pipeline.
* You must include either artifactStore
or artifactStores
in your pipeline, but
* you cannot use both. If you create a cross-region action in your pipeline, you must use
* artifactStores
.
*
* A mapping of artifactStore
objects and their corresponding Amazon Web Services Regions. There must
* be an artifact store for the pipeline Region and for each cross-region action in the pipeline.
*
* You must include either artifactStore
or artifactStores
in your pipeline, but you
* cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores
.
*
artifactStore
objects and their corresponding Amazon Web Services Regions. There
* must be an artifact store for the pipeline Region and for each cross-region action in the pipeline.
*
* You must include either artifactStore
or artifactStores
in your pipeline, but
* you cannot use both. If you create a cross-region action in your pipeline, you must use
* artifactStores
.
*
* A mapping of artifactStore
objects and their corresponding Amazon Web Services Regions. There must
* be an artifact store for the pipeline Region and for each cross-region action in the pipeline.
*
* You must include either artifactStore
or artifactStores
in your pipeline, but you
* cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores
.
*
artifactStore
objects and their corresponding Amazon Web Services Regions. There
* must be an artifact store for the pipeline Region and for each cross-region action in the pipeline.
*
* You must include either artifactStore
or artifactStores
in your pipeline, but
* you cannot use both. If you create a cross-region action in your pipeline, you must use
* artifactStores
.
*
* The stage in which to perform the action. *
* * @return The stage in which to perform the action. */ public java.util.List* The stage in which to perform the action. *
* * @param stages * The stage in which to perform the action. */ public void setStages(java.util.Collection* 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* 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* The version number of the pipeline. A new pipeline always has a version number of 1. This number is 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 * 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 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 * 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 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 * 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. 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 (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getArtifactStore() != null) sb.append("ArtifactStore: ").append(getArtifactStore()).append(","); if (getArtifactStores() != null) sb.append("ArtifactStores: ").append(getArtifactStores()).append(","); if (getStages() != null) sb.append("Stages: ").append(getStages()).append(","); if (getVersion() != null) sb.append("Version: ").append(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.getArtifactStores() == null ^ this.getArtifactStores() == null) return false; if (other.getArtifactStores() != null && other.getArtifactStores().equals(this.getArtifactStores()) == 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 + ((getArtifactStores() == null) ? 0 : getArtifactStores().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); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.codepipeline.model.transform.PipelineDeclarationMarshaller.getInstance().marshall(this, protocolMarshaller); } }