com.amazonaws.services.codepipeline.model.ActionExecution 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 run of an action.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ActionExecution implements Serializable, Cloneable, StructuredPojo {
/**
*
* ID of the workflow action execution in the current stage. Use the GetPipelineState action to retrieve the
* current action execution details of the current stage.
*
*
*
* For older executions, this field might be empty. The action execution ID is available for executions run on or
* after March 2020.
*
*
*/
private String actionExecutionId;
/**
*
* The status of the action, or for a completed action, the last status of the action.
*
*/
private String status;
/**
*
* A summary of the run of the action.
*
*/
private String summary;
/**
*
* The last status change of the action.
*
*/
private java.util.Date lastStatusChange;
/**
*
* The system-generated token used to identify a unique approval request. The token for each open approval request
* can be obtained using the GetPipelineState
command. It is used to validate that the approval request
* corresponding to this token is still valid.
*
*/
private String token;
/**
*
* The ARN of the user who last changed the pipeline.
*
*/
private String lastUpdatedBy;
/**
*
* The external ID of the run of the action.
*
*/
private String externalExecutionId;
/**
*
* The URL of a resource external to AWS that is used when running the action (for example, an external repository
* URL).
*
*/
private String externalExecutionUrl;
/**
*
* A percentage of completeness of the action as it runs.
*
*/
private Integer percentComplete;
/**
*
* The details of an error returned by a URL external to AWS.
*
*/
private ErrorDetails errorDetails;
/**
*
* ID of the workflow action execution in the current stage. Use the GetPipelineState action to retrieve the
* current action execution details of the current stage.
*
*
*
* For older executions, this field might be empty. The action execution ID is available for executions run on or
* after March 2020.
*
*
*
* @param actionExecutionId
* ID of the workflow action execution in the current stage. Use the GetPipelineState action to
* retrieve the current action execution details of the current stage.
*
* For older executions, this field might be empty. The action execution ID is available for executions run
* on or after March 2020.
*
*/
public void setActionExecutionId(String actionExecutionId) {
this.actionExecutionId = actionExecutionId;
}
/**
*
* ID of the workflow action execution in the current stage. Use the GetPipelineState action to retrieve the
* current action execution details of the current stage.
*
*
*
* For older executions, this field might be empty. The action execution ID is available for executions run on or
* after March 2020.
*
*
*
* @return ID of the workflow action execution in the current stage. Use the GetPipelineState action to
* retrieve the current action execution details of the current stage.
*
* For older executions, this field might be empty. The action execution ID is available for executions run
* on or after March 2020.
*
*/
public String getActionExecutionId() {
return this.actionExecutionId;
}
/**
*
* ID of the workflow action execution in the current stage. Use the GetPipelineState action to retrieve the
* current action execution details of the current stage.
*
*
*
* For older executions, this field might be empty. The action execution ID is available for executions run on or
* after March 2020.
*
*
*
* @param actionExecutionId
* ID of the workflow action execution in the current stage. Use the GetPipelineState action to
* retrieve the current action execution details of the current stage.
*
* For older executions, this field might be empty. The action execution ID is available for executions run
* on or after March 2020.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionExecution withActionExecutionId(String actionExecutionId) {
setActionExecutionId(actionExecutionId);
return this;
}
/**
*
* The status of the action, or for a completed action, the last status of the action.
*
*
* @param status
* The status of the action, or for a completed action, the last status of the action.
* @see ActionExecutionStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the action, or for a completed action, the last status of the action.
*
*
* @return The status of the action, or for a completed action, the last status of the action.
* @see ActionExecutionStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the action, or for a completed action, the last status of the action.
*
*
* @param status
* The status of the action, or for a completed action, the last status of the action.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionExecutionStatus
*/
public ActionExecution withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the action, or for a completed action, the last status of the action.
*
*
* @param status
* The status of the action, or for a completed action, the last status of the action.
* @see ActionExecutionStatus
*/
public void setStatus(ActionExecutionStatus status) {
withStatus(status);
}
/**
*
* The status of the action, or for a completed action, the last status of the action.
*
*
* @param status
* The status of the action, or for a completed action, the last status of the action.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionExecutionStatus
*/
public ActionExecution withStatus(ActionExecutionStatus status) {
this.status = status.toString();
return this;
}
/**
*
* A summary of the run of the action.
*
*
* @param summary
* A summary of the run of the action.
*/
public void setSummary(String summary) {
this.summary = summary;
}
/**
*
* A summary of the run of the action.
*
*
* @return A summary of the run of the action.
*/
public String getSummary() {
return this.summary;
}
/**
*
* A summary of the run of the action.
*
*
* @param summary
* A summary of the run of the action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionExecution withSummary(String summary) {
setSummary(summary);
return this;
}
/**
*
* The last status change of the action.
*
*
* @param lastStatusChange
* The last status change of the action.
*/
public void setLastStatusChange(java.util.Date lastStatusChange) {
this.lastStatusChange = lastStatusChange;
}
/**
*
* The last status change of the action.
*
*
* @return The last status change of the action.
*/
public java.util.Date getLastStatusChange() {
return this.lastStatusChange;
}
/**
*
* The last status change of the action.
*
*
* @param lastStatusChange
* The last status change of the action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionExecution withLastStatusChange(java.util.Date lastStatusChange) {
setLastStatusChange(lastStatusChange);
return this;
}
/**
*
* The system-generated token used to identify a unique approval request. The token for each open approval request
* can be obtained using the GetPipelineState
command. It is used to validate that the approval request
* corresponding to this token is still valid.
*
*
* @param token
* The system-generated token used to identify a unique approval request. The token for each open approval
* request can be obtained using the GetPipelineState
command. It is used to validate that the
* approval request corresponding to this token is still valid.
*/
public void setToken(String token) {
this.token = token;
}
/**
*
* The system-generated token used to identify a unique approval request. The token for each open approval request
* can be obtained using the GetPipelineState
command. It is used to validate that the approval request
* corresponding to this token is still valid.
*
*
* @return The system-generated token used to identify a unique approval request. The token for each open approval
* request can be obtained using the GetPipelineState
command. It is used to validate that the
* approval request corresponding to this token is still valid.
*/
public String getToken() {
return this.token;
}
/**
*
* The system-generated token used to identify a unique approval request. The token for each open approval request
* can be obtained using the GetPipelineState
command. It is used to validate that the approval request
* corresponding to this token is still valid.
*
*
* @param token
* The system-generated token used to identify a unique approval request. The token for each open approval
* request can be obtained using the GetPipelineState
command. It is used to validate that the
* approval request corresponding to this token is still valid.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionExecution withToken(String token) {
setToken(token);
return this;
}
/**
*
* The ARN of the user who last changed the pipeline.
*
*
* @param lastUpdatedBy
* The ARN of the user who last changed the pipeline.
*/
public void setLastUpdatedBy(String lastUpdatedBy) {
this.lastUpdatedBy = lastUpdatedBy;
}
/**
*
* The ARN of the user who last changed the pipeline.
*
*
* @return The ARN of the user who last changed the pipeline.
*/
public String getLastUpdatedBy() {
return this.lastUpdatedBy;
}
/**
*
* The ARN of the user who last changed the pipeline.
*
*
* @param lastUpdatedBy
* The ARN of the user who last changed the pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionExecution withLastUpdatedBy(String lastUpdatedBy) {
setLastUpdatedBy(lastUpdatedBy);
return this;
}
/**
*
* The external ID of the run of the action.
*
*
* @param externalExecutionId
* The external ID of the run of the action.
*/
public void setExternalExecutionId(String externalExecutionId) {
this.externalExecutionId = externalExecutionId;
}
/**
*
* The external ID of the run of the action.
*
*
* @return The external ID of the run of the action.
*/
public String getExternalExecutionId() {
return this.externalExecutionId;
}
/**
*
* The external ID of the run of the action.
*
*
* @param externalExecutionId
* The external ID of the run of the action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionExecution withExternalExecutionId(String externalExecutionId) {
setExternalExecutionId(externalExecutionId);
return this;
}
/**
*
* The URL of a resource external to AWS that is used when running the action (for example, an external repository
* URL).
*
*
* @param externalExecutionUrl
* The URL of a resource external to AWS that is used when running the action (for example, an external
* repository URL).
*/
public void setExternalExecutionUrl(String externalExecutionUrl) {
this.externalExecutionUrl = externalExecutionUrl;
}
/**
*
* The URL of a resource external to AWS that is used when running the action (for example, an external repository
* URL).
*
*
* @return The URL of a resource external to AWS that is used when running the action (for example, an external
* repository URL).
*/
public String getExternalExecutionUrl() {
return this.externalExecutionUrl;
}
/**
*
* The URL of a resource external to AWS that is used when running the action (for example, an external repository
* URL).
*
*
* @param externalExecutionUrl
* The URL of a resource external to AWS that is used when running the action (for example, an external
* repository URL).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionExecution withExternalExecutionUrl(String externalExecutionUrl) {
setExternalExecutionUrl(externalExecutionUrl);
return this;
}
/**
*
* A percentage of completeness of the action as it runs.
*
*
* @param percentComplete
* A percentage of completeness of the action as it runs.
*/
public void setPercentComplete(Integer percentComplete) {
this.percentComplete = percentComplete;
}
/**
*
* A percentage of completeness of the action as it runs.
*
*
* @return A percentage of completeness of the action as it runs.
*/
public Integer getPercentComplete() {
return this.percentComplete;
}
/**
*
* A percentage of completeness of the action as it runs.
*
*
* @param percentComplete
* A percentage of completeness of the action as it runs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionExecution withPercentComplete(Integer percentComplete) {
setPercentComplete(percentComplete);
return this;
}
/**
*
* The details of an error returned by a URL external to AWS.
*
*
* @param errorDetails
* The details of an error returned by a URL external to AWS.
*/
public void setErrorDetails(ErrorDetails errorDetails) {
this.errorDetails = errorDetails;
}
/**
*
* The details of an error returned by a URL external to AWS.
*
*
* @return The details of an error returned by a URL external to AWS.
*/
public ErrorDetails getErrorDetails() {
return this.errorDetails;
}
/**
*
* The details of an error returned by a URL external to AWS.
*
*
* @param errorDetails
* The details of an error returned by a URL external to AWS.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionExecution withErrorDetails(ErrorDetails errorDetails) {
setErrorDetails(errorDetails);
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 (getActionExecutionId() != null)
sb.append("ActionExecutionId: ").append(getActionExecutionId()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getSummary() != null)
sb.append("Summary: ").append(getSummary()).append(",");
if (getLastStatusChange() != null)
sb.append("LastStatusChange: ").append(getLastStatusChange()).append(",");
if (getToken() != null)
sb.append("Token: ").append(getToken()).append(",");
if (getLastUpdatedBy() != null)
sb.append("LastUpdatedBy: ").append(getLastUpdatedBy()).append(",");
if (getExternalExecutionId() != null)
sb.append("ExternalExecutionId: ").append(getExternalExecutionId()).append(",");
if (getExternalExecutionUrl() != null)
sb.append("ExternalExecutionUrl: ").append(getExternalExecutionUrl()).append(",");
if (getPercentComplete() != null)
sb.append("PercentComplete: ").append(getPercentComplete()).append(",");
if (getErrorDetails() != null)
sb.append("ErrorDetails: ").append(getErrorDetails());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ActionExecution == false)
return false;
ActionExecution other = (ActionExecution) obj;
if (other.getActionExecutionId() == null ^ this.getActionExecutionId() == null)
return false;
if (other.getActionExecutionId() != null && other.getActionExecutionId().equals(this.getActionExecutionId()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getSummary() == null ^ this.getSummary() == null)
return false;
if (other.getSummary() != null && other.getSummary().equals(this.getSummary()) == false)
return false;
if (other.getLastStatusChange() == null ^ this.getLastStatusChange() == null)
return false;
if (other.getLastStatusChange() != null && other.getLastStatusChange().equals(this.getLastStatusChange()) == false)
return false;
if (other.getToken() == null ^ this.getToken() == null)
return false;
if (other.getToken() != null && other.getToken().equals(this.getToken()) == false)
return false;
if (other.getLastUpdatedBy() == null ^ this.getLastUpdatedBy() == null)
return false;
if (other.getLastUpdatedBy() != null && other.getLastUpdatedBy().equals(this.getLastUpdatedBy()) == 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.getExternalExecutionUrl() == null ^ this.getExternalExecutionUrl() == null)
return false;
if (other.getExternalExecutionUrl() != null && other.getExternalExecutionUrl().equals(this.getExternalExecutionUrl()) == false)
return false;
if (other.getPercentComplete() == null ^ this.getPercentComplete() == null)
return false;
if (other.getPercentComplete() != null && other.getPercentComplete().equals(this.getPercentComplete()) == false)
return false;
if (other.getErrorDetails() == null ^ this.getErrorDetails() == null)
return false;
if (other.getErrorDetails() != null && other.getErrorDetails().equals(this.getErrorDetails()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getActionExecutionId() == null) ? 0 : getActionExecutionId().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getSummary() == null) ? 0 : getSummary().hashCode());
hashCode = prime * hashCode + ((getLastStatusChange() == null) ? 0 : getLastStatusChange().hashCode());
hashCode = prime * hashCode + ((getToken() == null) ? 0 : getToken().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedBy() == null) ? 0 : getLastUpdatedBy().hashCode());
hashCode = prime * hashCode + ((getExternalExecutionId() == null) ? 0 : getExternalExecutionId().hashCode());
hashCode = prime * hashCode + ((getExternalExecutionUrl() == null) ? 0 : getExternalExecutionUrl().hashCode());
hashCode = prime * hashCode + ((getPercentComplete() == null) ? 0 : getPercentComplete().hashCode());
hashCode = prime * hashCode + ((getErrorDetails() == null) ? 0 : getErrorDetails().hashCode());
return hashCode;
}
@Override
public ActionExecution clone() {
try {
return (ActionExecution) 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.ActionExecutionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}