com.amazonaws.services.codepipeline.model.SourceRevision 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;
/**
*
* Information about the version (or revision) of a source artifact that initiated a pipeline execution.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SourceRevision implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the action that processed the revision to the source artifact.
*
*/
private String actionName;
/**
*
* The system-generated unique ID that identifies the revision number of the artifact.
*
*/
private String revisionId;
/**
*
* Summary information about the most recent revision of the artifact. For GitHub and AWS CodeCommit repositories,
* the commit message. For Amazon S3 buckets or actions, the user-provided content of a
* codepipeline-artifact-revision-summary
key specified in the object metadata.
*
*/
private String revisionSummary;
/**
*
* The commit ID for the artifact revision. For artifacts stored in GitHub or AWS CodeCommit repositories, the
* commit ID is linked to a commit details page.
*
*/
private String revisionUrl;
/**
*
* The name of the action that processed the revision to the source artifact.
*
*
* @param actionName
* The name of the action that processed the revision to the source artifact.
*/
public void setActionName(String actionName) {
this.actionName = actionName;
}
/**
*
* The name of the action that processed the revision to the source artifact.
*
*
* @return The name of the action that processed the revision to the source artifact.
*/
public String getActionName() {
return this.actionName;
}
/**
*
* The name of the action that processed the revision to the source artifact.
*
*
* @param actionName
* The name of the action that processed the revision to the source artifact.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SourceRevision withActionName(String actionName) {
setActionName(actionName);
return this;
}
/**
*
* The system-generated unique ID that identifies the revision number of the artifact.
*
*
* @param revisionId
* The system-generated unique ID that identifies the revision number of the artifact.
*/
public void setRevisionId(String revisionId) {
this.revisionId = revisionId;
}
/**
*
* The system-generated unique ID that identifies the revision number of the artifact.
*
*
* @return The system-generated unique ID that identifies the revision number of the artifact.
*/
public String getRevisionId() {
return this.revisionId;
}
/**
*
* The system-generated unique ID that identifies the revision number of the artifact.
*
*
* @param revisionId
* The system-generated unique ID that identifies the revision number of the artifact.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SourceRevision withRevisionId(String revisionId) {
setRevisionId(revisionId);
return this;
}
/**
*
* Summary information about the most recent revision of the artifact. For GitHub and AWS CodeCommit repositories,
* the commit message. For Amazon S3 buckets or actions, the user-provided content of a
* codepipeline-artifact-revision-summary
key specified in the object metadata.
*
*
* @param revisionSummary
* Summary information about the most recent revision of the artifact. For GitHub and AWS CodeCommit
* repositories, the commit message. For Amazon S3 buckets or actions, the user-provided content of a
* codepipeline-artifact-revision-summary
key specified in the object metadata.
*/
public void setRevisionSummary(String revisionSummary) {
this.revisionSummary = revisionSummary;
}
/**
*
* Summary information about the most recent revision of the artifact. For GitHub and AWS CodeCommit repositories,
* the commit message. For Amazon S3 buckets or actions, the user-provided content of a
* codepipeline-artifact-revision-summary
key specified in the object metadata.
*
*
* @return Summary information about the most recent revision of the artifact. For GitHub and AWS CodeCommit
* repositories, the commit message. For Amazon S3 buckets or actions, the user-provided content of a
* codepipeline-artifact-revision-summary
key specified in the object metadata.
*/
public String getRevisionSummary() {
return this.revisionSummary;
}
/**
*
* Summary information about the most recent revision of the artifact. For GitHub and AWS CodeCommit repositories,
* the commit message. For Amazon S3 buckets or actions, the user-provided content of a
* codepipeline-artifact-revision-summary
key specified in the object metadata.
*
*
* @param revisionSummary
* Summary information about the most recent revision of the artifact. For GitHub and AWS CodeCommit
* repositories, the commit message. For Amazon S3 buckets or actions, the user-provided content of a
* codepipeline-artifact-revision-summary
key specified in the object metadata.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SourceRevision withRevisionSummary(String revisionSummary) {
setRevisionSummary(revisionSummary);
return this;
}
/**
*
* The commit ID for the artifact revision. For artifacts stored in GitHub or AWS CodeCommit repositories, the
* commit ID is linked to a commit details page.
*
*
* @param revisionUrl
* The commit ID for the artifact revision. For artifacts stored in GitHub or AWS CodeCommit repositories,
* the commit ID is linked to a commit details page.
*/
public void setRevisionUrl(String revisionUrl) {
this.revisionUrl = revisionUrl;
}
/**
*
* The commit ID for the artifact revision. For artifacts stored in GitHub or AWS CodeCommit repositories, the
* commit ID is linked to a commit details page.
*
*
* @return The commit ID for the artifact revision. For artifacts stored in GitHub or AWS CodeCommit repositories,
* the commit ID is linked to a commit details page.
*/
public String getRevisionUrl() {
return this.revisionUrl;
}
/**
*
* The commit ID for the artifact revision. For artifacts stored in GitHub or AWS CodeCommit repositories, the
* commit ID is linked to a commit details page.
*
*
* @param revisionUrl
* The commit ID for the artifact revision. For artifacts stored in GitHub or AWS CodeCommit repositories,
* the commit ID is linked to a commit details page.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SourceRevision withRevisionUrl(String revisionUrl) {
setRevisionUrl(revisionUrl);
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 (getActionName() != null)
sb.append("ActionName: ").append(getActionName()).append(",");
if (getRevisionId() != null)
sb.append("RevisionId: ").append(getRevisionId()).append(",");
if (getRevisionSummary() != null)
sb.append("RevisionSummary: ").append(getRevisionSummary()).append(",");
if (getRevisionUrl() != null)
sb.append("RevisionUrl: ").append(getRevisionUrl());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SourceRevision == false)
return false;
SourceRevision other = (SourceRevision) obj;
if (other.getActionName() == null ^ this.getActionName() == null)
return false;
if (other.getActionName() != null && other.getActionName().equals(this.getActionName()) == false)
return false;
if (other.getRevisionId() == null ^ this.getRevisionId() == null)
return false;
if (other.getRevisionId() != null && other.getRevisionId().equals(this.getRevisionId()) == false)
return false;
if (other.getRevisionSummary() == null ^ this.getRevisionSummary() == null)
return false;
if (other.getRevisionSummary() != null && other.getRevisionSummary().equals(this.getRevisionSummary()) == false)
return false;
if (other.getRevisionUrl() == null ^ this.getRevisionUrl() == null)
return false;
if (other.getRevisionUrl() != null && other.getRevisionUrl().equals(this.getRevisionUrl()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getActionName() == null) ? 0 : getActionName().hashCode());
hashCode = prime * hashCode + ((getRevisionId() == null) ? 0 : getRevisionId().hashCode());
hashCode = prime * hashCode + ((getRevisionSummary() == null) ? 0 : getRevisionSummary().hashCode());
hashCode = prime * hashCode + ((getRevisionUrl() == null) ? 0 : getRevisionUrl().hashCode());
return hashCode;
}
@Override
public SourceRevision clone() {
try {
return (SourceRevision) 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.SourceRevisionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}