/* * Copyright 2018-2023 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.imagebuilder.model; import java.io.Serializable; import javax.annotation.Generated; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GetWorkflowExecutionResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The request ID that uniquely identifies this request. *

*/ private String requestId; /** *

* The Amazon Resource Name (ARN) of the build version for the Image Builder workflow resource that defines the * specified runtime instance of the workflow. *

*/ private String workflowBuildVersionArn; /** *

* The unique identifier that Image Builder assigned to keep track of runtime details when it ran the workflow. *

*/ private String workflowExecutionId; /** *

* The Amazon Resource Name (ARN) of the image resource build version that the specified runtime instance of the * workflow created. *

*/ private String imageBuildVersionArn; /** *

* The type of workflow that Image Builder ran for the specified runtime instance of the workflow. *

*/ private String type; /** *

* The current runtime status for the specified runtime instance of the workflow. *

*/ private String status; /** *

* The output message from the specified runtime instance of the workflow, if applicable. *

*/ private String message; /** *

* The total number of steps in the specified runtime instance of the workflow that ran. This number should equal * the sum of the step counts for steps that succeeded, were skipped, and failed. *

*/ private Integer totalStepCount; /** *

* A runtime count for the number of steps that ran successfully in the specified runtime instance of the workflow. *

*/ private Integer totalStepsSucceeded; /** *

* A runtime count for the number of steps that failed in the specified runtime instance of the workflow. *

*/ private Integer totalStepsFailed; /** *

* A runtime count for the number of steps that were skipped in the specified runtime instance of the workflow. *

*/ private Integer totalStepsSkipped; /** *

* The timestamp when the specified runtime instance of the workflow started. *

*/ private String startTime; /** *

* The timestamp when the specified runtime instance of the workflow finished. *

*/ private String endTime; /** *

* The request ID that uniquely identifies this request. *

* * @param requestId * The request ID that uniquely identifies this request. */ public void setRequestId(String requestId) { this.requestId = requestId; } /** *

* The request ID that uniquely identifies this request. *

* * @return The request ID that uniquely identifies this request. */ public String getRequestId() { return this.requestId; } /** *

* The request ID that uniquely identifies this request. *

* * @param requestId * The request ID that uniquely identifies this request. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withRequestId(String requestId) { setRequestId(requestId); return this; } /** *

* The Amazon Resource Name (ARN) of the build version for the Image Builder workflow resource that defines the * specified runtime instance of the workflow. *

* * @param workflowBuildVersionArn * The Amazon Resource Name (ARN) of the build version for the Image Builder workflow resource that defines * the specified runtime instance of the workflow. */ public void setWorkflowBuildVersionArn(String workflowBuildVersionArn) { this.workflowBuildVersionArn = workflowBuildVersionArn; } /** *

* The Amazon Resource Name (ARN) of the build version for the Image Builder workflow resource that defines the * specified runtime instance of the workflow. *

* * @return The Amazon Resource Name (ARN) of the build version for the Image Builder workflow resource that defines * the specified runtime instance of the workflow. */ public String getWorkflowBuildVersionArn() { return this.workflowBuildVersionArn; } /** *

* The Amazon Resource Name (ARN) of the build version for the Image Builder workflow resource that defines the * specified runtime instance of the workflow. *

* * @param workflowBuildVersionArn * The Amazon Resource Name (ARN) of the build version for the Image Builder workflow resource that defines * the specified runtime instance of the workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withWorkflowBuildVersionArn(String workflowBuildVersionArn) { setWorkflowBuildVersionArn(workflowBuildVersionArn); return this; } /** *

* The unique identifier that Image Builder assigned to keep track of runtime details when it ran the workflow. *

* * @param workflowExecutionId * The unique identifier that Image Builder assigned to keep track of runtime details when it ran the * workflow. */ public void setWorkflowExecutionId(String workflowExecutionId) { this.workflowExecutionId = workflowExecutionId; } /** *

* The unique identifier that Image Builder assigned to keep track of runtime details when it ran the workflow. *

* * @return The unique identifier that Image Builder assigned to keep track of runtime details when it ran the * workflow. */ public String getWorkflowExecutionId() { return this.workflowExecutionId; } /** *

* The unique identifier that Image Builder assigned to keep track of runtime details when it ran the workflow. *

* * @param workflowExecutionId * The unique identifier that Image Builder assigned to keep track of runtime details when it ran the * workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withWorkflowExecutionId(String workflowExecutionId) { setWorkflowExecutionId(workflowExecutionId); return this; } /** *

* The Amazon Resource Name (ARN) of the image resource build version that the specified runtime instance of the * workflow created. *

* * @param imageBuildVersionArn * The Amazon Resource Name (ARN) of the image resource build version that the specified runtime instance of * the workflow created. */ public void setImageBuildVersionArn(String imageBuildVersionArn) { this.imageBuildVersionArn = imageBuildVersionArn; } /** *

* The Amazon Resource Name (ARN) of the image resource build version that the specified runtime instance of the * workflow created. *

* * @return The Amazon Resource Name (ARN) of the image resource build version that the specified runtime instance of * the workflow created. */ public String getImageBuildVersionArn() { return this.imageBuildVersionArn; } /** *

* The Amazon Resource Name (ARN) of the image resource build version that the specified runtime instance of the * workflow created. *

* * @param imageBuildVersionArn * The Amazon Resource Name (ARN) of the image resource build version that the specified runtime instance of * the workflow created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withImageBuildVersionArn(String imageBuildVersionArn) { setImageBuildVersionArn(imageBuildVersionArn); return this; } /** *

* The type of workflow that Image Builder ran for the specified runtime instance of the workflow. *

* * @param type * The type of workflow that Image Builder ran for the specified runtime instance of the workflow. * @see WorkflowType */ public void setType(String type) { this.type = type; } /** *

* The type of workflow that Image Builder ran for the specified runtime instance of the workflow. *

* * @return The type of workflow that Image Builder ran for the specified runtime instance of the workflow. * @see WorkflowType */ public String getType() { return this.type; } /** *

* The type of workflow that Image Builder ran for the specified runtime instance of the workflow. *

* * @param type * The type of workflow that Image Builder ran for the specified runtime instance of the workflow. * @return Returns a reference to this object so that method calls can be chained together. * @see WorkflowType */ public GetWorkflowExecutionResult withType(String type) { setType(type); return this; } /** *

* The type of workflow that Image Builder ran for the specified runtime instance of the workflow. *

* * @param type * The type of workflow that Image Builder ran for the specified runtime instance of the workflow. * @return Returns a reference to this object so that method calls can be chained together. * @see WorkflowType */ public GetWorkflowExecutionResult withType(WorkflowType type) { this.type = type.toString(); return this; } /** *

* The current runtime status for the specified runtime instance of the workflow. *

* * @param status * The current runtime status for the specified runtime instance of the workflow. * @see WorkflowExecutionStatus */ public void setStatus(String status) { this.status = status; } /** *

* The current runtime status for the specified runtime instance of the workflow. *

* * @return The current runtime status for the specified runtime instance of the workflow. * @see WorkflowExecutionStatus */ public String getStatus() { return this.status; } /** *

* The current runtime status for the specified runtime instance of the workflow. *

* * @param status * The current runtime status for the specified runtime instance of the workflow. * @return Returns a reference to this object so that method calls can be chained together. * @see WorkflowExecutionStatus */ public GetWorkflowExecutionResult withStatus(String status) { setStatus(status); return this; } /** *

* The current runtime status for the specified runtime instance of the workflow. *

* * @param status * The current runtime status for the specified runtime instance of the workflow. * @return Returns a reference to this object so that method calls can be chained together. * @see WorkflowExecutionStatus */ public GetWorkflowExecutionResult withStatus(WorkflowExecutionStatus status) { this.status = status.toString(); return this; } /** *

* The output message from the specified runtime instance of the workflow, if applicable. *

* * @param message * The output message from the specified runtime instance of the workflow, if applicable. */ public void setMessage(String message) { this.message = message; } /** *

* The output message from the specified runtime instance of the workflow, if applicable. *

* * @return The output message from the specified runtime instance of the workflow, if applicable. */ public String getMessage() { return this.message; } /** *

* The output message from the specified runtime instance of the workflow, if applicable. *

* * @param message * The output message from the specified runtime instance of the workflow, if applicable. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withMessage(String message) { setMessage(message); return this; } /** *

* The total number of steps in the specified runtime instance of the workflow that ran. This number should equal * the sum of the step counts for steps that succeeded, were skipped, and failed. *

* * @param totalStepCount * The total number of steps in the specified runtime instance of the workflow that ran. This number should * equal the sum of the step counts for steps that succeeded, were skipped, and failed. */ public void setTotalStepCount(Integer totalStepCount) { this.totalStepCount = totalStepCount; } /** *

* The total number of steps in the specified runtime instance of the workflow that ran. This number should equal * the sum of the step counts for steps that succeeded, were skipped, and failed. *

* * @return The total number of steps in the specified runtime instance of the workflow that ran. This number should * equal the sum of the step counts for steps that succeeded, were skipped, and failed. */ public Integer getTotalStepCount() { return this.totalStepCount; } /** *

* The total number of steps in the specified runtime instance of the workflow that ran. This number should equal * the sum of the step counts for steps that succeeded, were skipped, and failed. *

* * @param totalStepCount * The total number of steps in the specified runtime instance of the workflow that ran. This number should * equal the sum of the step counts for steps that succeeded, were skipped, and failed. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withTotalStepCount(Integer totalStepCount) { setTotalStepCount(totalStepCount); return this; } /** *

* A runtime count for the number of steps that ran successfully in the specified runtime instance of the workflow. *

* * @param totalStepsSucceeded * A runtime count for the number of steps that ran successfully in the specified runtime instance of the * workflow. */ public void setTotalStepsSucceeded(Integer totalStepsSucceeded) { this.totalStepsSucceeded = totalStepsSucceeded; } /** *

* A runtime count for the number of steps that ran successfully in the specified runtime instance of the workflow. *

* * @return A runtime count for the number of steps that ran successfully in the specified runtime instance of the * workflow. */ public Integer getTotalStepsSucceeded() { return this.totalStepsSucceeded; } /** *

* A runtime count for the number of steps that ran successfully in the specified runtime instance of the workflow. *

* * @param totalStepsSucceeded * A runtime count for the number of steps that ran successfully in the specified runtime instance of the * workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withTotalStepsSucceeded(Integer totalStepsSucceeded) { setTotalStepsSucceeded(totalStepsSucceeded); return this; } /** *

* A runtime count for the number of steps that failed in the specified runtime instance of the workflow. *

* * @param totalStepsFailed * A runtime count for the number of steps that failed in the specified runtime instance of the workflow. */ public void setTotalStepsFailed(Integer totalStepsFailed) { this.totalStepsFailed = totalStepsFailed; } /** *

* A runtime count for the number of steps that failed in the specified runtime instance of the workflow. *

* * @return A runtime count for the number of steps that failed in the specified runtime instance of the workflow. */ public Integer getTotalStepsFailed() { return this.totalStepsFailed; } /** *

* A runtime count for the number of steps that failed in the specified runtime instance of the workflow. *

* * @param totalStepsFailed * A runtime count for the number of steps that failed in the specified runtime instance of the workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withTotalStepsFailed(Integer totalStepsFailed) { setTotalStepsFailed(totalStepsFailed); return this; } /** *

* A runtime count for the number of steps that were skipped in the specified runtime instance of the workflow. *

* * @param totalStepsSkipped * A runtime count for the number of steps that were skipped in the specified runtime instance of the * workflow. */ public void setTotalStepsSkipped(Integer totalStepsSkipped) { this.totalStepsSkipped = totalStepsSkipped; } /** *

* A runtime count for the number of steps that were skipped in the specified runtime instance of the workflow. *

* * @return A runtime count for the number of steps that were skipped in the specified runtime instance of the * workflow. */ public Integer getTotalStepsSkipped() { return this.totalStepsSkipped; } /** *

* A runtime count for the number of steps that were skipped in the specified runtime instance of the workflow. *

* * @param totalStepsSkipped * A runtime count for the number of steps that were skipped in the specified runtime instance of the * workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withTotalStepsSkipped(Integer totalStepsSkipped) { setTotalStepsSkipped(totalStepsSkipped); return this; } /** *

* The timestamp when the specified runtime instance of the workflow started. *

* * @param startTime * The timestamp when the specified runtime instance of the workflow started. */ public void setStartTime(String startTime) { this.startTime = startTime; } /** *

* The timestamp when the specified runtime instance of the workflow started. *

* * @return The timestamp when the specified runtime instance of the workflow started. */ public String getStartTime() { return this.startTime; } /** *

* The timestamp when the specified runtime instance of the workflow started. *

* * @param startTime * The timestamp when the specified runtime instance of the workflow started. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withStartTime(String startTime) { setStartTime(startTime); return this; } /** *

* The timestamp when the specified runtime instance of the workflow finished. *

* * @param endTime * The timestamp when the specified runtime instance of the workflow finished. */ public void setEndTime(String endTime) { this.endTime = endTime; } /** *

* The timestamp when the specified runtime instance of the workflow finished. *

* * @return The timestamp when the specified runtime instance of the workflow finished. */ public String getEndTime() { return this.endTime; } /** *

* The timestamp when the specified runtime instance of the workflow finished. *

* * @param endTime * The timestamp when the specified runtime instance of the workflow finished. * @return Returns a reference to this object so that method calls can be chained together. */ public GetWorkflowExecutionResult withEndTime(String endTime) { setEndTime(endTime); 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 (getRequestId() != null) sb.append("RequestId: ").append(getRequestId()).append(","); if (getWorkflowBuildVersionArn() != null) sb.append("WorkflowBuildVersionArn: ").append(getWorkflowBuildVersionArn()).append(","); if (getWorkflowExecutionId() != null) sb.append("WorkflowExecutionId: ").append(getWorkflowExecutionId()).append(","); if (getImageBuildVersionArn() != null) sb.append("ImageBuildVersionArn: ").append(getImageBuildVersionArn()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getMessage() != null) sb.append("Message: ").append(getMessage()).append(","); if (getTotalStepCount() != null) sb.append("TotalStepCount: ").append(getTotalStepCount()).append(","); if (getTotalStepsSucceeded() != null) sb.append("TotalStepsSucceeded: ").append(getTotalStepsSucceeded()).append(","); if (getTotalStepsFailed() != null) sb.append("TotalStepsFailed: ").append(getTotalStepsFailed()).append(","); if (getTotalStepsSkipped() != null) sb.append("TotalStepsSkipped: ").append(getTotalStepsSkipped()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetWorkflowExecutionResult == false) return false; GetWorkflowExecutionResult other = (GetWorkflowExecutionResult) obj; if (other.getRequestId() == null ^ this.getRequestId() == null) return false; if (other.getRequestId() != null && other.getRequestId().equals(this.getRequestId()) == false) return false; if (other.getWorkflowBuildVersionArn() == null ^ this.getWorkflowBuildVersionArn() == null) return false; if (other.getWorkflowBuildVersionArn() != null && other.getWorkflowBuildVersionArn().equals(this.getWorkflowBuildVersionArn()) == false) return false; if (other.getWorkflowExecutionId() == null ^ this.getWorkflowExecutionId() == null) return false; if (other.getWorkflowExecutionId() != null && other.getWorkflowExecutionId().equals(this.getWorkflowExecutionId()) == false) return false; if (other.getImageBuildVersionArn() == null ^ this.getImageBuildVersionArn() == null) return false; if (other.getImageBuildVersionArn() != null && other.getImageBuildVersionArn().equals(this.getImageBuildVersionArn()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == 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.getMessage() == null ^ this.getMessage() == null) return false; if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false) return false; if (other.getTotalStepCount() == null ^ this.getTotalStepCount() == null) return false; if (other.getTotalStepCount() != null && other.getTotalStepCount().equals(this.getTotalStepCount()) == false) return false; if (other.getTotalStepsSucceeded() == null ^ this.getTotalStepsSucceeded() == null) return false; if (other.getTotalStepsSucceeded() != null && other.getTotalStepsSucceeded().equals(this.getTotalStepsSucceeded()) == false) return false; if (other.getTotalStepsFailed() == null ^ this.getTotalStepsFailed() == null) return false; if (other.getTotalStepsFailed() != null && other.getTotalStepsFailed().equals(this.getTotalStepsFailed()) == false) return false; if (other.getTotalStepsSkipped() == null ^ this.getTotalStepsSkipped() == null) return false; if (other.getTotalStepsSkipped() != null && other.getTotalStepsSkipped().equals(this.getTotalStepsSkipped()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRequestId() == null) ? 0 : getRequestId().hashCode()); hashCode = prime * hashCode + ((getWorkflowBuildVersionArn() == null) ? 0 : getWorkflowBuildVersionArn().hashCode()); hashCode = prime * hashCode + ((getWorkflowExecutionId() == null) ? 0 : getWorkflowExecutionId().hashCode()); hashCode = prime * hashCode + ((getImageBuildVersionArn() == null) ? 0 : getImageBuildVersionArn().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); hashCode = prime * hashCode + ((getTotalStepCount() == null) ? 0 : getTotalStepCount().hashCode()); hashCode = prime * hashCode + ((getTotalStepsSucceeded() == null) ? 0 : getTotalStepsSucceeded().hashCode()); hashCode = prime * hashCode + ((getTotalStepsFailed() == null) ? 0 : getTotalStepsFailed().hashCode()); hashCode = prime * hashCode + ((getTotalStepsSkipped() == null) ? 0 : getTotalStepsSkipped().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); return hashCode; } @Override public GetWorkflowExecutionResult clone() { try { return (GetWorkflowExecutionResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }