io.vanillabp.cockpit.bpms.api.v1.WorkflowCancelledEvent 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;
/**
* WorkflowCancelledEvent
*/
@JsonPropertyOrder({
WorkflowCancelledEvent.JSON_PROPERTY_ID,
WorkflowCancelledEvent.JSON_PROPERTY_WORKFLOW_ID,
WorkflowCancelledEvent.JSON_PROPERTY_INITIATOR,
WorkflowCancelledEvent.JSON_PROPERTY_TIMESTAMP,
WorkflowCancelledEvent.JSON_PROPERTY_SOURCE,
WorkflowCancelledEvent.JSON_PROPERTY_COMMENT,
WorkflowCancelledEvent.JSON_PROPERTY_BPMN_PROCESS_ID,
WorkflowCancelledEvent.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 WorkflowCancelledEvent {
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 WorkflowCancelledEvent() {
}
public WorkflowCancelledEvent 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 WorkflowCancelledEvent 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 WorkflowCancelledEvent 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 WorkflowCancelledEvent 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 WorkflowCancelledEvent 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 WorkflowCancelledEvent 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 WorkflowCancelledEvent 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 WorkflowCancelledEvent 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;
}
WorkflowCancelledEvent workflowCancelledEvent = (WorkflowCancelledEvent) o;
return Objects.equals(this.id, workflowCancelledEvent.id) &&
Objects.equals(this.workflowId, workflowCancelledEvent.workflowId) &&
Objects.equals(this.initiator, workflowCancelledEvent.initiator) &&
Objects.equals(this.timestamp, workflowCancelledEvent.timestamp) &&
Objects.equals(this.source, workflowCancelledEvent.source) &&
Objects.equals(this.comment, workflowCancelledEvent.comment) &&
Objects.equals(this.bpmnProcessId, workflowCancelledEvent.bpmnProcessId) &&
Objects.equals(this.bpmnProcessVersion, workflowCancelledEvent.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 WorkflowCancelledEvent {\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 ");
}
}