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

com.katalon.testops.model.JobResource Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
/*
 * Katalon TestOps API reference
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.katalon.testops.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 com.katalon.testops.model.AgentResource;
import com.katalon.testops.model.CircleCIAgentResource;
import com.katalon.testops.model.ExecutionResource;
import com.katalon.testops.model.K8SAgentResource;
import com.katalon.testops.model.ProjectResource;
import com.katalon.testops.model.RunConfigurationResource;
import com.katalon.testops.model.SchedulerResource;
import com.katalon.testops.model.TestProjectResource;
import com.katalon.testops.model.TriggerBuildParameter;
import com.katalon.testops.model.UserResource;
import io.swagger.v3.oas.annotations.media.Schema;
import org.threeten.bp.OffsetDateTime;
/**
 * JobResource
 */


public class JobResource {
  @JsonProperty("id")
  private Long id = null;

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

  /**
   * Gets or Sets status
   */
  public enum StatusEnum {
    QUEUED("QUEUED"),
    RUNNING("RUNNING"),
    FAILED("FAILED"),
    SUCCESS("SUCCESS"),
    CANCELED("CANCELED"),
    ERROR("ERROR"),
    WAIT_FOR_TRIGGER("WAIT_FOR_TRIGGER");

    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;
        }
      }
      return null;
    }

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

  @JsonProperty("queuedAt")
  private OffsetDateTime queuedAt = null;

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

  @JsonProperty("stopTime")
  private OffsetDateTime stopTime = null;

  @JsonProperty("testProject")
  private TestProjectResource testProject = null;

  @JsonProperty("execution")
  private ExecutionResource execution = null;

  @JsonProperty("agent")
  private AgentResource agent = null;

  @JsonProperty("k8sAgent")
  private K8SAgentResource k8sAgent = null;

  @JsonProperty("circleCiAgent")
  private CircleCIAgentResource circleCiAgent = null;

  @JsonProperty("runConfiguration")
  private RunConfigurationResource runConfiguration = null;

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

  @JsonProperty("parameter")
  private TriggerBuildParameter parameter = null;

  /**
   * Gets or Sets triggerBy
   */
  public enum TriggerByEnum {
    MANUAL("MANUAL"),
    SCHEDULE("SCHEDULE");

    private String value;

    TriggerByEnum(String value) {
      this.value = value;
    }
    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    @JsonCreator
    public static TriggerByEnum fromValue(String text) {
      for (TriggerByEnum b : TriggerByEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }

  }  @JsonProperty("triggerBy")
  private TriggerByEnum triggerBy = null;

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

  @JsonProperty("triggerAt")
  private OffsetDateTime triggerAt = null;

  @JsonProperty("user")
  private UserResource user = null;

  @JsonProperty("scheduler")
  private SchedulerResource scheduler = null;

  @JsonProperty("project")
  private ProjectResource project = null;

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

  /**
   * Gets or Sets nodeStatus
   */
  public enum NodeStatusEnum {
    PENDING_CANCELED("PENDING_CANCELED"),
    CANCELED("CANCELED");

    private String value;

    NodeStatusEnum(String value) {
      this.value = value;
    }
    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    @JsonCreator
    public static NodeStatusEnum fromValue(String text) {
      for (NodeStatusEnum b : NodeStatusEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }

  }  @JsonProperty("nodeStatus")
  private NodeStatusEnum nodeStatus = null;

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

  public JobResource id(Long id) {
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @Schema(description = "")
  public Long getId() {
    return id;
  }

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

  public JobResource buildNumber(Long buildNumber) {
    this.buildNumber = buildNumber;
    return this;
  }

   /**
   * Get buildNumber
   * @return buildNumber
  **/
  @Schema(description = "")
  public Long getBuildNumber() {
    return buildNumber;
  }

  public void setBuildNumber(Long buildNumber) {
    this.buildNumber = buildNumber;
  }

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

   /**
   * Get status
   * @return status
  **/
  @Schema(description = "")
  public StatusEnum getStatus() {
    return status;
  }

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

  public JobResource queuedAt(OffsetDateTime queuedAt) {
    this.queuedAt = queuedAt;
    return this;
  }

   /**
   * Get queuedAt
   * @return queuedAt
  **/
  @Schema(description = "")
  public OffsetDateTime getQueuedAt() {
    return queuedAt;
  }

  public void setQueuedAt(OffsetDateTime queuedAt) {
    this.queuedAt = queuedAt;
  }

  public JobResource startTime(OffsetDateTime startTime) {
    this.startTime = startTime;
    return this;
  }

   /**
   * Get startTime
   * @return startTime
  **/
  @Schema(description = "")
  public OffsetDateTime getStartTime() {
    return startTime;
  }

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

  public JobResource stopTime(OffsetDateTime stopTime) {
    this.stopTime = stopTime;
    return this;
  }

   /**
   * Get stopTime
   * @return stopTime
  **/
  @Schema(description = "")
  public OffsetDateTime getStopTime() {
    return stopTime;
  }

  public void setStopTime(OffsetDateTime stopTime) {
    this.stopTime = stopTime;
  }

  public JobResource testProject(TestProjectResource testProject) {
    this.testProject = testProject;
    return this;
  }

   /**
   * Get testProject
   * @return testProject
  **/
  @Schema(description = "")
  public TestProjectResource getTestProject() {
    return testProject;
  }

  public void setTestProject(TestProjectResource testProject) {
    this.testProject = testProject;
  }

  public JobResource execution(ExecutionResource execution) {
    this.execution = execution;
    return this;
  }

   /**
   * Get execution
   * @return execution
  **/
  @Schema(description = "")
  public ExecutionResource getExecution() {
    return execution;
  }

  public void setExecution(ExecutionResource execution) {
    this.execution = execution;
  }

  public JobResource agent(AgentResource agent) {
    this.agent = agent;
    return this;
  }

   /**
   * Get agent
   * @return agent
  **/
  @Schema(description = "")
  public AgentResource getAgent() {
    return agent;
  }

  public void setAgent(AgentResource agent) {
    this.agent = agent;
  }

  public JobResource k8sAgent(K8SAgentResource k8sAgent) {
    this.k8sAgent = k8sAgent;
    return this;
  }

   /**
   * Get k8sAgent
   * @return k8sAgent
  **/
  @Schema(description = "")
  public K8SAgentResource getK8sAgent() {
    return k8sAgent;
  }

  public void setK8sAgent(K8SAgentResource k8sAgent) {
    this.k8sAgent = k8sAgent;
  }

  public JobResource circleCiAgent(CircleCIAgentResource circleCiAgent) {
    this.circleCiAgent = circleCiAgent;
    return this;
  }

   /**
   * Get circleCiAgent
   * @return circleCiAgent
  **/
  @Schema(description = "")
  public CircleCIAgentResource getCircleCiAgent() {
    return circleCiAgent;
  }

  public void setCircleCiAgent(CircleCIAgentResource circleCiAgent) {
    this.circleCiAgent = circleCiAgent;
  }

  public JobResource runConfiguration(RunConfigurationResource runConfiguration) {
    this.runConfiguration = runConfiguration;
    return this;
  }

   /**
   * Get runConfiguration
   * @return runConfiguration
  **/
  @Schema(description = "")
  public RunConfigurationResource getRunConfiguration() {
    return runConfiguration;
  }

  public void setRunConfiguration(RunConfigurationResource runConfiguration) {
    this.runConfiguration = runConfiguration;
  }

  public JobResource order(Long order) {
    this.order = order;
    return this;
  }

   /**
   * Get order
   * @return order
  **/
  @Schema(description = "")
  public Long getOrder() {
    return order;
  }

  public void setOrder(Long order) {
    this.order = order;
  }

  public JobResource parameter(TriggerBuildParameter parameter) {
    this.parameter = parameter;
    return this;
  }

   /**
   * Get parameter
   * @return parameter
  **/
  @Schema(description = "")
  public TriggerBuildParameter getParameter() {
    return parameter;
  }

  public void setParameter(TriggerBuildParameter parameter) {
    this.parameter = parameter;
  }

  public JobResource triggerBy(TriggerByEnum triggerBy) {
    this.triggerBy = triggerBy;
    return this;
  }

   /**
   * Get triggerBy
   * @return triggerBy
  **/
  @Schema(description = "")
  public TriggerByEnum getTriggerBy() {
    return triggerBy;
  }

  public void setTriggerBy(TriggerByEnum triggerBy) {
    this.triggerBy = triggerBy;
  }

  public JobResource duration(Long duration) {
    this.duration = duration;
    return this;
  }

   /**
   * Get duration
   * @return duration
  **/
  @Schema(description = "")
  public Long getDuration() {
    return duration;
  }

  public void setDuration(Long duration) {
    this.duration = duration;
  }

  public JobResource triggerAt(OffsetDateTime triggerAt) {
    this.triggerAt = triggerAt;
    return this;
  }

   /**
   * Get triggerAt
   * @return triggerAt
  **/
  @Schema(description = "")
  public OffsetDateTime getTriggerAt() {
    return triggerAt;
  }

  public void setTriggerAt(OffsetDateTime triggerAt) {
    this.triggerAt = triggerAt;
  }

  public JobResource user(UserResource user) {
    this.user = user;
    return this;
  }

   /**
   * Get user
   * @return user
  **/
  @Schema(description = "")
  public UserResource getUser() {
    return user;
  }

  public void setUser(UserResource user) {
    this.user = user;
  }

  public JobResource scheduler(SchedulerResource scheduler) {
    this.scheduler = scheduler;
    return this;
  }

   /**
   * Get scheduler
   * @return scheduler
  **/
  @Schema(description = "")
  public SchedulerResource getScheduler() {
    return scheduler;
  }

  public void setScheduler(SchedulerResource scheduler) {
    this.scheduler = scheduler;
  }

  public JobResource project(ProjectResource project) {
    this.project = project;
    return this;
  }

   /**
   * Get project
   * @return project
  **/
  @Schema(description = "")
  public ProjectResource getProject() {
    return project;
  }

  public void setProject(ProjectResource project) {
    this.project = project;
  }

  public JobResource processId(Long processId) {
    this.processId = processId;
    return this;
  }

   /**
   * Get processId
   * @return processId
  **/
  @Schema(description = "")
  public Long getProcessId() {
    return processId;
  }

  public void setProcessId(Long processId) {
    this.processId = processId;
  }

  public JobResource nodeStatus(NodeStatusEnum nodeStatus) {
    this.nodeStatus = nodeStatus;
    return this;
  }

   /**
   * Get nodeStatus
   * @return nodeStatus
  **/
  @Schema(description = "")
  public NodeStatusEnum getNodeStatus() {
    return nodeStatus;
  }

  public void setNodeStatus(NodeStatusEnum nodeStatus) {
    this.nodeStatus = nodeStatus;
  }

  public JobResource runConfigurationId(Long runConfigurationId) {
    this.runConfigurationId = runConfigurationId;
    return this;
  }

   /**
   * Get runConfigurationId
   * @return runConfigurationId
  **/
  @Schema(description = "")
  public Long getRunConfigurationId() {
    return runConfigurationId;
  }

  public void setRunConfigurationId(Long runConfigurationId) {
    this.runConfigurationId = runConfigurationId;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    JobResource jobResource = (JobResource) o;
    return Objects.equals(this.id, jobResource.id) &&
        Objects.equals(this.buildNumber, jobResource.buildNumber) &&
        Objects.equals(this.status, jobResource.status) &&
        Objects.equals(this.queuedAt, jobResource.queuedAt) &&
        Objects.equals(this.startTime, jobResource.startTime) &&
        Objects.equals(this.stopTime, jobResource.stopTime) &&
        Objects.equals(this.testProject, jobResource.testProject) &&
        Objects.equals(this.execution, jobResource.execution) &&
        Objects.equals(this.agent, jobResource.agent) &&
        Objects.equals(this.k8sAgent, jobResource.k8sAgent) &&
        Objects.equals(this.circleCiAgent, jobResource.circleCiAgent) &&
        Objects.equals(this.runConfiguration, jobResource.runConfiguration) &&
        Objects.equals(this.order, jobResource.order) &&
        Objects.equals(this.parameter, jobResource.parameter) &&
        Objects.equals(this.triggerBy, jobResource.triggerBy) &&
        Objects.equals(this.duration, jobResource.duration) &&
        Objects.equals(this.triggerAt, jobResource.triggerAt) &&
        Objects.equals(this.user, jobResource.user) &&
        Objects.equals(this.scheduler, jobResource.scheduler) &&
        Objects.equals(this.project, jobResource.project) &&
        Objects.equals(this.processId, jobResource.processId) &&
        Objects.equals(this.nodeStatus, jobResource.nodeStatus) &&
        Objects.equals(this.runConfigurationId, jobResource.runConfigurationId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, buildNumber, status, queuedAt, startTime, stopTime, testProject, execution, agent, k8sAgent, circleCiAgent, runConfiguration, order, parameter, triggerBy, duration, triggerAt, user, scheduler, project, processId, nodeStatus, runConfigurationId);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class JobResource {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    buildNumber: ").append(toIndentedString(buildNumber)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    queuedAt: ").append(toIndentedString(queuedAt)).append("\n");
    sb.append("    startTime: ").append(toIndentedString(startTime)).append("\n");
    sb.append("    stopTime: ").append(toIndentedString(stopTime)).append("\n");
    sb.append("    testProject: ").append(toIndentedString(testProject)).append("\n");
    sb.append("    execution: ").append(toIndentedString(execution)).append("\n");
    sb.append("    agent: ").append(toIndentedString(agent)).append("\n");
    sb.append("    k8sAgent: ").append(toIndentedString(k8sAgent)).append("\n");
    sb.append("    circleCiAgent: ").append(toIndentedString(circleCiAgent)).append("\n");
    sb.append("    runConfiguration: ").append(toIndentedString(runConfiguration)).append("\n");
    sb.append("    order: ").append(toIndentedString(order)).append("\n");
    sb.append("    parameter: ").append(toIndentedString(parameter)).append("\n");
    sb.append("    triggerBy: ").append(toIndentedString(triggerBy)).append("\n");
    sb.append("    duration: ").append(toIndentedString(duration)).append("\n");
    sb.append("    triggerAt: ").append(toIndentedString(triggerAt)).append("\n");
    sb.append("    user: ").append(toIndentedString(user)).append("\n");
    sb.append("    scheduler: ").append(toIndentedString(scheduler)).append("\n");
    sb.append("    project: ").append(toIndentedString(project)).append("\n");
    sb.append("    processId: ").append(toIndentedString(processId)).append("\n");
    sb.append("    nodeStatus: ").append(toIndentedString(nodeStatus)).append("\n");
    sb.append("    runConfigurationId: ").append(toIndentedString(runConfigurationId)).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 - 2024 Weber Informatics LLC | Privacy Policy