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

io.vanillabp.cockpit.bpms.api.v1.WorkflowLifecycleEvent Maven / Gradle / Ivy

/*
 * BC-API
 * Business Cockpit API
 *
 * The version of the OpenAPI document: 1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package io.vanillabp.cockpit.bpms.api.v1;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.time.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * WorkflowLifecycleEvent
 */
@JsonPropertyOrder({
  WorkflowLifecycleEvent.JSON_PROPERTY_ID,
  WorkflowLifecycleEvent.JSON_PROPERTY_WORKFLOW_ID,
  WorkflowLifecycleEvent.JSON_PROPERTY_INITIATOR,
  WorkflowLifecycleEvent.JSON_PROPERTY_TIMESTAMP,
  WorkflowLifecycleEvent.JSON_PROPERTY_SOURCE,
  WorkflowLifecycleEvent.JSON_PROPERTY_COMMENT,
  WorkflowLifecycleEvent.JSON_PROPERTY_BPMN_PROCESS_ID,
  WorkflowLifecycleEvent.JSON_PROPERTY_BPMN_PROCESS_VERSION
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-20T08:07:41.493160+02:00[Europe/Berlin]")
public class WorkflowLifecycleEvent {
  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_WORKFLOW_ID = "workflowId";
  private String workflowId;

  public static final String JSON_PROPERTY_INITIATOR = "initiator";
  private String initiator;

  public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
  private OffsetDateTime timestamp;

  public static final String JSON_PROPERTY_SOURCE = "source";
  private String source;

  public static final String JSON_PROPERTY_COMMENT = "comment";
  private String comment;

  public static final String JSON_PROPERTY_BPMN_PROCESS_ID = "bpmnProcessId";
  private String bpmnProcessId;

  public static final String JSON_PROPERTY_BPMN_PROCESS_VERSION = "bpmnProcessVersion";
  private String bpmnProcessVersion;

  public WorkflowLifecycleEvent() {
  }

  public WorkflowLifecycleEvent id(String id) {
    
    this.id = id;
    return this;
  }

   /**
   * event id withing the source system
   * @return id
  **/
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getId() {
    return id;
  }


  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setId(String id) {
    this.id = id;
  }


  public WorkflowLifecycleEvent workflowId(String workflowId) {
    
    this.workflowId = workflowId;
    return this;
  }

   /**
   * The unique key of the workflow
   * @return workflowId
  **/
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_WORKFLOW_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getWorkflowId() {
    return workflowId;
  }


  @JsonProperty(JSON_PROPERTY_WORKFLOW_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setWorkflowId(String workflowId) {
    this.workflowId = workflowId;
  }


  public WorkflowLifecycleEvent initiator(String initiator) {
    
    this.initiator = initiator;
    return this;
  }

   /**
   * The user who triggered the update. Null if the update is done by the system.
   * @return initiator
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_INITIATOR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getInitiator() {
    return initiator;
  }


  @JsonProperty(JSON_PROPERTY_INITIATOR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setInitiator(String initiator) {
    this.initiator = initiator;
  }


  public WorkflowLifecycleEvent timestamp(OffsetDateTime timestamp) {
    
    this.timestamp = timestamp;
    return this;
  }

   /**
   * Timestamp of the initial cause of this event
   * @return timestamp
  **/
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_TIMESTAMP)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public OffsetDateTime getTimestamp() {
    return timestamp;
  }


  @JsonProperty(JSON_PROPERTY_TIMESTAMP)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setTimestamp(OffsetDateTime timestamp) {
    this.timestamp = timestamp;
  }


  public WorkflowLifecycleEvent source(String source) {
    
    this.source = source;
    return this;
  }

   /**
   * name of the source system sending this event
   * @return source
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSource() {
    return source;
  }


  @JsonProperty(JSON_PROPERTY_SOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSource(String source) {
    this.source = source;
  }


  public WorkflowLifecycleEvent comment(String comment) {
    
    this.comment = comment;
    return this;
  }

   /**
   * Get comment
   * @return comment
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COMMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getComment() {
    return comment;
  }


  @JsonProperty(JSON_PROPERTY_COMMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setComment(String comment) {
    this.comment = comment;
  }


  public WorkflowLifecycleEvent bpmnProcessId(String bpmnProcessId) {
    
    this.bpmnProcessId = bpmnProcessId;
    return this;
  }

   /**
   * BPMN process ID
   * @return bpmnProcessId
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_BPMN_PROCESS_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getBpmnProcessId() {
    return bpmnProcessId;
  }


  @JsonProperty(JSON_PROPERTY_BPMN_PROCESS_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBpmnProcessId(String bpmnProcessId) {
    this.bpmnProcessId = bpmnProcessId;
  }


  public WorkflowLifecycleEvent bpmnProcessVersion(String bpmnProcessVersion) {
    
    this.bpmnProcessVersion = bpmnProcessVersion;
    return this;
  }

   /**
   * Version of the BPMN process (beneath the version tag)
   * @return bpmnProcessVersion
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_BPMN_PROCESS_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getBpmnProcessVersion() {
    return bpmnProcessVersion;
  }


  @JsonProperty(JSON_PROPERTY_BPMN_PROCESS_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBpmnProcessVersion(String bpmnProcessVersion) {
    this.bpmnProcessVersion = bpmnProcessVersion;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    WorkflowLifecycleEvent workflowLifecycleEvent = (WorkflowLifecycleEvent) o;
    return Objects.equals(this.id, workflowLifecycleEvent.id) &&
        Objects.equals(this.workflowId, workflowLifecycleEvent.workflowId) &&
        Objects.equals(this.initiator, workflowLifecycleEvent.initiator) &&
        Objects.equals(this.timestamp, workflowLifecycleEvent.timestamp) &&
        Objects.equals(this.source, workflowLifecycleEvent.source) &&
        Objects.equals(this.comment, workflowLifecycleEvent.comment) &&
        Objects.equals(this.bpmnProcessId, workflowLifecycleEvent.bpmnProcessId) &&
        Objects.equals(this.bpmnProcessVersion, workflowLifecycleEvent.bpmnProcessVersion);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, workflowId, initiator, timestamp, source, comment, bpmnProcessId, bpmnProcessVersion);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class WorkflowLifecycleEvent {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    workflowId: ").append(toIndentedString(workflowId)).append("\n");
    sb.append("    initiator: ").append(toIndentedString(initiator)).append("\n");
    sb.append("    timestamp: ").append(toIndentedString(timestamp)).append("\n");
    sb.append("    source: ").append(toIndentedString(source)).append("\n");
    sb.append("    comment: ").append(toIndentedString(comment)).append("\n");
    sb.append("    bpmnProcessId: ").append(toIndentedString(bpmnProcessId)).append("\n");
    sb.append("    bpmnProcessVersion: ").append(toIndentedString(bpmnProcessVersion)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy