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

org.finra.herd.sdk.model.JobSummary Maven / Gradle / Ivy

There is a newer version: 0.160.0
Show newest version
/*
 * herd-external
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * OpenAPI spec version: 0.125.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 org.finra.herd.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.joda.time.DateTime;

/**
 * JobSummary
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-07-16T17:44:47.669-04:00[America/New_York]")
public class JobSummary {
  @JsonProperty("id")
  private String id = null;

  @JsonProperty("namespace")
  private String namespace = null;

  @JsonProperty("jobName")
  private String jobName = null;

  @JsonProperty("startTime")
  private DateTime startTime = null;

  @JsonProperty("endTime")
  private DateTime endTime = null;

  /**
   * The status of the job. One of the following values: RUNNING, COMPLETED
   */
  public enum StatusEnum {
    RUNNING("RUNNING"),
    
    SUSPENDED("SUSPENDED"),
    
    COMPLETED("COMPLETED");

    private String value;

    StatusEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static StatusEnum fromValue(String text) {
      for (StatusEnum b : StatusEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + text + "'");
    }
  }

  @JsonProperty("status")
  private StatusEnum status = null;

  @JsonProperty("totalExceptions")
  private Long totalExceptions = null;

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

   /**
   * The job id that uniquely identifies the previously submitted job
   * @return id
  **/
  @ApiModelProperty(required = true, value = "The job id that uniquely identifies the previously submitted job")
  public String getId() {
    return id;
  }

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

  public JobSummary namespace(String namespace) {
    this.namespace = namespace;
    return this;
  }

   /**
   * The namespace of the job
   * @return namespace
  **/
  @ApiModelProperty(value = "The namespace of the job")
  public String getNamespace() {
    return namespace;
  }

  public void setNamespace(String namespace) {
    this.namespace = namespace;
  }

  public JobSummary jobName(String jobName) {
    this.jobName = jobName;
    return this;
  }

   /**
   * The name of the job
   * @return jobName
  **/
  @ApiModelProperty(required = true, value = "The name of the job")
  public String getJobName() {
    return jobName;
  }

  public void setJobName(String jobName) {
    this.jobName = jobName;
  }

  public JobSummary startTime(DateTime startTime) {
    this.startTime = startTime;
    return this;
  }

   /**
   * The start time of the job
   * @return startTime
  **/
  @ApiModelProperty(required = true, value = "The start time of the job")
  public DateTime getStartTime() {
    return startTime;
  }

  public void setStartTime(DateTime startTime) {
    this.startTime = startTime;
  }

  public JobSummary endTime(DateTime endTime) {
    this.endTime = endTime;
    return this;
  }

   /**
   * The end time of the job. It is not returned for a job in RUNNING state
   * @return endTime
  **/
  @ApiModelProperty(value = "The end time of the job. It is not returned for a job in RUNNING state")
  public DateTime getEndTime() {
    return endTime;
  }

  public void setEndTime(DateTime endTime) {
    this.endTime = endTime;
  }

  public JobSummary status(StatusEnum status) {
    this.status = status;
    return this;
  }

   /**
   * The status of the job. One of the following values: RUNNING, COMPLETED
   * @return status
  **/
  @ApiModelProperty(value = "The status of the job. One of the following values: RUNNING, COMPLETED")
  public StatusEnum getStatus() {
    return status;
  }

  public void setStatus(StatusEnum status) {
    this.status = status;
  }

  public JobSummary totalExceptions(Long totalExceptions) {
    this.totalExceptions = totalExceptions;
    return this;
  }

   /**
   * The number of exceptions
   * @return totalExceptions
  **/
  @ApiModelProperty(value = "The number of exceptions")
  public Long getTotalExceptions() {
    return totalExceptions;
  }

  public void setTotalExceptions(Long totalExceptions) {
    this.totalExceptions = totalExceptions;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    JobSummary jobSummary = (JobSummary) o;
    return Objects.equals(this.id, jobSummary.id) &&
        Objects.equals(this.namespace, jobSummary.namespace) &&
        Objects.equals(this.jobName, jobSummary.jobName) &&
        Objects.equals(this.startTime, jobSummary.startTime) &&
        Objects.equals(this.endTime, jobSummary.endTime) &&
        Objects.equals(this.status, jobSummary.status) &&
        Objects.equals(this.totalExceptions, jobSummary.totalExceptions);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, namespace, jobName, startTime, endTime, status, totalExceptions);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class JobSummary {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    namespace: ").append(toIndentedString(namespace)).append("\n");
    sb.append("    jobName: ").append(toIndentedString(jobName)).append("\n");
    sb.append("    startTime: ").append(toIndentedString(startTime)).append("\n");
    sb.append("    endTime: ").append(toIndentedString(endTime)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    totalExceptions: ").append(toIndentedString(totalExceptions)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy