
de.gematik.test.tiger.testenvmgr.api.model.TestExecutionRequestDto 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 java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
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;
/**
* Request the execution of a subset of tests. Multiple specifications will be combined with AND. If one of the tags, sourceFiles, or testUniqueIds is an empty list, it will not be considered in the selection of tests. If all are empty, all tests are selected.
*/
@Schema(name = "TestExecutionRequest", description = "Request the execution of a subset of tests. Multiple specifications will be combined with AND. If one of the tags, sourceFiles, or testUniqueIds is an empty list, it will not be considered in the selection of tests. If all are empty, all tests are selected. ")
@JsonTypeName("TestExecutionRequest")
@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 TestExecutionRequestDto {
@Valid
private List tags = new ArrayList<>();
@Valid
private List sourceFiles = new ArrayList<>();
@Valid
private List testUniqueIds = new ArrayList<>();
public TestExecutionRequestDto tags(List tags) {
this.tags = tags;
return this;
}
public TestExecutionRequestDto addTagsItem(String tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(tagsItem);
return this;
}
/**
* Get tags
* @return tags
*/
@Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("tags")
public List getTags() {
return tags;
}
public void setTags(List tags) {
this.tags = tags;
}
public TestExecutionRequestDto sourceFiles(List sourceFiles) {
this.sourceFiles = sourceFiles;
return this;
}
public TestExecutionRequestDto addSourceFilesItem(String sourceFilesItem) {
if (this.sourceFiles == null) {
this.sourceFiles = new ArrayList<>();
}
this.sourceFiles.add(sourceFilesItem);
return this;
}
/**
* Get sourceFiles
* @return sourceFiles
*/
@Schema(name = "sourceFiles", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("sourceFiles")
public List getSourceFiles() {
return sourceFiles;
}
public void setSourceFiles(List sourceFiles) {
this.sourceFiles = sourceFiles;
}
public TestExecutionRequestDto testUniqueIds(List testUniqueIds) {
this.testUniqueIds = testUniqueIds;
return this;
}
public TestExecutionRequestDto addTestUniqueIdsItem(String testUniqueIdsItem) {
if (this.testUniqueIds == null) {
this.testUniqueIds = new ArrayList<>();
}
this.testUniqueIds.add(testUniqueIdsItem);
return this;
}
/**
* the unique ids generated by the test platform. See the endpoint `GET /tests` for the available tests.
* @return testUniqueIds
*/
@Schema(name = "testUniqueIds", description = "the unique ids generated by the test platform. See the endpoint `GET /tests` for the available tests.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("testUniqueIds")
public List getTestUniqueIds() {
return testUniqueIds;
}
public void setTestUniqueIds(List testUniqueIds) {
this.testUniqueIds = testUniqueIds;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TestExecutionRequestDto testExecutionRequest = (TestExecutionRequestDto) o;
return Objects.equals(this.tags, testExecutionRequest.tags) &&
Objects.equals(this.sourceFiles, testExecutionRequest.sourceFiles) &&
Objects.equals(this.testUniqueIds, testExecutionRequest.testUniqueIds);
}
@Override
public int hashCode() {
return Objects.hash(tags, sourceFiles, testUniqueIds);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TestExecutionRequestDto {\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" sourceFiles: ").append(toIndentedString(sourceFiles)).append("\n");
sb.append(" testUniqueIds: ").append(toIndentedString(testUniqueIds)).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