All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.simpleworkflow.model.WorkflowExecutionInfo Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon SWF module holds the client classes that are used for communicating with Amazon Simple Workflow Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 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.simpleworkflow.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Contains information about a workflow execution. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class WorkflowExecutionInfo implements Serializable, Cloneable, StructuredPojo { /** *

* The workflow execution this information is about. *

*/ private WorkflowExecution execution; /** *

* The type of the workflow execution. *

*/ private WorkflowType workflowType; /** *

* The time when the execution was started. *

*/ private java.util.Date startTimestamp; /** *

* The time when the workflow execution was closed. Set only if the execution status is CLOSED. *

*/ private java.util.Date closeTimestamp; /** *

* The current status of the execution. *

*/ private String executionStatus; /** *

* If the execution status is closed then this specifies how the execution was closed: *

*
    *
  • *

    * COMPLETED – the execution was successfully completed. *

    *
  • *
  • *

    * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully clean up * before the execution is closed. *

    *
  • *
  • *

    * TERMINATED – the execution was force terminated. *

    *
  • *
  • *

    * FAILED – the execution failed to complete. *

    *
  • *
  • *

    * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed out. *

    *
  • *
  • *

    * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was * completed and a new execution was started to carry on the workflow. *

    *
  • *
*/ private String closeStatus; /** *

* If this workflow execution is a child of another execution then contains the workflow execution that started this * execution. *

*/ private WorkflowExecution parent; /** *

* The list of tags associated with the workflow execution. Tags can be used to identify and list workflow * executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags. *

*/ private java.util.List tagList; /** *

* Set to true if a cancellation is requested for this workflow execution. *

*/ private Boolean cancelRequested; /** *

* The workflow execution this information is about. *

* * @param execution * The workflow execution this information is about. */ public void setExecution(WorkflowExecution execution) { this.execution = execution; } /** *

* The workflow execution this information is about. *

* * @return The workflow execution this information is about. */ public WorkflowExecution getExecution() { return this.execution; } /** *

* The workflow execution this information is about. *

* * @param execution * The workflow execution this information is about. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkflowExecutionInfo withExecution(WorkflowExecution execution) { setExecution(execution); return this; } /** *

* The type of the workflow execution. *

* * @param workflowType * The type of the workflow execution. */ public void setWorkflowType(WorkflowType workflowType) { this.workflowType = workflowType; } /** *

* The type of the workflow execution. *

* * @return The type of the workflow execution. */ public WorkflowType getWorkflowType() { return this.workflowType; } /** *

* The type of the workflow execution. *

* * @param workflowType * The type of the workflow execution. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkflowExecutionInfo withWorkflowType(WorkflowType workflowType) { setWorkflowType(workflowType); return this; } /** *

* The time when the execution was started. *

* * @param startTimestamp * The time when the execution was started. */ public void setStartTimestamp(java.util.Date startTimestamp) { this.startTimestamp = startTimestamp; } /** *

* The time when the execution was started. *

* * @return The time when the execution was started. */ public java.util.Date getStartTimestamp() { return this.startTimestamp; } /** *

* The time when the execution was started. *

* * @param startTimestamp * The time when the execution was started. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkflowExecutionInfo withStartTimestamp(java.util.Date startTimestamp) { setStartTimestamp(startTimestamp); return this; } /** *

* The time when the workflow execution was closed. Set only if the execution status is CLOSED. *

* * @param closeTimestamp * The time when the workflow execution was closed. Set only if the execution status is CLOSED. */ public void setCloseTimestamp(java.util.Date closeTimestamp) { this.closeTimestamp = closeTimestamp; } /** *

* The time when the workflow execution was closed. Set only if the execution status is CLOSED. *

* * @return The time when the workflow execution was closed. Set only if the execution status is CLOSED. */ public java.util.Date getCloseTimestamp() { return this.closeTimestamp; } /** *

* The time when the workflow execution was closed. Set only if the execution status is CLOSED. *

* * @param closeTimestamp * The time when the workflow execution was closed. Set only if the execution status is CLOSED. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkflowExecutionInfo withCloseTimestamp(java.util.Date closeTimestamp) { setCloseTimestamp(closeTimestamp); return this; } /** *

* The current status of the execution. *

* * @param executionStatus * The current status of the execution. * @see ExecutionStatus */ public void setExecutionStatus(String executionStatus) { this.executionStatus = executionStatus; } /** *

* The current status of the execution. *

* * @return The current status of the execution. * @see ExecutionStatus */ public String getExecutionStatus() { return this.executionStatus; } /** *

* The current status of the execution. *

* * @param executionStatus * The current status of the execution. * @return Returns a reference to this object so that method calls can be chained together. * @see ExecutionStatus */ public WorkflowExecutionInfo withExecutionStatus(String executionStatus) { setExecutionStatus(executionStatus); return this; } /** *

* The current status of the execution. *

* * @param executionStatus * The current status of the execution. * @see ExecutionStatus */ public void setExecutionStatus(ExecutionStatus executionStatus) { withExecutionStatus(executionStatus); } /** *

* The current status of the execution. *

* * @param executionStatus * The current status of the execution. * @return Returns a reference to this object so that method calls can be chained together. * @see ExecutionStatus */ public WorkflowExecutionInfo withExecutionStatus(ExecutionStatus executionStatus) { this.executionStatus = executionStatus.toString(); return this; } /** *

* If the execution status is closed then this specifies how the execution was closed: *

*
    *
  • *

    * COMPLETED – the execution was successfully completed. *

    *
  • *
  • *

    * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully clean up * before the execution is closed. *

    *
  • *
  • *

    * TERMINATED – the execution was force terminated. *

    *
  • *
  • *

    * FAILED – the execution failed to complete. *

    *
  • *
  • *

    * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed out. *

    *
  • *
  • *

    * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was * completed and a new execution was started to carry on the workflow. *

    *
  • *
* * @param closeStatus * If the execution status is closed then this specifies how the execution was closed:

*
    *
  • *

    * COMPLETED – the execution was successfully completed. *

    *
  • *
  • *

    * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully * clean up before the execution is closed. *

    *
  • *
  • *

    * TERMINATED – the execution was force terminated. *

    *
  • *
  • *

    * FAILED – the execution failed to complete. *

    *
  • *
  • *

    * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed * out. *

    *
  • *
  • *

    * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was * completed and a new execution was started to carry on the workflow. *

    *
  • * @see CloseStatus */ public void setCloseStatus(String closeStatus) { this.closeStatus = closeStatus; } /** *

    * If the execution status is closed then this specifies how the execution was closed: *

    *
      *
    • *

      * COMPLETED – the execution was successfully completed. *

      *
    • *
    • *

      * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully clean up * before the execution is closed. *

      *
    • *
    • *

      * TERMINATED – the execution was force terminated. *

      *
    • *
    • *

      * FAILED – the execution failed to complete. *

      *
    • *
    • *

      * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed out. *

      *
    • *
    • *

      * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was * completed and a new execution was started to carry on the workflow. *

      *
    • *
    * * @return If the execution status is closed then this specifies how the execution was closed:

    *
      *
    • *

      * COMPLETED – the execution was successfully completed. *

      *
    • *
    • *

      * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully * clean up before the execution is closed. *

      *
    • *
    • *

      * TERMINATED – the execution was force terminated. *

      *
    • *
    • *

      * FAILED – the execution failed to complete. *

      *
    • *
    • *

      * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed * out. *

      *
    • *
    • *

      * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution * was completed and a new execution was started to carry on the workflow. *

      *
    • * @see CloseStatus */ public String getCloseStatus() { return this.closeStatus; } /** *

      * If the execution status is closed then this specifies how the execution was closed: *

      *
        *
      • *

        * COMPLETED – the execution was successfully completed. *

        *
      • *
      • *

        * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully clean up * before the execution is closed. *

        *
      • *
      • *

        * TERMINATED – the execution was force terminated. *

        *
      • *
      • *

        * FAILED – the execution failed to complete. *

        *
      • *
      • *

        * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed out. *

        *
      • *
      • *

        * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was * completed and a new execution was started to carry on the workflow. *

        *
      • *
      * * @param closeStatus * If the execution status is closed then this specifies how the execution was closed:

      *
        *
      • *

        * COMPLETED – the execution was successfully completed. *

        *
      • *
      • *

        * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully * clean up before the execution is closed. *

        *
      • *
      • *

        * TERMINATED – the execution was force terminated. *

        *
      • *
      • *

        * FAILED – the execution failed to complete. *

        *
      • *
      • *

        * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed * out. *

        *
      • *
      • *

        * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was * completed and a new execution was started to carry on the workflow. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see CloseStatus */ public WorkflowExecutionInfo withCloseStatus(String closeStatus) { setCloseStatus(closeStatus); return this; } /** *

        * If the execution status is closed then this specifies how the execution was closed: *

        *
          *
        • *

          * COMPLETED – the execution was successfully completed. *

          *
        • *
        • *

          * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully clean up * before the execution is closed. *

          *
        • *
        • *

          * TERMINATED – the execution was force terminated. *

          *
        • *
        • *

          * FAILED – the execution failed to complete. *

          *
        • *
        • *

          * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed out. *

          *
        • *
        • *

          * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was * completed and a new execution was started to carry on the workflow. *

          *
        • *
        * * @param closeStatus * If the execution status is closed then this specifies how the execution was closed:

        *
          *
        • *

          * COMPLETED – the execution was successfully completed. *

          *
        • *
        • *

          * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully * clean up before the execution is closed. *

          *
        • *
        • *

          * TERMINATED – the execution was force terminated. *

          *
        • *
        • *

          * FAILED – the execution failed to complete. *

          *
        • *
        • *

          * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed * out. *

          *
        • *
        • *

          * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was * completed and a new execution was started to carry on the workflow. *

          *
        • * @see CloseStatus */ public void setCloseStatus(CloseStatus closeStatus) { withCloseStatus(closeStatus); } /** *

          * If the execution status is closed then this specifies how the execution was closed: *

          *
            *
          • *

            * COMPLETED – the execution was successfully completed. *

            *
          • *
          • *

            * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully clean up * before the execution is closed. *

            *
          • *
          • *

            * TERMINATED – the execution was force terminated. *

            *
          • *
          • *

            * FAILED – the execution failed to complete. *

            *
          • *
          • *

            * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed out. *

            *
          • *
          • *

            * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was * completed and a new execution was started to carry on the workflow. *

            *
          • *
          * * @param closeStatus * If the execution status is closed then this specifies how the execution was closed:

          *
            *
          • *

            * COMPLETED – the execution was successfully completed. *

            *
          • *
          • *

            * CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully * clean up before the execution is closed. *

            *
          • *
          • *

            * TERMINATED – the execution was force terminated. *

            *
          • *
          • *

            * FAILED – the execution failed to complete. *

            *
          • *
          • *

            * TIMED_OUT – the execution did not complete in the alloted time and was automatically timed * out. *

            *
          • *
          • *

            * CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was * completed and a new execution was started to carry on the workflow. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. * @see CloseStatus */ public WorkflowExecutionInfo withCloseStatus(CloseStatus closeStatus) { this.closeStatus = closeStatus.toString(); return this; } /** *

            * If this workflow execution is a child of another execution then contains the workflow execution that started this * execution. *

            * * @param parent * If this workflow execution is a child of another execution then contains the workflow execution that * started this execution. */ public void setParent(WorkflowExecution parent) { this.parent = parent; } /** *

            * If this workflow execution is a child of another execution then contains the workflow execution that started this * execution. *

            * * @return If this workflow execution is a child of another execution then contains the workflow execution that * started this execution. */ public WorkflowExecution getParent() { return this.parent; } /** *

            * If this workflow execution is a child of another execution then contains the workflow execution that started this * execution. *

            * * @param parent * If this workflow execution is a child of another execution then contains the workflow execution that * started this execution. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkflowExecutionInfo withParent(WorkflowExecution parent) { setParent(parent); return this; } /** *

            * The list of tags associated with the workflow execution. Tags can be used to identify and list workflow * executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags. *

            * * @return The list of tags associated with the workflow execution. Tags can be used to identify and list workflow * executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags. */ public java.util.List getTagList() { return tagList; } /** *

            * The list of tags associated with the workflow execution. Tags can be used to identify and list workflow * executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags. *

            * * @param tagList * The list of tags associated with the workflow execution. Tags can be used to identify and list workflow * executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags. */ public void setTagList(java.util.Collection tagList) { if (tagList == null) { this.tagList = null; return; } this.tagList = new java.util.ArrayList(tagList); } /** *

            * The list of tags associated with the workflow execution. Tags can be used to identify and list workflow * executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags. *

            *

            * NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagList(java.util.Collection)} or {@link #withTagList(java.util.Collection)} if you want to override * the existing values. *

            * * @param tagList * The list of tags associated with the workflow execution. Tags can be used to identify and list workflow * executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkflowExecutionInfo withTagList(String... tagList) { if (this.tagList == null) { setTagList(new java.util.ArrayList(tagList.length)); } for (String ele : tagList) { this.tagList.add(ele); } return this; } /** *

            * The list of tags associated with the workflow execution. Tags can be used to identify and list workflow * executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags. *

            * * @param tagList * The list of tags associated with the workflow execution. Tags can be used to identify and list workflow * executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkflowExecutionInfo withTagList(java.util.Collection tagList) { setTagList(tagList); return this; } /** *

            * Set to true if a cancellation is requested for this workflow execution. *

            * * @param cancelRequested * Set to true if a cancellation is requested for this workflow execution. */ public void setCancelRequested(Boolean cancelRequested) { this.cancelRequested = cancelRequested; } /** *

            * Set to true if a cancellation is requested for this workflow execution. *

            * * @return Set to true if a cancellation is requested for this workflow execution. */ public Boolean getCancelRequested() { return this.cancelRequested; } /** *

            * Set to true if a cancellation is requested for this workflow execution. *

            * * @param cancelRequested * Set to true if a cancellation is requested for this workflow execution. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkflowExecutionInfo withCancelRequested(Boolean cancelRequested) { setCancelRequested(cancelRequested); return this; } /** *

            * Set to true if a cancellation is requested for this workflow execution. *

            * * @return Set to true if a cancellation is requested for this workflow execution. */ public Boolean isCancelRequested() { return this.cancelRequested; } /** * 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 (getExecution() != null) sb.append("Execution: ").append(getExecution()).append(","); if (getWorkflowType() != null) sb.append("WorkflowType: ").append(getWorkflowType()).append(","); if (getStartTimestamp() != null) sb.append("StartTimestamp: ").append(getStartTimestamp()).append(","); if (getCloseTimestamp() != null) sb.append("CloseTimestamp: ").append(getCloseTimestamp()).append(","); if (getExecutionStatus() != null) sb.append("ExecutionStatus: ").append(getExecutionStatus()).append(","); if (getCloseStatus() != null) sb.append("CloseStatus: ").append(getCloseStatus()).append(","); if (getParent() != null) sb.append("Parent: ").append(getParent()).append(","); if (getTagList() != null) sb.append("TagList: ").append(getTagList()).append(","); if (getCancelRequested() != null) sb.append("CancelRequested: ").append(getCancelRequested()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof WorkflowExecutionInfo == false) return false; WorkflowExecutionInfo other = (WorkflowExecutionInfo) obj; if (other.getExecution() == null ^ this.getExecution() == null) return false; if (other.getExecution() != null && other.getExecution().equals(this.getExecution()) == false) return false; if (other.getWorkflowType() == null ^ this.getWorkflowType() == null) return false; if (other.getWorkflowType() != null && other.getWorkflowType().equals(this.getWorkflowType()) == false) return false; if (other.getStartTimestamp() == null ^ this.getStartTimestamp() == null) return false; if (other.getStartTimestamp() != null && other.getStartTimestamp().equals(this.getStartTimestamp()) == false) return false; if (other.getCloseTimestamp() == null ^ this.getCloseTimestamp() == null) return false; if (other.getCloseTimestamp() != null && other.getCloseTimestamp().equals(this.getCloseTimestamp()) == false) return false; if (other.getExecutionStatus() == null ^ this.getExecutionStatus() == null) return false; if (other.getExecutionStatus() != null && other.getExecutionStatus().equals(this.getExecutionStatus()) == false) return false; if (other.getCloseStatus() == null ^ this.getCloseStatus() == null) return false; if (other.getCloseStatus() != null && other.getCloseStatus().equals(this.getCloseStatus()) == false) return false; if (other.getParent() == null ^ this.getParent() == null) return false; if (other.getParent() != null && other.getParent().equals(this.getParent()) == false) return false; if (other.getTagList() == null ^ this.getTagList() == null) return false; if (other.getTagList() != null && other.getTagList().equals(this.getTagList()) == false) return false; if (other.getCancelRequested() == null ^ this.getCancelRequested() == null) return false; if (other.getCancelRequested() != null && other.getCancelRequested().equals(this.getCancelRequested()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getExecution() == null) ? 0 : getExecution().hashCode()); hashCode = prime * hashCode + ((getWorkflowType() == null) ? 0 : getWorkflowType().hashCode()); hashCode = prime * hashCode + ((getStartTimestamp() == null) ? 0 : getStartTimestamp().hashCode()); hashCode = prime * hashCode + ((getCloseTimestamp() == null) ? 0 : getCloseTimestamp().hashCode()); hashCode = prime * hashCode + ((getExecutionStatus() == null) ? 0 : getExecutionStatus().hashCode()); hashCode = prime * hashCode + ((getCloseStatus() == null) ? 0 : getCloseStatus().hashCode()); hashCode = prime * hashCode + ((getParent() == null) ? 0 : getParent().hashCode()); hashCode = prime * hashCode + ((getTagList() == null) ? 0 : getTagList().hashCode()); hashCode = prime * hashCode + ((getCancelRequested() == null) ? 0 : getCancelRequested().hashCode()); return hashCode; } @Override public WorkflowExecutionInfo clone() { try { return (WorkflowExecutionInfo) 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.simpleworkflow.model.transform.WorkflowExecutionInfoMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy