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

de.gematik.test.tiger.testenvmgr.api.model.TestExecutionInformationDto Maven / Gradle / Ivy

/*
 *
 * Copyright 2024 gematik GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package de.gematik.test.tiger.testenvmgr.api.model;

import java.net.URI;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import de.gematik.test.tiger.testenvmgr.api.model.TestDescriptionDto;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.time.OffsetDateTime;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;


import java.util.*;
import jakarta.annotation.Generated;

/**
 * information of which tests were started and where to find the results of the test run
 */

@Schema(name = "TestExecutionInformation", description = "information of which tests were started and where to find the results of the test run")
@JsonTypeName("TestExecutionInformation")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-09T12:14:31.265242911+01:00[Europe/Berlin]", comments = "Generator version: 7.10.0")
public class TestExecutionInformationDto {

  private UUID testRunId;

  private URI resultUrl;

  @Valid
  private List<@Valid TestDescriptionDto> testsToExecute = new ArrayList<>();

  public TestExecutionInformationDto testRunId(UUID testRunId) {
    this.testRunId = testRunId;
    return this;
  }

  /**
   * Get testRunId
   * @return testRunId
   */
  @Valid 
  @Schema(name = "testRunId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  @JsonProperty("testRunId")
  public UUID getTestRunId() {
    return testRunId;
  }

  public void setTestRunId(UUID testRunId) {
    this.testRunId = testRunId;
  }

  public TestExecutionInformationDto resultUrl(URI resultUrl) {
    this.resultUrl = resultUrl;
    return this;
  }

  /**
   * Get resultUrl
   * @return resultUrl
   */
  @Valid 
  @Schema(name = "resultUrl", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  @JsonProperty("resultUrl")
  public URI getResultUrl() {
    return resultUrl;
  }

  public void setResultUrl(URI resultUrl) {
    this.resultUrl = resultUrl;
  }

  public TestExecutionInformationDto testsToExecute(List<@Valid TestDescriptionDto> testsToExecute) {
    this.testsToExecute = testsToExecute;
    return this;
  }

  public TestExecutionInformationDto addTestsToExecuteItem(TestDescriptionDto testsToExecuteItem) {
    if (this.testsToExecute == null) {
      this.testsToExecute = new ArrayList<>();
    }
    this.testsToExecute.add(testsToExecuteItem);
    return this;
  }

  /**
   * Get testsToExecute
   * @return testsToExecute
   */
  @Valid 
  @Schema(name = "testsToExecute", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
  @JsonProperty("testsToExecute")
  public List<@Valid TestDescriptionDto> getTestsToExecute() {
    return testsToExecute;
  }

  public void setTestsToExecute(List<@Valid TestDescriptionDto> testsToExecute) {
    this.testsToExecute = testsToExecute;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TestExecutionInformationDto testExecutionInformation = (TestExecutionInformationDto) o;
    return Objects.equals(this.testRunId, testExecutionInformation.testRunId) &&
        Objects.equals(this.resultUrl, testExecutionInformation.resultUrl) &&
        Objects.equals(this.testsToExecute, testExecutionInformation.testsToExecute);
  }

  @Override
  public int hashCode() {
    return Objects.hash(testRunId, resultUrl, testsToExecute);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TestExecutionInformationDto {\n");
    sb.append("    testRunId: ").append(toIndentedString(testRunId)).append("\n");
    sb.append("    resultUrl: ").append(toIndentedString(resultUrl)).append("\n");
    sb.append("    testsToExecute: ").append(toIndentedString(testsToExecute)).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 - 2025 Weber Informatics LLC | Privacy Policy