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

io.vanillabp.cockpit.bpms.api.v1.UserTaskActivatedEvent 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 java.time.OffsetDateTime;
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;

/**
 * UserTaskActivatedEvent
 */

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

  @JsonProperty("id")
  private String id;

  @JsonProperty("userTaskId")
  private String userTaskId;

  @JsonProperty("initiator")
  private String initiator;

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

  @JsonProperty("source")
  private String source;

  @JsonProperty("comment")
  private String comment;

  public UserTaskActivatedEvent 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 UserTaskActivatedEvent userTaskId(String userTaskId) {
    this.userTaskId = userTaskId;
    return this;
  }

  /**
   * user task id
   * @return userTaskId
  */
  @NotNull 
  @Schema(name = "userTaskId", example = "Has to be unique across all reporting systems", description = "user task id", requiredMode = Schema.RequiredMode.REQUIRED)
  public String getUserTaskId() {
    return userTaskId;
  }

  public void setUserTaskId(String userTaskId) {
    this.userTaskId = userTaskId;
  }

  public UserTaskActivatedEvent 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 UserTaskActivatedEvent 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 UserTaskActivatedEvent 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 UserTaskActivatedEvent 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;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UserTaskActivatedEvent userTaskActivatedEvent = (UserTaskActivatedEvent) o;
    return Objects.equals(this.id, userTaskActivatedEvent.id) &&
        Objects.equals(this.userTaskId, userTaskActivatedEvent.userTaskId) &&
        Objects.equals(this.initiator, userTaskActivatedEvent.initiator) &&
        Objects.equals(this.timestamp, userTaskActivatedEvent.timestamp) &&
        Objects.equals(this.source, userTaskActivatedEvent.source) &&
        Objects.equals(this.comment, userTaskActivatedEvent.comment);
  }

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UserTaskActivatedEvent {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    userTaskId: ").append(toIndentedString(userTaskId)).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("}");
    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