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.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 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 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; /** *

* 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. *

*
*/ private ArtifactStore artifactStore; /** *

* A mapping of artifactStore objects and their corresponding AWS 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. *

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

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

* 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. *

*
* * @param artifactStore * 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. *

*/ public void setArtifactStore(ArtifactStore artifactStore) { this.artifactStore = artifactStore; } /** *

* 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. *

*
* * @return 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. *

*/ public ArtifactStore getArtifactStore() { return this.artifactStore; } /** *

* 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. *

*
* * @param artifactStore * 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. *

* @return Returns a reference to this object so that method calls can be chained together. */ public PipelineDeclaration withArtifactStore(ArtifactStore artifactStore) { setArtifactStore(artifactStore); return this; } /** *

* A mapping of artifactStore objects and their corresponding AWS 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. *

*
* * @return A mapping of artifactStore objects and their corresponding AWS 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. *

*/ public java.util.Map getArtifactStores() { return artifactStores; } /** *

* A mapping of artifactStore objects and their corresponding AWS 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. *

*
* * @param artifactStores * A mapping of artifactStore objects and their corresponding AWS 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. *

*/ public void setArtifactStores(java.util.Map artifactStores) { this.artifactStores = artifactStores; } /** *

* A mapping of artifactStore objects and their corresponding AWS 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. *

*
* * @param artifactStores * A mapping of artifactStore objects and their corresponding AWS 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. *

* @return Returns a reference to this object so that method calls can be chained together. */ public PipelineDeclaration withArtifactStores(java.util.Map artifactStores) { setArtifactStores(artifactStores); return this; } /** * Add a single ArtifactStores entry * * @see PipelineDeclaration#withArtifactStores * @returns a reference to this object so that method calls can be chained together. */ public PipelineDeclaration addArtifactStoresEntry(String key, ArtifactStore value) { if (null == this.artifactStores) { this.artifactStores = new java.util.HashMap(); } if (this.artifactStores.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.artifactStores.put(key, value); return this; } /** * Removes all the entries added into ArtifactStores. * * @return Returns a reference to this object so that method calls can be chained together. */ public PipelineDeclaration clearArtifactStoresEntries() { this.artifactStores = null; 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 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); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy