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

com.katalon.testops.model.TestCaseResource 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.ExecutionTestCaseResource;
import com.katalon.testops.model.ExecutionTestResultResource;
import com.katalon.testops.model.ExternalIssueResource;
import com.katalon.testops.model.ProjectResource;
import com.katalon.testops.model.TestCasePlatformStatisticsResource;
import com.katalon.testops.model.TestResultAssertionResource;
import com.katalon.testops.model.UserResource;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * TestCaseResource
 */


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

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

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

  /**
   * 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 text) {
      for (PreviousStatusEnum b : PreviousStatusEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }

  }  @JsonProperty("previousStatus")
  private PreviousStatusEnum previousStatus = null;

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

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

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

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

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

  @JsonProperty("lastExecutionTestCase")
  private ExecutionTestCaseResource lastExecutionTestCase = null;

  @JsonProperty("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 text) {
      for (TypeEnum b : TypeEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }

  }  @JsonProperty("type")
  private TypeEnum type = null;

  @JsonProperty("averageDuration")
  private Double averageDuration = null;

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

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

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

  @JsonProperty("flakiness")
  private Double flakiness = null;

  @JsonProperty("platformStatistics")
  private Map platformStatistics = null;

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

  @JsonProperty("testResultAssertion")
  private TestResultAssertionResource testResultAssertion = null;

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

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

   /**
   * Get name
   * @return name
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  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
  **/
  @Schema(description = "")
  public UserResource getMaintainer() {
    return maintainer;
  }

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

  public TestCaseResource testResultAssertion(TestResultAssertionResource testResultAssertion) {
    this.testResultAssertion = testResultAssertion;
    return this;
  }

   /**
   * Get testResultAssertion
   * @return testResultAssertion
  **/
  @Schema(description = "")
  public TestResultAssertionResource getTestResultAssertion() {
    return testResultAssertion;
  }

  public void setTestResultAssertion(TestResultAssertionResource testResultAssertion) {
    this.testResultAssertion = testResultAssertion;
  }

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

   /**
   * Get urlId
   * @return urlId
  **/
  @Schema(description = "")
  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.testResultAssertion, testCaseResource.testResultAssertion) &&
        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, testResultAssertion, 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("    testResultAssertion: ").append(toIndentedString(testResultAssertion)).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