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

com.github.jobservice.client.model.Failure Maven / Gradle / Ivy

The newest version!
/*
 * Job Service
 * Allows background operations to be sent to the workers, and for the operations to be tracked and controlled.  You can check the progress of operations, and request to cancel, pause, or resume them.  The primary use of this functionality is batch document processing.  The service can send work to the Batch Worker, and then track the progress of that work. 
 *
 * 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 com.github.jobservice.client.model;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
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.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.github.jobservice.job.client.JSON;


/**
 * Failure
 */
@JsonPropertyOrder({
  Failure.JSON_PROPERTY_FAILURE_ID,
  Failure.JSON_PROPERTY_FAILURE_TIME,
  Failure.JSON_PROPERTY_FAILURE_SOURCE,
  Failure.JSON_PROPERTY_FAILURE_MESSAGE
})
@JsonTypeName("failure")
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-20T20:37:34.533041584Z[Etc/UTC]")
public class Failure {
  public static final String JSON_PROPERTY_FAILURE_ID = "failureId";
  private String failureId;

  public static final String JSON_PROPERTY_FAILURE_TIME = "failureTime";
  private Long failureTime;

  public static final String JSON_PROPERTY_FAILURE_SOURCE = "failureSource";
  private String failureSource;

  public static final String JSON_PROPERTY_FAILURE_MESSAGE = "failureMessage";
  private String failureMessage;

  public Failure() { 
  }

  public Failure failureId(String failureId) {
    this.failureId = failureId;
    return this;
  }

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

  public String getFailureId() {
    return failureId;
  }


  @JsonProperty(JSON_PROPERTY_FAILURE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFailureId(String failureId) {
    this.failureId = failureId;
  }


  public Failure failureTime(Long failureTime) {
    this.failureTime = failureTime;
    return this;
  }

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

  public Long getFailureTime() {
    return failureTime;
  }


  @JsonProperty(JSON_PROPERTY_FAILURE_TIME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFailureTime(Long failureTime) {
    this.failureTime = failureTime;
  }


  public Failure failureSource(String failureSource) {
    this.failureSource = failureSource;
    return this;
  }

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

  public String getFailureSource() {
    return failureSource;
  }


  @JsonProperty(JSON_PROPERTY_FAILURE_SOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFailureSource(String failureSource) {
    this.failureSource = failureSource;
  }


  public Failure failureMessage(String failureMessage) {
    this.failureMessage = failureMessage;
    return this;
  }

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

  public String getFailureMessage() {
    return failureMessage;
  }


  @JsonProperty(JSON_PROPERTY_FAILURE_MESSAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFailureMessage(String failureMessage) {
    this.failureMessage = failureMessage;
  }


  /**
   * Return true if this failure object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Failure failure = (Failure) o;
    return Objects.equals(this.failureId, failure.failureId) &&
        Objects.equals(this.failureTime, failure.failureTime) &&
        Objects.equals(this.failureSource, failure.failureSource) &&
        Objects.equals(this.failureMessage, failure.failureMessage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(failureId, failureTime, failureSource, failureMessage);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Failure {\n");
    sb.append("    failureId: ").append(toIndentedString(failureId)).append("\n");
    sb.append("    failureTime: ").append(toIndentedString(failureTime)).append("\n");
    sb.append("    failureSource: ").append(toIndentedString(failureSource)).append("\n");
    sb.append("    failureMessage: ").append(toIndentedString(failureMessage)).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