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

com.katalon.testops.api.model.TestCaseResource Maven / Gradle / Ivy

/*
 * Katalon TestOps API reference
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.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.katalon.testops.api.model;

import java.util.Objects;
import java.util.Arrays;
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 com.katalon.testops.api.model.ExecutionTestCaseResource;
import com.katalon.testops.api.model.ExecutionTestResultResource;
import com.katalon.testops.api.model.ExternalIssueResource;
import com.katalon.testops.api.model.ProjectResource;
import com.katalon.testops.api.model.TestCasePlatformStatisticsResource;
import com.katalon.testops.api.model.UserResource;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
 * TestCaseResource
 */
@JsonPropertyOrder({
  TestCaseResource.JSON_PROPERTY_ID,
  TestCaseResource.JSON_PROPERTY_NAME,
  TestCaseResource.JSON_PROPERTY_PATH,
  TestCaseResource.JSON_PROPERTY_PREVIOUS_STATUS,
  TestCaseResource.JSON_PROPERTY_ALIAS,
  TestCaseResource.JSON_PROPERTY_TEST_MODULE_ID,
  TestCaseResource.JSON_PROPERTY_WEB_URL,
  TestCaseResource.JSON_PROPERTY_DESCRIPTION,
  TestCaseResource.JSON_PROPERTY_PROJECT,
  TestCaseResource.JSON_PROPERTY_LAST_EXECUTION_TEST_CASE,
  TestCaseResource.JSON_PROPERTY_EXTERNAL_ISSUES,
  TestCaseResource.JSON_PROPERTY_TYPE,
  TestCaseResource.JSON_PROPERTY_AVERAGE_DURATION,
  TestCaseResource.JSON_PROPERTY_MAX_DURATION,
  TestCaseResource.JSON_PROPERTY_MIN_DURATION,
  TestCaseResource.JSON_PROPERTY_EXECUTION_TEST_RESULTS,
  TestCaseResource.JSON_PROPERTY_FLAKINESS,
  TestCaseResource.JSON_PROPERTY_PLATFORM_STATISTICS,
  TestCaseResource.JSON_PROPERTY_MAINTAINER,
  TestCaseResource.JSON_PROPERTY_URL_ID
})
@JsonTypeName("TestCaseResource")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class TestCaseResource implements Serializable {
  private static final long serialVersionUID = 1L;

  public static final String JSON_PROPERTY_ID = "id";
  private Long id;

  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  public static final String JSON_PROPERTY_PATH = "path";
  private String path;

  /**
   * Gets or Sets previousStatus
   */
  public enum PreviousStatusEnum {
    PASSED("PASSED"),
    
    FAILED("FAILED"),
    
    ERROR("ERROR"),
    
    INCOMPLETE("INCOMPLETE"),
    
    RUNNING("RUNNING"),
    
    SKIPPED("SKIPPED"),
    
    NOT_RUN("NOT_RUN");

    private String value;

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

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

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

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

  public static final String JSON_PROPERTY_PREVIOUS_STATUS = "previousStatus";
  private PreviousStatusEnum previousStatus;

  public static final String JSON_PROPERTY_ALIAS = "alias";
  private String alias;

  public static final String JSON_PROPERTY_TEST_MODULE_ID = "testModuleId";
  private Long testModuleId;

  public static final String JSON_PROPERTY_WEB_URL = "webUrl";
  private String webUrl;

  public static final String JSON_PROPERTY_DESCRIPTION = "description";
  private String description;

  public static final String JSON_PROPERTY_PROJECT = "project";
  private ProjectResource project;

  public static final String JSON_PROPERTY_LAST_EXECUTION_TEST_CASE = "lastExecutionTestCase";
  private ExecutionTestCaseResource lastExecutionTestCase;

  public static final String JSON_PROPERTY_EXTERNAL_ISSUES = "externalIssues";
  private List externalIssues = null;

  /**
   * Gets or Sets type
   */
  public enum TypeEnum {
    TEST_CASE("TEST_CASE"),
    
    SCENARIO("SCENARIO");

    private String value;

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

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

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

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

  public static final String JSON_PROPERTY_TYPE = "type";
  private TypeEnum type;

  public static final String JSON_PROPERTY_AVERAGE_DURATION = "averageDuration";
  private Double averageDuration;

  public static final String JSON_PROPERTY_MAX_DURATION = "maxDuration";
  private Long maxDuration;

  public static final String JSON_PROPERTY_MIN_DURATION = "minDuration";
  private Long minDuration;

  public static final String JSON_PROPERTY_EXECUTION_TEST_RESULTS = "executionTestResults";
  private List executionTestResults = null;

  public static final String JSON_PROPERTY_FLAKINESS = "flakiness";
  private Double flakiness;

  public static final String JSON_PROPERTY_PLATFORM_STATISTICS = "platformStatistics";
  private Map platformStatistics = null;

  public static final String JSON_PROPERTY_MAINTAINER = "maintainer";
  private UserResource maintainer;

  public static final String JSON_PROPERTY_URL_ID = "urlId";
  private String urlId;


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

   /**
   * Get id
   * @return id
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Long getId() {
    return id;
  }


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


  public TestCaseResource name(String name) {
    
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getName() {
    return name;
  }


  public void setName(String name) {
    this.name = name;
  }


  public TestCaseResource path(String path) {
    
    this.path = path;
    return this;
  }

   /**
   * Get path
   * @return path
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_PATH)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getPath() {
    return path;
  }


  public void setPath(String path) {
    this.path = path;
  }


  public TestCaseResource previousStatus(PreviousStatusEnum previousStatus) {
    
    this.previousStatus = previousStatus;
    return this;
  }

   /**
   * Get previousStatus
   * @return previousStatus
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_PREVIOUS_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public PreviousStatusEnum getPreviousStatus() {
    return previousStatus;
  }


  public void setPreviousStatus(PreviousStatusEnum previousStatus) {
    this.previousStatus = previousStatus;
  }


  public TestCaseResource alias(String alias) {
    
    this.alias = alias;
    return this;
  }

   /**
   * Get alias
   * @return alias
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_ALIAS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getAlias() {
    return alias;
  }


  public void setAlias(String alias) {
    this.alias = alias;
  }


  public TestCaseResource testModuleId(Long testModuleId) {
    
    this.testModuleId = testModuleId;
    return this;
  }

   /**
   * Get testModuleId
   * @return testModuleId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_TEST_MODULE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Long getTestModuleId() {
    return testModuleId;
  }


  public void setTestModuleId(Long testModuleId) {
    this.testModuleId = testModuleId;
  }


  public TestCaseResource webUrl(String webUrl) {
    
    this.webUrl = webUrl;
    return this;
  }

   /**
   * Get webUrl
   * @return webUrl
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_WEB_URL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getWebUrl() {
    return webUrl;
  }


  public void setWebUrl(String webUrl) {
    this.webUrl = webUrl;
  }


  public TestCaseResource description(String description) {
    
    this.description = description;
    return this;
  }

   /**
   * Get description
   * @return description
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getDescription() {
    return description;
  }


  public void setDescription(String description) {
    this.description = description;
  }


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

   /**
   * Get project
   * @return project
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_PROJECT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public ProjectResource getProject() {
    return project;
  }


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


  public TestCaseResource lastExecutionTestCase(ExecutionTestCaseResource lastExecutionTestCase) {
    
    this.lastExecutionTestCase = lastExecutionTestCase;
    return this;
  }

   /**
   * Get lastExecutionTestCase
   * @return lastExecutionTestCase
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_LAST_EXECUTION_TEST_CASE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public ExecutionTestCaseResource getLastExecutionTestCase() {
    return lastExecutionTestCase;
  }


  public void setLastExecutionTestCase(ExecutionTestCaseResource lastExecutionTestCase) {
    this.lastExecutionTestCase = lastExecutionTestCase;
  }


  public TestCaseResource externalIssues(List externalIssues) {
    
    this.externalIssues = externalIssues;
    return this;
  }

  public TestCaseResource addExternalIssuesItem(ExternalIssueResource externalIssuesItem) {
    if (this.externalIssues == null) {
      this.externalIssues = new ArrayList<>();
    }
    this.externalIssues.add(externalIssuesItem);
    return this;
  }

   /**
   * Get externalIssues
   * @return externalIssues
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_EXTERNAL_ISSUES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List getExternalIssues() {
    return externalIssues;
  }


  public void setExternalIssues(List externalIssues) {
    this.externalIssues = externalIssues;
  }


  public TestCaseResource type(TypeEnum type) {
    
    this.type = type;
    return this;
  }

   /**
   * Get type
   * @return type
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public TypeEnum getType() {
    return type;
  }


  public void setType(TypeEnum type) {
    this.type = type;
  }


  public TestCaseResource averageDuration(Double averageDuration) {
    
    this.averageDuration = averageDuration;
    return this;
  }

   /**
   * Get averageDuration
   * @return averageDuration
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_AVERAGE_DURATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getAverageDuration() {
    return averageDuration;
  }


  public void setAverageDuration(Double averageDuration) {
    this.averageDuration = averageDuration;
  }


  public TestCaseResource maxDuration(Long maxDuration) {
    
    this.maxDuration = maxDuration;
    return this;
  }

   /**
   * Get maxDuration
   * @return maxDuration
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_MAX_DURATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Long getMaxDuration() {
    return maxDuration;
  }


  public void setMaxDuration(Long maxDuration) {
    this.maxDuration = maxDuration;
  }


  public TestCaseResource minDuration(Long minDuration) {
    
    this.minDuration = minDuration;
    return this;
  }

   /**
   * Get minDuration
   * @return minDuration
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_MIN_DURATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Long getMinDuration() {
    return minDuration;
  }


  public void setMinDuration(Long minDuration) {
    this.minDuration = minDuration;
  }


  public TestCaseResource executionTestResults(List executionTestResults) {
    
    this.executionTestResults = executionTestResults;
    return this;
  }

  public TestCaseResource addExecutionTestResultsItem(ExecutionTestResultResource executionTestResultsItem) {
    if (this.executionTestResults == null) {
      this.executionTestResults = new ArrayList<>();
    }
    this.executionTestResults.add(executionTestResultsItem);
    return this;
  }

   /**
   * Get executionTestResults
   * @return executionTestResults
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_EXECUTION_TEST_RESULTS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List getExecutionTestResults() {
    return executionTestResults;
  }


  public void setExecutionTestResults(List executionTestResults) {
    this.executionTestResults = executionTestResults;
  }


  public TestCaseResource flakiness(Double flakiness) {
    
    this.flakiness = flakiness;
    return this;
  }

   /**
   * Get flakiness
   * @return flakiness
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_FLAKINESS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getFlakiness() {
    return flakiness;
  }


  public void setFlakiness(Double flakiness) {
    this.flakiness = flakiness;
  }


  public TestCaseResource platformStatistics(Map platformStatistics) {
    
    this.platformStatistics = platformStatistics;
    return this;
  }

  public TestCaseResource putPlatformStatisticsItem(String key, TestCasePlatformStatisticsResource platformStatisticsItem) {
    if (this.platformStatistics == null) {
      this.platformStatistics = new HashMap<>();
    }
    this.platformStatistics.put(key, platformStatisticsItem);
    return this;
  }

   /**
   * Get platformStatistics
   * @return platformStatistics
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_PLATFORM_STATISTICS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Map getPlatformStatistics() {
    return platformStatistics;
  }


  public void setPlatformStatistics(Map platformStatistics) {
    this.platformStatistics = platformStatistics;
  }


  public TestCaseResource maintainer(UserResource maintainer) {
    
    this.maintainer = maintainer;
    return this;
  }

   /**
   * Get maintainer
   * @return maintainer
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_MAINTAINER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public UserResource getMaintainer() {
    return maintainer;
  }


  public void setMaintainer(UserResource maintainer) {
    this.maintainer = maintainer;
  }


  public TestCaseResource urlId(String urlId) {
    
    this.urlId = urlId;
    return this;
  }

   /**
   * Get urlId
   * @return urlId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_URL_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getUrlId() {
    return urlId;
  }


  public void setUrlId(String urlId) {
    this.urlId = urlId;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TestCaseResource testCaseResource = (TestCaseResource) o;
    return Objects.equals(this.id, testCaseResource.id) &&
        Objects.equals(this.name, testCaseResource.name) &&
        Objects.equals(this.path, testCaseResource.path) &&
        Objects.equals(this.previousStatus, testCaseResource.previousStatus) &&
        Objects.equals(this.alias, testCaseResource.alias) &&
        Objects.equals(this.testModuleId, testCaseResource.testModuleId) &&
        Objects.equals(this.webUrl, testCaseResource.webUrl) &&
        Objects.equals(this.description, testCaseResource.description) &&
        Objects.equals(this.project, testCaseResource.project) &&
        Objects.equals(this.lastExecutionTestCase, testCaseResource.lastExecutionTestCase) &&
        Objects.equals(this.externalIssues, testCaseResource.externalIssues) &&
        Objects.equals(this.type, testCaseResource.type) &&
        Objects.equals(this.averageDuration, testCaseResource.averageDuration) &&
        Objects.equals(this.maxDuration, testCaseResource.maxDuration) &&
        Objects.equals(this.minDuration, testCaseResource.minDuration) &&
        Objects.equals(this.executionTestResults, testCaseResource.executionTestResults) &&
        Objects.equals(this.flakiness, testCaseResource.flakiness) &&
        Objects.equals(this.platformStatistics, testCaseResource.platformStatistics) &&
        Objects.equals(this.maintainer, testCaseResource.maintainer) &&
        Objects.equals(this.urlId, testCaseResource.urlId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, path, previousStatus, alias, testModuleId, webUrl, description, project, lastExecutionTestCase, externalIssues, type, averageDuration, maxDuration, minDuration, executionTestResults, flakiness, platformStatistics, maintainer, urlId);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TestCaseResource {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    path: ").append(toIndentedString(path)).append("\n");
    sb.append("    previousStatus: ").append(toIndentedString(previousStatus)).append("\n");
    sb.append("    alias: ").append(toIndentedString(alias)).append("\n");
    sb.append("    testModuleId: ").append(toIndentedString(testModuleId)).append("\n");
    sb.append("    webUrl: ").append(toIndentedString(webUrl)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    project: ").append(toIndentedString(project)).append("\n");
    sb.append("    lastExecutionTestCase: ").append(toIndentedString(lastExecutionTestCase)).append("\n");
    sb.append("    externalIssues: ").append(toIndentedString(externalIssues)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    averageDuration: ").append(toIndentedString(averageDuration)).append("\n");
    sb.append("    maxDuration: ").append(toIndentedString(maxDuration)).append("\n");
    sb.append("    minDuration: ").append(toIndentedString(minDuration)).append("\n");
    sb.append("    executionTestResults: ").append(toIndentedString(executionTestResults)).append("\n");
    sb.append("    flakiness: ").append(toIndentedString(flakiness)).append("\n");
    sb.append("    platformStatistics: ").append(toIndentedString(platformStatistics)).append("\n");
    sb.append("    maintainer: ").append(toIndentedString(maintainer)).append("\n");
    sb.append("    urlId: ").append(toIndentedString(urlId)).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