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

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

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

import java.net.URI;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.vanillabp.cockpit.bpms.api.v1.UiUriType;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.format.annotation.DateTimeFormat;
import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;


import java.util.*;
import jakarta.annotation.Generated;

/**
 * WorkflowCreatedOrUpdatedEvent
 */

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-11T07:10:32.454223+01:00[Europe/Berlin]")
public class WorkflowCreatedOrUpdatedEvent {

  @JsonProperty("id")
  private String id;

  @JsonProperty("updated")
  private Boolean updated;

  @JsonProperty("workflowId")
  private String workflowId;

  @JsonProperty("businessId")
  private String businessId;

  @JsonProperty("initiator")
  private String initiator;

  @JsonProperty("timestamp")
  @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
  private OffsetDateTime timestamp;

  @JsonProperty("source")
  private String source;

  @JsonProperty("workflowModuleId")
  private String workflowModuleId;

  @JsonProperty("title")
  @Valid
  private Map title = null;

  @JsonProperty("comment")
  private String comment;

  @JsonProperty("bpmnProcessId")
  private String bpmnProcessId;

  @JsonProperty("bpmnProcessVersion")
  private String bpmnProcessVersion;

  @JsonProperty("uiUriPath")
  private String uiUriPath;

  @JsonProperty("uiUriType")
  private UiUriType uiUriType;

  @JsonProperty("accessibleToUsers")
  @Valid
  private List accessibleToUsers = null;

  @JsonProperty("accessibleToGroups")
  @Valid
  private List accessibleToGroups = null;

  @JsonProperty("details")
  @Valid
  private Map details = null;

  @JsonProperty("detailsFulltextSearch")
  private String detailsFulltextSearch;

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

  /**
   * event id withing the source system
   * @return id
  */
  @NotNull 
  @Schema(name = "id", description = "event id withing the source system", requiredMode = Schema.RequiredMode.REQUIRED)
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public WorkflowCreatedOrUpdatedEvent updated(Boolean updated) {
    this.updated = updated;
    return this;
  }

  /**
   * Whether this event is about an update (otherwise creating a user task)
   * @return updated
  */
  
  @Schema(name = "updated", description = "Whether this event is about an update (otherwise creating a user task)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public Boolean getUpdated() {
    return updated;
  }

  public void setUpdated(Boolean updated) {
    this.updated = updated;
  }

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

  /**
   * The unique key of the workflow
   * @return workflowId
  */
  @NotNull 
  @Schema(name = "workflowId", example = "c26f4d10-a7a7-44e5-97ed-cbfd06e760e1", description = "The unique key of the workflow", requiredMode = Schema.RequiredMode.REQUIRED)
  public String getWorkflowId() {
    return workflowId;
  }

  public void setWorkflowId(String workflowId) {
    this.workflowId = workflowId;
  }

  public WorkflowCreatedOrUpdatedEvent businessId(String businessId) {
    this.businessId = businessId;
    return this;
  }

  /**
   * The natural ID of the workflow (e.g. order-id)
   * @return businessId
  */
  
  @Schema(name = "businessId", example = "AT0815", description = "The natural ID of the workflow (e.g. order-id)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public String getBusinessId() {
    return businessId;
  }

  public void setBusinessId(String businessId) {
    this.businessId = businessId;
  }

  public WorkflowCreatedOrUpdatedEvent 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
  */
  
  @Schema(name = "initiator", description = "The user who triggered the update. Null if the update is done by the system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public String getInitiator() {
    return initiator;
  }

  public void setInitiator(String initiator) {
    this.initiator = initiator;
  }

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

  /**
   * Timestamp of the initial cause of this event (e.g. the time the task was created for ACTIVATED)
   * @return timestamp
  */
  @NotNull @Valid 
  @Schema(name = "timestamp", example = "2019-05-21T13:30:26.202Z", description = "Timestamp of the initial cause of this event (e.g. the time the task was created for ACTIVATED)", requiredMode = Schema.RequiredMode.REQUIRED)
  public OffsetDateTime getTimestamp() {
    return timestamp;
  }

  public void setTimestamp(OffsetDateTime timestamp) {
    this.timestamp = timestamp;
  }

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

  /**
   * name of the source system sending this event
   * @return source
  */
  
  @Schema(name = "source", description = "name of the source system sending this event", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public String getSource() {
    return source;
  }

  public void setSource(String source) {
    this.source = source;
  }

  public WorkflowCreatedOrUpdatedEvent workflowModuleId(String workflowModuleId) {
    this.workflowModuleId = workflowModuleId;
    return this;
  }

  /**
   * The workflow module sending this event
   * @return workflowModuleId
  */
  @NotNull 
  @Schema(name = "workflowModuleId", description = "The workflow module sending this event", requiredMode = Schema.RequiredMode.REQUIRED)
  public String getWorkflowModuleId() {
    return workflowModuleId;
  }

  public void setWorkflowModuleId(String workflowModuleId) {
    this.workflowModuleId = workflowModuleId;
  }

  public WorkflowCreatedOrUpdatedEvent title(Map title) {
    this.title = title;
    return this;
  }

  public WorkflowCreatedOrUpdatedEvent putTitleItem(String key, String titleItem) {
    if (this.title == null) {
      this.title = new HashMap<>();
    }
    this.title.put(key, titleItem);
    return this;
  }

  /**
   * The rendered title of the workflow (may contain specific data)
   * @return title
  */
  
  @Schema(name = "title", example = "{\"en\":\"Ride request #4711\",\"de\":\"Fahrtanfrage #4711\"}", description = "The rendered title of the workflow (may contain specific data)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public Map getTitle() {
    return title;
  }

  public void setTitle(Map title) {
    this.title = title;
  }

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

  /**
   * Get comment
   * @return comment
  */
  
  @Schema(name = "comment", example = "A comment describing the event. Is interpreted in the context of the event. E.g. the reason which caused CANCELLATION", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public String getComment() {
    return comment;
  }

  public void setComment(String comment) {
    this.comment = comment;
  }

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

  /**
   * BPMN process ID
   * @return bpmnProcessId
  */
  @NotNull 
  @Schema(name = "bpmnProcessId", example = "taxi-ride", description = "BPMN process ID", requiredMode = Schema.RequiredMode.REQUIRED)
  public String getBpmnProcessId() {
    return bpmnProcessId;
  }

  public void setBpmnProcessId(String bpmnProcessId) {
    this.bpmnProcessId = bpmnProcessId;
  }

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

  /**
   * Version of the BPMN process (beneath the version tag)
   * @return bpmnProcessVersion
  */
  
  @Schema(name = "bpmnProcessVersion", description = "Version of the BPMN process (beneath the version tag)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public String getBpmnProcessVersion() {
    return bpmnProcessVersion;
  }

  public void setBpmnProcessVersion(String bpmnProcessVersion) {
    this.bpmnProcessVersion = bpmnProcessVersion;
  }

  public WorkflowCreatedOrUpdatedEvent uiUriPath(String uiUriPath) {
    this.uiUriPath = uiUriPath;
    return this;
  }

  /**
   * A path added to workflowModuleUri to build a entrypoint URI for UI components. Maybe a technical URL (e.g. for WEBPACK) or an URL targeting a human readable form (e.g. EXTERNAL)
   * @return uiUriPath
  */
  @NotNull 
  @Schema(name = "uiUriPath", example = "/remoteEntry.js", description = "A path added to workflowModuleUri to build a entrypoint URI for UI components. Maybe a technical URL (e.g. for WEBPACK) or an URL targeting a human readable form (e.g. EXTERNAL)", requiredMode = Schema.RequiredMode.REQUIRED)
  public String getUiUriPath() {
    return uiUriPath;
  }

  public void setUiUriPath(String uiUriPath) {
    this.uiUriPath = uiUriPath;
  }

  public WorkflowCreatedOrUpdatedEvent uiUriType(UiUriType uiUriType) {
    this.uiUriType = uiUriType;
    return this;
  }

  /**
   * Get uiUriType
   * @return uiUriType
  */
  @NotNull @Valid 
  @Schema(name = "uiUriType", requiredMode = Schema.RequiredMode.REQUIRED)
  public UiUriType getUiUriType() {
    return uiUriType;
  }

  public void setUiUriType(UiUriType uiUriType) {
    this.uiUriType = uiUriType;
  }

  public WorkflowCreatedOrUpdatedEvent accessibleToUsers(List accessibleToUsers) {
    this.accessibleToUsers = accessibleToUsers;
    return this;
  }

  public WorkflowCreatedOrUpdatedEvent addAccessibleToUsersItem(String accessibleToUsersItem) {
    if (this.accessibleToUsers == null) {
      this.accessibleToUsers = new ArrayList<>();
    }
    this.accessibleToUsers.add(accessibleToUsersItem);
    return this;
  }

  /**
   * Get accessibleToUsers
   * @return accessibleToUsers
  */
  
  @Schema(name = "accessibleToUsers", example = "[]", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public List getAccessibleToUsers() {
    return accessibleToUsers;
  }

  public void setAccessibleToUsers(List accessibleToUsers) {
    this.accessibleToUsers = accessibleToUsers;
  }

  public WorkflowCreatedOrUpdatedEvent accessibleToGroups(List accessibleToGroups) {
    this.accessibleToGroups = accessibleToGroups;
    return this;
  }

  public WorkflowCreatedOrUpdatedEvent addAccessibleToGroupsItem(String accessibleToGroupsItem) {
    if (this.accessibleToGroups == null) {
      this.accessibleToGroups = new ArrayList<>();
    }
    this.accessibleToGroups.add(accessibleToGroupsItem);
    return this;
  }

  /**
   * Get accessibleToGroups
   * @return accessibleToGroups
  */
  
  @Schema(name = "accessibleToGroups", example = "[\"drivers\"]", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public List getAccessibleToGroups() {
    return accessibleToGroups;
  }

  public void setAccessibleToGroups(List accessibleToGroups) {
    this.accessibleToGroups = accessibleToGroups;
  }

  public WorkflowCreatedOrUpdatedEvent details(Map details) {
    this.details = details;
    return this;
  }

  public WorkflowCreatedOrUpdatedEvent putDetailsItem(String key, Object detailsItem) {
    if (this.details == null) {
      this.details = new HashMap<>();
    }
    this.details.put(key, detailsItem);
    return this;
  }

  /**
   * Properties for individual searches
   * @return details
  */
  
  @Schema(name = "details", example = "{ \"ride-request\": \"4711\" }", description = "Properties for individual searches", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public Map getDetails() {
    return details;
  }

  public void setDetails(Map details) {
    this.details = details;
  }

  public WorkflowCreatedOrUpdatedEvent detailsFulltextSearch(String detailsFulltextSearch) {
    this.detailsFulltextSearch = detailsFulltextSearch;
    return this;
  }

  /**
   * List of words for fulltext searching details
   * @return detailsFulltextSearch
  */
  
  @Schema(name = "detailsFulltextSearch", description = "List of words for fulltext searching details", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  public String getDetailsFulltextSearch() {
    return detailsFulltextSearch;
  }

  public void setDetailsFulltextSearch(String detailsFulltextSearch) {
    this.detailsFulltextSearch = detailsFulltextSearch;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    WorkflowCreatedOrUpdatedEvent workflowCreatedOrUpdatedEvent = (WorkflowCreatedOrUpdatedEvent) o;
    return Objects.equals(this.id, workflowCreatedOrUpdatedEvent.id) &&
        Objects.equals(this.updated, workflowCreatedOrUpdatedEvent.updated) &&
        Objects.equals(this.workflowId, workflowCreatedOrUpdatedEvent.workflowId) &&
        Objects.equals(this.businessId, workflowCreatedOrUpdatedEvent.businessId) &&
        Objects.equals(this.initiator, workflowCreatedOrUpdatedEvent.initiator) &&
        Objects.equals(this.timestamp, workflowCreatedOrUpdatedEvent.timestamp) &&
        Objects.equals(this.source, workflowCreatedOrUpdatedEvent.source) &&
        Objects.equals(this.workflowModuleId, workflowCreatedOrUpdatedEvent.workflowModuleId) &&
        Objects.equals(this.title, workflowCreatedOrUpdatedEvent.title) &&
        Objects.equals(this.comment, workflowCreatedOrUpdatedEvent.comment) &&
        Objects.equals(this.bpmnProcessId, workflowCreatedOrUpdatedEvent.bpmnProcessId) &&
        Objects.equals(this.bpmnProcessVersion, workflowCreatedOrUpdatedEvent.bpmnProcessVersion) &&
        Objects.equals(this.uiUriPath, workflowCreatedOrUpdatedEvent.uiUriPath) &&
        Objects.equals(this.uiUriType, workflowCreatedOrUpdatedEvent.uiUriType) &&
        Objects.equals(this.accessibleToUsers, workflowCreatedOrUpdatedEvent.accessibleToUsers) &&
        Objects.equals(this.accessibleToGroups, workflowCreatedOrUpdatedEvent.accessibleToGroups) &&
        Objects.equals(this.details, workflowCreatedOrUpdatedEvent.details) &&
        Objects.equals(this.detailsFulltextSearch, workflowCreatedOrUpdatedEvent.detailsFulltextSearch);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, updated, workflowId, businessId, initiator, timestamp, source, workflowModuleId, title, comment, bpmnProcessId, bpmnProcessVersion, uiUriPath, uiUriType, accessibleToUsers, accessibleToGroups, details, detailsFulltextSearch);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class WorkflowCreatedOrUpdatedEvent {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    updated: ").append(toIndentedString(updated)).append("\n");
    sb.append("    workflowId: ").append(toIndentedString(workflowId)).append("\n");
    sb.append("    businessId: ").append(toIndentedString(businessId)).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("    workflowModuleId: ").append(toIndentedString(workflowModuleId)).append("\n");
    sb.append("    title: ").append(toIndentedString(title)).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("    uiUriPath: ").append(toIndentedString(uiUriPath)).append("\n");
    sb.append("    uiUriType: ").append(toIndentedString(uiUriType)).append("\n");
    sb.append("    accessibleToUsers: ").append(toIndentedString(accessibleToUsers)).append("\n");
    sb.append("    accessibleToGroups: ").append(toIndentedString(accessibleToGroups)).append("\n");
    sb.append("    details: ").append(toIndentedString(details)).append("\n");
    sb.append("    detailsFulltextSearch: ").append(toIndentedString(detailsFulltextSearch)).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 - 2025 Weber Informatics LLC | Privacy Policy