com.amazonaws.services.codepipeline.model.ExecutionDetails 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;
/**
*
* The details of the actions taken and results produced on an artifact as it passes through stages in the pipeline.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ExecutionDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The summary of the current status of the actions.
*
*/
private String summary;
/**
*
* The system-generated unique ID of this action used to identify this job worker in any external systems, such as
* AWS CodeDeploy.
*
*/
private String externalExecutionId;
/**
*
* The percentage of work completed on the action, represented on a scale of 0 to 100 percent.
*
*/
private Integer percentComplete;
/**
*
* The summary of the current status of the actions.
*
*
* @param summary
* The summary of the current status of the actions.
*/
public void setSummary(String summary) {
this.summary = summary;
}
/**
*
* The summary of the current status of the actions.
*
*
* @return The summary of the current status of the actions.
*/
public String getSummary() {
return this.summary;
}
/**
*
* The summary of the current status of the actions.
*
*
* @param summary
* The summary of the current status of the actions.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecutionDetails withSummary(String summary) {
setSummary(summary);
return this;
}
/**
*
* The system-generated unique ID of this action used to identify this job worker in any external systems, such as
* AWS CodeDeploy.
*
*
* @param externalExecutionId
* The system-generated unique ID of this action used to identify this job worker in any external systems,
* such as AWS CodeDeploy.
*/
public void setExternalExecutionId(String externalExecutionId) {
this.externalExecutionId = externalExecutionId;
}
/**
*
* The system-generated unique ID of this action used to identify this job worker in any external systems, such as
* AWS CodeDeploy.
*
*
* @return The system-generated unique ID of this action used to identify this job worker in any external systems,
* such as AWS CodeDeploy.
*/
public String getExternalExecutionId() {
return this.externalExecutionId;
}
/**
*
* The system-generated unique ID of this action used to identify this job worker in any external systems, such as
* AWS CodeDeploy.
*
*
* @param externalExecutionId
* The system-generated unique ID of this action used to identify this job worker in any external systems,
* such as AWS CodeDeploy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecutionDetails withExternalExecutionId(String externalExecutionId) {
setExternalExecutionId(externalExecutionId);
return this;
}
/**
*
* The percentage of work completed on the action, represented on a scale of 0 to 100 percent.
*
*
* @param percentComplete
* The percentage of work completed on the action, represented on a scale of 0 to 100 percent.
*/
public void setPercentComplete(Integer percentComplete) {
this.percentComplete = percentComplete;
}
/**
*
* The percentage of work completed on the action, represented on a scale of 0 to 100 percent.
*
*
* @return The percentage of work completed on the action, represented on a scale of 0 to 100 percent.
*/
public Integer getPercentComplete() {
return this.percentComplete;
}
/**
*
* The percentage of work completed on the action, represented on a scale of 0 to 100 percent.
*
*
* @param percentComplete
* The percentage of work completed on the action, represented on a scale of 0 to 100 percent.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecutionDetails withPercentComplete(Integer percentComplete) {
setPercentComplete(percentComplete);
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 (getSummary() != null)
sb.append("Summary: ").append(getSummary()).append(",");
if (getExternalExecutionId() != null)
sb.append("ExternalExecutionId: ").append(getExternalExecutionId()).append(",");
if (getPercentComplete() != null)
sb.append("PercentComplete: ").append(getPercentComplete());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ExecutionDetails == false)
return false;
ExecutionDetails other = (ExecutionDetails) obj;
if (other.getSummary() == null ^ this.getSummary() == null)
return false;
if (other.getSummary() != null && other.getSummary().equals(this.getSummary()) == false)
return false;
if (other.getExternalExecutionId() == null ^ this.getExternalExecutionId() == null)
return false;
if (other.getExternalExecutionId() != null && other.getExternalExecutionId().equals(this.getExternalExecutionId()) == false)
return false;
if (other.getPercentComplete() == null ^ this.getPercentComplete() == null)
return false;
if (other.getPercentComplete() != null && other.getPercentComplete().equals(this.getPercentComplete()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSummary() == null) ? 0 : getSummary().hashCode());
hashCode = prime * hashCode + ((getExternalExecutionId() == null) ? 0 : getExternalExecutionId().hashCode());
hashCode = prime * hashCode + ((getPercentComplete() == null) ? 0 : getPercentComplete().hashCode());
return hashCode;
}
@Override
public ExecutionDetails clone() {
try {
return (ExecutionDetails) 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.ExecutionDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}