com.amazonaws.services.codepipeline.model.ThirdPartyJobData Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codepipeline Show documentation
/*
* Copyright 2016-2021 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 the job data for a partner action.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ThirdPartyJobData implements Serializable, Cloneable, StructuredPojo {
/**
*
* Represents information about an action type.
*
*/
private ActionTypeId actionTypeId;
/**
*
* Represents information about an action configuration.
*
*/
private ActionConfiguration actionConfiguration;
/**
*
* Represents information about a pipeline to a job worker.
*
*
*
* Does not include pipelineArn
and pipelineExecutionId
for ThirdParty jobs.
*
*
*/
private PipelineContext pipelineContext;
/**
*
* The name of the artifact that is worked on by the action, if any. This name might be system-generated, such as
* "MyApp", or it might be defined by the user when the action is created. The input artifact name must match the
* name of an output artifact generated by an action in an earlier action or stage of the pipeline.
*
*/
private java.util.List inputArtifacts;
/**
*
* The name of the artifact that is the result of the action, if any. This name might be system-generated, such as
* "MyBuiltApp", or it might be defined by the user when the action is created.
*
*/
private java.util.List outputArtifacts;
/**
*
* Represents an AWS session credentials object. These credentials are temporary credentials that are issued by AWS
* Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket used to store
* artifact for the pipeline in AWS CodePipeline.
*
*/
private AWSSessionCredentials artifactCredentials;
/**
*
* A system-generated token, such as a AWS CodeDeploy deployment ID, that a job requires to continue the job
* asynchronously.
*
*/
private String continuationToken;
/**
*
* The encryption key used to encrypt and decrypt data in the artifact store for the pipeline, such as an AWS Key
* Management Service (AWS KMS) key. This is optional and might not be present.
*
*/
private EncryptionKey encryptionKey;
/**
*
* Represents information about an action type.
*
*
* @param actionTypeId
* Represents information about an action type.
*/
public void setActionTypeId(ActionTypeId actionTypeId) {
this.actionTypeId = actionTypeId;
}
/**
*
* Represents information about an action type.
*
*
* @return Represents information about an action type.
*/
public ActionTypeId getActionTypeId() {
return this.actionTypeId;
}
/**
*
* Represents information about an action type.
*
*
* @param actionTypeId
* Represents information about an action type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ThirdPartyJobData withActionTypeId(ActionTypeId actionTypeId) {
setActionTypeId(actionTypeId);
return this;
}
/**
*
* Represents information about an action configuration.
*
*
* @param actionConfiguration
* Represents information about an action configuration.
*/
public void setActionConfiguration(ActionConfiguration actionConfiguration) {
this.actionConfiguration = actionConfiguration;
}
/**
*
* Represents information about an action configuration.
*
*
* @return Represents information about an action configuration.
*/
public ActionConfiguration getActionConfiguration() {
return this.actionConfiguration;
}
/**
*
* Represents information about an action configuration.
*
*
* @param actionConfiguration
* Represents information about an action configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ThirdPartyJobData withActionConfiguration(ActionConfiguration actionConfiguration) {
setActionConfiguration(actionConfiguration);
return this;
}
/**
*
* Represents information about a pipeline to a job worker.
*
*
*
* Does not include pipelineArn
and pipelineExecutionId
for ThirdParty jobs.
*
*
*
* @param pipelineContext
* Represents information about a pipeline to a job worker.
*
* Does not include pipelineArn
and pipelineExecutionId
for ThirdParty jobs.
*
*/
public void setPipelineContext(PipelineContext pipelineContext) {
this.pipelineContext = pipelineContext;
}
/**
*
* Represents information about a pipeline to a job worker.
*
*
*
* Does not include pipelineArn
and pipelineExecutionId
for ThirdParty jobs.
*
*
*
* @return Represents information about a pipeline to a job worker.
*
* Does not include pipelineArn
and pipelineExecutionId
for ThirdParty jobs.
*
*/
public PipelineContext getPipelineContext() {
return this.pipelineContext;
}
/**
*
* Represents information about a pipeline to a job worker.
*
*
*
* Does not include pipelineArn
and pipelineExecutionId
for ThirdParty jobs.
*
*
*
* @param pipelineContext
* Represents information about a pipeline to a job worker.
*
* Does not include pipelineArn
and pipelineExecutionId
for ThirdParty jobs.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ThirdPartyJobData withPipelineContext(PipelineContext pipelineContext) {
setPipelineContext(pipelineContext);
return this;
}
/**
*
* The name of the artifact that is worked on by the action, if any. This name might be system-generated, such as
* "MyApp", or it might be defined by the user when the action is created. The input artifact name must match the
* name of an output artifact generated by an action in an earlier action or stage of the pipeline.
*
*
* @return The name of the artifact that is worked on by the action, if any. This name might be system-generated,
* such as "MyApp", or it might be defined by the user when the action is created. The input artifact name
* must match the name of an output artifact generated by an action in an earlier action or stage of the
* pipeline.
*/
public java.util.List getInputArtifacts() {
return inputArtifacts;
}
/**
*
* The name of the artifact that is worked on by the action, if any. This name might be system-generated, such as
* "MyApp", or it might be defined by the user when the action is created. The input artifact name must match the
* name of an output artifact generated by an action in an earlier action or stage of the pipeline.
*
*
* @param inputArtifacts
* The name of the artifact that is worked on by the action, if any. This name might be system-generated,
* such as "MyApp", or it might be defined by the user when the action is created. The input artifact name
* must match the name of an output artifact generated by an action in an earlier action or stage of the
* pipeline.
*/
public void setInputArtifacts(java.util.Collection inputArtifacts) {
if (inputArtifacts == null) {
this.inputArtifacts = null;
return;
}
this.inputArtifacts = new java.util.ArrayList(inputArtifacts);
}
/**
*
* The name of the artifact that is worked on by the action, if any. This name might be system-generated, such as
* "MyApp", or it might be defined by the user when the action is created. The input artifact name must match the
* name of an output artifact generated by an action in an earlier action or stage of the pipeline.
*
*
* 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 of the artifact that is worked on by the action, if any. This name might be system-generated,
* such as "MyApp", or it might be defined by the user when the action is created. The input artifact name
* must match the name of an output artifact generated by an action in an earlier action or stage of the
* pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ThirdPartyJobData withInputArtifacts(Artifact... inputArtifacts) {
if (this.inputArtifacts == null) {
setInputArtifacts(new java.util.ArrayList(inputArtifacts.length));
}
for (Artifact ele : inputArtifacts) {
this.inputArtifacts.add(ele);
}
return this;
}
/**
*
* The name of the artifact that is worked on by the action, if any. This name might be system-generated, such as
* "MyApp", or it might be defined by the user when the action is created. The input artifact name must match the
* name of an output artifact generated by an action in an earlier action or stage of the pipeline.
*
*
* @param inputArtifacts
* The name of the artifact that is worked on by the action, if any. This name might be system-generated,
* such as "MyApp", or it might be defined by the user when the action is created. The input artifact name
* must match the name of an output artifact generated by an action in an earlier action or stage of the
* pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ThirdPartyJobData withInputArtifacts(java.util.Collection inputArtifacts) {
setInputArtifacts(inputArtifacts);
return this;
}
/**
*
* The name of the artifact that is the result of the action, if any. This name might be system-generated, such as
* "MyBuiltApp", or it might be defined by the user when the action is created.
*
*
* @return The name of the artifact that is the result of the action, if any. This name might be system-generated,
* such as "MyBuiltApp", or it might be defined by the user when the action is created.
*/
public java.util.List getOutputArtifacts() {
return outputArtifacts;
}
/**
*
* The name of the artifact that is the result of the action, if any. This name might be system-generated, such as
* "MyBuiltApp", or it might be defined by the user when the action is created.
*
*
* @param outputArtifacts
* The name of the artifact that is the result of the action, if any. This name might be system-generated,
* such as "MyBuiltApp", or it might be defined by the user when the action is created.
*/
public void setOutputArtifacts(java.util.Collection outputArtifacts) {
if (outputArtifacts == null) {
this.outputArtifacts = null;
return;
}
this.outputArtifacts = new java.util.ArrayList(outputArtifacts);
}
/**
*
* The name of the artifact that is the result of the action, if any. This name might be system-generated, such as
* "MyBuiltApp", or it might be defined by the user when the action is created.
*
*
* 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 of the artifact that is the result of the action, if any. This name might be system-generated,
* such as "MyBuiltApp", or it might be defined by the user when the action is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ThirdPartyJobData withOutputArtifacts(Artifact... outputArtifacts) {
if (this.outputArtifacts == null) {
setOutputArtifacts(new java.util.ArrayList(outputArtifacts.length));
}
for (Artifact ele : outputArtifacts) {
this.outputArtifacts.add(ele);
}
return this;
}
/**
*
* The name of the artifact that is the result of the action, if any. This name might be system-generated, such as
* "MyBuiltApp", or it might be defined by the user when the action is created.
*
*
* @param outputArtifacts
* The name of the artifact that is the result of the action, if any. This name might be system-generated,
* such as "MyBuiltApp", or it might be defined by the user when the action is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ThirdPartyJobData withOutputArtifacts(java.util.Collection outputArtifacts) {
setOutputArtifacts(outputArtifacts);
return this;
}
/**
*
* Represents an AWS session credentials object. These credentials are temporary credentials that are issued by AWS
* Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket used to store
* artifact for the pipeline in AWS CodePipeline.
*
*
* @param artifactCredentials
* Represents an AWS session credentials object. These credentials are temporary credentials that are issued
* by AWS Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket
* used to store artifact for the pipeline in AWS CodePipeline.
*/
public void setArtifactCredentials(AWSSessionCredentials artifactCredentials) {
this.artifactCredentials = artifactCredentials;
}
/**
*
* Represents an AWS session credentials object. These credentials are temporary credentials that are issued by AWS
* Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket used to store
* artifact for the pipeline in AWS CodePipeline.
*
*
* @return Represents an AWS session credentials object. These credentials are temporary credentials that are issued
* by AWS Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket
* used to store artifact for the pipeline in AWS CodePipeline.
*/
public AWSSessionCredentials getArtifactCredentials() {
return this.artifactCredentials;
}
/**
*
* Represents an AWS session credentials object. These credentials are temporary credentials that are issued by AWS
* Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket used to store
* artifact for the pipeline in AWS CodePipeline.
*
*
* @param artifactCredentials
* Represents an AWS session credentials object. These credentials are temporary credentials that are issued
* by AWS Secure Token Service (STS). They can be used to access input and output artifacts in the S3 bucket
* used to store artifact for the pipeline in AWS CodePipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ThirdPartyJobData withArtifactCredentials(AWSSessionCredentials artifactCredentials) {
setArtifactCredentials(artifactCredentials);
return this;
}
/**
*
* A system-generated token, such as a AWS CodeDeploy deployment ID, that a job requires to continue the job
* asynchronously.
*
*
* @param continuationToken
* A system-generated token, such as a AWS CodeDeploy deployment ID, that a job requires to continue the job
* asynchronously.
*/
public void setContinuationToken(String continuationToken) {
this.continuationToken = continuationToken;
}
/**
*
* A system-generated token, such as a AWS CodeDeploy deployment ID, that a job requires to continue the job
* asynchronously.
*
*
* @return A system-generated token, such as a AWS CodeDeploy deployment ID, that a job requires to continue the job
* asynchronously.
*/
public String getContinuationToken() {
return this.continuationToken;
}
/**
*
* A system-generated token, such as a AWS CodeDeploy deployment ID, that a job requires to continue the job
* asynchronously.
*
*
* @param continuationToken
* A system-generated token, such as a AWS CodeDeploy deployment ID, that a job requires to continue the job
* asynchronously.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ThirdPartyJobData withContinuationToken(String continuationToken) {
setContinuationToken(continuationToken);
return this;
}
/**
*
* The encryption key used to encrypt and decrypt data in the artifact store for the pipeline, such as an AWS Key
* Management Service (AWS KMS) key. This is optional and might not be present.
*
*
* @param encryptionKey
* The encryption key used to encrypt and decrypt data in the artifact store for the pipeline, such as an AWS
* Key Management Service (AWS KMS) key. This is optional and might not be present.
*/
public void setEncryptionKey(EncryptionKey encryptionKey) {
this.encryptionKey = encryptionKey;
}
/**
*
* The encryption key used to encrypt and decrypt data in the artifact store for the pipeline, such as an AWS Key
* Management Service (AWS KMS) key. This is optional and might not be present.
*
*
* @return The encryption key used to encrypt and decrypt data in the artifact store for the pipeline, such as an
* AWS Key Management Service (AWS KMS) key. This is optional and might not be present.
*/
public EncryptionKey getEncryptionKey() {
return this.encryptionKey;
}
/**
*
* The encryption key used to encrypt and decrypt data in the artifact store for the pipeline, such as an AWS Key
* Management Service (AWS KMS) key. This is optional and might not be present.
*
*
* @param encryptionKey
* The encryption key used to encrypt and decrypt data in the artifact store for the pipeline, such as an AWS
* Key Management Service (AWS KMS) key. This is optional and might not be present.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ThirdPartyJobData withEncryptionKey(EncryptionKey encryptionKey) {
setEncryptionKey(encryptionKey);
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 (getActionTypeId() != null)
sb.append("ActionTypeId: ").append(getActionTypeId()).append(",");
if (getActionConfiguration() != null)
sb.append("ActionConfiguration: ").append(getActionConfiguration()).append(",");
if (getPipelineContext() != null)
sb.append("PipelineContext: ").append(getPipelineContext()).append(",");
if (getInputArtifacts() != null)
sb.append("InputArtifacts: ").append(getInputArtifacts()).append(",");
if (getOutputArtifacts() != null)
sb.append("OutputArtifacts: ").append(getOutputArtifacts()).append(",");
if (getArtifactCredentials() != null)
sb.append("ArtifactCredentials: ").append("***Sensitive Data Redacted***").append(",");
if (getContinuationToken() != null)
sb.append("ContinuationToken: ").append(getContinuationToken()).append(",");
if (getEncryptionKey() != null)
sb.append("EncryptionKey: ").append(getEncryptionKey());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ThirdPartyJobData == false)
return false;
ThirdPartyJobData other = (ThirdPartyJobData) obj;
if (other.getActionTypeId() == null ^ this.getActionTypeId() == null)
return false;
if (other.getActionTypeId() != null && other.getActionTypeId().equals(this.getActionTypeId()) == false)
return false;
if (other.getActionConfiguration() == null ^ this.getActionConfiguration() == null)
return false;
if (other.getActionConfiguration() != null && other.getActionConfiguration().equals(this.getActionConfiguration()) == false)
return false;
if (other.getPipelineContext() == null ^ this.getPipelineContext() == null)
return false;
if (other.getPipelineContext() != null && other.getPipelineContext().equals(this.getPipelineContext()) == 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.getOutputArtifacts() == null ^ this.getOutputArtifacts() == null)
return false;
if (other.getOutputArtifacts() != null && other.getOutputArtifacts().equals(this.getOutputArtifacts()) == false)
return false;
if (other.getArtifactCredentials() == null ^ this.getArtifactCredentials() == null)
return false;
if (other.getArtifactCredentials() != null && other.getArtifactCredentials().equals(this.getArtifactCredentials()) == false)
return false;
if (other.getContinuationToken() == null ^ this.getContinuationToken() == null)
return false;
if (other.getContinuationToken() != null && other.getContinuationToken().equals(this.getContinuationToken()) == false)
return false;
if (other.getEncryptionKey() == null ^ this.getEncryptionKey() == null)
return false;
if (other.getEncryptionKey() != null && other.getEncryptionKey().equals(this.getEncryptionKey()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getActionTypeId() == null) ? 0 : getActionTypeId().hashCode());
hashCode = prime * hashCode + ((getActionConfiguration() == null) ? 0 : getActionConfiguration().hashCode());
hashCode = prime * hashCode + ((getPipelineContext() == null) ? 0 : getPipelineContext().hashCode());
hashCode = prime * hashCode + ((getInputArtifacts() == null) ? 0 : getInputArtifacts().hashCode());
hashCode = prime * hashCode + ((getOutputArtifacts() == null) ? 0 : getOutputArtifacts().hashCode());
hashCode = prime * hashCode + ((getArtifactCredentials() == null) ? 0 : getArtifactCredentials().hashCode());
hashCode = prime * hashCode + ((getContinuationToken() == null) ? 0 : getContinuationToken().hashCode());
hashCode = prime * hashCode + ((getEncryptionKey() == null) ? 0 : getEncryptionKey().hashCode());
return hashCode;
}
@Override
public ThirdPartyJobData clone() {
try {
return (ThirdPartyJobData) 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.ThirdPartyJobDataMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}