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

org.finra.herd.sdk.model.Job 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 java.util.ArrayList;
import java.util.List;
import org.finra.herd.sdk.model.Parameter;
import org.finra.herd.sdk.model.WorkflowError;
import org.finra.herd.sdk.model.WorkflowStep;
import org.joda.time.DateTime;

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

  /**
   * The status of the job. One of the following values: RUNNING, SUSPENDED, 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("namespace")
  private String namespace = null;

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

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

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

  @JsonProperty("currentWorkflowStep")
  private WorkflowStep currentWorkflowStep = null;

  @JsonProperty("completedWorkflowSteps")
  private List completedWorkflowSteps = null;

  @JsonProperty("parameters")
  private List parameters = null;

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

  @JsonProperty("workflowErrors")
  private List workflowErrors = null;

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

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

   /**
   * The internal identifier that uniquely references a job
   * @return id
  **/
  @ApiModelProperty(required = true, value = "The internal identifier that uniquely references a job")
  public String getId() {
    return id;
  }

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

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

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

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

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

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

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

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

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

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

  public Job 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 Job currentWorkflowStep(WorkflowStep currentWorkflowStep) {
    this.currentWorkflowStep = currentWorkflowStep;
    return this;
  }

   /**
   * Get currentWorkflowStep
   * @return currentWorkflowStep
  **/
  @ApiModelProperty(value = "")
  public WorkflowStep getCurrentWorkflowStep() {
    return currentWorkflowStep;
  }

  public void setCurrentWorkflowStep(WorkflowStep currentWorkflowStep) {
    this.currentWorkflowStep = currentWorkflowStep;
  }

  public Job completedWorkflowSteps(List completedWorkflowSteps) {
    this.completedWorkflowSteps = completedWorkflowSteps;
    return this;
  }

  public Job addCompletedWorkflowStepsItem(WorkflowStep completedWorkflowStepsItem) {
    if (this.completedWorkflowSteps == null) {
      this.completedWorkflowSteps = new ArrayList();
    }
    this.completedWorkflowSteps.add(completedWorkflowStepsItem);
    return this;
  }

   /**
   * The steps that have been completed. For a job in RUNNING state, steps up to the last Async task will be returned. For a job in                   COMPLETED state, all executed steps will be returned                
   * @return completedWorkflowSteps
  **/
  @ApiModelProperty(value = "The steps that have been completed. For a job in RUNNING state, steps up to the last Async task will be returned. For a job in                   COMPLETED state, all executed steps will be returned                ")
  public List getCompletedWorkflowSteps() {
    return completedWorkflowSteps;
  }

  public void setCompletedWorkflowSteps(List completedWorkflowSteps) {
    this.completedWorkflowSteps = completedWorkflowSteps;
  }

  public Job parameters(List parameters) {
    this.parameters = parameters;
    return this;
  }

  public Job addParametersItem(Parameter parametersItem) {
    if (this.parameters == null) {
      this.parameters = new ArrayList();
    }
    this.parameters.add(parametersItem);
    return this;
  }

   /**
   * Current workflow variables and values
   * @return parameters
  **/
  @ApiModelProperty(value = "Current workflow variables and values")
  public List getParameters() {
    return parameters;
  }

  public void setParameters(List parameters) {
    this.parameters = parameters;
  }

  public Job activitiJobXml(String activitiJobXml) {
    this.activitiJobXml = activitiJobXml;
    return this;
  }

   /**
   * Activiti workflow XML related to the job
   * @return activitiJobXml
  **/
  @ApiModelProperty(value = "Activiti workflow XML related to the job")
  public String getActivitiJobXml() {
    return activitiJobXml;
  }

  public void setActivitiJobXml(String activitiJobXml) {
    this.activitiJobXml = activitiJobXml;
  }

  public Job workflowErrors(List workflowErrors) {
    this.workflowErrors = workflowErrors;
    return this;
  }

  public Job addWorkflowErrorsItem(WorkflowError workflowErrorsItem) {
    if (this.workflowErrors == null) {
      this.workflowErrors = new ArrayList();
    }
    this.workflowErrors.add(workflowErrorsItem);
    return this;
  }

   /**
   * The workflow errors
   * @return workflowErrors
  **/
  @ApiModelProperty(value = "The workflow errors")
  public List getWorkflowErrors() {
    return workflowErrors;
  }

  public void setWorkflowErrors(List workflowErrors) {
    this.workflowErrors = workflowErrors;
  }

  public Job deleteReason(String deleteReason) {
    this.deleteReason = deleteReason;
    return this;
  }

   /**
   * A reason this job has been deleted. It is returned if the job has been deleted
   * @return deleteReason
  **/
  @ApiModelProperty(value = "A reason this job has been deleted. It is returned if the job has been deleted")
  public String getDeleteReason() {
    return deleteReason;
  }

  public void setDeleteReason(String deleteReason) {
    this.deleteReason = deleteReason;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Job job = (Job) o;
    return Objects.equals(this.id, job.id) &&
        Objects.equals(this.status, job.status) &&
        Objects.equals(this.namespace, job.namespace) &&
        Objects.equals(this.jobName, job.jobName) &&
        Objects.equals(this.startTime, job.startTime) &&
        Objects.equals(this.endTime, job.endTime) &&
        Objects.equals(this.currentWorkflowStep, job.currentWorkflowStep) &&
        Objects.equals(this.completedWorkflowSteps, job.completedWorkflowSteps) &&
        Objects.equals(this.parameters, job.parameters) &&
        Objects.equals(this.activitiJobXml, job.activitiJobXml) &&
        Objects.equals(this.workflowErrors, job.workflowErrors) &&
        Objects.equals(this.deleteReason, job.deleteReason);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, status, namespace, jobName, startTime, endTime, currentWorkflowStep, completedWorkflowSteps, parameters, activitiJobXml, workflowErrors, deleteReason);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Job {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).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("    currentWorkflowStep: ").append(toIndentedString(currentWorkflowStep)).append("\n");
    sb.append("    completedWorkflowSteps: ").append(toIndentedString(completedWorkflowSteps)).append("\n");
    sb.append("    parameters: ").append(toIndentedString(parameters)).append("\n");
    sb.append("    activitiJobXml: ").append(toIndentedString(activitiJobXml)).append("\n");
    sb.append("    workflowErrors: ").append(toIndentedString(workflowErrors)).append("\n");
    sb.append("    deleteReason: ").append(toIndentedString(deleteReason)).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