diff --git a/gradle.properties b/gradle.properties index edb85c2..c0c4dec 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=3.1.2 +version=4.0.0 org.gradle.daemon=true org.gradle.parallel=true diff --git a/testit-java-commons/build.gradle.kts b/testit-java-commons/build.gradle.kts index 05c1acf..0d0f07e 100644 --- a/testit-java-commons/build.gradle.kts +++ b/testit-java-commons/build.gradle.kts @@ -4,7 +4,6 @@ plugins { java } -var apiClientVersion = "2.4.4" val slf4jVersion = "1.7.36" val jacksonVersion = "2.17.1" val aspectjrtVersion = "1.9.22" @@ -25,7 +24,6 @@ dependencies { implementation("org.apache.commons:commons-lang3:$commonsLang3Version") implementation("org.slf4j:slf4j-api:$slf4jVersion") implementation("org.slf4j:slf4j-simple:$slf4jVersion") - implementation("ru.testit:testit-api-client:$apiClientVersion") implementation("jakarta.ws.rs:jakarta.ws.rs-api:$jakartaWsRsVersion") // Source: https://mvnrepository.com/artifact/org.openapitools/jackson-databind-nullable implementation("org.openapitools:jackson-databind-nullable:$jacksonDatabindNullable") @@ -36,6 +34,7 @@ dependencies { implementation("jakarta.annotation:jakarta.annotation-api:${jakartaAnnotationApiVersion}") // Source: https://mvnrepository.com/artifact/org.glassfish.jersey.core/jersey-client implementation("org.glassfish.jersey.core:jersey-client:$jerseyVersion") + implementation("org.glassfish.jersey.inject:jersey-hk2:$jerseyVersion") // Source: https://mvnrepository.com/artifact/org.glassfish.jersey.media/jersey-media-multipart implementation("org.glassfish.jersey.media:jersey-media-multipart:$jerseyVersion") // Source: https://mvnrepository.com/artifact/org.glassfish.jersey.media/jersey-media-json-jackson diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/AttachmentsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/AttachmentsApi.java new file mode 100644 index 0000000..b10afa4 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/AttachmentsApi.java @@ -0,0 +1,245 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.AttachmentModel; +import java.io.File; +import ru.testit.adaptersapi.model.ImageResizeType; +import ru.testit.adaptersapi.model.ProblemDetails; +import java.util.UUID; +import ru.testit.adaptersapi.model.ValidationProblemDetails; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AttachmentsApi { + private ApiClient apiClient; + + public AttachmentsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AttachmentsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * + * @param files (optional) + * @return List<AttachmentModel> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersAttachmentsBulkPost(List files) throws ApiException { + return adaptersAttachmentsBulkPostWithHttpInfo(files).getData(); + } + + /** + * + * + * @param files (optional) + * @return ApiResponse<List<AttachmentModel>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersAttachmentsBulkPostWithHttpInfo(List files) throws ApiException { + // Form parameters + Map localVarFormParams = new LinkedHashMap<>(); + if (files != null) { + localVarFormParams.put("files", files); + } + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("AttachmentsApi.adaptersAttachmentsBulkPost", "/adapters/attachments/bulk", "POST", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Download attachment file + * + * @param id (required) + * @param width Width of the result image (optional) + * @param height Height of the result image (optional) + * @param resizeType Type of resizing to apply to the result image (optional) + * @param backgroundColor Color of the background if the `resizeType` is `AddBackgroundStripes` (optional) + * @param preview If image must be converted to a preview (lower quality, no animation) (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersAttachmentsIdGet(UUID id, Integer width, Integer height, ImageResizeType resizeType, String backgroundColor, Boolean preview) throws ApiException { + adaptersAttachmentsIdGetWithHttpInfo(id, width, height, resizeType, backgroundColor, preview); + } + + /** + * Download attachment file + * + * @param id (required) + * @param width Width of the result image (optional) + * @param height Height of the result image (optional) + * @param resizeType Type of resizing to apply to the result image (optional) + * @param backgroundColor Color of the background if the `resizeType` is `AddBackgroundStripes` (optional) + * @param preview If image must be converted to a preview (lower quality, no animation) (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersAttachmentsIdGetWithHttpInfo(UUID id, Integer width, Integer height, ImageResizeType resizeType, String backgroundColor, Boolean preview) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersAttachmentsIdGet"); + } + + // Path parameters + String localVarPath = "/adapters/attachments/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "width", width) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "height", height)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "resizeType", resizeType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "backgroundColor", backgroundColor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "preview", preview)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("AttachmentsApi.adaptersAttachmentsIdGet", localVarPath, "GET", localVarQueryParams, null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Upload new attachment file + * File size is restricted to 1 GB (1 073 741 824 bytes) + * @param _file (optional) + * @return AttachmentModel + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 - Invalid file contents - Invalid HTTP headers -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public AttachmentModel adaptersAttachmentsPost(File _file) throws ApiException { + return adaptersAttachmentsPostWithHttpInfo(_file).getData(); + } + + /** + * Upload new attachment file + * File size is restricted to 1 GB (1 073 741 824 bytes) + * @param _file (optional) + * @return ApiResponse<AttachmentModel> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 - Invalid file contents - Invalid HTTP headers -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersAttachmentsPostWithHttpInfo(File _file) throws ApiException { + // Form parameters + Map localVarFormParams = new LinkedHashMap<>(); + if (_file != null) { + localVarFormParams.put("file", _file); + } + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("AttachmentsApi.adaptersAttachmentsPost", "/adapters/attachments", "POST", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/AutoTestsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/AutoTestsApi.java new file mode 100644 index 0000000..29802ae --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/AutoTestsApi.java @@ -0,0 +1,779 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.AutoTestApiResult; +import ru.testit.adaptersapi.model.AutoTestCreateApiModel; +import ru.testit.adaptersapi.model.AutoTestModel; +import ru.testit.adaptersapi.model.AutoTestSearchApiModel; +import ru.testit.adaptersapi.model.AutoTestUpdateApiModel; +import ru.testit.adaptersapi.model.AutoTestWorkItemIdentifierApiResult; +import ru.testit.adaptersapi.model.Operation; +import ru.testit.adaptersapi.model.ProblemDetails; +import java.util.UUID; +import ru.testit.adaptersapi.model.ValidationProblemDetails; +import ru.testit.adaptersapi.model.WorkItemIdApiModel; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestsApi { + private ApiClient apiClient; + + public AutoTestsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AutoTestsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create multiple autotests + * + * @param autoTestCreateApiModel (optional) + * @return List<AutoTestApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersAutoTestsBulkPost(List autoTestCreateApiModel) throws ApiException { + return adaptersAutoTestsBulkPostWithHttpInfo(autoTestCreateApiModel).getData(); + } + + /** + * Create multiple autotests + * + * @param autoTestCreateApiModel (optional) + * @return ApiResponse<List<AutoTestApiResult>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersAutoTestsBulkPostWithHttpInfo(List autoTestCreateApiModel) throws ApiException { + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsBulkPost", "/adapters/autoTests/bulk", "POST", new ArrayList<>(), autoTestCreateApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update multiple autotests + * + * @param autoTestUpdateApiModel (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersAutoTestsBulkPut(List autoTestUpdateApiModel) throws ApiException { + adaptersAutoTestsBulkPutWithHttpInfo(autoTestUpdateApiModel); + } + + /** + * Update multiple autotests + * + * @param autoTestUpdateApiModel (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersAutoTestsBulkPutWithHttpInfo(List autoTestUpdateApiModel) throws ApiException { + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsBulkPut", "/adapters/autoTests/bulk", "PUT", new ArrayList<>(), autoTestUpdateApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * + * + * @param projectId Project internal ID (optional) + * @param externalId Autotest external ID (optional) + * @param globalId Autotest global ID (optional) + * @param namespace Namespace in which autotest is located (optional) + * @param isNamespaceNull OBSOLETE: Use `includeEmptyNamespaces` instead (optional) + * @param includeEmptyNamespaces If result must contain autotests without namespace (optional) + * @param className Name of class in which autotest is located (optional) + * @param isClassnameNull OBSOLETE: Use `includeEmptyClassNames` instead (optional) + * @param includeEmptyClassNames If result must contain autotests without class (optional) + * @param isDeleted OBSOLETE: Use `deleted` instead (optional) + * @param deleted Is autotest deleted (optional) + * @param labels Include only autotests with provided labels (optional) + * @param stabilityMinimal OBSOLETE: Use `minStability` instead (optional) + * @param minStability Minimum stability value of autotest (optional) + * @param stabilityMaximal OBSOLETE: Use `maxStability` instead (optional) + * @param maxStability Maximum stability value of autotest (optional) + * @param isFlaky OBSOLETE: Use `flaky` instead (optional) + * @param flaky Is autotest marked as \"Flaky\" (optional) + * @param includeSteps If result must also include autotest steps (optional) + * @param includeLabels If result must also include autotest labels (optional) + * @param externalKey External key of autotest (optional) + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @return List<AutoTestModel> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ * @deprecated + */ + @Deprecated + public List adaptersAutoTestsGet(UUID projectId, String externalId, Long globalId, String namespace, Boolean isNamespaceNull, Boolean includeEmptyNamespaces, String className, Boolean isClassnameNull, Boolean includeEmptyClassNames, Boolean isDeleted, Boolean deleted, List labels, Integer stabilityMinimal, Integer minStability, Integer stabilityMaximal, Integer maxStability, Boolean isFlaky, Boolean flaky, Boolean includeSteps, Boolean includeLabels, String externalKey, Integer skip, Integer take, String orderBy, String searchField, String searchValue) throws ApiException { + return adaptersAutoTestsGetWithHttpInfo(projectId, externalId, globalId, namespace, isNamespaceNull, includeEmptyNamespaces, className, isClassnameNull, includeEmptyClassNames, isDeleted, deleted, labels, stabilityMinimal, minStability, stabilityMaximal, maxStability, isFlaky, flaky, includeSteps, includeLabels, externalKey, skip, take, orderBy, searchField, searchValue).getData(); + } + + /** + * + * + * @param projectId Project internal ID (optional) + * @param externalId Autotest external ID (optional) + * @param globalId Autotest global ID (optional) + * @param namespace Namespace in which autotest is located (optional) + * @param isNamespaceNull OBSOLETE: Use `includeEmptyNamespaces` instead (optional) + * @param includeEmptyNamespaces If result must contain autotests without namespace (optional) + * @param className Name of class in which autotest is located (optional) + * @param isClassnameNull OBSOLETE: Use `includeEmptyClassNames` instead (optional) + * @param includeEmptyClassNames If result must contain autotests without class (optional) + * @param isDeleted OBSOLETE: Use `deleted` instead (optional) + * @param deleted Is autotest deleted (optional) + * @param labels Include only autotests with provided labels (optional) + * @param stabilityMinimal OBSOLETE: Use `minStability` instead (optional) + * @param minStability Minimum stability value of autotest (optional) + * @param stabilityMaximal OBSOLETE: Use `maxStability` instead (optional) + * @param maxStability Maximum stability value of autotest (optional) + * @param isFlaky OBSOLETE: Use `flaky` instead (optional) + * @param flaky Is autotest marked as \"Flaky\" (optional) + * @param includeSteps If result must also include autotest steps (optional) + * @param includeLabels If result must also include autotest labels (optional) + * @param externalKey External key of autotest (optional) + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @return ApiResponse<List<AutoTestModel>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ * @deprecated + */ + @Deprecated + public ApiResponse> adaptersAutoTestsGetWithHttpInfo(UUID projectId, String externalId, Long globalId, String namespace, Boolean isNamespaceNull, Boolean includeEmptyNamespaces, String className, Boolean isClassnameNull, Boolean includeEmptyClassNames, Boolean isDeleted, Boolean deleted, List labels, Integer stabilityMinimal, Integer minStability, Integer stabilityMaximal, Integer maxStability, Boolean isFlaky, Boolean flaky, Boolean includeSteps, Boolean includeLabels, String externalKey, Integer skip, Integer take, String orderBy, String searchField, String searchValue) throws ApiException { + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "projectId", projectId) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "externalId", externalId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "globalId", globalId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "namespace", namespace)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "isNamespaceNull", isNamespaceNull)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "includeEmptyNamespaces", includeEmptyNamespaces)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "className", className)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "isClassnameNull", isClassnameNull)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "includeEmptyClassNames", includeEmptyClassNames)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "isDeleted", isDeleted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "deleted", deleted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "labels", labels)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "stabilityMinimal", stabilityMinimal)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "minStability", minStability)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "stabilityMaximal", stabilityMaximal)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "maxStability", maxStability)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "isFlaky", isFlaky)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "flaky", flaky)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "includeSteps", includeSteps)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "includeLabels", includeLabels)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "externalKey", externalKey)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Skip", skip)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Take", take)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "OrderBy", orderBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchField", searchField)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchValue", searchValue)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsGet", "/adapters/autoTests", "GET", localVarQueryParams, null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Get autotest by internal or global ID + * + * @param id Internal (UUID) or global (integer) identifier (required) + * @return AutoTestApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public AutoTestApiResult adaptersAutoTestsIdGet(String id) throws ApiException { + return adaptersAutoTestsIdGetWithHttpInfo(id).getData(); + } + + /** + * Get autotest by internal or global ID + * + * @param id Internal (UUID) or global (integer) identifier (required) + * @return ApiResponse<AutoTestApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersAutoTestsIdGetWithHttpInfo(String id) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersAutoTestsIdGet"); + } + + // Path parameters + String localVarPath = "/adapters/autoTests/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsIdGet", localVarPath, "GET", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Patch auto test + * See <a href=\"https://www.rfc-editor.org/rfc/rfc6902\" target=\"_blank\">RFC 6902: JavaScript Object Notation (JSON) Patch</a> for details + * @param id (required) + * @param operation (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersAutoTestsIdPatch(UUID id, List operation) throws ApiException { + adaptersAutoTestsIdPatchWithHttpInfo(id, operation); + } + + /** + * Patch auto test + * See <a href=\"https://www.rfc-editor.org/rfc/rfc6902\" target=\"_blank\">RFC 6902: JavaScript Object Notation (JSON) Patch</a> for details + * @param id (required) + * @param operation (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersAutoTestsIdPatchWithHttpInfo(UUID id, List operation) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersAutoTestsIdPatch"); + } + + // Path parameters + String localVarPath = "/adapters/autoTests/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsIdPatch", localVarPath, "PATCH", new ArrayList<>(), operation, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Unlink autotest from work item + * + * @param id Internal (UUID) or global (integer) identifier (required) + * @param workItemId Internal (UUID) or global (integer) identifier (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersAutoTestsIdWorkItemsDelete(String id, String workItemId) throws ApiException { + adaptersAutoTestsIdWorkItemsDeleteWithHttpInfo(id, workItemId); + } + + /** + * Unlink autotest from work item + * + * @param id Internal (UUID) or global (integer) identifier (required) + * @param workItemId Internal (UUID) or global (integer) identifier (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersAutoTestsIdWorkItemsDeleteWithHttpInfo(String id, String workItemId) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersAutoTestsIdWorkItemsDelete"); + } + + // Path parameters + String localVarPath = "/adapters/autoTests/{id}/work-items" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "workItemId", workItemId) + ); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsIdWorkItemsDelete", localVarPath, "DELETE", localVarQueryParams, null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Get work items linked to autotest + * + * @param id Internal (UUID) or global (integer) identifier (required) + * @param isDeleted (optional) + * @param isWorkItemDeleted (optional, default to false) + * @return List<AutoTestWorkItemIdentifierApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersAutoTestsIdWorkItemsGet(String id, Boolean isDeleted, Boolean isWorkItemDeleted) throws ApiException { + return adaptersAutoTestsIdWorkItemsGetWithHttpInfo(id, isDeleted, isWorkItemDeleted).getData(); + } + + /** + * Get work items linked to autotest + * + * @param id Internal (UUID) or global (integer) identifier (required) + * @param isDeleted (optional) + * @param isWorkItemDeleted (optional, default to false) + * @return ApiResponse<List<AutoTestWorkItemIdentifierApiResult>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersAutoTestsIdWorkItemsGetWithHttpInfo(String id, Boolean isDeleted, Boolean isWorkItemDeleted) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersAutoTestsIdWorkItemsGet"); + } + + // Path parameters + String localVarPath = "/adapters/autoTests/{id}/work-items" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "isDeleted", isDeleted) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "isWorkItemDeleted", isWorkItemDeleted)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsIdWorkItemsGet", localVarPath, "GET", localVarQueryParams, null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Link autotest with work items + * + * @param id Internal (UUID) or global (integer) identifier (required) + * @param workItemIdApiModel (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersAutoTestsIdWorkItemsPost(String id, WorkItemIdApiModel workItemIdApiModel) throws ApiException { + adaptersAutoTestsIdWorkItemsPostWithHttpInfo(id, workItemIdApiModel); + } + + /** + * Link autotest with work items + * + * @param id Internal (UUID) or global (integer) identifier (required) + * @param workItemIdApiModel (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersAutoTestsIdWorkItemsPostWithHttpInfo(String id, WorkItemIdApiModel workItemIdApiModel) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersAutoTestsIdWorkItemsPost"); + } + + // Path parameters + String localVarPath = "/adapters/autoTests/{id}/work-items" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsIdWorkItemsPost", localVarPath, "POST", new ArrayList<>(), workItemIdApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Create autotest + * + * @param autoTestCreateApiModel (optional) + * @return AutoTestApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public AutoTestApiResult adaptersAutoTestsPost(AutoTestCreateApiModel autoTestCreateApiModel) throws ApiException { + return adaptersAutoTestsPostWithHttpInfo(autoTestCreateApiModel).getData(); + } + + /** + * Create autotest + * + * @param autoTestCreateApiModel (optional) + * @return ApiResponse<AutoTestApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersAutoTestsPostWithHttpInfo(AutoTestCreateApiModel autoTestCreateApiModel) throws ApiException { + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsPost", "/adapters/autoTests", "POST", new ArrayList<>(), autoTestCreateApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update autotest + * + * @param autoTestUpdateApiModel (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersAutoTestsPut(AutoTestUpdateApiModel autoTestUpdateApiModel) throws ApiException { + adaptersAutoTestsPutWithHttpInfo(autoTestUpdateApiModel); + } + + /** + * Update autotest + * + * @param autoTestUpdateApiModel (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersAutoTestsPutWithHttpInfo(AutoTestUpdateApiModel autoTestUpdateApiModel) throws ApiException { + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsPut", "/adapters/autoTests", "PUT", new ArrayList<>(), autoTestUpdateApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Search for autotests + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param autoTestSearchApiModel (optional) + * @return List<AutoTestApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Read permission for autotests library is required -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersAutoTestsSearchPost(Integer skip, Integer take, String orderBy, String searchField, String searchValue, AutoTestSearchApiModel autoTestSearchApiModel) throws ApiException { + return adaptersAutoTestsSearchPostWithHttpInfo(skip, take, orderBy, searchField, searchValue, autoTestSearchApiModel).getData(); + } + + /** + * Search for autotests + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param autoTestSearchApiModel (optional) + * @return ApiResponse<List<AutoTestApiResult>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Read permission for autotests library is required -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersAutoTestsSearchPostWithHttpInfo(Integer skip, Integer take, String orderBy, String searchField, String searchValue, AutoTestSearchApiModel autoTestSearchApiModel) throws ApiException { + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "Skip", skip) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Take", take)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "OrderBy", orderBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchField", searchField)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchValue", searchValue)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("AutoTestsApi.adaptersAutoTestsSearchPost", "/adapters/autoTests/search", "POST", localVarQueryParams, autoTestSearchApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ConfigurationsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ConfigurationsApi.java new file mode 100644 index 0000000..14862b5 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ConfigurationsApi.java @@ -0,0 +1,122 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.ConfigurationFilterModel; +import ru.testit.adaptersapi.model.ConfigurationModel; +import ru.testit.adaptersapi.model.ProblemDetails; +import ru.testit.adaptersapi.model.ValidationProblemDetails; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ConfigurationsApi { + private ApiClient apiClient; + + public ConfigurationsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ConfigurationsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Search for configurations + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param configurationFilterModel (optional) + * @return List<ConfigurationModel> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersConfigurationsSearchPost(Integer skip, Integer take, String orderBy, String searchField, String searchValue, ConfigurationFilterModel configurationFilterModel) throws ApiException { + return adaptersConfigurationsSearchPostWithHttpInfo(skip, take, orderBy, searchField, searchValue, configurationFilterModel).getData(); + } + + /** + * Search for configurations + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param configurationFilterModel (optional) + * @return ApiResponse<List<ConfigurationModel>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersConfigurationsSearchPostWithHttpInfo(Integer skip, Integer take, String orderBy, String searchField, String searchValue, ConfigurationFilterModel configurationFilterModel) throws ApiException { + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "Skip", skip) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Take", take)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "OrderBy", orderBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchField", searchField)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchValue", searchValue)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("ConfigurationsApi.adaptersConfigurationsSearchPost", "/adapters/configurations/search", "POST", localVarQueryParams, configurationFilterModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ParametersApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ParametersApi.java new file mode 100644 index 0000000..ae06223 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ParametersApi.java @@ -0,0 +1,235 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.CreateParameterApiModel; +import ru.testit.adaptersapi.model.ParameterApiResult; +import ru.testit.adaptersapi.model.ParametersFilterApiModel; +import ru.testit.adaptersapi.model.ProblemDetails; +import java.util.UUID; +import ru.testit.adaptersapi.model.ValidationProblemDetails; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ParametersApi { + private ApiClient apiClient; + + public ParametersApi() { + this(Configuration.getDefaultApiClient()); + } + + public ParametersApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get parameter by ID + * + * @param id (required) + * @return ParameterApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ParameterApiResult adaptersParametersIdGet(UUID id) throws ApiException { + return adaptersParametersIdGetWithHttpInfo(id).getData(); + } + + /** + * Get parameter by ID + * + * @param id (required) + * @return ApiResponse<ParameterApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersParametersIdGetWithHttpInfo(UUID id) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersParametersIdGet"); + } + + // Path parameters + String localVarPath = "/adapters/parameters/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("ParametersApi.adaptersParametersIdGet", localVarPath, "GET", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Create parameter + * + * @param createParameterApiModel (optional) + * @return ParameterApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ParameterApiResult adaptersParametersPost(CreateParameterApiModel createParameterApiModel) throws ApiException { + return adaptersParametersPostWithHttpInfo(createParameterApiModel).getData(); + } + + /** + * Create parameter + * + * @param createParameterApiModel (optional) + * @return ApiResponse<ParameterApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersParametersPostWithHttpInfo(CreateParameterApiModel createParameterApiModel) throws ApiException { + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("ParametersApi.adaptersParametersPost", "/adapters/parameters", "POST", new ArrayList<>(), createParameterApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Search for parameters + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param parametersFilterApiModel (optional) + * @return List<ParameterApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersParametersSearchPost(Integer skip, Integer take, String orderBy, String searchField, String searchValue, ParametersFilterApiModel parametersFilterApiModel) throws ApiException { + return adaptersParametersSearchPostWithHttpInfo(skip, take, orderBy, searchField, searchValue, parametersFilterApiModel).getData(); + } + + /** + * Search for parameters + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param parametersFilterApiModel (optional) + * @return ApiResponse<List<ParameterApiResult>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersParametersSearchPostWithHttpInfo(Integer skip, Integer take, String orderBy, String searchField, String searchValue, ParametersFilterApiModel parametersFilterApiModel) throws ApiException { + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "Skip", skip) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Take", take)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "OrderBy", orderBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchField", searchField)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchValue", searchValue)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("ParametersApi.adaptersParametersSearchPost", "/adapters/parameters/search", "POST", localVarQueryParams, parametersFilterApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectAttributesApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectAttributesApi.java new file mode 100644 index 0000000..9ce9409 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectAttributesApi.java @@ -0,0 +1,195 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.CustomAttributeGetModel; +import ru.testit.adaptersapi.model.CustomAttributePutModel; +import ru.testit.adaptersapi.model.ProblemDetails; +import ru.testit.adaptersapi.model.ProjectAttributesFilterModel; +import java.util.UUID; +import ru.testit.adaptersapi.model.ValidationProblemDetails; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ProjectAttributesApi { + private ApiClient apiClient; + + public ProjectAttributesApi() { + this(Configuration.getDefaultApiClient()); + } + + public ProjectAttributesApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Edit attribute of the project + * + * @param projectId (required) + * @param customAttributePutModel (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersProjectsProjectIdAttributesPut(UUID projectId, CustomAttributePutModel customAttributePutModel) throws ApiException { + adaptersProjectsProjectIdAttributesPutWithHttpInfo(projectId, customAttributePutModel); + } + + /** + * Edit attribute of the project + * + * @param projectId (required) + * @param customAttributePutModel (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersProjectsProjectIdAttributesPutWithHttpInfo(UUID projectId, CustomAttributePutModel customAttributePutModel) throws ApiException { + // Check required parameters + if (projectId == null) { + throw new ApiException(400, "Missing the required parameter 'projectId' when calling adaptersProjectsProjectIdAttributesPut"); + } + + // Path parameters + String localVarPath = "/adapters/projects/{projectId}/attributes" + .replaceAll("\\{projectId}", apiClient.escapeString(projectId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("ProjectAttributesApi.adaptersProjectsProjectIdAttributesPut", localVarPath, "PUT", new ArrayList<>(), customAttributePutModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Search for attributes used in the project + * + * @param projectId (required) + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param projectAttributesFilterModel (optional) + * @return List<CustomAttributeGetModel> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersProjectsProjectIdAttributesSearchPost(UUID projectId, Integer skip, Integer take, String orderBy, String searchField, String searchValue, ProjectAttributesFilterModel projectAttributesFilterModel) throws ApiException { + return adaptersProjectsProjectIdAttributesSearchPostWithHttpInfo(projectId, skip, take, orderBy, searchField, searchValue, projectAttributesFilterModel).getData(); + } + + /** + * Search for attributes used in the project + * + * @param projectId (required) + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param projectAttributesFilterModel (optional) + * @return ApiResponse<List<CustomAttributeGetModel>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersProjectsProjectIdAttributesSearchPostWithHttpInfo(UUID projectId, Integer skip, Integer take, String orderBy, String searchField, String searchValue, ProjectAttributesFilterModel projectAttributesFilterModel) throws ApiException { + // Check required parameters + if (projectId == null) { + throw new ApiException(400, "Missing the required parameter 'projectId' when calling adaptersProjectsProjectIdAttributesSearchPost"); + } + + // Path parameters + String localVarPath = "/adapters/projects/{projectId}/attributes/search" + .replaceAll("\\{projectId}", apiClient.escapeString(projectId.toString())); + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "Skip", skip) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Take", take)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "OrderBy", orderBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchField", searchField)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchValue", searchValue)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("ProjectAttributesApi.adaptersProjectsProjectIdAttributesSearchPost", localVarPath, "POST", localVarQueryParams, projectAttributesFilterModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectSectionsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectSectionsApi.java new file mode 100644 index 0000000..f379a2e --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectSectionsApi.java @@ -0,0 +1,131 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.ProblemDetails; +import ru.testit.adaptersapi.model.SectionModel; +import java.util.UUID; +import ru.testit.adaptersapi.model.ValidationProblemDetails; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ProjectSectionsApi { + private ApiClient apiClient; + + public ProjectSectionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ProjectSectionsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get project sections + * + * @param projectId (required) + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @return List<SectionModel> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersProjectsProjectIdSectionsGet(UUID projectId, Integer skip, Integer take, String orderBy, String searchField, String searchValue) throws ApiException { + return adaptersProjectsProjectIdSectionsGetWithHttpInfo(projectId, skip, take, orderBy, searchField, searchValue).getData(); + } + + /** + * Get project sections + * + * @param projectId (required) + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @return ApiResponse<List<SectionModel>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersProjectsProjectIdSectionsGetWithHttpInfo(UUID projectId, Integer skip, Integer take, String orderBy, String searchField, String searchValue) throws ApiException { + // Check required parameters + if (projectId == null) { + throw new ApiException(400, "Missing the required parameter 'projectId' when calling adaptersProjectsProjectIdSectionsGet"); + } + + // Path parameters + String localVarPath = "/adapters/projects/{projectId}/sections" + .replaceAll("\\{projectId}", apiClient.escapeString(projectId.toString())); + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "Skip", skip) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Take", take)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "OrderBy", orderBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchField", searchField)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchValue", searchValue)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("ProjectSectionsApi.adaptersProjectsProjectIdSectionsGet", localVarPath, "GET", localVarQueryParams, null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectWorkItemsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectWorkItemsApi.java new file mode 100644 index 0000000..c24fef9 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectWorkItemsApi.java @@ -0,0 +1,133 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.ProblemDetails; +import ru.testit.adaptersapi.model.ValidationProblemDetails; +import ru.testit.adaptersapi.model.WorkItemSelectApiModel; +import ru.testit.adaptersapi.model.WorkItemShortApiResult; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ProjectWorkItemsApi { + private ApiClient apiClient; + + public ProjectWorkItemsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ProjectWorkItemsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Search for work items + * + * @param projectId Internal (UUID) or global (integer) identifier (required) + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param workItemSelectApiModel (optional) + * @return List<WorkItemShortApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersProjectsProjectIdWorkItemsSearchPost(String projectId, Integer skip, Integer take, String orderBy, String searchField, String searchValue, WorkItemSelectApiModel workItemSelectApiModel) throws ApiException { + return adaptersProjectsProjectIdWorkItemsSearchPostWithHttpInfo(projectId, skip, take, orderBy, searchField, searchValue, workItemSelectApiModel).getData(); + } + + /** + * Search for work items + * + * @param projectId Internal (UUID) or global (integer) identifier (required) + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param workItemSelectApiModel (optional) + * @return ApiResponse<List<WorkItemShortApiResult>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersProjectsProjectIdWorkItemsSearchPostWithHttpInfo(String projectId, Integer skip, Integer take, String orderBy, String searchField, String searchValue, WorkItemSelectApiModel workItemSelectApiModel) throws ApiException { + // Check required parameters + if (projectId == null) { + throw new ApiException(400, "Missing the required parameter 'projectId' when calling adaptersProjectsProjectIdWorkItemsSearchPost"); + } + + // Path parameters + String localVarPath = "/adapters/projects/{projectId}/work-items/search" + .replaceAll("\\{projectId}", apiClient.escapeString(projectId.toString())); + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "Skip", skip) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Take", take)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "OrderBy", orderBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchField", searchField)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchValue", searchValue)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("ProjectWorkItemsApi.adaptersProjectsProjectIdWorkItemsSearchPost", localVarPath, "POST", localVarQueryParams, workItemSelectApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectsApi.java new file mode 100644 index 0000000..3166224 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/ProjectsApi.java @@ -0,0 +1,297 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.CreateProjectApiModel; +import ru.testit.adaptersapi.model.DetailedProjectApiResult; +import ru.testit.adaptersapi.model.ProblemDetails; +import ru.testit.adaptersapi.model.ProjectApiResult; +import ru.testit.adaptersapi.model.ProjectsFilterModel; +import java.util.Set; +import java.util.UUID; +import ru.testit.adaptersapi.model.ValidationProblemDetails; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ProjectsApi { + private ApiClient apiClient; + + public ProjectsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ProjectsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Add global attributes to project + * + * @param id (required) + * @param UUID (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersProjectsIdAttributesGlobalPost(UUID id, Set UUID) throws ApiException { + adaptersProjectsIdAttributesGlobalPostWithHttpInfo(id, UUID); + } + + /** + * Add global attributes to project + * + * @param id (required) + * @param UUID (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersProjectsIdAttributesGlobalPostWithHttpInfo(UUID id, Set UUID) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersProjectsIdAttributesGlobalPost"); + } + + // Path parameters + String localVarPath = "/adapters/projects/{id}/attributes/global" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("ProjectsApi.adaptersProjectsIdAttributesGlobalPost", localVarPath, "POST", new ArrayList<>(), UUID, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Get project by ID + * + * @param id (required) + * @return DetailedProjectApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public DetailedProjectApiResult adaptersProjectsIdGet(UUID id) throws ApiException { + return adaptersProjectsIdGetWithHttpInfo(id).getData(); + } + + /** + * Get project by ID + * + * @param id (required) + * @return ApiResponse<DetailedProjectApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersProjectsIdGetWithHttpInfo(UUID id) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersProjectsIdGet"); + } + + // Path parameters + String localVarPath = "/adapters/projects/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("ProjectsApi.adaptersProjectsIdGet", localVarPath, "GET", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Create project + * + * @param createProjectApiModel (optional) + * @return ProjectApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ProjectApiResult adaptersProjectsPost(CreateProjectApiModel createProjectApiModel) throws ApiException { + return adaptersProjectsPostWithHttpInfo(createProjectApiModel).getData(); + } + + /** + * Create project + * + * @param createProjectApiModel (optional) + * @return ApiResponse<ProjectApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersProjectsPostWithHttpInfo(CreateProjectApiModel createProjectApiModel) throws ApiException { + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("ProjectsApi.adaptersProjectsPost", "/adapters/projects", "POST", new ArrayList<>(), createProjectApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Search for projects + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param projectsFilterModel (optional) + * @return List<ProjectApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersProjectsSearchPost(Integer skip, Integer take, String orderBy, String searchField, String searchValue, ProjectsFilterModel projectsFilterModel) throws ApiException { + return adaptersProjectsSearchPostWithHttpInfo(skip, take, orderBy, searchField, searchValue, projectsFilterModel).getData(); + } + + /** + * Search for projects + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param projectsFilterModel (optional) + * @return ApiResponse<List<ProjectApiResult>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersProjectsSearchPostWithHttpInfo(Integer skip, Integer take, String orderBy, String searchField, String searchValue, ProjectsFilterModel projectsFilterModel) throws ApiException { + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "Skip", skip) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Take", take)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "OrderBy", orderBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchField", searchField)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchValue", searchValue)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("ProjectsApi.adaptersProjectsSearchPost", "/adapters/projects/search", "POST", localVarQueryParams, projectsFilterModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/SectionsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/SectionsApi.java new file mode 100644 index 0000000..29189ac --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/SectionsApi.java @@ -0,0 +1,172 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.DeletionState; +import ru.testit.adaptersapi.model.ProblemDetails; +import ru.testit.adaptersapi.model.SectionPostModel; +import ru.testit.adaptersapi.model.SectionWithStepsModel; +import java.util.UUID; +import ru.testit.adaptersapi.model.ValidationProblemDetails; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class SectionsApi { + private ApiClient apiClient; + + public SectionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public SectionsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get section + * + * @param id (required) + * @param isDeleted (optional) + * @return SectionWithStepsModel + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public SectionWithStepsModel adaptersSectionsIdGet(UUID id, DeletionState isDeleted) throws ApiException { + return adaptersSectionsIdGetWithHttpInfo(id, isDeleted).getData(); + } + + /** + * Get section + * + * @param id (required) + * @param isDeleted (optional) + * @return ApiResponse<SectionWithStepsModel> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersSectionsIdGetWithHttpInfo(UUID id, DeletionState isDeleted) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersSectionsIdGet"); + } + + // Path parameters + String localVarPath = "/adapters/sections/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "isDeleted", isDeleted) + ); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("SectionsApi.adaptersSectionsIdGet", localVarPath, "GET", localVarQueryParams, null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Create section + * + * @param sectionPostModel (optional) + * @return SectionWithStepsModel + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public SectionWithStepsModel adaptersSectionsPost(SectionPostModel sectionPostModel) throws ApiException { + return adaptersSectionsPostWithHttpInfo(sectionPostModel).getData(); + } + + /** + * Create section + * + * @param sectionPostModel (optional) + * @return ApiResponse<SectionWithStepsModel> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersSectionsPostWithHttpInfo(SectionPostModel sectionPostModel) throws ApiException { + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("SectionsApi.adaptersSectionsPost", "/adapters/sections", "POST", new ArrayList<>(), sectionPostModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/TestResultsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/TestResultsApi.java new file mode 100644 index 0000000..2d0c88b --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/TestResultsApi.java @@ -0,0 +1,245 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.ProblemDetails; +import ru.testit.adaptersapi.model.TestResultResponse; +import ru.testit.adaptersapi.model.TestResultShortResponse; +import ru.testit.adaptersapi.model.TestResultUpdateRequest; +import ru.testit.adaptersapi.model.TestResultsFilterApiModel; +import java.util.UUID; +import ru.testit.adaptersapi.model.ValidationProblemDetails; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestResultsApi { + private ApiClient apiClient; + + public TestResultsApi() { + this(Configuration.getDefaultApiClient()); + } + + public TestResultsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get test result by ID + * + * @param id (required) + * @return TestResultResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public TestResultResponse adaptersTestResultsIdGet(UUID id) throws ApiException { + return adaptersTestResultsIdGetWithHttpInfo(id).getData(); + } + + /** + * Get test result by ID + * + * @param id (required) + * @return ApiResponse<TestResultResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersTestResultsIdGetWithHttpInfo(UUID id) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersTestResultsIdGet"); + } + + // Path parameters + String localVarPath = "/adapters/testResults/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("TestResultsApi.adaptersTestResultsIdGet", localVarPath, "GET", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Edit test result by ID + * + * @param id (required) + * @param testResultUpdateRequest (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersTestResultsIdPut(UUID id, TestResultUpdateRequest testResultUpdateRequest) throws ApiException { + adaptersTestResultsIdPutWithHttpInfo(id, testResultUpdateRequest); + } + + /** + * Edit test result by ID + * + * @param id (required) + * @param testResultUpdateRequest (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersTestResultsIdPutWithHttpInfo(UUID id, TestResultUpdateRequest testResultUpdateRequest) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersTestResultsIdPut"); + } + + // Path parameters + String localVarPath = "/adapters/testResults/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("TestResultsApi.adaptersTestResultsIdPut", localVarPath, "PUT", new ArrayList<>(), testResultUpdateRequest, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Search for test results + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param testResultsFilterApiModel (optional) + * @return List<TestResultShortResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersTestResultsSearchPost(Integer skip, Integer take, String orderBy, String searchField, String searchValue, TestResultsFilterApiModel testResultsFilterApiModel) throws ApiException { + return adaptersTestResultsSearchPostWithHttpInfo(skip, take, orderBy, searchField, searchValue, testResultsFilterApiModel).getData(); + } + + /** + * Search for test results + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param testResultsFilterApiModel (optional) + * @return ApiResponse<List<TestResultShortResponse>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersTestResultsSearchPostWithHttpInfo(Integer skip, Integer take, String orderBy, String searchField, String searchValue, TestResultsFilterApiModel testResultsFilterApiModel) throws ApiException { + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "Skip", skip) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Take", take)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "OrderBy", orderBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchField", searchField)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchValue", searchValue)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("TestResultsApi.adaptersTestResultsSearchPost", "/adapters/testResults/search", "POST", localVarQueryParams, testResultsFilterApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/TestRunsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/TestRunsApi.java new file mode 100644 index 0000000..5bf27b7 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/TestRunsApi.java @@ -0,0 +1,515 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.AutoTestResultsForTestRunModel; +import ru.testit.adaptersapi.model.CreateEmptyTestRunApiModel; +import ru.testit.adaptersapi.model.ManualRerunApiResult; +import ru.testit.adaptersapi.model.ManualRerunSelectTestResultsApiModel; +import ru.testit.adaptersapi.model.ProblemDetails; +import ru.testit.adaptersapi.model.TestRunApiResult; +import java.util.UUID; +import ru.testit.adaptersapi.model.UpdateEmptyTestRunApiModel; +import ru.testit.adaptersapi.model.ValidationProblemDetails; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestRunsApi { + private ApiClient apiClient; + + public TestRunsApi() { + this(Configuration.getDefaultApiClient()); + } + + public TestRunsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Complete TestRun + * + * @param id (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersTestRunsIdCompletePost(UUID id) throws ApiException { + adaptersTestRunsIdCompletePostWithHttpInfo(id); + } + + /** + * Complete TestRun + * + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersTestRunsIdCompletePostWithHttpInfo(UUID id) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersTestRunsIdCompletePost"); + } + + // Path parameters + String localVarPath = "/adapters/testRuns/{id}/complete" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("TestRunsApi.adaptersTestRunsIdCompletePost", localVarPath, "POST", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Get TestRun by Id + * + * @param id (required) + * @return TestRunApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public TestRunApiResult adaptersTestRunsIdGet(UUID id) throws ApiException { + return adaptersTestRunsIdGetWithHttpInfo(id).getData(); + } + + /** + * Get TestRun by Id + * + * @param id (required) + * @return ApiResponse<TestRunApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersTestRunsIdGetWithHttpInfo(UUID id) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersTestRunsIdGet"); + } + + // Path parameters + String localVarPath = "/adapters/testRuns/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("TestRunsApi.adaptersTestRunsIdGet", localVarPath, "GET", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Manual autotests rerun in test run + * + * @param id (required) + * @param manualRerunSelectTestResultsApiModel (optional) + * @return ManualRerunApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ManualRerunApiResult adaptersTestRunsIdRerunsPost(UUID id, ManualRerunSelectTestResultsApiModel manualRerunSelectTestResultsApiModel) throws ApiException { + return adaptersTestRunsIdRerunsPostWithHttpInfo(id, manualRerunSelectTestResultsApiModel).getData(); + } + + /** + * Manual autotests rerun in test run + * + * @param id (required) + * @param manualRerunSelectTestResultsApiModel (optional) + * @return ApiResponse<ManualRerunApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersTestRunsIdRerunsPostWithHttpInfo(UUID id, ManualRerunSelectTestResultsApiModel manualRerunSelectTestResultsApiModel) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersTestRunsIdRerunsPost"); + } + + // Path parameters + String localVarPath = "/adapters/testRuns/{id}/reruns" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("TestRunsApi.adaptersTestRunsIdRerunsPost", localVarPath, "POST", new ArrayList<>(), manualRerunSelectTestResultsApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Start TestRun + * + * @param id (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersTestRunsIdStartPost(UUID id) throws ApiException { + adaptersTestRunsIdStartPostWithHttpInfo(id); + } + + /** + * Start TestRun + * + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersTestRunsIdStartPostWithHttpInfo(UUID id) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersTestRunsIdStartPost"); + } + + // Path parameters + String localVarPath = "/adapters/testRuns/{id}/start" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("TestRunsApi.adaptersTestRunsIdStartPost", localVarPath, "POST", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Stop TestRun + * + * @param id (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersTestRunsIdStopPost(UUID id) throws ApiException { + adaptersTestRunsIdStopPostWithHttpInfo(id); + } + + /** + * Stop TestRun + * + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersTestRunsIdStopPostWithHttpInfo(UUID id) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersTestRunsIdStopPost"); + } + + // Path parameters + String localVarPath = "/adapters/testRuns/{id}/stop" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("TestRunsApi.adaptersTestRunsIdStopPost", localVarPath, "POST", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Send test results to the test runs in the system + * + * @param id (required) + * @param autoTestResultsForTestRunModel (optional) + * @return List<UUID> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersTestRunsIdTestResultsPost(UUID id, List autoTestResultsForTestRunModel) throws ApiException { + return adaptersTestRunsIdTestResultsPostWithHttpInfo(id, autoTestResultsForTestRunModel).getData(); + } + + /** + * Send test results to the test runs in the system + * + * @param id (required) + * @param autoTestResultsForTestRunModel (optional) + * @return ApiResponse<List<UUID>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersTestRunsIdTestResultsPostWithHttpInfo(UUID id, List autoTestResultsForTestRunModel) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersTestRunsIdTestResultsPost"); + } + + // Path parameters + String localVarPath = "/adapters/testRuns/{id}/test-results" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("TestRunsApi.adaptersTestRunsIdTestResultsPost", localVarPath, "POST", new ArrayList<>(), autoTestResultsForTestRunModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Create empty TestRun + * + * @param createEmptyTestRunApiModel (optional) + * @return TestRunApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public TestRunApiResult adaptersTestRunsPost(CreateEmptyTestRunApiModel createEmptyTestRunApiModel) throws ApiException { + return adaptersTestRunsPostWithHttpInfo(createEmptyTestRunApiModel).getData(); + } + + /** + * Create empty TestRun + * + * @param createEmptyTestRunApiModel (optional) + * @return ApiResponse<TestRunApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersTestRunsPostWithHttpInfo(CreateEmptyTestRunApiModel createEmptyTestRunApiModel) throws ApiException { + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("TestRunsApi.adaptersTestRunsPost", "/adapters/testRuns", "POST", new ArrayList<>(), createEmptyTestRunApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update empty TestRun + * + * @param updateEmptyTestRunApiModel (optional) + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public void adaptersTestRunsPut(UpdateEmptyTestRunApiModel updateEmptyTestRunApiModel) throws ApiException { + adaptersTestRunsPutWithHttpInfo(updateEmptyTestRunApiModel); + } + + /** + * Update empty TestRun + * + * @param updateEmptyTestRunApiModel (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersTestRunsPutWithHttpInfo(UpdateEmptyTestRunApiModel updateEmptyTestRunApiModel) throws ApiException { + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + return apiClient.invokeAPI("TestRunsApi.adaptersTestRunsPut", "/adapters/testRuns", "PUT", new ArrayList<>(), updateEmptyTestRunApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/WorkItemsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/WorkItemsApi.java new file mode 100644 index 0000000..7d6b4a6 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/WorkItemsApi.java @@ -0,0 +1,246 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.CreateWorkItemApiModel; +import ru.testit.adaptersapi.model.ProblemDetails; +import java.util.UUID; +import ru.testit.adaptersapi.model.ValidationProblemDetails; +import ru.testit.adaptersapi.model.WorkItemApiResult; +import ru.testit.adaptersapi.model.WorkItemSelectApiModel; +import ru.testit.adaptersapi.model.WorkItemShortApiResult; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkItemsApi { + private ApiClient apiClient; + + public WorkItemsApi() { + this(Configuration.getDefaultApiClient()); + } + + public WorkItemsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get Test Case, Checklist or Shared Step by Id or GlobalId + * + * @param id Internal (UUID) or global (integer) identifier (required) + * @param versionId (optional) + * @param versionNumber (optional) + * @return WorkItemApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public WorkItemApiResult adaptersWorkItemsIdGet(String id, UUID versionId, Integer versionNumber) throws ApiException { + return adaptersWorkItemsIdGetWithHttpInfo(id, versionId, versionNumber).getData(); + } + + /** + * Get Test Case, Checklist or Shared Step by Id or GlobalId + * + * @param id Internal (UUID) or global (integer) identifier (required) + * @param versionId (optional) + * @param versionNumber (optional) + * @return ApiResponse<WorkItemApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersWorkItemsIdGetWithHttpInfo(String id, UUID versionId, Integer versionNumber) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersWorkItemsIdGet"); + } + + // Path parameters + String localVarPath = "/adapters/workItems/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "versionId", versionId) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "versionNumber", versionNumber)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("WorkItemsApi.adaptersWorkItemsIdGet", localVarPath, "GET", localVarQueryParams, null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Creates work item + * + * @param createWorkItemApiModel (optional) + * @return WorkItemApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public WorkItemApiResult adaptersWorkItemsPost(CreateWorkItemApiModel createWorkItemApiModel) throws ApiException { + return adaptersWorkItemsPostWithHttpInfo(createWorkItemApiModel).getData(); + } + + /** + * Creates work item + * + * @param createWorkItemApiModel (optional) + * @return ApiResponse<WorkItemApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersWorkItemsPostWithHttpInfo(CreateWorkItemApiModel createWorkItemApiModel) throws ApiException { + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("WorkItemsApi.adaptersWorkItemsPost", "/adapters/workItems", "POST", new ArrayList<>(), createWorkItemApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Search for work items + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param workItemSelectApiModel (optional) + * @return List<WorkItemShortApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public List adaptersWorkItemsSearchPost(Integer skip, Integer take, String orderBy, String searchField, String searchValue, WorkItemSelectApiModel workItemSelectApiModel) throws ApiException { + return adaptersWorkItemsSearchPostWithHttpInfo(skip, take, orderBy, searchField, searchValue, workItemSelectApiModel).getData(); + } + + /** + * Search for work items + * + * @param skip Amount of items to be skipped (offset) (optional) + * @param take Amount of items to be taken (limit) (optional) + * @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional) + * @param searchField Property name for searching (optional) + * @param searchValue Value for searching (optional) + * @param workItemSelectApiModel (optional) + * @return ApiResponse<List<WorkItemShortApiResult>> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Pagination-Skip - Skipped amount of items
* Pagination-Take - Taken items
* Pagination-Pages - Expected number of pages
* Pagination-Total-Items - Total count of items
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse> adaptersWorkItemsSearchPostWithHttpInfo(Integer skip, Integer take, String orderBy, String searchField, String searchValue, WorkItemSelectApiModel workItemSelectApiModel) throws ApiException { + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "Skip", skip) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "Take", take)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "OrderBy", orderBy)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchField", searchField)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "SearchValue", searchValue)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI("WorkItemsApi.adaptersWorkItemsSearchPost", "/adapters/workItems/search", "POST", localVarQueryParams, workItemSelectApiModel, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/WorkflowsApi.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/WorkflowsApi.java new file mode 100644 index 0000000..f4a3f16 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/api/WorkflowsApi.java @@ -0,0 +1,112 @@ +package ru.testit.adaptersapi.api; + +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiResponse; +import ru.testit.adaptersapi.invoker.Configuration; +import ru.testit.adaptersapi.invoker.Pair; + +import jakarta.ws.rs.core.GenericType; + +import ru.testit.adaptersapi.model.ProblemDetails; +import java.util.UUID; +import ru.testit.adaptersapi.model.ValidationProblemDetails; +import ru.testit.adaptersapi.model.WorkflowApiResult; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkflowsApi { + private ApiClient apiClient; + + public WorkflowsApi() { + this(Configuration.getDefaultApiClient()); + } + + public WorkflowsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * + * @param id (required) + * @return WorkflowApiResult + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public WorkflowApiResult adaptersWorkflowsIdGet(UUID id) throws ApiException { + return adaptersWorkflowsIdGetWithHttpInfo(id).getData(); + } + + /** + * + * + * @param id (required) + * @return ApiResponse<WorkflowApiResult> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
422 Unprocessable Entity -
+ */ + public ApiResponse adaptersWorkflowsIdGetWithHttpInfo(UUID id) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling adaptersWorkflowsIdGet"); + } + + // Path parameters + String localVarPath = "/adapters/workflows/{id}" + .replaceAll("\\{id}", apiClient.escapeString(id.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"PrivateToken", "Cookies"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("WorkflowsApi.adaptersWorkflowsIdGet", localVarPath, "GET", new ArrayList<>(), null, + new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ApiClient.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ApiClient.java new file mode 100644 index 0000000..affd5c2 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ApiClient.java @@ -0,0 +1,1293 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v2.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 ru.testit.adaptersapi.invoker; + +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; + +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import org.glassfish.jersey.client.HttpUrlConnectorProvider; +import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.media.multipart.FormDataBodyPart; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.MultiPart; +import org.glassfish.jersey.media.multipart.MultiPartFeature; + +import java.io.IOException; +import java.io.InputStream; + +import java.net.URI; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import java.security.cert.X509Certificate; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import org.glassfish.jersey.logging.LoggingFeature; +import java.util.AbstractMap.SimpleEntry; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Date; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import java.time.OffsetDateTime; + +import java.net.URLEncoder; + +import java.io.File; +import java.io.UnsupportedEncodingException; + +import java.text.DateFormat; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import ru.testit.adaptersapi.invoker.auth.Authentication; +import ru.testit.adaptersapi.invoker.auth.HttpBasicAuth; +import ru.testit.adaptersapi.invoker.auth.HttpBearerAuth; +import ru.testit.adaptersapi.invoker.auth.ApiKeyAuth; + +/** + *

ApiClient class.

+ */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ApiClient extends JavaTimeFormatter { + private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + + protected Map defaultHeaderMap = new HashMap<>(); + protected Map defaultCookieMap = new HashMap<>(); + protected String basePath = "http://localhost"; + protected String userAgent; + private static final Logger log = Logger.getLogger(ApiClient.class.getName()); + + protected List servers = new ArrayList<>(Arrays.asList( + new ServerConfiguration( + "", + "No description provided", + new LinkedHashMap<>() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + protected Map> operationServers = new HashMap<>(); + protected Map operationServerIndex = new HashMap<>(); + protected Map> operationServerVariables = new HashMap<>(); + protected boolean debugging = false; + protected ClientConfig clientConfig; + protected int connectionTimeout = 0; + private int readTimeout = 0; + + protected Client httpClient; + protected JSON json; + protected String tempFolderPath = null; + + protected Map authentications; + protected Map authenticationLookup; + + protected DateFormat dateFormat; + + + // KEEP disableCertificateValidation logic + // revert changes on ApiClient.java + + /** + * Constructs a new ApiClient with default parameters. + */ + public ApiClient(boolean disableCertificateValidation) { + this(null, disableCertificateValidation); + } + + /** + * Constructs a new ApiClient with the specified authentication parameters. + * + * @param authMap A hash map containing authentication parameters. + */ + public ApiClient(Map authMap, boolean disableCertificateValidation) { + json = new JSON(); + httpClient = buildHttpClient(disableCertificateValidation); + + this.dateFormat = new RFC3339DateFormat(); + + // Set default User-Agent. + setUserAgent("OpenAPI-Generator/2.5.0-TMS-5.8/java"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap<>(); + Authentication auth = null; + if (authMap != null) { + auth = authMap.get("PrivateToken"); + } + if (auth instanceof ApiKeyAuth) { + authentications.put("PrivateToken", auth); + } else { + authentications.put("PrivateToken", new ApiKeyAuth("header", "Authorization")); + } + if (authMap != null) { + auth = authMap.get("Cookies"); + } + if (auth instanceof ApiKeyAuth) { + authentications.put("Cookies", auth); + } else { + authentications.put("Cookies", new ApiKeyAuth("query", "session")); + } + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + // Setup authentication lookup (key: authentication alias, value: authentication name) + authenticationLookup = new HashMap<>(); + } + + /** + * Gets the JSON instance to do JSON serialization and deserialization. + * + * @return JSON + */ + public JSON getJSON() { + return json; + } + + /** + *

Getter for the field httpClient.

+ * + * @return a {@link jakarta.ws.rs.client.Client} object. + */ + public Client getHttpClient() { + return httpClient; + } + + /** + *

Setter for the field httpClient.

+ * + * @param httpClient a {@link jakarta.ws.rs.client.Client} object. + * @return a {@link ApiClient} object. + */ + public ApiClient setHttpClient(Client httpClient) { + this.httpClient = httpClient; + return this; + } + + /** + * Returns the base URL to the location where the OpenAPI document is being served. + * + * @return The base URL to the target host. + */ + public String getBasePath() { + return basePath; + } + + /** + * Sets the base URL to the location where the OpenAPI document is being served. + * + * @param basePath The base URL to the target host. + * @return a {@link ApiClient} object. + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + *

Getter for the field servers.

+ * + * @return a {@link java.util.List} of servers. + */ + public List getServers() { + return servers; + } + + /** + *

Setter for the field servers.

+ * + * @param servers a {@link java.util.List} of servers. + * @return a {@link ApiClient} object. + */ + public ApiClient setServers(List servers) { + this.servers = servers; + updateBasePath(); + return this; + } + + /** + *

Getter for the field serverIndex.

+ * + * @return a {@link java.lang.Integer} object. + */ + public Integer getServerIndex() { + return serverIndex; + } + + /** + *

Setter for the field serverIndex.

+ * + * @param serverIndex the server index + * @return a {@link ApiClient} object. + */ + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + updateBasePath(); + return this; + } + + /** + *

Getter for the field serverVariables.

+ * + * @return a {@link java.util.Map} of server variables. + */ + public Map getServerVariables() { + return serverVariables; + } + + /** + *

Setter for the field serverVariables.

+ * + * @param serverVariables a {@link java.util.Map} of server variables. + * @return a {@link ApiClient} object. + */ + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + updateBasePath(); + return this; + } + + private void updateBasePath() { + if (serverIndex != null) { + setBasePath(servers.get(serverIndex).URL(serverVariables)); + } + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication object + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + * @return a {@link ApiClient} object. + */ + public ApiClient setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + * @return a {@link ApiClient} object. + */ + public ApiClient setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return this; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + * @return a {@link ApiClient} object. + */ + public ApiClient setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to configure authentications which respects aliases of API keys. + * + * @param secrets Hash map from authentication name to its secret. + * @return a {@link ApiClient} object. + */ + public ApiClient configureApiKeys(Map secrets) { + for (Map.Entry authEntry : authentications.entrySet()) { + Authentication auth = authEntry.getValue(); + if (auth instanceof ApiKeyAuth) { + String name = authEntry.getKey(); + // respect x-auth-id-alias property + name = authenticationLookup.getOrDefault(name, name); + String secret = secrets.get(name); + if (secret != null) { + ((ApiKeyAuth) auth).setApiKey(secret); + } + } + } + return this; + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + * @return a {@link ApiClient} object. + */ + public ApiClient setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return this; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set bearer token for the first Bearer authentication. + * + * @param bearerToken Bearer token + * @return a {@link ApiClient} object. + */ + public ApiClient setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return this; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent Http user agent + * @return a {@link ApiClient} object. + */ + public ApiClient setUserAgent(String userAgent) { + this.userAgent = userAgent; + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Get the User-Agent header's value. + * + * @return User-Agent string + */ + public String getUserAgent(){ + return userAgent; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return a {@link ApiClient} object. + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return a {@link ApiClient} object. + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Gets the client config. + * + * @return Client config + */ + public ClientConfig getClientConfig() { + return clientConfig; + } + + /** + * Set the client config. + * + * @param clientConfig Set the client config + * @return a {@link ApiClient} object. + */ + public ApiClient setClientConfig(ClientConfig clientConfig, boolean disableCertificateValidation) { + this.clientConfig = clientConfig; + // Rebuild HTTP Client according to the new "clientConfig" value. + this.httpClient = buildHttpClient(disableCertificateValidation); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is switched on + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return a {@link ApiClient} object. + */ + public ApiClient setDebugging(boolean debugging, boolean disableCertificateValidation) { + this.debugging = debugging; + // Rebuild HTTP Client according to the new "debugging" value. + this.httpClient = buildHttpClient(disableCertificateValidation); + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @return Temp folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set temp folder path + * + * @param tempFolderPath Temp folder path + * @return a {@link ApiClient} object. + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Connect timeout (in milliseconds). + * + * @return Connection timeout + */ + public int getConnectTimeout() { + return connectionTimeout; + } + + /** + * Set the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param connectionTimeout Connection timeout in milliseconds + * @return a {@link ApiClient} object. + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + this.connectionTimeout = connectionTimeout; + httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout); + return this; + } + + /** + * read timeout (in milliseconds). + * + * @return Read timeout + */ + public int getReadTimeout() { + return readTimeout; + } + + /** + * Set the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param readTimeout Read timeout in milliseconds + * @return a {@link ApiClient} object. + */ + public ApiClient setReadTimeout(int readTimeout) { + this.readTimeout = readTimeout; + httpClient.property(ClientProperties.READ_TIMEOUT, readTimeout); + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * + * @return Date format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * + * @param dateFormat Date format + * @return a {@link ApiClient} object. + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + // also set the date format for model (de)serialization with Date properties + this.json.setDateFormat((DateFormat) dateFormat.clone()); + return this; + } + + /** + * Parse the given string into Date object. + * + * @param str String + * @return Date + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (java.text.ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * + * @param date Date + * @return Date in string format + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * + * @param param Object + * @return Object in string format + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection)param) { + if(b.length() > 0) { + b.append(','); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /* + * Format to {@code Pair} objects. + * + * @param collectionFormat Collection format + * @param name Name + * @param value Value + * @return List of pairs + */ + public List parameterToPairs(String collectionFormat, String name, Object value){ + List params = new ArrayList<>(); + + // preconditions + if (name == null || name.isEmpty() || value == null) return params; + + Collection valueCollection; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(new Pair(name, parameterToString(value))); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + // get the collection format (default: csv) + String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); + + // create the params based on the collection format + if ("multi".equals(format)) { + for (Object item : valueCollection) { + params.add(new Pair(name, parameterToString(item))); + } + + return params; + } + + String delimiter = ","; + + if ("csv".equals(format)) { + delimiter = ","; + } else if ("ssv".equals(format)) { + delimiter = " "; + } else if ("tsv".equals(format)) { + delimiter = "\t"; + } else if ("pipes".equals(format)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : valueCollection) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + params.add(new Pair(name, sb.substring(1))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "*{@literal /}*" is also considered JSON by this method. + * + * @param mime MIME + * @return True if the MIME type is JSON + */ + public boolean isJsonMime(String mime) { + return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches()); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String... accepts) { + if (accepts == null || accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + public String selectHeaderContentType(String... contentTypes) { + if (contentTypes == null || contentTypes.length == 0) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Serialize the given Java object into string entity according the given + * Content-Type (only JSON is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @return Entity + * @throws ApiException API exception + */ + public Entity serialize(Object obj, Map formParams, String contentType, boolean isBodyNullable) throws ApiException { + Entity entity; + if (contentType.startsWith("multipart/form-data")) { + MultiPart multiPart = new MultiPart(); + for (Entry param: formParams.entrySet()) { + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); + } else { + addParamToMultipart(param.getValue(), param.getKey(), multiPart); + } + } + entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + Form form = new Form(); + for (Entry param: formParams.entrySet()) { + form.param(param.getKey(), parameterToString(param.getValue())); + } + entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); + } else { + // We let jersey handle the serialization + if (isBodyNullable) { // payload is nullable + if (obj instanceof String) { + entity = Entity.entity(obj == null ? "null" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType); + } else { + entity = Entity.entity(obj == null ? "null" : obj, contentType); + } + } else { + if (obj instanceof String) { + entity = Entity.entity(obj == null ? "" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType); + } else { + entity = Entity.entity(obj == null ? "" : obj, contentType); + } + } + } + return entity; + } + + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + + /** + * Serialize the given Java object into string according the given + * Content-Type (only JSON, HTTP form is supported for now). + * + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @param isBodyNullable True if the body is nullable + * @return String + * @throws ApiException API exception + */ + public String serializeToString(Object obj, Map formParams, String contentType, boolean isBodyNullable) throws ApiException { + try { + if (contentType.startsWith("multipart/form-data")) { + throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)"); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + String formString = ""; + for (Entry param : formParams.entrySet()) { + formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&"; + } + + if (formString.length() == 0) { // empty string + return formString; + } else { + return formString.substring(0, formString.length() - 1); + } + } else { + if (isBodyNullable) { + return obj == null ? "null" : json.getMapper().writeValueAsString(obj); + } else { + return obj == null ? "" : json.getMapper().writeValueAsString(obj); + } + } + } catch (Exception ex) { + throw new ApiException("Failed to perform serializeToString: " + ex.toString()); + } + } + + /** + * Deserialize response body to Java object according to the Content-Type. + * + * @param Type + * @param response Response + * @param returnType Return type + * @return Deserialize object + * @throws ApiException API exception + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, GenericType returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + return (T) response.readEntity(byte[].class); + } else if (returnType.getRawType() == File.class) { + // Handle file downloading. + T file = (T) downloadFileFromResponse(response); + return file; + } + + // read the entity stream multiple times + response.bufferEntity(); + + return response.readEntity(returnType); + } + + /** + * Download file from the given response. + * + * @param response Response + * @return File + * @throws ApiException If fail to read file content from response and write to disk + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + *

Prepare the file for download from the response.

+ * + * @param response a {@link jakarta.ws.rs.core.Response} object. + * @return a {@link java.io.File} object. + * @throws java.io.IOException if any. + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) + filename = matcher.group(1); + } + + String prefix; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf('.'); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param Type + * @param operation The qualified name of the operation + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE" + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType The return type into which to deserialize the response + * @param isBodyNullable True if the body is nullable + * @return The response body in type of string + * @throws ApiException API exception + */ + public ApiResponse invokeAPI( + String operation, + String path, + String method, + List queryParams, + Object body, + Map headerParams, + Map cookieParams, + Map formParams, + String accept, + String contentType, + String[] authNames, + GenericType returnType, + boolean isBodyNullable) + throws ApiException { + + String targetURL; + List serverConfigurations; + if (serverIndex != null && (serverConfigurations = operationServers.get(operation)) != null) { + int index = operationServerIndex.getOrDefault(operation, serverIndex).intValue(); + Map variables = operationServerVariables.getOrDefault(operation, serverVariables); + if (index < 0 || index >= serverConfigurations.size()) { + throw new ArrayIndexOutOfBoundsException( + String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", + index, serverConfigurations.size())); + } + targetURL = serverConfigurations.get(index).URL(variables) + path; + } else { + targetURL = this.basePath + path; + } + // Not using `.target(targetURL).path(path)` below, + // to support (constant) query string in `path`, e.g. "/posts?draft=1" + WebTarget target = httpClient.target(targetURL); + + if (queryParams != null) { + for (Pair queryParam : queryParams) { + if (queryParam.getValue() != null) { + target = target.queryParam(queryParam.getName(), escapeString(queryParam.getValue())); + } + } + } + + Invocation.Builder invocationBuilder = target.request(); + + if (accept != null) { + invocationBuilder = invocationBuilder.accept(accept); + } + + for (Entry entry : cookieParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + + for (Entry entry : defaultCookieMap.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); + } + } + + Entity entity = serialize(body, formParams, contentType, isBodyNullable); + + // put all headers in one place + Map allHeaderParams = new HashMap<>(defaultHeaderMap); + allHeaderParams.putAll(headerParams); + + if (authNames != null) { + // update different parameters (e.g. headers) for authentication + updateParamsForAuth( + authNames, + queryParams, + allHeaderParams, + cookieParams, + null, + method, + target.getUri()); + } + + for (Entry entry : allHeaderParams.entrySet()) { + String value = entry.getValue(); + if (value != null) { + invocationBuilder = invocationBuilder.header(entry.getKey(), value); + } + } + + Response response = null; + + try { + response = sendRequest(method, invocationBuilder, entity); + + final int statusCode = response.getStatusInfo().getStatusCode(); + + Map> responseHeaders = buildResponseHeaders(response); + + if (statusCode == Status.NO_CONTENT.getStatusCode()) { + return new ApiResponse(statusCode, responseHeaders); + } else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) { + if (returnType == null) { + return new ApiResponse(statusCode, responseHeaders); + } else { + return new ApiResponse(statusCode, responseHeaders, deserialize(response, returnType)); + } + } else { + String message = "error"; + String respBody = null; + if (response.hasEntity()) { + try { + respBody = String.valueOf(response.readEntity(String.class)); + message = respBody; + } catch (RuntimeException e) { + // e.printStackTrace(); + } + } + throw new ApiException( + response.getStatus(), message, buildResponseHeaders(response), respBody); + } + } finally { + try { + response.close(); + } catch (Exception e) { + // it's not critical, since the response object is local in method invokeAPI; that's fine, + // just continue + } + } + } + + private Response sendRequest(String method, Invocation.Builder invocationBuilder, Entity entity) { + Response response; + if ("POST".equals(method)) { + response = invocationBuilder.post(entity); + } else if ("PUT".equals(method)) { + response = invocationBuilder.put(entity); + } else if ("DELETE".equals(method)) { + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } + } else if ("PATCH".equals(method)) { + response = invocationBuilder.method("PATCH", entity); + } else { + response = invocationBuilder.method(method); + } + return response; + } + + /** + * @deprecated Add qualified name of the operation as a first parameter. + */ + @Deprecated + public ApiResponse invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType, boolean isBodyNullable) throws ApiException { + return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, isBodyNullable); + } + + /** + * Build the Client used to make HTTP requests. + * + * @return Client + */ + protected Client buildHttpClient(boolean disableCertificateValidation) { + // recreate the client config to pickup changes + clientConfig = getDefaultClientConfig(); + + ClientBuilder clientBuilder = ClientBuilder.newBuilder(); + clientBuilder = clientBuilder.withConfig(clientConfig); + customizeClientBuilder(clientBuilder, disableCertificateValidation); + return clientBuilder.build(); + } + + /** + * Get the default client config. + * + * @return Client config + */ + public ClientConfig getDefaultClientConfig() { + ClientConfig clientConfig = new ClientConfig(); + clientConfig.register(MultiPartFeature.class); + clientConfig.register(json); + clientConfig.register(JacksonFeature.class); + clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); + // turn off compliance validation to be able to send payloads with DELETE calls + clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); + if (debugging) { + clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */)); + clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); + // Set logger to ALL + java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL); + } else { + // suppress warnings for payloads with DELETE calls: + java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE); + } + + return clientConfig; + } + + /** + * Customize the client builder. + * + * This method can be overridden to customize the API client. For example, this can be used to: + * 1. Set the hostname verifier to be used by the client to verify the endpoint's hostname + * against its identification information. + * 2. Set the client-side key store. + * 3. Set the SSL context that will be used when creating secured transport connections to + * server endpoints from web targets created by the client instance that is using this SSL context. + * 4. Set the client-side trust store. + * + * To completely disable certificate validation (at your own risk), you can + * override this method and invoke disableCertificateValidation(clientBuilder). + * + * @param clientBuilder a {@link jakarta.ws.rs.client.ClientBuilder} object. + */ + protected void customizeClientBuilder(ClientBuilder clientBuilder, boolean disableCertificateValidation) { + // No-op extension point + try { + if (disableCertificateValidation) { + disableCertificateValidation(clientBuilder); + } + } catch (KeyManagementException | NoSuchAlgorithmException e) { + throw new RuntimeException(e); + } + } + + /** + * Disable X.509 certificate validation in TLS connections. + * + * Please note that trusting all certificates is extremely risky. + * This may be useful in a development environment with self-signed certificates. + * + * @param clientBuilder a {@link jakarta.ws.rs.client.ClientBuilder} object. + * @throws java.security.KeyManagementException if any. + * @throws java.security.NoSuchAlgorithmException if any. + */ + protected void disableCertificateValidation(ClientBuilder clientBuilder) throws KeyManagementException, NoSuchAlgorithmException { + TrustManager[] trustAllCerts = new X509TrustManager[] { + new X509TrustManager() { + @Override + public X509Certificate[] getAcceptedIssuers() { + return null; + } + @Override + public void checkClientTrusted(X509Certificate[] certs, String authType) { + } + @Override + public void checkServerTrusted(X509Certificate[] certs, String authType) { + } + } + }; + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(null, trustAllCerts, new SecureRandom()); + clientBuilder.sslContext(sslContext); + } + + /** + *

Build the response headers.

+ * + * @param response a {@link jakarta.ws.rs.core.Response} object. + * @return a {@link java.util.Map} of response headers. + */ + protected Map> buildResponseHeaders(Response response) { + Map> responseHeaders = new HashMap<>(); + for (Entry> entry: response.getHeaders().entrySet()) { + List values = entry.getValue(); + List headers = new ArrayList<>(); + for (Object o : values) { + headers.add(String.valueOf(o)); + } + responseHeaders.put(entry.getKey(), headers); + } + return responseHeaders; + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param method HTTP method (e.g. POST) + * @param uri HTTP URI + */ + protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + continue; + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + } + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ApiException.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ApiException.java new file mode 100644 index 0000000..9818b3c --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ApiException.java @@ -0,0 +1,96 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker; + +import java.util.Map; +import java.util.List; + +/** + * API Exception + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ApiException extends Exception { + private static final long serialVersionUID = 1L; + + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ApiResponse.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ApiResponse.java new file mode 100644 index 0000000..66eec40 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ApiResponse.java @@ -0,0 +1,74 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + private final int statusCode; + private final Map> headers; + private final T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + /** + * Get the status code + * + * @return status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Get the headers + * + * @return map of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + * Get the data + * + * @return data + */ + public T getData() { + return data; + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/Configuration.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/Configuration.java new file mode 100644 index 0000000..8b8d555 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/Configuration.java @@ -0,0 +1,41 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v2.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 ru.testit.adaptersapi.invoker; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.9.0") +public class Configuration { + public static final String VERSION = "2.2.6"; + + private static ApiClient defaultApiClient = new ApiClient(true); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/JSON.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/JSON.java new file mode 100644 index 0000000..1f5461e --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/JSON.java @@ -0,0 +1,261 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +import org.openapitools.jackson.nullable.JsonNullableModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.ext.ContextResolver; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class JSON implements ContextResolver { + private ObjectMapper mapper; + + public JSON() { + mapper = JsonMapper.builder() + .serializationInclusion(JsonInclude.Include.NON_NULL) + .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) + .enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING) + .defaultDateFormat(new RFC3339DateFormat()) + .addModule(new JavaTimeModule()) + .addModule(new JsonNullableModule()) + .build(); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet<>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap<>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map> descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map>> modelDescendants = new HashMap<>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map> descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/JavaTimeFormatter.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/JavaTimeFormatter.java new file mode 100644 index 0000000..01e076a --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/JavaTimeFormatter.java @@ -0,0 +1,64 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package ru.testit.adaptersapi.invoker; + +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + +/** + * Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class. + * It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}. + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class JavaTimeFormatter { + + private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + + /** + * Get the date format used to parse/format {@code OffsetDateTime} parameters. + * @return DateTimeFormatter + */ + public DateTimeFormatter getOffsetDateTimeFormatter() { + return offsetDateTimeFormatter; + } + + /** + * Set the date format used to parse/format {@code OffsetDateTime} parameters. + * @param offsetDateTimeFormatter {@code DateTimeFormatter} + */ + public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) { + this.offsetDateTimeFormatter = offsetDateTimeFormatter; + } + + /** + * Parse the given string into {@code OffsetDateTime} object. + * @param str String + * @return {@code OffsetDateTime} + */ + public OffsetDateTime parseOffsetDateTime(String str) { + try { + return OffsetDateTime.parse(str, offsetDateTimeFormatter); + } catch (DateTimeParseException e) { + throw new RuntimeException(e); + } + } + /** + * Format the given {@code OffsetDateTime} object into string. + * @param offsetDateTime {@code OffsetDateTime} + * @return {@code OffsetDateTime} in string format + */ + public String formatOffsetDateTime(OffsetDateTime offsetDateTime) { + return offsetDateTimeFormatter.format(offsetDateTime); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/Pair.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/Pair.java new file mode 100644 index 0000000..e440d2e --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/Pair.java @@ -0,0 +1,57 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/RFC3339DateFormat.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/RFC3339DateFormat.java new file mode 100644 index 0000000..32de069 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/RFC3339DateFormat.java @@ -0,0 +1,58 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package ru.testit.adaptersapi.invoker; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.text.DecimalFormat; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + this.numberFormat = new DecimalFormat(); + } + + @Override + public Date parse(String source) { + return parse(source, new ParsePosition(0)); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return super.clone(); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ServerConfiguration.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ServerConfiguration.java new file mode 100644 index 0000000..531caf0 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ServerConfiguration.java @@ -0,0 +1,72 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ServerVariable.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ServerVariable.java new file mode 100644 index 0000000..2e74b86 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/ServerVariable.java @@ -0,0 +1,37 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/StringUtil.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/StringUtil.java new file mode 100644 index 0000000..4a367c5 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/StringUtil.java @@ -0,0 +1,83 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker; + +import java.util.Collection; +import java.util.Iterator; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/ApiKeyAuth.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/ApiKeyAuth.java new file mode 100644 index 0000000..c58ca89 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/ApiKeyAuth.java @@ -0,0 +1,79 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker.auth; + +import ru.testit.adaptersapi.invoker.Pair; +import ru.testit.adaptersapi.invoker.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/Authentication.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/Authentication.java new file mode 100644 index 0000000..eb56190 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/Authentication.java @@ -0,0 +1,33 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker.auth; + +import ru.testit.adaptersapi.invoker.Pair; +import ru.testit.adaptersapi.invoker.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; + +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/HttpBasicAuth.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/HttpBasicAuth.java new file mode 100644 index 0000000..52ed146 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/HttpBasicAuth.java @@ -0,0 +1,55 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker.auth; + +import ru.testit.adaptersapi.invoker.Pair; +import ru.testit.adaptersapi.invoker.ApiException; + +import java.util.Base64; +import java.nio.charset.StandardCharsets; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/HttpBearerAuth.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/HttpBearerAuth.java new file mode 100644 index 0000000..1ca9c5f --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/invoker/auth/HttpBearerAuth.java @@ -0,0 +1,62 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.invoker.auth; + +import ru.testit.adaptersapi.invoker.Pair; +import ru.testit.adaptersapi.invoker.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + if(bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AbstractOpenApiSchema.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AbstractOpenApiSchema.java new file mode 100644 index 0000000..9e41f50 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AbstractOpenApiSchema.java @@ -0,0 +1,149 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import ru.testit.adaptersapi.invoker.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; +import jakarta.ws.rs.core.GenericType; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).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 "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AssignAttachmentApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AssignAttachmentApiModel.java new file mode 100644 index 0000000..026fd9f --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AssignAttachmentApiModel.java @@ -0,0 +1,111 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AssignAttachmentApiModel + */ +@JsonPropertyOrder({ + AssignAttachmentApiModel.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AssignAttachmentApiModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public AssignAttachmentApiModel() { + } + + public AssignAttachmentApiModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the attachment + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this AssignAttachmentApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignAttachmentApiModel assignAttachmentApiModel = (AssignAttachmentApiModel) o; + return Objects.equals(this.id, assignAttachmentApiModel.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignAttachmentApiModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AssignAutoTestCaseIdApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AssignAutoTestCaseIdApiModel.java new file mode 100644 index 0000000..edc0f41 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AssignAutoTestCaseIdApiModel.java @@ -0,0 +1,111 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AssignAutoTestCaseIdApiModel + */ +@JsonPropertyOrder({ + AssignAutoTestCaseIdApiModel.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AssignAutoTestCaseIdApiModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public AssignAutoTestCaseIdApiModel() { + } + + public AssignAutoTestCaseIdApiModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the automated test case + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this AssignAutoTestCaseIdApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignAutoTestCaseIdApiModel assignAutoTestCaseIdApiModel = (AssignAutoTestCaseIdApiModel) o; + return Objects.equals(this.id, assignAutoTestCaseIdApiModel.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignAutoTestCaseIdApiModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AssignIterationApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AssignIterationApiModel.java new file mode 100644 index 0000000..cba6c07 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AssignIterationApiModel.java @@ -0,0 +1,154 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import ru.testit.adaptersapi.model.ParameterIterationModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AssignIterationApiModel + */ +@JsonPropertyOrder({ + AssignIterationApiModel.JSON_PROPERTY_PARAMETERS, + AssignIterationApiModel.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AssignIterationApiModel { + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + @jakarta.annotation.Nonnull + private List parameters = new ArrayList<>(); + + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public AssignIterationApiModel() { + } + + public AssignIterationApiModel parameters(@jakarta.annotation.Nonnull List parameters) { + this.parameters = parameters; + return this; + } + + public AssignIterationApiModel addParametersItem(ParameterIterationModel parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); + } + this.parameters.add(parametersItem); + return this; + } + + /** + * Get parameters + * @return parameters + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getParameters() { + return parameters; + } + + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParameters(@jakarta.annotation.Nonnull List parameters) { + this.parameters = parameters; + } + + + public AssignIterationApiModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Iteration identifier, must be empty for new or changed iteration + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this AssignIterationApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignIterationApiModel assignIterationApiModel = (AssignIterationApiModel) o; + return Objects.equals(this.parameters, assignIterationApiModel.parameters) && + Objects.equals(this.id, assignIterationApiModel.id); + } + + @Override + public int hashCode() { + return Objects.hash(parameters, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignIterationApiModel {\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentApiResult.java new file mode 100644 index 0000000..40fc1fe --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentApiResult.java @@ -0,0 +1,239 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AttachmentApiResult + */ +@JsonPropertyOrder({ + AttachmentApiResult.JSON_PROPERTY_ID, + AttachmentApiResult.JSON_PROPERTY_FILE_ID, + AttachmentApiResult.JSON_PROPERTY_TYPE, + AttachmentApiResult.JSON_PROPERTY_SIZE, + AttachmentApiResult.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AttachmentApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_FILE_ID = "fileId"; + @jakarta.annotation.Nonnull + private String fileId; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private String type; + + public static final String JSON_PROPERTY_SIZE = "size"; + @jakarta.annotation.Nonnull + private Float size; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public AttachmentApiResult() { + } + + public AttachmentApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the attachment + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public AttachmentApiResult fileId(@jakarta.annotation.Nonnull String fileId) { + this.fileId = fileId; + return this; + } + + /** + * Unique ID of the attachment file + * @return fileId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getFileId() { + return fileId; + } + + + @JsonProperty(JSON_PROPERTY_FILE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFileId(@jakarta.annotation.Nonnull String fileId) { + this.fileId = fileId; + } + + + public AttachmentApiResult type(@jakarta.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * MIME type of the attachment + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull String type) { + this.type = type; + } + + + public AttachmentApiResult size(@jakarta.annotation.Nonnull Float size) { + this.size = size; + return this; + } + + /** + * Size in bytes of the attachment file + * @return size + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Float getSize() { + return size; + } + + + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSize(@jakarta.annotation.Nonnull Float size) { + this.size = size; + } + + + public AttachmentApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the attachment file + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this AttachmentApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachmentApiResult attachmentApiResult = (AttachmentApiResult) o; + return Objects.equals(this.id, attachmentApiResult.id) && + Objects.equals(this.fileId, attachmentApiResult.fileId) && + Objects.equals(this.type, attachmentApiResult.type) && + Objects.equals(this.size, attachmentApiResult.size) && + Objects.equals(this.name, attachmentApiResult.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, fileId, type, size, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachmentApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" fileId: ").append(toIndentedString(fileId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentModel.java new file mode 100644 index 0000000..bb28c9f --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentModel.java @@ -0,0 +1,397 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AttachmentModel + */ +@JsonPropertyOrder({ + AttachmentModel.JSON_PROPERTY_FILE_ID, + AttachmentModel.JSON_PROPERTY_TYPE, + AttachmentModel.JSON_PROPERTY_SIZE, + AttachmentModel.JSON_PROPERTY_CREATED_DATE, + AttachmentModel.JSON_PROPERTY_CREATED_BY_ID, + AttachmentModel.JSON_PROPERTY_NAME, + AttachmentModel.JSON_PROPERTY_ID, + AttachmentModel.JSON_PROPERTY_MODIFIED_DATE, + AttachmentModel.JSON_PROPERTY_MODIFIED_BY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AttachmentModel { + public static final String JSON_PROPERTY_FILE_ID = "fileId"; + @jakarta.annotation.Nonnull + private String fileId; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private String type; + + public static final String JSON_PROPERTY_SIZE = "size"; + @jakarta.annotation.Nonnull + private Float size; + + public static final String JSON_PROPERTY_CREATED_DATE = "createdDate"; + @jakarta.annotation.Nonnull + private OffsetDateTime createdDate; + + public static final String JSON_PROPERTY_CREATED_BY_ID = "createdById"; + @jakarta.annotation.Nonnull + private UUID createdById; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_MODIFIED_DATE = "modifiedDate"; + private JsonNullable modifiedDate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED_BY_ID = "modifiedById"; + private JsonNullable modifiedById = JsonNullable.undefined(); + + public AttachmentModel() { + } + + public AttachmentModel fileId(@jakarta.annotation.Nonnull String fileId) { + this.fileId = fileId; + return this; + } + + /** + * Unique ID of the attachment file + * @return fileId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getFileId() { + return fileId; + } + + + @JsonProperty(JSON_PROPERTY_FILE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFileId(@jakarta.annotation.Nonnull String fileId) { + this.fileId = fileId; + } + + + public AttachmentModel type(@jakarta.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * MIME type of the attachment + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull String type) { + this.type = type; + } + + + public AttachmentModel size(@jakarta.annotation.Nonnull Float size) { + this.size = size; + return this; + } + + /** + * Size in bytes of the attachment file + * @return size + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Float getSize() { + return size; + } + + + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSize(@jakarta.annotation.Nonnull Float size) { + this.size = size; + } + + + public AttachmentModel createdDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Creation date of the attachment + * @return createdDate + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedDate() { + return createdDate; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + } + + + public AttachmentModel createdById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + return this; + } + + /** + * Unique ID of the attachment creator + * @return createdById + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getCreatedById() { + return createdById; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + } + + + public AttachmentModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the attachment file + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public AttachmentModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the attachment + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public AttachmentModel modifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + return this; + } + + /** + * Last modification date of the attachment + * @return modifiedDate + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getModifiedDate() { + return modifiedDate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedDate_JsonNullable() { + return modifiedDate; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + public void setModifiedDate_JsonNullable(JsonNullable modifiedDate) { + this.modifiedDate = modifiedDate; + } + + public void setModifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + } + + + public AttachmentModel modifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + return this; + } + + /** + * Unique ID of the attachment last editor + * @return modifiedById + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getModifiedById() { + return modifiedById.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedById_JsonNullable() { + return modifiedById; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + public void setModifiedById_JsonNullable(JsonNullable modifiedById) { + this.modifiedById = modifiedById; + } + + public void setModifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + } + + + /** + * Return true if this AttachmentModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachmentModel attachmentModel = (AttachmentModel) o; + return Objects.equals(this.fileId, attachmentModel.fileId) && + Objects.equals(this.type, attachmentModel.type) && + Objects.equals(this.size, attachmentModel.size) && + Objects.equals(this.createdDate, attachmentModel.createdDate) && + Objects.equals(this.createdById, attachmentModel.createdById) && + Objects.equals(this.name, attachmentModel.name) && + Objects.equals(this.id, attachmentModel.id) && + equalsNullable(this.modifiedDate, attachmentModel.modifiedDate) && + equalsNullable(this.modifiedById, attachmentModel.modifiedById); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(fileId, type, size, createdDate, createdById, name, id, hashCodeNullable(modifiedDate), hashCodeNullable(modifiedById)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachmentModel {\n"); + sb.append(" fileId: ").append(toIndentedString(fileId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" createdDate: ").append(toIndentedString(createdDate)).append("\n"); + sb.append(" createdById: ").append(toIndentedString(createdById)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" modifiedDate: ").append(toIndentedString(modifiedDate)).append("\n"); + sb.append(" modifiedById: ").append(toIndentedString(modifiedById)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentPutModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentPutModel.java new file mode 100644 index 0000000..29482f6 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentPutModel.java @@ -0,0 +1,111 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AttachmentPutModel + */ +@JsonPropertyOrder({ + AttachmentPutModel.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AttachmentPutModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public AttachmentPutModel() { + } + + public AttachmentPutModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the attachment + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this AttachmentPutModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachmentPutModel attachmentPutModel = (AttachmentPutModel) o; + return Objects.equals(this.id, attachmentPutModel.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachmentPutModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentPutModelAutoTestStepResultsModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentPutModelAutoTestStepResultsModel.java new file mode 100644 index 0000000..e5a0ccc --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentPutModelAutoTestStepResultsModel.java @@ -0,0 +1,528 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentPutModel; +import ru.testit.adaptersapi.model.AvailableTestResultOutcome; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AttachmentPutModelAutoTestStepResultsModel + */ +@JsonPropertyOrder({ + AttachmentPutModelAutoTestStepResultsModel.JSON_PROPERTY_TITLE, + AttachmentPutModelAutoTestStepResultsModel.JSON_PROPERTY_DESCRIPTION, + AttachmentPutModelAutoTestStepResultsModel.JSON_PROPERTY_INFO, + AttachmentPutModelAutoTestStepResultsModel.JSON_PROPERTY_STARTED_ON, + AttachmentPutModelAutoTestStepResultsModel.JSON_PROPERTY_COMPLETED_ON, + AttachmentPutModelAutoTestStepResultsModel.JSON_PROPERTY_DURATION, + AttachmentPutModelAutoTestStepResultsModel.JSON_PROPERTY_OUTCOME, + AttachmentPutModelAutoTestStepResultsModel.JSON_PROPERTY_STEP_RESULTS, + AttachmentPutModelAutoTestStepResultsModel.JSON_PROPERTY_ATTACHMENTS, + AttachmentPutModelAutoTestStepResultsModel.JSON_PROPERTY_PARAMETERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AttachmentPutModelAutoTestStepResultsModel { + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INFO = "info"; + private JsonNullable info = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STARTED_ON = "startedOn"; + private JsonNullable startedOn = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETED_ON = "completedOn"; + private JsonNullable completedOn = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION = "duration"; + private JsonNullable duration = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTCOME = "outcome"; + private JsonNullable outcome = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEP_RESULTS = "stepResults"; + private JsonNullable> stepResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private JsonNullable> attachments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + private JsonNullable> parameters = JsonNullable.>undefined(); + + public AttachmentPutModelAutoTestStepResultsModel() { + } + + public AttachmentPutModelAutoTestStepResultsModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * The name of the step. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public AttachmentPutModelAutoTestStepResultsModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the step result. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AttachmentPutModelAutoTestStepResultsModel info(@jakarta.annotation.Nullable String info) { + this.info = JsonNullable.of(info); + return this; + } + + /** + * Extended description of the step result. + * @return info + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getInfo() { + return info.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInfo_JsonNullable() { + return info; + } + + @JsonProperty(JSON_PROPERTY_INFO) + public void setInfo_JsonNullable(JsonNullable info) { + this.info = info; + } + + public void setInfo(@jakarta.annotation.Nullable String info) { + this.info = JsonNullable.of(info); + } + + + public AttachmentPutModelAutoTestStepResultsModel startedOn(@jakarta.annotation.Nullable OffsetDateTime startedOn) { + this.startedOn = JsonNullable.of(startedOn); + return this; + } + + /** + * Step start date. + * @return startedOn + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getStartedOn() { + return startedOn.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STARTED_ON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStartedOn_JsonNullable() { + return startedOn; + } + + @JsonProperty(JSON_PROPERTY_STARTED_ON) + public void setStartedOn_JsonNullable(JsonNullable startedOn) { + this.startedOn = startedOn; + } + + public void setStartedOn(@jakarta.annotation.Nullable OffsetDateTime startedOn) { + this.startedOn = JsonNullable.of(startedOn); + } + + + public AttachmentPutModelAutoTestStepResultsModel completedOn(@jakarta.annotation.Nullable OffsetDateTime completedOn) { + this.completedOn = JsonNullable.of(completedOn); + return this; + } + + /** + * Step end date. + * @return completedOn + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getCompletedOn() { + return completedOn.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_ON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedOn_JsonNullable() { + return completedOn; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_ON) + public void setCompletedOn_JsonNullable(JsonNullable completedOn) { + this.completedOn = completedOn; + } + + public void setCompletedOn(@jakarta.annotation.Nullable OffsetDateTime completedOn) { + this.completedOn = JsonNullable.of(completedOn); + } + + + public AttachmentPutModelAutoTestStepResultsModel duration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + return this; + } + + /** + * Expected or actual duration of the test run execution in milliseconds. + * minimum: 0 + * maximum: 43200000000 + * @return duration + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Long getDuration() { + return duration.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDuration_JsonNullable() { + return duration; + } + + @JsonProperty(JSON_PROPERTY_DURATION) + public void setDuration_JsonNullable(JsonNullable duration) { + this.duration = duration; + } + + public void setDuration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + } + + + public AttachmentPutModelAutoTestStepResultsModel outcome(@jakarta.annotation.Nullable AvailableTestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + return this; + } + + /** + * Specifies the result of the autotest execution. + * @return outcome + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public AvailableTestResultOutcome getOutcome() { + return outcome.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutcome_JsonNullable() { + return outcome; + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + public void setOutcome_JsonNullable(JsonNullable outcome) { + this.outcome = outcome; + } + + public void setOutcome(@jakarta.annotation.Nullable AvailableTestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + } + + + public AttachmentPutModelAutoTestStepResultsModel stepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + return this; + } + + public AttachmentPutModelAutoTestStepResultsModel addStepResultsItem(AttachmentPutModelAutoTestStepResultsModel stepResultsItem) { + if (this.stepResults == null || !this.stepResults.isPresent()) { + this.stepResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.stepResults.get().add(stepResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Nested step results. The maximum nesting level is 15. + * @return stepResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getStepResults() { + return stepResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStepResults_JsonNullable() { + return stepResults; + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + public void setStepResults_JsonNullable(JsonNullable> stepResults) { + this.stepResults = stepResults; + } + + public void setStepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + } + + + public AttachmentPutModelAutoTestStepResultsModel attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + return this; + } + + public AttachmentPutModelAutoTestStepResultsModel addAttachmentsItem(AttachmentPutModel attachmentsItem) { + if (this.attachments == null || !this.attachments.isPresent()) { + this.attachments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attachments.get().add(attachmentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * /// <summary> Specifies an attachment GUID. Multiple values can be sent. </summary> + * @return attachments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttachments() { + return attachments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttachments_JsonNullable() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + public void setAttachments_JsonNullable(JsonNullable> attachments) { + this.attachments = attachments; + } + + public void setAttachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + } + + + public AttachmentPutModelAutoTestStepResultsModel parameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + return this; + } + + public AttachmentPutModelAutoTestStepResultsModel putParametersItem(String key, String parametersItem) { + if (this.parameters == null || !this.parameters.isPresent()) { + this.parameters = JsonNullable.>of(new HashMap<>()); + } + try { + this.parameters.get().put(key, parametersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * \"<b>parameter</b>\": \"<b>value</b>\" pair with arbitrary custom parameters. Multiple parameters can be sent. + * @return parameters + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map getParameters() { + return parameters.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getParameters_JsonNullable() { + return parameters; + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + public void setParameters_JsonNullable(JsonNullable> parameters) { + this.parameters = parameters; + } + + public void setParameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + } + + + /** + * Return true if this AttachmentPutModelAutoTestStepResultsModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachmentPutModelAutoTestStepResultsModel attachmentPutModelAutoTestStepResultsModel = (AttachmentPutModelAutoTestStepResultsModel) o; + return equalsNullable(this.title, attachmentPutModelAutoTestStepResultsModel.title) && + equalsNullable(this.description, attachmentPutModelAutoTestStepResultsModel.description) && + equalsNullable(this.info, attachmentPutModelAutoTestStepResultsModel.info) && + equalsNullable(this.startedOn, attachmentPutModelAutoTestStepResultsModel.startedOn) && + equalsNullable(this.completedOn, attachmentPutModelAutoTestStepResultsModel.completedOn) && + equalsNullable(this.duration, attachmentPutModelAutoTestStepResultsModel.duration) && + equalsNullable(this.outcome, attachmentPutModelAutoTestStepResultsModel.outcome) && + equalsNullable(this.stepResults, attachmentPutModelAutoTestStepResultsModel.stepResults) && + equalsNullable(this.attachments, attachmentPutModelAutoTestStepResultsModel.attachments) && + equalsNullable(this.parameters, attachmentPutModelAutoTestStepResultsModel.parameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(title), hashCodeNullable(description), hashCodeNullable(info), hashCodeNullable(startedOn), hashCodeNullable(completedOn), hashCodeNullable(duration), hashCodeNullable(outcome), hashCodeNullable(stepResults), hashCodeNullable(attachments), hashCodeNullable(parameters)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachmentPutModelAutoTestStepResultsModel {\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" info: ").append(toIndentedString(info)).append("\n"); + sb.append(" startedOn: ").append(toIndentedString(startedOn)).append("\n"); + sb.append(" completedOn: ").append(toIndentedString(completedOn)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" outcome: ").append(toIndentedString(outcome)).append("\n"); + sb.append(" stepResults: ").append(toIndentedString(stepResults)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentUpdateRequest.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentUpdateRequest.java new file mode 100644 index 0000000..8e21b84 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AttachmentUpdateRequest.java @@ -0,0 +1,111 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AttachmentUpdateRequest + */ +@JsonPropertyOrder({ + AttachmentUpdateRequest.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AttachmentUpdateRequest { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public AttachmentUpdateRequest() { + } + + public AttachmentUpdateRequest id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the attachment + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this AttachmentUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachmentUpdateRequest attachmentUpdateRequest = (AttachmentUpdateRequest) o; + return Objects.equals(this.id, attachmentUpdateRequest.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachmentUpdateRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTest.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTest.java new file mode 100644 index 0000000..eda15b2 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTest.java @@ -0,0 +1,748 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AutoTestStep; +import ru.testit.adaptersapi.model.LabelApiModel; +import ru.testit.adaptersapi.model.LinkApiResult; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTest + */ +@JsonPropertyOrder({ + AutoTest.JSON_PROPERTY_EXTERNAL_ID, + AutoTest.JSON_PROPERTY_PROJECT_ID, + AutoTest.JSON_PROPERTY_NAME, + AutoTest.JSON_PROPERTY_GLOBAL_ID, + AutoTest.JSON_PROPERTY_ID, + AutoTest.JSON_PROPERTY_LINKS, + AutoTest.JSON_PROPERTY_NAMESPACE, + AutoTest.JSON_PROPERTY_CLASSNAME, + AutoTest.JSON_PROPERTY_STEPS, + AutoTest.JSON_PROPERTY_SETUP, + AutoTest.JSON_PROPERTY_TEARDOWN, + AutoTest.JSON_PROPERTY_TITLE, + AutoTest.JSON_PROPERTY_DESCRIPTION, + AutoTest.JSON_PROPERTY_LABELS, + AutoTest.JSON_PROPERTY_IS_FLAKY, + AutoTest.JSON_PROPERTY_EXTERNAL_KEY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTest { + public static final String JSON_PROPERTY_EXTERNAL_ID = "externalId"; + @jakarta.annotation.Nonnull + private String externalId; + + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + private JsonNullable namespace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CLASSNAME = "classname"; + private JsonNullable classname = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + private JsonNullable> steps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_SETUP = "setup"; + private JsonNullable> setup = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TEARDOWN = "teardown"; + private JsonNullable> teardown = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LABELS = "labels"; + private JsonNullable> labels = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_IS_FLAKY = "isFlaky"; + private JsonNullable isFlaky = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXTERNAL_KEY = "externalKey"; + private JsonNullable externalKey = JsonNullable.undefined(); + + public AutoTest() { + } + + public AutoTest externalId(@jakarta.annotation.Nonnull String externalId) { + this.externalId = externalId; + return this; + } + + /** + * External ID of the autotest + * @return externalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getExternalId() { + return externalId; + } + + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExternalId(@jakarta.annotation.Nonnull String externalId) { + this.externalId = externalId; + } + + + public AutoTest projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Unique ID of the autotest project + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public AutoTest name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the autotest + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public AutoTest globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Global ID of the autotest + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + public AutoTest id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the autotest + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public AutoTest links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public AutoTest addLinksItem(LinkApiResult linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest links + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public AutoTest namespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + return this; + } + + /** + * Name of the autotest namespace + * @return namespace + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getNamespace() { + return namespace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNamespace_JsonNullable() { + return namespace; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + public void setNamespace_JsonNullable(JsonNullable namespace) { + this.namespace = namespace; + } + + public void setNamespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + } + + + public AutoTest classname(@jakarta.annotation.Nullable String classname) { + this.classname = JsonNullable.of(classname); + return this; + } + + /** + * Name of the autotest class + * @return classname + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getClassname() { + return classname.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CLASSNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getClassname_JsonNullable() { + return classname; + } + + @JsonProperty(JSON_PROPERTY_CLASSNAME) + public void setClassname_JsonNullable(JsonNullable classname) { + this.classname = classname; + } + + public void setClassname(@jakarta.annotation.Nullable String classname) { + this.classname = JsonNullable.of(classname); + } + + + public AutoTest steps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + return this; + } + + public AutoTest addStepsItem(AutoTestStep stepsItem) { + if (this.steps == null || !this.steps.isPresent()) { + this.steps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.steps.get().add(stepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest steps + * @return steps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSteps() { + return steps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSteps_JsonNullable() { + return steps; + } + + @JsonProperty(JSON_PROPERTY_STEPS) + public void setSteps_JsonNullable(JsonNullable> steps) { + this.steps = steps; + } + + public void setSteps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + } + + + public AutoTest setup(@jakarta.annotation.Nullable List setup) { + this.setup = JsonNullable.>of(setup); + return this; + } + + public AutoTest addSetupItem(AutoTestStep setupItem) { + if (this.setup == null || !this.setup.isPresent()) { + this.setup = JsonNullable.>of(new ArrayList<>()); + } + try { + this.setup.get().add(setupItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest setup steps + * @return setup + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSetup() { + return setup.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SETUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSetup_JsonNullable() { + return setup; + } + + @JsonProperty(JSON_PROPERTY_SETUP) + public void setSetup_JsonNullable(JsonNullable> setup) { + this.setup = setup; + } + + public void setSetup(@jakarta.annotation.Nullable List setup) { + this.setup = JsonNullable.>of(setup); + } + + + public AutoTest teardown(@jakarta.annotation.Nullable List teardown) { + this.teardown = JsonNullable.>of(teardown); + return this; + } + + public AutoTest addTeardownItem(AutoTestStep teardownItem) { + if (this.teardown == null || !this.teardown.isPresent()) { + this.teardown = JsonNullable.>of(new ArrayList<>()); + } + try { + this.teardown.get().add(teardownItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest teardown steps + * @return teardown + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTeardown() { + return teardown.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTeardown_JsonNullable() { + return teardown; + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN) + public void setTeardown_JsonNullable(JsonNullable> teardown) { + this.teardown = teardown; + } + + public void setTeardown(@jakarta.annotation.Nullable List teardown) { + this.teardown = JsonNullable.>of(teardown); + } + + + public AutoTest title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Name of the autotest in autotest's card + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public AutoTest description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the autotest in autotest's card + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTest labels(@jakarta.annotation.Nullable List labels) { + this.labels = JsonNullable.>of(labels); + return this; + } + + public AutoTest addLabelsItem(LabelApiModel labelsItem) { + if (this.labels == null || !this.labels.isPresent()) { + this.labels = JsonNullable.>of(new ArrayList<>()); + } + try { + this.labels.get().add(labelsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest labels + * @return labels + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLabels() { + return labels.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLabels_JsonNullable() { + return labels; + } + + @JsonProperty(JSON_PROPERTY_LABELS) + public void setLabels_JsonNullable(JsonNullable> labels) { + this.labels = labels; + } + + public void setLabels(@jakarta.annotation.Nullable List labels) { + this.labels = JsonNullable.>of(labels); + } + + + public AutoTest isFlaky(@jakarta.annotation.Nullable Boolean isFlaky) { + this.isFlaky = JsonNullable.of(isFlaky); + return this; + } + + /** + * Indicates if the autotest is marked as flaky + * @return isFlaky + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsFlaky() { + return isFlaky.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsFlaky_JsonNullable() { + return isFlaky; + } + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + public void setIsFlaky_JsonNullable(JsonNullable isFlaky) { + this.isFlaky = isFlaky; + } + + public void setIsFlaky(@jakarta.annotation.Nullable Boolean isFlaky) { + this.isFlaky = JsonNullable.of(isFlaky); + } + + + public AutoTest externalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + return this; + } + + /** + * External key of the autotest + * @return externalKey + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getExternalKey() { + return externalKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExternalKey_JsonNullable() { + return externalKey; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + public void setExternalKey_JsonNullable(JsonNullable externalKey) { + this.externalKey = externalKey; + } + + public void setExternalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + } + + + /** + * Return true if this AutoTest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTest autoTest = (AutoTest) o; + return Objects.equals(this.externalId, autoTest.externalId) && + Objects.equals(this.projectId, autoTest.projectId) && + Objects.equals(this.name, autoTest.name) && + Objects.equals(this.globalId, autoTest.globalId) && + Objects.equals(this.id, autoTest.id) && + equalsNullable(this.links, autoTest.links) && + equalsNullable(this.namespace, autoTest.namespace) && + equalsNullable(this.classname, autoTest.classname) && + equalsNullable(this.steps, autoTest.steps) && + equalsNullable(this.setup, autoTest.setup) && + equalsNullable(this.teardown, autoTest.teardown) && + equalsNullable(this.title, autoTest.title) && + equalsNullable(this.description, autoTest.description) && + equalsNullable(this.labels, autoTest.labels) && + equalsNullable(this.isFlaky, autoTest.isFlaky) && + equalsNullable(this.externalKey, autoTest.externalKey); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(externalId, projectId, name, globalId, id, hashCodeNullable(links), hashCodeNullable(namespace), hashCodeNullable(classname), hashCodeNullable(steps), hashCodeNullable(setup), hashCodeNullable(teardown), hashCodeNullable(title), hashCodeNullable(description), hashCodeNullable(labels), hashCodeNullable(isFlaky), hashCodeNullable(externalKey)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTest {\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" classname: ").append(toIndentedString(classname)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).append("\n"); + sb.append(" setup: ").append(toIndentedString(setup)).append("\n"); + sb.append(" teardown: ").append(toIndentedString(teardown)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" isFlaky: ").append(toIndentedString(isFlaky)).append("\n"); + sb.append(" externalKey: ").append(toIndentedString(externalKey)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestApiResult.java new file mode 100644 index 0000000..c4a5af9 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestApiResult.java @@ -0,0 +1,799 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AutoTestStepApiResult; +import ru.testit.adaptersapi.model.LabelApiResult; +import ru.testit.adaptersapi.model.LinkApiResult; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestApiResult + */ +@JsonPropertyOrder({ + AutoTestApiResult.JSON_PROPERTY_ID, + AutoTestApiResult.JSON_PROPERTY_PROJECT_ID, + AutoTestApiResult.JSON_PROPERTY_NAME, + AutoTestApiResult.JSON_PROPERTY_IS_FLAKY, + AutoTestApiResult.JSON_PROPERTY_GLOBAL_ID, + AutoTestApiResult.JSON_PROPERTY_EXTERNAL_ID, + AutoTestApiResult.JSON_PROPERTY_NAMESPACE, + AutoTestApiResult.JSON_PROPERTY_CLASSNAME, + AutoTestApiResult.JSON_PROPERTY_STEPS, + AutoTestApiResult.JSON_PROPERTY_SETUP, + AutoTestApiResult.JSON_PROPERTY_TEARDOWN, + AutoTestApiResult.JSON_PROPERTY_TITLE, + AutoTestApiResult.JSON_PROPERTY_DESCRIPTION, + AutoTestApiResult.JSON_PROPERTY_EXTERNAL_KEY, + AutoTestApiResult.JSON_PROPERTY_LINKS, + AutoTestApiResult.JSON_PROPERTY_LABELS, + AutoTestApiResult.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_IS_FLAKY = "isFlaky"; + @jakarta.annotation.Nonnull + private Boolean isFlaky; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public static final String JSON_PROPERTY_EXTERNAL_ID = "externalId"; + private JsonNullable externalId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + private JsonNullable namespace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CLASSNAME = "classname"; + private JsonNullable classname = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + private JsonNullable> steps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_SETUP = "setup"; + private JsonNullable> setup = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TEARDOWN = "teardown"; + private JsonNullable> teardown = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXTERNAL_KEY = "externalKey"; + private JsonNullable externalKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_LABELS = "labels"; + private JsonNullable> labels = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public AutoTestApiResult() { + } + + public AutoTestApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public AutoTestApiResult projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Get projectId + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public AutoTestApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public AutoTestApiResult isFlaky(@jakarta.annotation.Nonnull Boolean isFlaky) { + this.isFlaky = isFlaky; + return this; + } + + /** + * Get isFlaky + * @return isFlaky + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsFlaky() { + return isFlaky; + } + + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsFlaky(@jakarta.annotation.Nonnull Boolean isFlaky) { + this.isFlaky = isFlaky; + } + + + public AutoTestApiResult globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Get globalId + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + public AutoTestApiResult externalId(@jakarta.annotation.Nullable String externalId) { + this.externalId = JsonNullable.of(externalId); + return this; + } + + /** + * Get externalId + * @return externalId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getExternalId() { + return externalId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExternalId_JsonNullable() { + return externalId; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + public void setExternalId_JsonNullable(JsonNullable externalId) { + this.externalId = externalId; + } + + public void setExternalId(@jakarta.annotation.Nullable String externalId) { + this.externalId = JsonNullable.of(externalId); + } + + + public AutoTestApiResult namespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + return this; + } + + /** + * Get namespace + * @return namespace + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getNamespace() { + return namespace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNamespace_JsonNullable() { + return namespace; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + public void setNamespace_JsonNullable(JsonNullable namespace) { + this.namespace = namespace; + } + + public void setNamespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + } + + + public AutoTestApiResult classname(@jakarta.annotation.Nullable String classname) { + this.classname = JsonNullable.of(classname); + return this; + } + + /** + * Get classname + * @return classname + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getClassname() { + return classname.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CLASSNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getClassname_JsonNullable() { + return classname; + } + + @JsonProperty(JSON_PROPERTY_CLASSNAME) + public void setClassname_JsonNullable(JsonNullable classname) { + this.classname = classname; + } + + public void setClassname(@jakarta.annotation.Nullable String classname) { + this.classname = JsonNullable.of(classname); + } + + + public AutoTestApiResult steps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + return this; + } + + public AutoTestApiResult addStepsItem(AutoTestStepApiResult stepsItem) { + if (this.steps == null || !this.steps.isPresent()) { + this.steps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.steps.get().add(stepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get steps + * @return steps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSteps() { + return steps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSteps_JsonNullable() { + return steps; + } + + @JsonProperty(JSON_PROPERTY_STEPS) + public void setSteps_JsonNullable(JsonNullable> steps) { + this.steps = steps; + } + + public void setSteps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + } + + + public AutoTestApiResult setup(@jakarta.annotation.Nullable List setup) { + this.setup = JsonNullable.>of(setup); + return this; + } + + public AutoTestApiResult addSetupItem(AutoTestStepApiResult setupItem) { + if (this.setup == null || !this.setup.isPresent()) { + this.setup = JsonNullable.>of(new ArrayList<>()); + } + try { + this.setup.get().add(setupItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get setup + * @return setup + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSetup() { + return setup.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SETUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSetup_JsonNullable() { + return setup; + } + + @JsonProperty(JSON_PROPERTY_SETUP) + public void setSetup_JsonNullable(JsonNullable> setup) { + this.setup = setup; + } + + public void setSetup(@jakarta.annotation.Nullable List setup) { + this.setup = JsonNullable.>of(setup); + } + + + public AutoTestApiResult teardown(@jakarta.annotation.Nullable List teardown) { + this.teardown = JsonNullable.>of(teardown); + return this; + } + + public AutoTestApiResult addTeardownItem(AutoTestStepApiResult teardownItem) { + if (this.teardown == null || !this.teardown.isPresent()) { + this.teardown = JsonNullable.>of(new ArrayList<>()); + } + try { + this.teardown.get().add(teardownItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get teardown + * @return teardown + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTeardown() { + return teardown.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTeardown_JsonNullable() { + return teardown; + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN) + public void setTeardown_JsonNullable(JsonNullable> teardown) { + this.teardown = teardown; + } + + public void setTeardown(@jakarta.annotation.Nullable List teardown) { + this.teardown = JsonNullable.>of(teardown); + } + + + public AutoTestApiResult title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Get title + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public AutoTestApiResult description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTestApiResult externalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + return this; + } + + /** + * Get externalKey + * @return externalKey + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getExternalKey() { + return externalKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExternalKey_JsonNullable() { + return externalKey; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + public void setExternalKey_JsonNullable(JsonNullable externalKey) { + this.externalKey = externalKey; + } + + public void setExternalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + } + + + public AutoTestApiResult links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public AutoTestApiResult addLinksItem(LinkApiResult linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get links + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public AutoTestApiResult labels(@jakarta.annotation.Nullable List labels) { + this.labels = JsonNullable.>of(labels); + return this; + } + + public AutoTestApiResult addLabelsItem(LabelApiResult labelsItem) { + if (this.labels == null || !this.labels.isPresent()) { + this.labels = JsonNullable.>of(new ArrayList<>()); + } + try { + this.labels.get().add(labelsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get labels + * @return labels + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLabels() { + return labels.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLabels_JsonNullable() { + return labels; + } + + @JsonProperty(JSON_PROPERTY_LABELS) + public void setLabels_JsonNullable(JsonNullable> labels) { + this.labels = labels; + } + + public void setLabels(@jakarta.annotation.Nullable List labels) { + this.labels = JsonNullable.>of(labels); + } + + + public AutoTestApiResult tags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public AutoTestApiResult addTagsItem(String tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.tags.get().add(tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get tags + * @return tags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + } + + + /** + * Return true if this AutoTestApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestApiResult autoTestApiResult = (AutoTestApiResult) o; + return Objects.equals(this.id, autoTestApiResult.id) && + Objects.equals(this.projectId, autoTestApiResult.projectId) && + Objects.equals(this.name, autoTestApiResult.name) && + Objects.equals(this.isFlaky, autoTestApiResult.isFlaky) && + Objects.equals(this.globalId, autoTestApiResult.globalId) && + equalsNullable(this.externalId, autoTestApiResult.externalId) && + equalsNullable(this.namespace, autoTestApiResult.namespace) && + equalsNullable(this.classname, autoTestApiResult.classname) && + equalsNullable(this.steps, autoTestApiResult.steps) && + equalsNullable(this.setup, autoTestApiResult.setup) && + equalsNullable(this.teardown, autoTestApiResult.teardown) && + equalsNullable(this.title, autoTestApiResult.title) && + equalsNullable(this.description, autoTestApiResult.description) && + equalsNullable(this.externalKey, autoTestApiResult.externalKey) && + equalsNullable(this.links, autoTestApiResult.links) && + equalsNullable(this.labels, autoTestApiResult.labels) && + equalsNullable(this.tags, autoTestApiResult.tags); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, projectId, name, isFlaky, globalId, hashCodeNullable(externalId), hashCodeNullable(namespace), hashCodeNullable(classname), hashCodeNullable(steps), hashCodeNullable(setup), hashCodeNullable(teardown), hashCodeNullable(title), hashCodeNullable(description), hashCodeNullable(externalKey), hashCodeNullable(links), hashCodeNullable(labels), hashCodeNullable(tags)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isFlaky: ").append(toIndentedString(isFlaky)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" classname: ").append(toIndentedString(classname)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).append("\n"); + sb.append(" setup: ").append(toIndentedString(setup)).append("\n"); + sb.append(" teardown: ").append(toIndentedString(teardown)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" externalKey: ").append(toIndentedString(externalKey)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestCaseApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestCaseApiModel.java new file mode 100644 index 0000000..4d17a3f --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestCaseApiModel.java @@ -0,0 +1,111 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestCaseApiModel + */ +@JsonPropertyOrder({ + AutoTestCaseApiModel.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestCaseApiModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public AutoTestCaseApiModel() { + } + + public AutoTestCaseApiModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the automated test case + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this AutoTestCaseApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestCaseApiModel autoTestCaseApiModel = (AutoTestCaseApiModel) o; + return Objects.equals(this.id, autoTestCaseApiModel.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestCaseApiModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestCreateApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestCreateApiModel.java new file mode 100644 index 0000000..68f2e91 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestCreateApiModel.java @@ -0,0 +1,774 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AutoTestStepApiModel; +import ru.testit.adaptersapi.model.LabelApiModel; +import ru.testit.adaptersapi.model.LinkCreateApiModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestCreateApiModel + */ +@JsonPropertyOrder({ + AutoTestCreateApiModel.JSON_PROPERTY_PROJECT_ID, + AutoTestCreateApiModel.JSON_PROPERTY_EXTERNAL_ID, + AutoTestCreateApiModel.JSON_PROPERTY_NAME, + AutoTestCreateApiModel.JSON_PROPERTY_EXTERNAL_KEY, + AutoTestCreateApiModel.JSON_PROPERTY_NAMESPACE, + AutoTestCreateApiModel.JSON_PROPERTY_CLASSNAME, + AutoTestCreateApiModel.JSON_PROPERTY_TITLE, + AutoTestCreateApiModel.JSON_PROPERTY_DESCRIPTION, + AutoTestCreateApiModel.JSON_PROPERTY_IS_FLAKY, + AutoTestCreateApiModel.JSON_PROPERTY_STEPS, + AutoTestCreateApiModel.JSON_PROPERTY_SETUP, + AutoTestCreateApiModel.JSON_PROPERTY_TEARDOWN, + AutoTestCreateApiModel.JSON_PROPERTY_SHOULD_CREATE_WORK_ITEM, + AutoTestCreateApiModel.JSON_PROPERTY_LABELS, + AutoTestCreateApiModel.JSON_PROPERTY_LINKS, + AutoTestCreateApiModel.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestCreateApiModel { + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_EXTERNAL_ID = "externalId"; + @jakarta.annotation.Nonnull + private String externalId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_EXTERNAL_KEY = "externalKey"; + private JsonNullable externalKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + private JsonNullable namespace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CLASSNAME = "classname"; + private JsonNullable classname = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_FLAKY = "isFlaky"; + private JsonNullable isFlaky = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + private JsonNullable> steps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_SETUP = "setup"; + private JsonNullable> setup = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TEARDOWN = "teardown"; + private JsonNullable> teardown = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_SHOULD_CREATE_WORK_ITEM = "shouldCreateWorkItem"; + private JsonNullable shouldCreateWorkItem = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LABELS = "labels"; + private JsonNullable> labels = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public AutoTestCreateApiModel() { + } + + public AutoTestCreateApiModel projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Unique ID of the autotest project + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public AutoTestCreateApiModel externalId(@jakarta.annotation.Nonnull String externalId) { + this.externalId = externalId; + return this; + } + + /** + * External ID of the autotest + * @return externalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getExternalId() { + return externalId; + } + + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExternalId(@jakarta.annotation.Nonnull String externalId) { + this.externalId = externalId; + } + + + public AutoTestCreateApiModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the autotest + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public AutoTestCreateApiModel externalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + return this; + } + + /** + * External key of the autotest + * @return externalKey + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getExternalKey() { + return externalKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExternalKey_JsonNullable() { + return externalKey; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + public void setExternalKey_JsonNullable(JsonNullable externalKey) { + this.externalKey = externalKey; + } + + public void setExternalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + } + + + public AutoTestCreateApiModel namespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + return this; + } + + /** + * Name of the autotest namespace + * @return namespace + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getNamespace() { + return namespace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNamespace_JsonNullable() { + return namespace; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + public void setNamespace_JsonNullable(JsonNullable namespace) { + this.namespace = namespace; + } + + public void setNamespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + } + + + public AutoTestCreateApiModel classname(@jakarta.annotation.Nullable String classname) { + this.classname = JsonNullable.of(classname); + return this; + } + + /** + * Name of the autotest class + * @return classname + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getClassname() { + return classname.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CLASSNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getClassname_JsonNullable() { + return classname; + } + + @JsonProperty(JSON_PROPERTY_CLASSNAME) + public void setClassname_JsonNullable(JsonNullable classname) { + this.classname = classname; + } + + public void setClassname(@jakarta.annotation.Nullable String classname) { + this.classname = JsonNullable.of(classname); + } + + + public AutoTestCreateApiModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Name of the autotest in autotest's card + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public AutoTestCreateApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the autotest in autotest's card + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTestCreateApiModel isFlaky(@jakarta.annotation.Nullable Boolean isFlaky) { + this.isFlaky = JsonNullable.of(isFlaky); + return this; + } + + /** + * Indicates if the autotest is marked as flaky + * @return isFlaky + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsFlaky() { + return isFlaky.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsFlaky_JsonNullable() { + return isFlaky; + } + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + public void setIsFlaky_JsonNullable(JsonNullable isFlaky) { + this.isFlaky = isFlaky; + } + + public void setIsFlaky(@jakarta.annotation.Nullable Boolean isFlaky) { + this.isFlaky = JsonNullable.of(isFlaky); + } + + + public AutoTestCreateApiModel steps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + return this; + } + + public AutoTestCreateApiModel addStepsItem(AutoTestStepApiModel stepsItem) { + if (this.steps == null || !this.steps.isPresent()) { + this.steps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.steps.get().add(stepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest steps + * @return steps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSteps() { + return steps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSteps_JsonNullable() { + return steps; + } + + @JsonProperty(JSON_PROPERTY_STEPS) + public void setSteps_JsonNullable(JsonNullable> steps) { + this.steps = steps; + } + + public void setSteps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + } + + + public AutoTestCreateApiModel setup(@jakarta.annotation.Nullable List setup) { + this.setup = JsonNullable.>of(setup); + return this; + } + + public AutoTestCreateApiModel addSetupItem(AutoTestStepApiModel setupItem) { + if (this.setup == null || !this.setup.isPresent()) { + this.setup = JsonNullable.>of(new ArrayList<>()); + } + try { + this.setup.get().add(setupItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest setup steps + * @return setup + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSetup() { + return setup.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SETUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSetup_JsonNullable() { + return setup; + } + + @JsonProperty(JSON_PROPERTY_SETUP) + public void setSetup_JsonNullable(JsonNullable> setup) { + this.setup = setup; + } + + public void setSetup(@jakarta.annotation.Nullable List setup) { + this.setup = JsonNullable.>of(setup); + } + + + public AutoTestCreateApiModel teardown(@jakarta.annotation.Nullable List teardown) { + this.teardown = JsonNullable.>of(teardown); + return this; + } + + public AutoTestCreateApiModel addTeardownItem(AutoTestStepApiModel teardownItem) { + if (this.teardown == null || !this.teardown.isPresent()) { + this.teardown = JsonNullable.>of(new ArrayList<>()); + } + try { + this.teardown.get().add(teardownItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest teardown steps + * @return teardown + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTeardown() { + return teardown.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTeardown_JsonNullable() { + return teardown; + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN) + public void setTeardown_JsonNullable(JsonNullable> teardown) { + this.teardown = teardown; + } + + public void setTeardown(@jakarta.annotation.Nullable List teardown) { + this.teardown = JsonNullable.>of(teardown); + } + + + public AutoTestCreateApiModel shouldCreateWorkItem(@jakarta.annotation.Nullable Boolean shouldCreateWorkItem) { + this.shouldCreateWorkItem = JsonNullable.of(shouldCreateWorkItem); + return this; + } + + /** + * Creates a test case linked to the autotest. + * @return shouldCreateWorkItem + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getShouldCreateWorkItem() { + return shouldCreateWorkItem.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SHOULD_CREATE_WORK_ITEM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getShouldCreateWorkItem_JsonNullable() { + return shouldCreateWorkItem; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_CREATE_WORK_ITEM) + public void setShouldCreateWorkItem_JsonNullable(JsonNullable shouldCreateWorkItem) { + this.shouldCreateWorkItem = shouldCreateWorkItem; + } + + public void setShouldCreateWorkItem(@jakarta.annotation.Nullable Boolean shouldCreateWorkItem) { + this.shouldCreateWorkItem = JsonNullable.of(shouldCreateWorkItem); + } + + + public AutoTestCreateApiModel labels(@jakarta.annotation.Nullable List labels) { + this.labels = JsonNullable.>of(labels); + return this; + } + + public AutoTestCreateApiModel addLabelsItem(LabelApiModel labelsItem) { + if (this.labels == null || !this.labels.isPresent()) { + this.labels = JsonNullable.>of(new ArrayList<>()); + } + try { + this.labels.get().add(labelsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest labels + * @return labels + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLabels() { + return labels.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLabels_JsonNullable() { + return labels; + } + + @JsonProperty(JSON_PROPERTY_LABELS) + public void setLabels_JsonNullable(JsonNullable> labels) { + this.labels = labels; + } + + public void setLabels(@jakarta.annotation.Nullable List labels) { + this.labels = JsonNullable.>of(labels); + } + + + public AutoTestCreateApiModel links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public AutoTestCreateApiModel addLinksItem(LinkCreateApiModel linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest links + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public AutoTestCreateApiModel tags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public AutoTestCreateApiModel addTagsItem(String tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.tags.get().add(tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest tags + * @return tags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + } + + + /** + * Return true if this AutoTestCreateApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestCreateApiModel autoTestCreateApiModel = (AutoTestCreateApiModel) o; + return Objects.equals(this.projectId, autoTestCreateApiModel.projectId) && + Objects.equals(this.externalId, autoTestCreateApiModel.externalId) && + Objects.equals(this.name, autoTestCreateApiModel.name) && + equalsNullable(this.externalKey, autoTestCreateApiModel.externalKey) && + equalsNullable(this.namespace, autoTestCreateApiModel.namespace) && + equalsNullable(this.classname, autoTestCreateApiModel.classname) && + equalsNullable(this.title, autoTestCreateApiModel.title) && + equalsNullable(this.description, autoTestCreateApiModel.description) && + equalsNullable(this.isFlaky, autoTestCreateApiModel.isFlaky) && + equalsNullable(this.steps, autoTestCreateApiModel.steps) && + equalsNullable(this.setup, autoTestCreateApiModel.setup) && + equalsNullable(this.teardown, autoTestCreateApiModel.teardown) && + equalsNullable(this.shouldCreateWorkItem, autoTestCreateApiModel.shouldCreateWorkItem) && + equalsNullable(this.labels, autoTestCreateApiModel.labels) && + equalsNullable(this.links, autoTestCreateApiModel.links) && + equalsNullable(this.tags, autoTestCreateApiModel.tags); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, externalId, name, hashCodeNullable(externalKey), hashCodeNullable(namespace), hashCodeNullable(classname), hashCodeNullable(title), hashCodeNullable(description), hashCodeNullable(isFlaky), hashCodeNullable(steps), hashCodeNullable(setup), hashCodeNullable(teardown), hashCodeNullable(shouldCreateWorkItem), hashCodeNullable(labels), hashCodeNullable(links), hashCodeNullable(tags)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestCreateApiModel {\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" externalKey: ").append(toIndentedString(externalKey)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" classname: ").append(toIndentedString(classname)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" isFlaky: ").append(toIndentedString(isFlaky)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).append("\n"); + sb.append(" setup: ").append(toIndentedString(setup)).append("\n"); + sb.append(" teardown: ").append(toIndentedString(teardown)).append("\n"); + sb.append(" shouldCreateWorkItem: ").append(toIndentedString(shouldCreateWorkItem)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestFilterApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestFilterApiModel.java new file mode 100644 index 0000000..c602e40 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestFilterApiModel.java @@ -0,0 +1,585 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestFilterApiModel + */ +@JsonPropertyOrder({ + AutoTestFilterApiModel.JSON_PROPERTY_PROJECT_IDS, + AutoTestFilterApiModel.JSON_PROPERTY_EXTERNAL_IDS, + AutoTestFilterApiModel.JSON_PROPERTY_GLOBAL_IDS, + AutoTestFilterApiModel.JSON_PROPERTY_NAME, + AutoTestFilterApiModel.JSON_PROPERTY_IS_FLAKY, + AutoTestFilterApiModel.JSON_PROPERTY_IS_DELETED, + AutoTestFilterApiModel.JSON_PROPERTY_NAMESPACE, + AutoTestFilterApiModel.JSON_PROPERTY_CLASS_NAME, + AutoTestFilterApiModel.JSON_PROPERTY_EXTERNAL_KEY, + AutoTestFilterApiModel.JSON_PROPERTY_TAGS, + AutoTestFilterApiModel.JSON_PROPERTY_EXCLUDE_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestFilterApiModel { + public static final String JSON_PROPERTY_PROJECT_IDS = "projectIds"; + private JsonNullable> projectIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_EXTERNAL_IDS = "externalIds"; + private JsonNullable> externalIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_GLOBAL_IDS = "globalIds"; + private JsonNullable> globalIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_FLAKY = "isFlaky"; + private JsonNullable isFlaky = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + private JsonNullable isDeleted = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + private JsonNullable namespace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CLASS_NAME = "className"; + private JsonNullable className = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXTERNAL_KEY = "externalKey"; + private JsonNullable externalKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_EXCLUDE_TAGS = "excludeTags"; + private JsonNullable> excludeTags = JsonNullable.>undefined(); + + public AutoTestFilterApiModel() { + } + + public AutoTestFilterApiModel projectIds(@jakarta.annotation.Nullable Set projectIds) { + this.projectIds = JsonNullable.>of(projectIds); + return this; + } + + public AutoTestFilterApiModel addProjectIdsItem(UUID projectIdsItem) { + if (this.projectIds == null || !this.projectIds.isPresent()) { + this.projectIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.projectIds.get().add(projectIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies an autotest projects IDs to search for + * @return projectIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getProjectIds() { + return projectIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getProjectIds_JsonNullable() { + return projectIds; + } + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + public void setProjectIds_JsonNullable(JsonNullable> projectIds) { + this.projectIds = projectIds; + } + + public void setProjectIds(@jakarta.annotation.Nullable Set projectIds) { + this.projectIds = JsonNullable.>of(projectIds); + } + + + public AutoTestFilterApiModel externalIds(@jakarta.annotation.Nullable Set externalIds) { + this.externalIds = JsonNullable.>of(externalIds); + return this; + } + + public AutoTestFilterApiModel addExternalIdsItem(String externalIdsItem) { + if (this.externalIds == null || !this.externalIds.isPresent()) { + this.externalIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.externalIds.get().add(externalIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies an autotest external IDs to search for + * @return externalIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getExternalIds() { + return externalIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getExternalIds_JsonNullable() { + return externalIds; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_IDS) + public void setExternalIds_JsonNullable(JsonNullable> externalIds) { + this.externalIds = externalIds; + } + + public void setExternalIds(@jakarta.annotation.Nullable Set externalIds) { + this.externalIds = JsonNullable.>of(externalIds); + } + + + public AutoTestFilterApiModel globalIds(@jakarta.annotation.Nullable Set globalIds) { + this.globalIds = JsonNullable.>of(globalIds); + return this; + } + + public AutoTestFilterApiModel addGlobalIdsItem(Long globalIdsItem) { + if (this.globalIds == null || !this.globalIds.isPresent()) { + this.globalIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.globalIds.get().add(globalIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies an autotest global IDs to search for + * @return globalIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getGlobalIds() { + return globalIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_GLOBAL_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getGlobalIds_JsonNullable() { + return globalIds; + } + + @JsonProperty(JSON_PROPERTY_GLOBAL_IDS) + public void setGlobalIds_JsonNullable(JsonNullable> globalIds) { + this.globalIds = globalIds; + } + + public void setGlobalIds(@jakarta.annotation.Nullable Set globalIds) { + this.globalIds = JsonNullable.>of(globalIds); + } + + + public AutoTestFilterApiModel name(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Specifies an autotest name to search for + * @return name + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public AutoTestFilterApiModel isFlaky(@jakarta.annotation.Nullable Boolean isFlaky) { + this.isFlaky = JsonNullable.of(isFlaky); + return this; + } + + /** + * Specifies an autotest flaky status to search for + * @return isFlaky + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsFlaky() { + return isFlaky.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsFlaky_JsonNullable() { + return isFlaky; + } + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + public void setIsFlaky_JsonNullable(JsonNullable isFlaky) { + this.isFlaky = isFlaky; + } + + public void setIsFlaky(@jakarta.annotation.Nullable Boolean isFlaky) { + this.isFlaky = JsonNullable.of(isFlaky); + } + + + public AutoTestFilterApiModel isDeleted(@jakarta.annotation.Nullable Boolean isDeleted) { + this.isDeleted = JsonNullable.of(isDeleted); + return this; + } + + /** + * Specifies an autotest deleted status to search for + * @return isDeleted + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsDeleted() { + return isDeleted.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsDeleted_JsonNullable() { + return isDeleted; + } + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + public void setIsDeleted_JsonNullable(JsonNullable isDeleted) { + this.isDeleted = isDeleted; + } + + public void setIsDeleted(@jakarta.annotation.Nullable Boolean isDeleted) { + this.isDeleted = JsonNullable.of(isDeleted); + } + + + public AutoTestFilterApiModel namespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + return this; + } + + /** + * Specifies an autotest namespace to search for + * @return namespace + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getNamespace() { + return namespace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNamespace_JsonNullable() { + return namespace; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + public void setNamespace_JsonNullable(JsonNullable namespace) { + this.namespace = namespace; + } + + public void setNamespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + } + + + public AutoTestFilterApiModel className(@jakarta.annotation.Nullable String className) { + this.className = JsonNullable.of(className); + return this; + } + + /** + * Specifies an autotest class name to search for + * @return className + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getClassName() { + return className.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getClassName_JsonNullable() { + return className; + } + + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + public void setClassName_JsonNullable(JsonNullable className) { + this.className = className; + } + + public void setClassName(@jakarta.annotation.Nullable String className) { + this.className = JsonNullable.of(className); + } + + + public AutoTestFilterApiModel externalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + return this; + } + + /** + * Specifies an autotest external key to search for + * @return externalKey + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getExternalKey() { + return externalKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExternalKey_JsonNullable() { + return externalKey; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + public void setExternalKey_JsonNullable(JsonNullable externalKey) { + this.externalKey = externalKey; + } + + public void setExternalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + } + + + public AutoTestFilterApiModel tags(@jakarta.annotation.Nullable Set tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public AutoTestFilterApiModel addTagsItem(String tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.tags.get().add(tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies an autotest tags to search for + * @return tags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(@jakarta.annotation.Nullable Set tags) { + this.tags = JsonNullable.>of(tags); + } + + + public AutoTestFilterApiModel excludeTags(@jakarta.annotation.Nullable Set excludeTags) { + this.excludeTags = JsonNullable.>of(excludeTags); + return this; + } + + public AutoTestFilterApiModel addExcludeTagsItem(String excludeTagsItem) { + if (this.excludeTags == null || !this.excludeTags.isPresent()) { + this.excludeTags = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.excludeTags.get().add(excludeTagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies an autotest tags to exclude + * @return excludeTags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getExcludeTags() { + return excludeTags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getExcludeTags_JsonNullable() { + return excludeTags; + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE_TAGS) + public void setExcludeTags_JsonNullable(JsonNullable> excludeTags) { + this.excludeTags = excludeTags; + } + + public void setExcludeTags(@jakarta.annotation.Nullable Set excludeTags) { + this.excludeTags = JsonNullable.>of(excludeTags); + } + + + /** + * Return true if this AutoTestFilterApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestFilterApiModel autoTestFilterApiModel = (AutoTestFilterApiModel) o; + return equalsNullable(this.projectIds, autoTestFilterApiModel.projectIds) && + equalsNullable(this.externalIds, autoTestFilterApiModel.externalIds) && + equalsNullable(this.globalIds, autoTestFilterApiModel.globalIds) && + equalsNullable(this.name, autoTestFilterApiModel.name) && + equalsNullable(this.isFlaky, autoTestFilterApiModel.isFlaky) && + equalsNullable(this.isDeleted, autoTestFilterApiModel.isDeleted) && + equalsNullable(this.namespace, autoTestFilterApiModel.namespace) && + equalsNullable(this.className, autoTestFilterApiModel.className) && + equalsNullable(this.externalKey, autoTestFilterApiModel.externalKey) && + equalsNullable(this.tags, autoTestFilterApiModel.tags) && + equalsNullable(this.excludeTags, autoTestFilterApiModel.excludeTags); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(projectIds), hashCodeNullable(externalIds), hashCodeNullable(globalIds), hashCodeNullable(name), hashCodeNullable(isFlaky), hashCodeNullable(isDeleted), hashCodeNullable(namespace), hashCodeNullable(className), hashCodeNullable(externalKey), hashCodeNullable(tags), hashCodeNullable(excludeTags)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestFilterApiModel {\n"); + sb.append(" projectIds: ").append(toIndentedString(projectIds)).append("\n"); + sb.append(" externalIds: ").append(toIndentedString(externalIds)).append("\n"); + sb.append(" globalIds: ").append(toIndentedString(globalIds)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isFlaky: ").append(toIndentedString(isFlaky)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" externalKey: ").append(toIndentedString(externalKey)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" excludeTags: ").append(toIndentedString(excludeTags)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestIdModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestIdModel.java new file mode 100644 index 0000000..80d6a8a --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestIdModel.java @@ -0,0 +1,111 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestIdModel + */ +@JsonPropertyOrder({ + AutoTestIdModel.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestIdModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public AutoTestIdModel() { + } + + public AutoTestIdModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this AutoTestIdModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestIdModel autoTestIdModel = (AutoTestIdModel) o; + return Objects.equals(this.id, autoTestIdModel.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestIdModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestModel.java new file mode 100644 index 0000000..13f7e32 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestModel.java @@ -0,0 +1,1235 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AutoTestStepModel; +import ru.testit.adaptersapi.model.ConfigurationShortModel; +import ru.testit.adaptersapi.model.LabelShortModel; +import ru.testit.adaptersapi.model.LinkPutModel; +import ru.testit.adaptersapi.model.TestStatusModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestModel + */ +@JsonPropertyOrder({ + AutoTestModel.JSON_PROPERTY_GLOBAL_ID, + AutoTestModel.JSON_PROPERTY_IS_DELETED, + AutoTestModel.JSON_PROPERTY_MUST_BE_APPROVED, + AutoTestModel.JSON_PROPERTY_ID, + AutoTestModel.JSON_PROPERTY_CREATED_DATE, + AutoTestModel.JSON_PROPERTY_CREATED_BY_ID, + AutoTestModel.JSON_PROPERTY_EXTERNAL_ID, + AutoTestModel.JSON_PROPERTY_PROJECT_ID, + AutoTestModel.JSON_PROPERTY_NAME, + AutoTestModel.JSON_PROPERTY_MODIFIED_DATE, + AutoTestModel.JSON_PROPERTY_MODIFIED_BY_ID, + AutoTestModel.JSON_PROPERTY_LAST_TEST_RUN_ID, + AutoTestModel.JSON_PROPERTY_LAST_TEST_RUN_NAME, + AutoTestModel.JSON_PROPERTY_LAST_TEST_RESULT_ID, + AutoTestModel.JSON_PROPERTY_LAST_TEST_RESULT_CONFIGURATION, + AutoTestModel.JSON_PROPERTY_LAST_TEST_RESULT_OUTCOME, + AutoTestModel.JSON_PROPERTY_LAST_TEST_RESULT_STATUS, + AutoTestModel.JSON_PROPERTY_STABILITY_PERCENTAGE, + AutoTestModel.JSON_PROPERTY_LINKS, + AutoTestModel.JSON_PROPERTY_NAMESPACE, + AutoTestModel.JSON_PROPERTY_CLASSNAME, + AutoTestModel.JSON_PROPERTY_STEPS, + AutoTestModel.JSON_PROPERTY_SETUP, + AutoTestModel.JSON_PROPERTY_TEARDOWN, + AutoTestModel.JSON_PROPERTY_TITLE, + AutoTestModel.JSON_PROPERTY_DESCRIPTION, + AutoTestModel.JSON_PROPERTY_LABELS, + AutoTestModel.JSON_PROPERTY_IS_FLAKY, + AutoTestModel.JSON_PROPERTY_EXTERNAL_KEY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestModel { + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_MUST_BE_APPROVED = "mustBeApproved"; + @jakarta.annotation.Nonnull + private Boolean mustBeApproved; + + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_CREATED_DATE = "createdDate"; + @jakarta.annotation.Nonnull + private OffsetDateTime createdDate; + + public static final String JSON_PROPERTY_CREATED_BY_ID = "createdById"; + @jakarta.annotation.Nonnull + private UUID createdById; + + public static final String JSON_PROPERTY_EXTERNAL_ID = "externalId"; + @jakarta.annotation.Nonnull + private String externalId; + + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_MODIFIED_DATE = "modifiedDate"; + private JsonNullable modifiedDate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED_BY_ID = "modifiedById"; + private JsonNullable modifiedById = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LAST_TEST_RUN_ID = "lastTestRunId"; + private JsonNullable lastTestRunId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LAST_TEST_RUN_NAME = "lastTestRunName"; + private JsonNullable lastTestRunName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LAST_TEST_RESULT_ID = "lastTestResultId"; + private JsonNullable lastTestResultId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LAST_TEST_RESULT_CONFIGURATION = "lastTestResultConfiguration"; + private JsonNullable lastTestResultConfiguration = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LAST_TEST_RESULT_OUTCOME = "lastTestResultOutcome"; + @Deprecated + private JsonNullable lastTestResultOutcome = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LAST_TEST_RESULT_STATUS = "lastTestResultStatus"; + private JsonNullable lastTestResultStatus = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STABILITY_PERCENTAGE = "stabilityPercentage"; + private JsonNullable stabilityPercentage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + private JsonNullable namespace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CLASSNAME = "classname"; + private JsonNullable classname = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + private JsonNullable> steps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_SETUP = "setup"; + private JsonNullable> setup = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TEARDOWN = "teardown"; + private JsonNullable> teardown = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LABELS = "labels"; + private JsonNullable> labels = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_IS_FLAKY = "isFlaky"; + private JsonNullable isFlaky = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXTERNAL_KEY = "externalKey"; + private JsonNullable externalKey = JsonNullable.undefined(); + + public AutoTestModel() { + } + + public AutoTestModel globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Global ID of the autotest + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + public AutoTestModel isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Indicates if the autotest is deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public AutoTestModel mustBeApproved(@jakarta.annotation.Nonnull Boolean mustBeApproved) { + this.mustBeApproved = mustBeApproved; + return this; + } + + /** + * Indicates if the autotest has unapproved changes from linked work items + * @return mustBeApproved + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MUST_BE_APPROVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getMustBeApproved() { + return mustBeApproved; + } + + + @JsonProperty(JSON_PROPERTY_MUST_BE_APPROVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMustBeApproved(@jakarta.annotation.Nonnull Boolean mustBeApproved) { + this.mustBeApproved = mustBeApproved; + } + + + public AutoTestModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the autotest + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public AutoTestModel createdDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Creation date of the autotest + * @return createdDate + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedDate() { + return createdDate; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + } + + + public AutoTestModel createdById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + return this; + } + + /** + * Unique ID of the project creator + * @return createdById + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getCreatedById() { + return createdById; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + } + + + public AutoTestModel externalId(@jakarta.annotation.Nonnull String externalId) { + this.externalId = externalId; + return this; + } + + /** + * External ID of the autotest + * @return externalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getExternalId() { + return externalId; + } + + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExternalId(@jakarta.annotation.Nonnull String externalId) { + this.externalId = externalId; + } + + + public AutoTestModel projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Unique ID of the autotest project + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public AutoTestModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the autotest + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public AutoTestModel modifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + return this; + } + + /** + * Last modification date of the project + * @return modifiedDate + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getModifiedDate() { + return modifiedDate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedDate_JsonNullable() { + return modifiedDate; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + public void setModifiedDate_JsonNullable(JsonNullable modifiedDate) { + this.modifiedDate = modifiedDate; + } + + public void setModifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + } + + + public AutoTestModel modifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + return this; + } + + /** + * Unique ID of the project last editor + * @return modifiedById + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getModifiedById() { + return modifiedById.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedById_JsonNullable() { + return modifiedById; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + public void setModifiedById_JsonNullable(JsonNullable modifiedById) { + this.modifiedById = modifiedById; + } + + public void setModifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + } + + + public AutoTestModel lastTestRunId(@jakarta.annotation.Nullable UUID lastTestRunId) { + this.lastTestRunId = JsonNullable.of(lastTestRunId); + return this; + } + + /** + * Unique ID of the autotest last test run + * @return lastTestRunId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getLastTestRunId() { + return lastTestRunId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RUN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLastTestRunId_JsonNullable() { + return lastTestRunId; + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RUN_ID) + public void setLastTestRunId_JsonNullable(JsonNullable lastTestRunId) { + this.lastTestRunId = lastTestRunId; + } + + public void setLastTestRunId(@jakarta.annotation.Nullable UUID lastTestRunId) { + this.lastTestRunId = JsonNullable.of(lastTestRunId); + } + + + public AutoTestModel lastTestRunName(@jakarta.annotation.Nullable String lastTestRunName) { + this.lastTestRunName = JsonNullable.of(lastTestRunName); + return this; + } + + /** + * Name of the autotest last test run + * @return lastTestRunName + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getLastTestRunName() { + return lastTestRunName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RUN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLastTestRunName_JsonNullable() { + return lastTestRunName; + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RUN_NAME) + public void setLastTestRunName_JsonNullable(JsonNullable lastTestRunName) { + this.lastTestRunName = lastTestRunName; + } + + public void setLastTestRunName(@jakarta.annotation.Nullable String lastTestRunName) { + this.lastTestRunName = JsonNullable.of(lastTestRunName); + } + + + public AutoTestModel lastTestResultId(@jakarta.annotation.Nullable UUID lastTestResultId) { + this.lastTestResultId = JsonNullable.of(lastTestResultId); + return this; + } + + /** + * Unique ID of the autotest last test result + * @return lastTestResultId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getLastTestResultId() { + return lastTestResultId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RESULT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLastTestResultId_JsonNullable() { + return lastTestResultId; + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RESULT_ID) + public void setLastTestResultId_JsonNullable(JsonNullable lastTestResultId) { + this.lastTestResultId = lastTestResultId; + } + + public void setLastTestResultId(@jakarta.annotation.Nullable UUID lastTestResultId) { + this.lastTestResultId = JsonNullable.of(lastTestResultId); + } + + + public AutoTestModel lastTestResultConfiguration(@jakarta.annotation.Nullable ConfigurationShortModel lastTestResultConfiguration) { + this.lastTestResultConfiguration = JsonNullable.of(lastTestResultConfiguration); + return this; + } + + /** + * Configuration of the autotest last test result + * @return lastTestResultConfiguration + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public ConfigurationShortModel getLastTestResultConfiguration() { + return lastTestResultConfiguration.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RESULT_CONFIGURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLastTestResultConfiguration_JsonNullable() { + return lastTestResultConfiguration; + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RESULT_CONFIGURATION) + public void setLastTestResultConfiguration_JsonNullable(JsonNullable lastTestResultConfiguration) { + this.lastTestResultConfiguration = lastTestResultConfiguration; + } + + public void setLastTestResultConfiguration(@jakarta.annotation.Nullable ConfigurationShortModel lastTestResultConfiguration) { + this.lastTestResultConfiguration = JsonNullable.of(lastTestResultConfiguration); + } + + + @Deprecated + public AutoTestModel lastTestResultOutcome(@jakarta.annotation.Nullable String lastTestResultOutcome) { + this.lastTestResultOutcome = JsonNullable.of(lastTestResultOutcome); + return this; + } + + /** + * Outcome of the autotest last test result + * @return lastTestResultOutcome + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + + public String getLastTestResultOutcome() { + return lastTestResultOutcome.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RESULT_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLastTestResultOutcome_JsonNullable() { + return lastTestResultOutcome; + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RESULT_OUTCOME) + public void setLastTestResultOutcome_JsonNullable(JsonNullable lastTestResultOutcome) { + this.lastTestResultOutcome = lastTestResultOutcome; + } + + @Deprecated + public void setLastTestResultOutcome(@jakarta.annotation.Nullable String lastTestResultOutcome) { + this.lastTestResultOutcome = JsonNullable.of(lastTestResultOutcome); + } + + + public AutoTestModel lastTestResultStatus(@jakarta.annotation.Nullable TestStatusModel lastTestResultStatus) { + this.lastTestResultStatus = JsonNullable.of(lastTestResultStatus); + return this; + } + + /** + * Status of the autotest last test result + * @return lastTestResultStatus + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public TestStatusModel getLastTestResultStatus() { + return lastTestResultStatus.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RESULT_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLastTestResultStatus_JsonNullable() { + return lastTestResultStatus; + } + + @JsonProperty(JSON_PROPERTY_LAST_TEST_RESULT_STATUS) + public void setLastTestResultStatus_JsonNullable(JsonNullable lastTestResultStatus) { + this.lastTestResultStatus = lastTestResultStatus; + } + + public void setLastTestResultStatus(@jakarta.annotation.Nullable TestStatusModel lastTestResultStatus) { + this.lastTestResultStatus = JsonNullable.of(lastTestResultStatus); + } + + + public AutoTestModel stabilityPercentage(@jakarta.annotation.Nullable Integer stabilityPercentage) { + this.stabilityPercentage = JsonNullable.of(stabilityPercentage); + return this; + } + + /** + * Stability percentage of the autotest + * @return stabilityPercentage + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Integer getStabilityPercentage() { + return stabilityPercentage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STABILITY_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStabilityPercentage_JsonNullable() { + return stabilityPercentage; + } + + @JsonProperty(JSON_PROPERTY_STABILITY_PERCENTAGE) + public void setStabilityPercentage_JsonNullable(JsonNullable stabilityPercentage) { + this.stabilityPercentage = stabilityPercentage; + } + + public void setStabilityPercentage(@jakarta.annotation.Nullable Integer stabilityPercentage) { + this.stabilityPercentage = JsonNullable.of(stabilityPercentage); + } + + + public AutoTestModel links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public AutoTestModel addLinksItem(LinkPutModel linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest links + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public AutoTestModel namespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + return this; + } + + /** + * Name of the autotest namespace + * @return namespace + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getNamespace() { + return namespace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNamespace_JsonNullable() { + return namespace; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + public void setNamespace_JsonNullable(JsonNullable namespace) { + this.namespace = namespace; + } + + public void setNamespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + } + + + public AutoTestModel classname(@jakarta.annotation.Nullable String classname) { + this.classname = JsonNullable.of(classname); + return this; + } + + /** + * Name of the autotest class + * @return classname + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getClassname() { + return classname.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CLASSNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getClassname_JsonNullable() { + return classname; + } + + @JsonProperty(JSON_PROPERTY_CLASSNAME) + public void setClassname_JsonNullable(JsonNullable classname) { + this.classname = classname; + } + + public void setClassname(@jakarta.annotation.Nullable String classname) { + this.classname = JsonNullable.of(classname); + } + + + public AutoTestModel steps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + return this; + } + + public AutoTestModel addStepsItem(AutoTestStepModel stepsItem) { + if (this.steps == null || !this.steps.isPresent()) { + this.steps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.steps.get().add(stepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest steps + * @return steps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSteps() { + return steps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSteps_JsonNullable() { + return steps; + } + + @JsonProperty(JSON_PROPERTY_STEPS) + public void setSteps_JsonNullable(JsonNullable> steps) { + this.steps = steps; + } + + public void setSteps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + } + + + public AutoTestModel setup(@jakarta.annotation.Nullable List setup) { + this.setup = JsonNullable.>of(setup); + return this; + } + + public AutoTestModel addSetupItem(AutoTestStepModel setupItem) { + if (this.setup == null || !this.setup.isPresent()) { + this.setup = JsonNullable.>of(new ArrayList<>()); + } + try { + this.setup.get().add(setupItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest setup steps + * @return setup + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSetup() { + return setup.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SETUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSetup_JsonNullable() { + return setup; + } + + @JsonProperty(JSON_PROPERTY_SETUP) + public void setSetup_JsonNullable(JsonNullable> setup) { + this.setup = setup; + } + + public void setSetup(@jakarta.annotation.Nullable List setup) { + this.setup = JsonNullable.>of(setup); + } + + + public AutoTestModel teardown(@jakarta.annotation.Nullable List teardown) { + this.teardown = JsonNullable.>of(teardown); + return this; + } + + public AutoTestModel addTeardownItem(AutoTestStepModel teardownItem) { + if (this.teardown == null || !this.teardown.isPresent()) { + this.teardown = JsonNullable.>of(new ArrayList<>()); + } + try { + this.teardown.get().add(teardownItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest teardown steps + * @return teardown + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTeardown() { + return teardown.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTeardown_JsonNullable() { + return teardown; + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN) + public void setTeardown_JsonNullable(JsonNullable> teardown) { + this.teardown = teardown; + } + + public void setTeardown(@jakarta.annotation.Nullable List teardown) { + this.teardown = JsonNullable.>of(teardown); + } + + + public AutoTestModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Name of the autotest in autotest's card + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public AutoTestModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the autotest in autotest's card + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTestModel labels(@jakarta.annotation.Nullable List labels) { + this.labels = JsonNullable.>of(labels); + return this; + } + + public AutoTestModel addLabelsItem(LabelShortModel labelsItem) { + if (this.labels == null || !this.labels.isPresent()) { + this.labels = JsonNullable.>of(new ArrayList<>()); + } + try { + this.labels.get().add(labelsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest labels + * @return labels + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLabels() { + return labels.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLabels_JsonNullable() { + return labels; + } + + @JsonProperty(JSON_PROPERTY_LABELS) + public void setLabels_JsonNullable(JsonNullable> labels) { + this.labels = labels; + } + + public void setLabels(@jakarta.annotation.Nullable List labels) { + this.labels = JsonNullable.>of(labels); + } + + + public AutoTestModel isFlaky(@jakarta.annotation.Nullable Boolean isFlaky) { + this.isFlaky = JsonNullable.of(isFlaky); + return this; + } + + /** + * Indicates if the autotest is marked as flaky + * @return isFlaky + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsFlaky() { + return isFlaky.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsFlaky_JsonNullable() { + return isFlaky; + } + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + public void setIsFlaky_JsonNullable(JsonNullable isFlaky) { + this.isFlaky = isFlaky; + } + + public void setIsFlaky(@jakarta.annotation.Nullable Boolean isFlaky) { + this.isFlaky = JsonNullable.of(isFlaky); + } + + + public AutoTestModel externalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + return this; + } + + /** + * External key of the autotest + * @return externalKey + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getExternalKey() { + return externalKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExternalKey_JsonNullable() { + return externalKey; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + public void setExternalKey_JsonNullable(JsonNullable externalKey) { + this.externalKey = externalKey; + } + + public void setExternalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + } + + + /** + * Return true if this AutoTestModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestModel autoTestModel = (AutoTestModel) o; + return Objects.equals(this.globalId, autoTestModel.globalId) && + Objects.equals(this.isDeleted, autoTestModel.isDeleted) && + Objects.equals(this.mustBeApproved, autoTestModel.mustBeApproved) && + Objects.equals(this.id, autoTestModel.id) && + Objects.equals(this.createdDate, autoTestModel.createdDate) && + Objects.equals(this.createdById, autoTestModel.createdById) && + Objects.equals(this.externalId, autoTestModel.externalId) && + Objects.equals(this.projectId, autoTestModel.projectId) && + Objects.equals(this.name, autoTestModel.name) && + equalsNullable(this.modifiedDate, autoTestModel.modifiedDate) && + equalsNullable(this.modifiedById, autoTestModel.modifiedById) && + equalsNullable(this.lastTestRunId, autoTestModel.lastTestRunId) && + equalsNullable(this.lastTestRunName, autoTestModel.lastTestRunName) && + equalsNullable(this.lastTestResultId, autoTestModel.lastTestResultId) && + equalsNullable(this.lastTestResultConfiguration, autoTestModel.lastTestResultConfiguration) && + equalsNullable(this.lastTestResultOutcome, autoTestModel.lastTestResultOutcome) && + equalsNullable(this.lastTestResultStatus, autoTestModel.lastTestResultStatus) && + equalsNullable(this.stabilityPercentage, autoTestModel.stabilityPercentage) && + equalsNullable(this.links, autoTestModel.links) && + equalsNullable(this.namespace, autoTestModel.namespace) && + equalsNullable(this.classname, autoTestModel.classname) && + equalsNullable(this.steps, autoTestModel.steps) && + equalsNullable(this.setup, autoTestModel.setup) && + equalsNullable(this.teardown, autoTestModel.teardown) && + equalsNullable(this.title, autoTestModel.title) && + equalsNullable(this.description, autoTestModel.description) && + equalsNullable(this.labels, autoTestModel.labels) && + equalsNullable(this.isFlaky, autoTestModel.isFlaky) && + equalsNullable(this.externalKey, autoTestModel.externalKey); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(globalId, isDeleted, mustBeApproved, id, createdDate, createdById, externalId, projectId, name, hashCodeNullable(modifiedDate), hashCodeNullable(modifiedById), hashCodeNullable(lastTestRunId), hashCodeNullable(lastTestRunName), hashCodeNullable(lastTestResultId), hashCodeNullable(lastTestResultConfiguration), hashCodeNullable(lastTestResultOutcome), hashCodeNullable(lastTestResultStatus), hashCodeNullable(stabilityPercentage), hashCodeNullable(links), hashCodeNullable(namespace), hashCodeNullable(classname), hashCodeNullable(steps), hashCodeNullable(setup), hashCodeNullable(teardown), hashCodeNullable(title), hashCodeNullable(description), hashCodeNullable(labels), hashCodeNullable(isFlaky), hashCodeNullable(externalKey)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestModel {\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" mustBeApproved: ").append(toIndentedString(mustBeApproved)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdDate: ").append(toIndentedString(createdDate)).append("\n"); + sb.append(" createdById: ").append(toIndentedString(createdById)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" modifiedDate: ").append(toIndentedString(modifiedDate)).append("\n"); + sb.append(" modifiedById: ").append(toIndentedString(modifiedById)).append("\n"); + sb.append(" lastTestRunId: ").append(toIndentedString(lastTestRunId)).append("\n"); + sb.append(" lastTestRunName: ").append(toIndentedString(lastTestRunName)).append("\n"); + sb.append(" lastTestResultId: ").append(toIndentedString(lastTestResultId)).append("\n"); + sb.append(" lastTestResultConfiguration: ").append(toIndentedString(lastTestResultConfiguration)).append("\n"); + sb.append(" lastTestResultOutcome: ").append(toIndentedString(lastTestResultOutcome)).append("\n"); + sb.append(" lastTestResultStatus: ").append(toIndentedString(lastTestResultStatus)).append("\n"); + sb.append(" stabilityPercentage: ").append(toIndentedString(stabilityPercentage)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" classname: ").append(toIndentedString(classname)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).append("\n"); + sb.append(" setup: ").append(toIndentedString(setup)).append("\n"); + sb.append(" teardown: ").append(toIndentedString(teardown)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" isFlaky: ").append(toIndentedString(isFlaky)).append("\n"); + sb.append(" externalKey: ").append(toIndentedString(externalKey)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestResultReasonShort.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestResultReasonShort.java new file mode 100644 index 0000000..3960331 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestResultReasonShort.java @@ -0,0 +1,143 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import ru.testit.adaptersapi.model.FailureCategoryModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestResultReasonShort + */ +@JsonPropertyOrder({ + AutoTestResultReasonShort.JSON_PROPERTY_FAILURE_CATEGORY, + AutoTestResultReasonShort.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestResultReasonShort { + public static final String JSON_PROPERTY_FAILURE_CATEGORY = "failureCategory"; + @jakarta.annotation.Nonnull + private FailureCategoryModel failureCategory; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public AutoTestResultReasonShort() { + } + + public AutoTestResultReasonShort failureCategory(@jakarta.annotation.Nonnull FailureCategoryModel failureCategory) { + this.failureCategory = failureCategory; + return this; + } + + /** + * Get failureCategory + * @return failureCategory + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAILURE_CATEGORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FailureCategoryModel getFailureCategory() { + return failureCategory; + } + + + @JsonProperty(JSON_PROPERTY_FAILURE_CATEGORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailureCategory(@jakarta.annotation.Nonnull FailureCategoryModel failureCategory) { + this.failureCategory = failureCategory; + } + + + public AutoTestResultReasonShort name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this AutoTestResultReasonShort object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestResultReasonShort autoTestResultReasonShort = (AutoTestResultReasonShort) o; + return Objects.equals(this.failureCategory, autoTestResultReasonShort.failureCategory) && + Objects.equals(this.name, autoTestResultReasonShort.name); + } + + @Override + public int hashCode() { + return Objects.hash(failureCategory, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestResultReasonShort {\n"); + sb.append(" failureCategory: ").append(toIndentedString(failureCategory)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestResultsForTestRunModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestResultsForTestRunModel.java new file mode 100644 index 0000000..8c98c72 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestResultsForTestRunModel.java @@ -0,0 +1,896 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentPutModel; +import ru.testit.adaptersapi.model.AttachmentPutModelAutoTestStepResultsModel; +import ru.testit.adaptersapi.model.AvailableTestResultOutcome; +import ru.testit.adaptersapi.model.FailureCategoryModel; +import ru.testit.adaptersapi.model.LinkPostModel; +import ru.testit.adaptersapi.model.TestStatusType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestResultsForTestRunModel + */ +@JsonPropertyOrder({ + AutoTestResultsForTestRunModel.JSON_PROPERTY_CONFIGURATION_ID, + AutoTestResultsForTestRunModel.JSON_PROPERTY_AUTO_TEST_EXTERNAL_ID, + AutoTestResultsForTestRunModel.JSON_PROPERTY_LINKS, + AutoTestResultsForTestRunModel.JSON_PROPERTY_FAILURE_REASON_NAMES, + AutoTestResultsForTestRunModel.JSON_PROPERTY_OUTCOME, + AutoTestResultsForTestRunModel.JSON_PROPERTY_STATUS_CODE, + AutoTestResultsForTestRunModel.JSON_PROPERTY_STATUS_TYPE, + AutoTestResultsForTestRunModel.JSON_PROPERTY_MESSAGE, + AutoTestResultsForTestRunModel.JSON_PROPERTY_TRACES, + AutoTestResultsForTestRunModel.JSON_PROPERTY_STARTED_ON, + AutoTestResultsForTestRunModel.JSON_PROPERTY_COMPLETED_ON, + AutoTestResultsForTestRunModel.JSON_PROPERTY_DURATION, + AutoTestResultsForTestRunModel.JSON_PROPERTY_ATTACHMENTS, + AutoTestResultsForTestRunModel.JSON_PROPERTY_PARAMETERS, + AutoTestResultsForTestRunModel.JSON_PROPERTY_PROPERTIES, + AutoTestResultsForTestRunModel.JSON_PROPERTY_STEP_RESULTS, + AutoTestResultsForTestRunModel.JSON_PROPERTY_SETUP_RESULTS, + AutoTestResultsForTestRunModel.JSON_PROPERTY_TEARDOWN_RESULTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestResultsForTestRunModel { + public static final String JSON_PROPERTY_CONFIGURATION_ID = "configurationId"; + @jakarta.annotation.Nonnull + private UUID configurationId; + + public static final String JSON_PROPERTY_AUTO_TEST_EXTERNAL_ID = "autoTestExternalId"; + @jakarta.annotation.Nonnull + private String autoTestExternalId; + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_FAILURE_REASON_NAMES = "failureReasonNames"; + private JsonNullable> failureReasonNames = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OUTCOME = "outcome"; + @Deprecated + private JsonNullable outcome = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS_CODE = "statusCode"; + private JsonNullable statusCode = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS_TYPE = "statusType"; + private JsonNullable statusType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TRACES = "traces"; + private JsonNullable traces = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STARTED_ON = "startedOn"; + private JsonNullable startedOn = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETED_ON = "completedOn"; + private JsonNullable completedOn = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION = "duration"; + private JsonNullable duration = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private JsonNullable> attachments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + private JsonNullable> parameters = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PROPERTIES = "properties"; + private JsonNullable> properties = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_STEP_RESULTS = "stepResults"; + private JsonNullable> stepResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_SETUP_RESULTS = "setupResults"; + private JsonNullable> setupResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TEARDOWN_RESULTS = "teardownResults"; + private JsonNullable> teardownResults = JsonNullable.>undefined(); + + public AutoTestResultsForTestRunModel() { + } + + public AutoTestResultsForTestRunModel configurationId(@jakarta.annotation.Nonnull UUID configurationId) { + this.configurationId = configurationId; + return this; + } + + /** + * Specifies the GUID of the autotest configuration, which was specified when the test run was created. + * @return configurationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIGURATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getConfigurationId() { + return configurationId; + } + + + @JsonProperty(JSON_PROPERTY_CONFIGURATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfigurationId(@jakarta.annotation.Nonnull UUID configurationId) { + this.configurationId = configurationId; + } + + + public AutoTestResultsForTestRunModel autoTestExternalId(@jakarta.annotation.Nonnull String autoTestExternalId) { + this.autoTestExternalId = autoTestExternalId; + return this; + } + + /** + * Specifies the external ID of the autotest, which was specified when the test run was created. + * @return autoTestExternalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AUTO_TEST_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAutoTestExternalId() { + return autoTestExternalId; + } + + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAutoTestExternalId(@jakarta.annotation.Nonnull String autoTestExternalId) { + this.autoTestExternalId = autoTestExternalId; + } + + + public AutoTestResultsForTestRunModel links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public AutoTestResultsForTestRunModel addLinksItem(LinkPostModel linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies the links in the autotest. + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public AutoTestResultsForTestRunModel failureReasonNames(@jakarta.annotation.Nullable List failureReasonNames) { + this.failureReasonNames = JsonNullable.>of(failureReasonNames); + return this; + } + + public AutoTestResultsForTestRunModel addFailureReasonNamesItem(FailureCategoryModel failureReasonNamesItem) { + if (this.failureReasonNames == null || !this.failureReasonNames.isPresent()) { + this.failureReasonNames = JsonNullable.>of(new ArrayList<>()); + } + try { + this.failureReasonNames.get().add(failureReasonNamesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies the cause of autotest failure. + * @return failureReasonNames + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getFailureReasonNames() { + return failureReasonNames.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FAILURE_REASON_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getFailureReasonNames_JsonNullable() { + return failureReasonNames; + } + + @JsonProperty(JSON_PROPERTY_FAILURE_REASON_NAMES) + public void setFailureReasonNames_JsonNullable(JsonNullable> failureReasonNames) { + this.failureReasonNames = failureReasonNames; + } + + public void setFailureReasonNames(@jakarta.annotation.Nullable List failureReasonNames) { + this.failureReasonNames = JsonNullable.>of(failureReasonNames); + } + + + @Deprecated + public AutoTestResultsForTestRunModel outcome(@jakarta.annotation.Nullable AvailableTestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + return this; + } + + /** + * Specifies the result of the autotest execution. + * @return outcome + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + + public AvailableTestResultOutcome getOutcome() { + return outcome.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutcome_JsonNullable() { + return outcome; + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + public void setOutcome_JsonNullable(JsonNullable outcome) { + this.outcome = outcome; + } + + @Deprecated + public void setOutcome(@jakarta.annotation.Nullable AvailableTestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + } + + + public AutoTestResultsForTestRunModel statusCode(@jakarta.annotation.Nullable String statusCode) { + this.statusCode = JsonNullable.of(statusCode); + return this; + } + + /** + * Specifies code of result status of the autotest execution. + * @return statusCode + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getStatusCode() { + return statusCode.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStatusCode_JsonNullable() { + return statusCode; + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + public void setStatusCode_JsonNullable(JsonNullable statusCode) { + this.statusCode = statusCode; + } + + public void setStatusCode(@jakarta.annotation.Nullable String statusCode) { + this.statusCode = JsonNullable.of(statusCode); + } + + + public AutoTestResultsForTestRunModel statusType(@jakarta.annotation.Nullable TestStatusType statusType) { + this.statusType = JsonNullable.of(statusType); + return this; + } + + /** + * Specifies type of result status of the autotest execution. + * @return statusType + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public TestStatusType getStatusType() { + return statusType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStatusType_JsonNullable() { + return statusType; + } + + @JsonProperty(JSON_PROPERTY_STATUS_TYPE) + public void setStatusType_JsonNullable(JsonNullable statusType) { + this.statusType = statusType; + } + + public void setStatusType(@jakarta.annotation.Nullable TestStatusType statusType) { + this.statusType = JsonNullable.of(statusType); + } + + + public AutoTestResultsForTestRunModel message(@jakarta.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * A comment for the result. + * @return message + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public AutoTestResultsForTestRunModel traces(@jakarta.annotation.Nullable String traces) { + this.traces = JsonNullable.of(traces); + return this; + } + + /** + * An extended comment or a stack trace. + * @return traces + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTraces() { + return traces.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TRACES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTraces_JsonNullable() { + return traces; + } + + @JsonProperty(JSON_PROPERTY_TRACES) + public void setTraces_JsonNullable(JsonNullable traces) { + this.traces = traces; + } + + public void setTraces(@jakarta.annotation.Nullable String traces) { + this.traces = JsonNullable.of(traces); + } + + + public AutoTestResultsForTestRunModel startedOn(@jakarta.annotation.Nullable OffsetDateTime startedOn) { + this.startedOn = JsonNullable.of(startedOn); + return this; + } + + /** + * Test run start date. + * @return startedOn + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getStartedOn() { + return startedOn.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STARTED_ON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStartedOn_JsonNullable() { + return startedOn; + } + + @JsonProperty(JSON_PROPERTY_STARTED_ON) + public void setStartedOn_JsonNullable(JsonNullable startedOn) { + this.startedOn = startedOn; + } + + public void setStartedOn(@jakarta.annotation.Nullable OffsetDateTime startedOn) { + this.startedOn = JsonNullable.of(startedOn); + } + + + public AutoTestResultsForTestRunModel completedOn(@jakarta.annotation.Nullable OffsetDateTime completedOn) { + this.completedOn = JsonNullable.of(completedOn); + return this; + } + + /** + * Test run end date. + * @return completedOn + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getCompletedOn() { + return completedOn.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_ON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedOn_JsonNullable() { + return completedOn; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_ON) + public void setCompletedOn_JsonNullable(JsonNullable completedOn) { + this.completedOn = completedOn; + } + + public void setCompletedOn(@jakarta.annotation.Nullable OffsetDateTime completedOn) { + this.completedOn = JsonNullable.of(completedOn); + } + + + public AutoTestResultsForTestRunModel duration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + return this; + } + + /** + * Expected or actual duration of the test run execution in milliseconds. + * minimum: 0 + * maximum: 43200000000 + * @return duration + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Long getDuration() { + return duration.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDuration_JsonNullable() { + return duration; + } + + @JsonProperty(JSON_PROPERTY_DURATION) + public void setDuration_JsonNullable(JsonNullable duration) { + this.duration = duration; + } + + public void setDuration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + } + + + public AutoTestResultsForTestRunModel attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + return this; + } + + public AutoTestResultsForTestRunModel addAttachmentsItem(AttachmentPutModel attachmentsItem) { + if (this.attachments == null || !this.attachments.isPresent()) { + this.attachments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attachments.get().add(attachmentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies an attachment GUID. Multiple values can be sent. + * @return attachments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttachments() { + return attachments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttachments_JsonNullable() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + public void setAttachments_JsonNullable(JsonNullable> attachments) { + this.attachments = attachments; + } + + public void setAttachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + } + + + public AutoTestResultsForTestRunModel parameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + return this; + } + + public AutoTestResultsForTestRunModel putParametersItem(String key, String parametersItem) { + if (this.parameters == null || !this.parameters.isPresent()) { + this.parameters = JsonNullable.>of(new HashMap<>()); + } + try { + this.parameters.get().put(key, parametersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * \"<b>parameter</b>\": \"<b>value</b>\" pair with arbitrary custom parameters. Multiple parameters can be sent. + * @return parameters + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map getParameters() { + return parameters.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getParameters_JsonNullable() { + return parameters; + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + public void setParameters_JsonNullable(JsonNullable> parameters) { + this.parameters = parameters; + } + + public void setParameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + } + + + public AutoTestResultsForTestRunModel properties(@jakarta.annotation.Nullable Map properties) { + this.properties = JsonNullable.>of(properties); + return this; + } + + public AutoTestResultsForTestRunModel putPropertiesItem(String key, String propertiesItem) { + if (this.properties == null || !this.properties.isPresent()) { + this.properties = JsonNullable.>of(new HashMap<>()); + } + try { + this.properties.get().put(key, propertiesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * \"<b>property</b>\": \"<b>value</b>\" pair with arbitrary custom properties. Multiple properties can be sent. + * @return properties + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map getProperties() { + return properties.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getProperties_JsonNullable() { + return properties; + } + + @JsonProperty(JSON_PROPERTY_PROPERTIES) + public void setProperties_JsonNullable(JsonNullable> properties) { + this.properties = properties; + } + + public void setProperties(@jakarta.annotation.Nullable Map properties) { + this.properties = JsonNullable.>of(properties); + } + + + public AutoTestResultsForTestRunModel stepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + return this; + } + + public AutoTestResultsForTestRunModel addStepResultsItem(AttachmentPutModelAutoTestStepResultsModel stepResultsItem) { + if (this.stepResults == null || !this.stepResults.isPresent()) { + this.stepResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.stepResults.get().add(stepResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies the results of individual steps. + * @return stepResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getStepResults() { + return stepResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStepResults_JsonNullable() { + return stepResults; + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + public void setStepResults_JsonNullable(JsonNullable> stepResults) { + this.stepResults = stepResults; + } + + public void setStepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + } + + + public AutoTestResultsForTestRunModel setupResults(@jakarta.annotation.Nullable List setupResults) { + this.setupResults = JsonNullable.>of(setupResults); + return this; + } + + public AutoTestResultsForTestRunModel addSetupResultsItem(AttachmentPutModelAutoTestStepResultsModel setupResultsItem) { + if (this.setupResults == null || !this.setupResults.isPresent()) { + this.setupResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.setupResults.get().add(setupResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies the results of setup steps. For information on supported values, see the `stepResults` parameter above. + * @return setupResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSetupResults() { + return setupResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SETUP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSetupResults_JsonNullable() { + return setupResults; + } + + @JsonProperty(JSON_PROPERTY_SETUP_RESULTS) + public void setSetupResults_JsonNullable(JsonNullable> setupResults) { + this.setupResults = setupResults; + } + + public void setSetupResults(@jakarta.annotation.Nullable List setupResults) { + this.setupResults = JsonNullable.>of(setupResults); + } + + + public AutoTestResultsForTestRunModel teardownResults(@jakarta.annotation.Nullable List teardownResults) { + this.teardownResults = JsonNullable.>of(teardownResults); + return this; + } + + public AutoTestResultsForTestRunModel addTeardownResultsItem(AttachmentPutModelAutoTestStepResultsModel teardownResultsItem) { + if (this.teardownResults == null || !this.teardownResults.isPresent()) { + this.teardownResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.teardownResults.get().add(teardownResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies the results of the teardown steps. For information on supported values, see the `stepResults` parameter above. + * @return teardownResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTeardownResults() { + return teardownResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTeardownResults_JsonNullable() { + return teardownResults; + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN_RESULTS) + public void setTeardownResults_JsonNullable(JsonNullable> teardownResults) { + this.teardownResults = teardownResults; + } + + public void setTeardownResults(@jakarta.annotation.Nullable List teardownResults) { + this.teardownResults = JsonNullable.>of(teardownResults); + } + + + /** + * Return true if this AutoTestResultsForTestRunModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestResultsForTestRunModel autoTestResultsForTestRunModel = (AutoTestResultsForTestRunModel) o; + return Objects.equals(this.configurationId, autoTestResultsForTestRunModel.configurationId) && + Objects.equals(this.autoTestExternalId, autoTestResultsForTestRunModel.autoTestExternalId) && + equalsNullable(this.links, autoTestResultsForTestRunModel.links) && + equalsNullable(this.failureReasonNames, autoTestResultsForTestRunModel.failureReasonNames) && + equalsNullable(this.outcome, autoTestResultsForTestRunModel.outcome) && + equalsNullable(this.statusCode, autoTestResultsForTestRunModel.statusCode) && + equalsNullable(this.statusType, autoTestResultsForTestRunModel.statusType) && + equalsNullable(this.message, autoTestResultsForTestRunModel.message) && + equalsNullable(this.traces, autoTestResultsForTestRunModel.traces) && + equalsNullable(this.startedOn, autoTestResultsForTestRunModel.startedOn) && + equalsNullable(this.completedOn, autoTestResultsForTestRunModel.completedOn) && + equalsNullable(this.duration, autoTestResultsForTestRunModel.duration) && + equalsNullable(this.attachments, autoTestResultsForTestRunModel.attachments) && + equalsNullable(this.parameters, autoTestResultsForTestRunModel.parameters) && + equalsNullable(this.properties, autoTestResultsForTestRunModel.properties) && + equalsNullable(this.stepResults, autoTestResultsForTestRunModel.stepResults) && + equalsNullable(this.setupResults, autoTestResultsForTestRunModel.setupResults) && + equalsNullable(this.teardownResults, autoTestResultsForTestRunModel.teardownResults); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(configurationId, autoTestExternalId, hashCodeNullable(links), hashCodeNullable(failureReasonNames), hashCodeNullable(outcome), hashCodeNullable(statusCode), hashCodeNullable(statusType), hashCodeNullable(message), hashCodeNullable(traces), hashCodeNullable(startedOn), hashCodeNullable(completedOn), hashCodeNullable(duration), hashCodeNullable(attachments), hashCodeNullable(parameters), hashCodeNullable(properties), hashCodeNullable(stepResults), hashCodeNullable(setupResults), hashCodeNullable(teardownResults)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestResultsForTestRunModel {\n"); + sb.append(" configurationId: ").append(toIndentedString(configurationId)).append("\n"); + sb.append(" autoTestExternalId: ").append(toIndentedString(autoTestExternalId)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" failureReasonNames: ").append(toIndentedString(failureReasonNames)).append("\n"); + sb.append(" outcome: ").append(toIndentedString(outcome)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" statusType: ").append(toIndentedString(statusType)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" traces: ").append(toIndentedString(traces)).append("\n"); + sb.append(" startedOn: ").append(toIndentedString(startedOn)).append("\n"); + sb.append(" completedOn: ").append(toIndentedString(completedOn)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append(" stepResults: ").append(toIndentedString(stepResults)).append("\n"); + sb.append(" setupResults: ").append(toIndentedString(setupResults)).append("\n"); + sb.append(" teardownResults: ").append(toIndentedString(teardownResults)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestSearchApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestSearchApiModel.java new file mode 100644 index 0000000..9bdffd5 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestSearchApiModel.java @@ -0,0 +1,173 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AutoTestFilterApiModel; +import ru.testit.adaptersapi.model.AutoTestSearchIncludeApiModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestSearchApiModel + */ +@JsonPropertyOrder({ + AutoTestSearchApiModel.JSON_PROPERTY_FILTER, + AutoTestSearchApiModel.JSON_PROPERTY_INCLUDES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestSearchApiModel { + public static final String JSON_PROPERTY_FILTER = "filter"; + private JsonNullable filter = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INCLUDES = "includes"; + private JsonNullable includes = JsonNullable.undefined(); + + public AutoTestSearchApiModel() { + } + + public AutoTestSearchApiModel filter(@jakarta.annotation.Nullable AutoTestFilterApiModel filter) { + this.filter = JsonNullable.of(filter); + return this; + } + + /** + * Object containing different filters to adjust search + * @return filter + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public AutoTestFilterApiModel getFilter() { + return filter.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFilter_JsonNullable() { + return filter; + } + + @JsonProperty(JSON_PROPERTY_FILTER) + public void setFilter_JsonNullable(JsonNullable filter) { + this.filter = filter; + } + + public void setFilter(@jakarta.annotation.Nullable AutoTestFilterApiModel filter) { + this.filter = JsonNullable.of(filter); + } + + + public AutoTestSearchApiModel includes(@jakarta.annotation.Nullable AutoTestSearchIncludeApiModel includes) { + this.includes = JsonNullable.of(includes); + return this; + } + + /** + * Object specifying data to be included + * @return includes + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public AutoTestSearchIncludeApiModel getIncludes() { + return includes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCLUDES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIncludes_JsonNullable() { + return includes; + } + + @JsonProperty(JSON_PROPERTY_INCLUDES) + public void setIncludes_JsonNullable(JsonNullable includes) { + this.includes = includes; + } + + public void setIncludes(@jakarta.annotation.Nullable AutoTestSearchIncludeApiModel includes) { + this.includes = JsonNullable.of(includes); + } + + + /** + * Return true if this AutoTestSearchApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestSearchApiModel autoTestSearchApiModel = (AutoTestSearchApiModel) o; + return equalsNullable(this.filter, autoTestSearchApiModel.filter) && + equalsNullable(this.includes, autoTestSearchApiModel.includes); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(filter), hashCodeNullable(includes)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestSearchApiModel {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" includes: ").append(toIndentedString(includes)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestSearchIncludeApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestSearchIncludeApiModel.java new file mode 100644 index 0000000..c37f464 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestSearchIncludeApiModel.java @@ -0,0 +1,210 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestSearchIncludeApiModel + */ +@JsonPropertyOrder({ + AutoTestSearchIncludeApiModel.JSON_PROPERTY_INCLUDE_STEPS, + AutoTestSearchIncludeApiModel.JSON_PROPERTY_INCLUDE_LINKS, + AutoTestSearchIncludeApiModel.JSON_PROPERTY_INCLUDE_LABELS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestSearchIncludeApiModel { + public static final String JSON_PROPERTY_INCLUDE_STEPS = "includeSteps"; + private JsonNullable includeSteps = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INCLUDE_LINKS = "includeLinks"; + private JsonNullable includeLinks = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INCLUDE_LABELS = "includeLabels"; + private JsonNullable includeLabels = JsonNullable.undefined(); + + public AutoTestSearchIncludeApiModel() { + } + + public AutoTestSearchIncludeApiModel includeSteps(@jakarta.annotation.Nullable Boolean includeSteps) { + this.includeSteps = JsonNullable.of(includeSteps); + return this; + } + + /** + * If autotest steps will be included + * @return includeSteps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIncludeSteps() { + return includeSteps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIncludeSteps_JsonNullable() { + return includeSteps; + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_STEPS) + public void setIncludeSteps_JsonNullable(JsonNullable includeSteps) { + this.includeSteps = includeSteps; + } + + public void setIncludeSteps(@jakarta.annotation.Nullable Boolean includeSteps) { + this.includeSteps = JsonNullable.of(includeSteps); + } + + + public AutoTestSearchIncludeApiModel includeLinks(@jakarta.annotation.Nullable Boolean includeLinks) { + this.includeLinks = JsonNullable.of(includeLinks); + return this; + } + + /** + * If autotest links will be included + * @return includeLinks + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIncludeLinks() { + return includeLinks.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIncludeLinks_JsonNullable() { + return includeLinks; + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_LINKS) + public void setIncludeLinks_JsonNullable(JsonNullable includeLinks) { + this.includeLinks = includeLinks; + } + + public void setIncludeLinks(@jakarta.annotation.Nullable Boolean includeLinks) { + this.includeLinks = JsonNullable.of(includeLinks); + } + + + public AutoTestSearchIncludeApiModel includeLabels(@jakarta.annotation.Nullable Boolean includeLabels) { + this.includeLabels = JsonNullable.of(includeLabels); + return this; + } + + /** + * If autotest labels will be included + * @return includeLabels + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIncludeLabels() { + return includeLabels.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIncludeLabels_JsonNullable() { + return includeLabels; + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_LABELS) + public void setIncludeLabels_JsonNullable(JsonNullable includeLabels) { + this.includeLabels = includeLabels; + } + + public void setIncludeLabels(@jakarta.annotation.Nullable Boolean includeLabels) { + this.includeLabels = JsonNullable.of(includeLabels); + } + + + /** + * Return true if this AutoTestSearchIncludeApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestSearchIncludeApiModel autoTestSearchIncludeApiModel = (AutoTestSearchIncludeApiModel) o; + return equalsNullable(this.includeSteps, autoTestSearchIncludeApiModel.includeSteps) && + equalsNullable(this.includeLinks, autoTestSearchIncludeApiModel.includeLinks) && + equalsNullable(this.includeLabels, autoTestSearchIncludeApiModel.includeLabels); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(includeSteps), hashCodeNullable(includeLinks), hashCodeNullable(includeLabels)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestSearchIncludeApiModel {\n"); + sb.append(" includeSteps: ").append(toIndentedString(includeSteps)).append("\n"); + sb.append(" includeLinks: ").append(toIndentedString(includeLinks)).append("\n"); + sb.append(" includeLabels: ").append(toIndentedString(includeLabels)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStep.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStep.java new file mode 100644 index 0000000..7927ec7 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStep.java @@ -0,0 +1,217 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestStep + */ +@JsonPropertyOrder({ + AutoTestStep.JSON_PROPERTY_TITLE, + AutoTestStep.JSON_PROPERTY_DESCRIPTION, + AutoTestStep.JSON_PROPERTY_STEPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestStep { + public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nonnull + private String title; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + private JsonNullable> steps = JsonNullable.>undefined(); + + public AutoTestStep() { + } + + public AutoTestStep title(@jakarta.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Step name. + * @return title + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(@jakarta.annotation.Nonnull String title) { + this.title = title; + } + + + public AutoTestStep description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Detailed step description. It appears when the step is unfolded. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTestStep steps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + return this; + } + + public AutoTestStep addStepsItem(AutoTestStep stepsItem) { + if (this.steps == null || !this.steps.isPresent()) { + this.steps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.steps.get().add(stepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Includes a nested step inside another step. The maximum nesting level is 15. + * @return steps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSteps() { + return steps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSteps_JsonNullable() { + return steps; + } + + @JsonProperty(JSON_PROPERTY_STEPS) + public void setSteps_JsonNullable(JsonNullable> steps) { + this.steps = steps; + } + + public void setSteps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + } + + + /** + * Return true if this AutoTestStep object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestStep autoTestStep = (AutoTestStep) o; + return Objects.equals(this.title, autoTestStep.title) && + equalsNullable(this.description, autoTestStep.description) && + equalsNullable(this.steps, autoTestStep.steps); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(title, hashCodeNullable(description), hashCodeNullable(steps)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestStep {\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepApiModel.java new file mode 100644 index 0000000..b960cba --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepApiModel.java @@ -0,0 +1,217 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestStepApiModel + */ +@JsonPropertyOrder({ + AutoTestStepApiModel.JSON_PROPERTY_TITLE, + AutoTestStepApiModel.JSON_PROPERTY_DESCRIPTION, + AutoTestStepApiModel.JSON_PROPERTY_STEPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestStepApiModel { + public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nonnull + private String title; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + private JsonNullable> steps = JsonNullable.>undefined(); + + public AutoTestStepApiModel() { + } + + public AutoTestStepApiModel title(@jakarta.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Step name. + * @return title + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(@jakarta.annotation.Nonnull String title) { + this.title = title; + } + + + public AutoTestStepApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Detailed step description. It appears when the step is unfolded. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTestStepApiModel steps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + return this; + } + + public AutoTestStepApiModel addStepsItem(AutoTestStepApiModel stepsItem) { + if (this.steps == null || !this.steps.isPresent()) { + this.steps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.steps.get().add(stepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Includes a nested step inside another step. The maximum nesting level is 15. + * @return steps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSteps() { + return steps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSteps_JsonNullable() { + return steps; + } + + @JsonProperty(JSON_PROPERTY_STEPS) + public void setSteps_JsonNullable(JsonNullable> steps) { + this.steps = steps; + } + + public void setSteps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + } + + + /** + * Return true if this AutoTestStepApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestStepApiModel autoTestStepApiModel = (AutoTestStepApiModel) o; + return Objects.equals(this.title, autoTestStepApiModel.title) && + equalsNullable(this.description, autoTestStepApiModel.description) && + equalsNullable(this.steps, autoTestStepApiModel.steps); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(title, hashCodeNullable(description), hashCodeNullable(steps)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestStepApiModel {\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepApiResult.java new file mode 100644 index 0000000..8f23820 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepApiResult.java @@ -0,0 +1,217 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestStepApiResult + */ +@JsonPropertyOrder({ + AutoTestStepApiResult.JSON_PROPERTY_TITLE, + AutoTestStepApiResult.JSON_PROPERTY_DESCRIPTION, + AutoTestStepApiResult.JSON_PROPERTY_STEPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestStepApiResult { + public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nonnull + private String title; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + private JsonNullable> steps = JsonNullable.>undefined(); + + public AutoTestStepApiResult() { + } + + public AutoTestStepApiResult title(@jakarta.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Step name. + * @return title + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(@jakarta.annotation.Nonnull String title) { + this.title = title; + } + + + public AutoTestStepApiResult description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Detailed step description. It appears when the step is unfolded. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTestStepApiResult steps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + return this; + } + + public AutoTestStepApiResult addStepsItem(AutoTestStepApiResult stepsItem) { + if (this.steps == null || !this.steps.isPresent()) { + this.steps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.steps.get().add(stepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Includes a nested step inside another step. The maximum nesting level is 15. + * @return steps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSteps() { + return steps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSteps_JsonNullable() { + return steps; + } + + @JsonProperty(JSON_PROPERTY_STEPS) + public void setSteps_JsonNullable(JsonNullable> steps) { + this.steps = steps; + } + + public void setSteps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + } + + + /** + * Return true if this AutoTestStepApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestStepApiResult autoTestStepApiResult = (AutoTestStepApiResult) o; + return Objects.equals(this.title, autoTestStepApiResult.title) && + equalsNullable(this.description, autoTestStepApiResult.description) && + equalsNullable(this.steps, autoTestStepApiResult.steps); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(title, hashCodeNullable(description), hashCodeNullable(steps)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestStepApiResult {\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepModel.java new file mode 100644 index 0000000..cb58bf9 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepModel.java @@ -0,0 +1,217 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestStepModel + */ +@JsonPropertyOrder({ + AutoTestStepModel.JSON_PROPERTY_TITLE, + AutoTestStepModel.JSON_PROPERTY_DESCRIPTION, + AutoTestStepModel.JSON_PROPERTY_STEPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestStepModel { + public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nonnull + private String title; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + private JsonNullable> steps = JsonNullable.>undefined(); + + public AutoTestStepModel() { + } + + public AutoTestStepModel title(@jakarta.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Step name. + * @return title + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(@jakarta.annotation.Nonnull String title) { + this.title = title; + } + + + public AutoTestStepModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Detailed step description. It appears when the step is unfolded. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTestStepModel steps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + return this; + } + + public AutoTestStepModel addStepsItem(AutoTestStepModel stepsItem) { + if (this.steps == null || !this.steps.isPresent()) { + this.steps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.steps.get().add(stepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Includes a nested step inside another step. The maximum nesting level is 15. + * @return steps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSteps() { + return steps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSteps_JsonNullable() { + return steps; + } + + @JsonProperty(JSON_PROPERTY_STEPS) + public void setSteps_JsonNullable(JsonNullable> steps) { + this.steps = steps; + } + + public void setSteps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + } + + + /** + * Return true if this AutoTestStepModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestStepModel autoTestStepModel = (AutoTestStepModel) o; + return Objects.equals(this.title, autoTestStepModel.title) && + equalsNullable(this.description, autoTestStepModel.description) && + equalsNullable(this.steps, autoTestStepModel.steps); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(title, hashCodeNullable(description), hashCodeNullable(steps)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestStepModel {\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepResult.java new file mode 100644 index 0000000..5004305 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepResult.java @@ -0,0 +1,528 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentApiResult; +import ru.testit.adaptersapi.model.AvailableTestResultOutcome; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestStepResult + */ +@JsonPropertyOrder({ + AutoTestStepResult.JSON_PROPERTY_TITLE, + AutoTestStepResult.JSON_PROPERTY_DESCRIPTION, + AutoTestStepResult.JSON_PROPERTY_INFO, + AutoTestStepResult.JSON_PROPERTY_STARTED_ON, + AutoTestStepResult.JSON_PROPERTY_COMPLETED_ON, + AutoTestStepResult.JSON_PROPERTY_DURATION, + AutoTestStepResult.JSON_PROPERTY_OUTCOME, + AutoTestStepResult.JSON_PROPERTY_STEP_RESULTS, + AutoTestStepResult.JSON_PROPERTY_ATTACHMENTS, + AutoTestStepResult.JSON_PROPERTY_PARAMETERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestStepResult { + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INFO = "info"; + private JsonNullable info = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STARTED_ON = "startedOn"; + private JsonNullable startedOn = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETED_ON = "completedOn"; + private JsonNullable completedOn = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION = "duration"; + private JsonNullable duration = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTCOME = "outcome"; + private JsonNullable outcome = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEP_RESULTS = "stepResults"; + private JsonNullable> stepResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private JsonNullable> attachments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + private JsonNullable> parameters = JsonNullable.>undefined(); + + public AutoTestStepResult() { + } + + public AutoTestStepResult title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * The name of the step. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public AutoTestStepResult description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the step result. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTestStepResult info(@jakarta.annotation.Nullable String info) { + this.info = JsonNullable.of(info); + return this; + } + + /** + * Extended description of the step result. + * @return info + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getInfo() { + return info.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInfo_JsonNullable() { + return info; + } + + @JsonProperty(JSON_PROPERTY_INFO) + public void setInfo_JsonNullable(JsonNullable info) { + this.info = info; + } + + public void setInfo(@jakarta.annotation.Nullable String info) { + this.info = JsonNullable.of(info); + } + + + public AutoTestStepResult startedOn(@jakarta.annotation.Nullable OffsetDateTime startedOn) { + this.startedOn = JsonNullable.of(startedOn); + return this; + } + + /** + * Step start date. + * @return startedOn + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getStartedOn() { + return startedOn.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STARTED_ON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStartedOn_JsonNullable() { + return startedOn; + } + + @JsonProperty(JSON_PROPERTY_STARTED_ON) + public void setStartedOn_JsonNullable(JsonNullable startedOn) { + this.startedOn = startedOn; + } + + public void setStartedOn(@jakarta.annotation.Nullable OffsetDateTime startedOn) { + this.startedOn = JsonNullable.of(startedOn); + } + + + public AutoTestStepResult completedOn(@jakarta.annotation.Nullable OffsetDateTime completedOn) { + this.completedOn = JsonNullable.of(completedOn); + return this; + } + + /** + * Step end date. + * @return completedOn + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getCompletedOn() { + return completedOn.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_ON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedOn_JsonNullable() { + return completedOn; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_ON) + public void setCompletedOn_JsonNullable(JsonNullable completedOn) { + this.completedOn = completedOn; + } + + public void setCompletedOn(@jakarta.annotation.Nullable OffsetDateTime completedOn) { + this.completedOn = JsonNullable.of(completedOn); + } + + + public AutoTestStepResult duration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + return this; + } + + /** + * Expected or actual duration of the test run execution in milliseconds. + * minimum: 0 + * maximum: 43200000000 + * @return duration + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Long getDuration() { + return duration.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDuration_JsonNullable() { + return duration; + } + + @JsonProperty(JSON_PROPERTY_DURATION) + public void setDuration_JsonNullable(JsonNullable duration) { + this.duration = duration; + } + + public void setDuration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + } + + + public AutoTestStepResult outcome(@jakarta.annotation.Nullable AvailableTestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + return this; + } + + /** + * Specifies the result of the autotest execution. + * @return outcome + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public AvailableTestResultOutcome getOutcome() { + return outcome.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutcome_JsonNullable() { + return outcome; + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + public void setOutcome_JsonNullable(JsonNullable outcome) { + this.outcome = outcome; + } + + public void setOutcome(@jakarta.annotation.Nullable AvailableTestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + } + + + public AutoTestStepResult stepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + return this; + } + + public AutoTestStepResult addStepResultsItem(AutoTestStepResult stepResultsItem) { + if (this.stepResults == null || !this.stepResults.isPresent()) { + this.stepResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.stepResults.get().add(stepResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Nested step results. The maximum nesting level is 15. + * @return stepResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getStepResults() { + return stepResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStepResults_JsonNullable() { + return stepResults; + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + public void setStepResults_JsonNullable(JsonNullable> stepResults) { + this.stepResults = stepResults; + } + + public void setStepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + } + + + public AutoTestStepResult attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + return this; + } + + public AutoTestStepResult addAttachmentsItem(AttachmentApiResult attachmentsItem) { + if (this.attachments == null || !this.attachments.isPresent()) { + this.attachments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attachments.get().add(attachmentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * /// <summary> Specifies an attachment GUID. Multiple values can be sent. </summary> + * @return attachments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttachments() { + return attachments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttachments_JsonNullable() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + public void setAttachments_JsonNullable(JsonNullable> attachments) { + this.attachments = attachments; + } + + public void setAttachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + } + + + public AutoTestStepResult parameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + return this; + } + + public AutoTestStepResult putParametersItem(String key, String parametersItem) { + if (this.parameters == null || !this.parameters.isPresent()) { + this.parameters = JsonNullable.>of(new HashMap<>()); + } + try { + this.parameters.get().put(key, parametersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * \"<b>parameter</b>\": \"<b>value</b>\" pair with arbitrary custom parameters. Multiple parameters can be sent. + * @return parameters + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map getParameters() { + return parameters.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getParameters_JsonNullable() { + return parameters; + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + public void setParameters_JsonNullable(JsonNullable> parameters) { + this.parameters = parameters; + } + + public void setParameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + } + + + /** + * Return true if this AutoTestStepResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestStepResult autoTestStepResult = (AutoTestStepResult) o; + return equalsNullable(this.title, autoTestStepResult.title) && + equalsNullable(this.description, autoTestStepResult.description) && + equalsNullable(this.info, autoTestStepResult.info) && + equalsNullable(this.startedOn, autoTestStepResult.startedOn) && + equalsNullable(this.completedOn, autoTestStepResult.completedOn) && + equalsNullable(this.duration, autoTestStepResult.duration) && + equalsNullable(this.outcome, autoTestStepResult.outcome) && + equalsNullable(this.stepResults, autoTestStepResult.stepResults) && + equalsNullable(this.attachments, autoTestStepResult.attachments) && + equalsNullable(this.parameters, autoTestStepResult.parameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(title), hashCodeNullable(description), hashCodeNullable(info), hashCodeNullable(startedOn), hashCodeNullable(completedOn), hashCodeNullable(duration), hashCodeNullable(outcome), hashCodeNullable(stepResults), hashCodeNullable(attachments), hashCodeNullable(parameters)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestStepResult {\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" info: ").append(toIndentedString(info)).append("\n"); + sb.append(" startedOn: ").append(toIndentedString(startedOn)).append("\n"); + sb.append(" completedOn: ").append(toIndentedString(completedOn)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" outcome: ").append(toIndentedString(outcome)).append("\n"); + sb.append(" stepResults: ").append(toIndentedString(stepResults)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepResultUpdateRequest.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepResultUpdateRequest.java new file mode 100644 index 0000000..80e67e9 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestStepResultUpdateRequest.java @@ -0,0 +1,528 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentUpdateRequest; +import ru.testit.adaptersapi.model.AvailableTestResultOutcome; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestStepResultUpdateRequest + */ +@JsonPropertyOrder({ + AutoTestStepResultUpdateRequest.JSON_PROPERTY_TITLE, + AutoTestStepResultUpdateRequest.JSON_PROPERTY_DESCRIPTION, + AutoTestStepResultUpdateRequest.JSON_PROPERTY_INFO, + AutoTestStepResultUpdateRequest.JSON_PROPERTY_STARTED_ON, + AutoTestStepResultUpdateRequest.JSON_PROPERTY_COMPLETED_ON, + AutoTestStepResultUpdateRequest.JSON_PROPERTY_DURATION, + AutoTestStepResultUpdateRequest.JSON_PROPERTY_OUTCOME, + AutoTestStepResultUpdateRequest.JSON_PROPERTY_STEP_RESULTS, + AutoTestStepResultUpdateRequest.JSON_PROPERTY_ATTACHMENTS, + AutoTestStepResultUpdateRequest.JSON_PROPERTY_PARAMETERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestStepResultUpdateRequest { + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INFO = "info"; + private JsonNullable info = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STARTED_ON = "startedOn"; + private JsonNullable startedOn = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMPLETED_ON = "completedOn"; + private JsonNullable completedOn = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION = "duration"; + private JsonNullable duration = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTCOME = "outcome"; + private JsonNullable outcome = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEP_RESULTS = "stepResults"; + private JsonNullable> stepResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private JsonNullable> attachments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + private JsonNullable> parameters = JsonNullable.>undefined(); + + public AutoTestStepResultUpdateRequest() { + } + + public AutoTestStepResultUpdateRequest title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * The name of the step. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public AutoTestStepResultUpdateRequest description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the step result. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTestStepResultUpdateRequest info(@jakarta.annotation.Nullable String info) { + this.info = JsonNullable.of(info); + return this; + } + + /** + * Extended description of the step result. + * @return info + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getInfo() { + return info.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInfo_JsonNullable() { + return info; + } + + @JsonProperty(JSON_PROPERTY_INFO) + public void setInfo_JsonNullable(JsonNullable info) { + this.info = info; + } + + public void setInfo(@jakarta.annotation.Nullable String info) { + this.info = JsonNullable.of(info); + } + + + public AutoTestStepResultUpdateRequest startedOn(@jakarta.annotation.Nullable OffsetDateTime startedOn) { + this.startedOn = JsonNullable.of(startedOn); + return this; + } + + /** + * Step start date. + * @return startedOn + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getStartedOn() { + return startedOn.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STARTED_ON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStartedOn_JsonNullable() { + return startedOn; + } + + @JsonProperty(JSON_PROPERTY_STARTED_ON) + public void setStartedOn_JsonNullable(JsonNullable startedOn) { + this.startedOn = startedOn; + } + + public void setStartedOn(@jakarta.annotation.Nullable OffsetDateTime startedOn) { + this.startedOn = JsonNullable.of(startedOn); + } + + + public AutoTestStepResultUpdateRequest completedOn(@jakarta.annotation.Nullable OffsetDateTime completedOn) { + this.completedOn = JsonNullable.of(completedOn); + return this; + } + + /** + * Step end date. + * @return completedOn + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getCompletedOn() { + return completedOn.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_ON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCompletedOn_JsonNullable() { + return completedOn; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_ON) + public void setCompletedOn_JsonNullable(JsonNullable completedOn) { + this.completedOn = completedOn; + } + + public void setCompletedOn(@jakarta.annotation.Nullable OffsetDateTime completedOn) { + this.completedOn = JsonNullable.of(completedOn); + } + + + public AutoTestStepResultUpdateRequest duration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + return this; + } + + /** + * Expected or actual duration of the test run execution in milliseconds. + * minimum: 0 + * maximum: 43200000000 + * @return duration + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Long getDuration() { + return duration.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDuration_JsonNullable() { + return duration; + } + + @JsonProperty(JSON_PROPERTY_DURATION) + public void setDuration_JsonNullable(JsonNullable duration) { + this.duration = duration; + } + + public void setDuration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + } + + + public AutoTestStepResultUpdateRequest outcome(@jakarta.annotation.Nullable AvailableTestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + return this; + } + + /** + * Specifies the result of the autotest execution. + * @return outcome + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public AvailableTestResultOutcome getOutcome() { + return outcome.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutcome_JsonNullable() { + return outcome; + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + public void setOutcome_JsonNullable(JsonNullable outcome) { + this.outcome = outcome; + } + + public void setOutcome(@jakarta.annotation.Nullable AvailableTestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + } + + + public AutoTestStepResultUpdateRequest stepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + return this; + } + + public AutoTestStepResultUpdateRequest addStepResultsItem(AutoTestStepResultUpdateRequest stepResultsItem) { + if (this.stepResults == null || !this.stepResults.isPresent()) { + this.stepResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.stepResults.get().add(stepResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Nested step results. The maximum nesting level is 15. + * @return stepResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getStepResults() { + return stepResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStepResults_JsonNullable() { + return stepResults; + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + public void setStepResults_JsonNullable(JsonNullable> stepResults) { + this.stepResults = stepResults; + } + + public void setStepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + } + + + public AutoTestStepResultUpdateRequest attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + return this; + } + + public AutoTestStepResultUpdateRequest addAttachmentsItem(AttachmentUpdateRequest attachmentsItem) { + if (this.attachments == null || !this.attachments.isPresent()) { + this.attachments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attachments.get().add(attachmentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * /// <summary> Specifies an attachment GUID. Multiple values can be sent. </summary> + * @return attachments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttachments() { + return attachments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttachments_JsonNullable() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + public void setAttachments_JsonNullable(JsonNullable> attachments) { + this.attachments = attachments; + } + + public void setAttachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + } + + + public AutoTestStepResultUpdateRequest parameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + return this; + } + + public AutoTestStepResultUpdateRequest putParametersItem(String key, String parametersItem) { + if (this.parameters == null || !this.parameters.isPresent()) { + this.parameters = JsonNullable.>of(new HashMap<>()); + } + try { + this.parameters.get().put(key, parametersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * \"<b>parameter</b>\": \"<b>value</b>\" pair with arbitrary custom parameters. Multiple parameters can be sent. + * @return parameters + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map getParameters() { + return parameters.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getParameters_JsonNullable() { + return parameters; + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + public void setParameters_JsonNullable(JsonNullable> parameters) { + this.parameters = parameters; + } + + public void setParameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + } + + + /** + * Return true if this AutoTestStepResultUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestStepResultUpdateRequest autoTestStepResultUpdateRequest = (AutoTestStepResultUpdateRequest) o; + return equalsNullable(this.title, autoTestStepResultUpdateRequest.title) && + equalsNullable(this.description, autoTestStepResultUpdateRequest.description) && + equalsNullable(this.info, autoTestStepResultUpdateRequest.info) && + equalsNullable(this.startedOn, autoTestStepResultUpdateRequest.startedOn) && + equalsNullable(this.completedOn, autoTestStepResultUpdateRequest.completedOn) && + equalsNullable(this.duration, autoTestStepResultUpdateRequest.duration) && + equalsNullable(this.outcome, autoTestStepResultUpdateRequest.outcome) && + equalsNullable(this.stepResults, autoTestStepResultUpdateRequest.stepResults) && + equalsNullable(this.attachments, autoTestStepResultUpdateRequest.attachments) && + equalsNullable(this.parameters, autoTestStepResultUpdateRequest.parameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(title), hashCodeNullable(description), hashCodeNullable(info), hashCodeNullable(startedOn), hashCodeNullable(completedOn), hashCodeNullable(duration), hashCodeNullable(outcome), hashCodeNullable(stepResults), hashCodeNullable(attachments), hashCodeNullable(parameters)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestStepResultUpdateRequest {\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" info: ").append(toIndentedString(info)).append("\n"); + sb.append(" startedOn: ").append(toIndentedString(startedOn)).append("\n"); + sb.append(" completedOn: ").append(toIndentedString(completedOn)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" outcome: ").append(toIndentedString(outcome)).append("\n"); + sb.append(" stepResults: ").append(toIndentedString(stepResults)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestUpdateApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestUpdateApiModel.java new file mode 100644 index 0000000..f9f9554 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestUpdateApiModel.java @@ -0,0 +1,774 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AutoTestStepApiModel; +import ru.testit.adaptersapi.model.LabelApiModel; +import ru.testit.adaptersapi.model.LinkUpdateApiModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestUpdateApiModel + */ +@JsonPropertyOrder({ + AutoTestUpdateApiModel.JSON_PROPERTY_PROJECT_ID, + AutoTestUpdateApiModel.JSON_PROPERTY_EXTERNAL_ID, + AutoTestUpdateApiModel.JSON_PROPERTY_NAME, + AutoTestUpdateApiModel.JSON_PROPERTY_ID, + AutoTestUpdateApiModel.JSON_PROPERTY_EXTERNAL_KEY, + AutoTestUpdateApiModel.JSON_PROPERTY_NAMESPACE, + AutoTestUpdateApiModel.JSON_PROPERTY_CLASSNAME, + AutoTestUpdateApiModel.JSON_PROPERTY_TITLE, + AutoTestUpdateApiModel.JSON_PROPERTY_DESCRIPTION, + AutoTestUpdateApiModel.JSON_PROPERTY_IS_FLAKY, + AutoTestUpdateApiModel.JSON_PROPERTY_STEPS, + AutoTestUpdateApiModel.JSON_PROPERTY_SETUP, + AutoTestUpdateApiModel.JSON_PROPERTY_TEARDOWN, + AutoTestUpdateApiModel.JSON_PROPERTY_LABELS, + AutoTestUpdateApiModel.JSON_PROPERTY_LINKS, + AutoTestUpdateApiModel.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestUpdateApiModel { + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_EXTERNAL_ID = "externalId"; + @jakarta.annotation.Nonnull + private String externalId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXTERNAL_KEY = "externalKey"; + private JsonNullable externalKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + private JsonNullable namespace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CLASSNAME = "classname"; + private JsonNullable classname = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_FLAKY = "isFlaky"; + private JsonNullable isFlaky = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + private JsonNullable> steps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_SETUP = "setup"; + private JsonNullable> setup = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TEARDOWN = "teardown"; + private JsonNullable> teardown = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_LABELS = "labels"; + private JsonNullable> labels = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public AutoTestUpdateApiModel() { + } + + public AutoTestUpdateApiModel projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Unique ID of the autotest project + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public AutoTestUpdateApiModel externalId(@jakarta.annotation.Nonnull String externalId) { + this.externalId = externalId; + return this; + } + + /** + * External ID of the autotest + * @return externalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getExternalId() { + return externalId; + } + + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExternalId(@jakarta.annotation.Nonnull String externalId) { + this.externalId = externalId; + } + + + public AutoTestUpdateApiModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the autotest + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public AutoTestUpdateApiModel id(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Autotest unique internal identifier + * @return id + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + } + + + public AutoTestUpdateApiModel externalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + return this; + } + + /** + * External key of the autotest + * @return externalKey + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getExternalKey() { + return externalKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExternalKey_JsonNullable() { + return externalKey; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_KEY) + public void setExternalKey_JsonNullable(JsonNullable externalKey) { + this.externalKey = externalKey; + } + + public void setExternalKey(@jakarta.annotation.Nullable String externalKey) { + this.externalKey = JsonNullable.of(externalKey); + } + + + public AutoTestUpdateApiModel namespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + return this; + } + + /** + * Name of the autotest namespace + * @return namespace + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getNamespace() { + return namespace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNamespace_JsonNullable() { + return namespace; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + public void setNamespace_JsonNullable(JsonNullable namespace) { + this.namespace = namespace; + } + + public void setNamespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + } + + + public AutoTestUpdateApiModel classname(@jakarta.annotation.Nullable String classname) { + this.classname = JsonNullable.of(classname); + return this; + } + + /** + * Name of the autotest class + * @return classname + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getClassname() { + return classname.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CLASSNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getClassname_JsonNullable() { + return classname; + } + + @JsonProperty(JSON_PROPERTY_CLASSNAME) + public void setClassname_JsonNullable(JsonNullable classname) { + this.classname = classname; + } + + public void setClassname(@jakarta.annotation.Nullable String classname) { + this.classname = JsonNullable.of(classname); + } + + + public AutoTestUpdateApiModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Name of the autotest in autotest's card + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public AutoTestUpdateApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the autotest in autotest's card + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public AutoTestUpdateApiModel isFlaky(@jakarta.annotation.Nullable Boolean isFlaky) { + this.isFlaky = JsonNullable.of(isFlaky); + return this; + } + + /** + * Indicates if the autotest is marked as flaky + * @return isFlaky + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsFlaky() { + return isFlaky.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsFlaky_JsonNullable() { + return isFlaky; + } + + @JsonProperty(JSON_PROPERTY_IS_FLAKY) + public void setIsFlaky_JsonNullable(JsonNullable isFlaky) { + this.isFlaky = isFlaky; + } + + public void setIsFlaky(@jakarta.annotation.Nullable Boolean isFlaky) { + this.isFlaky = JsonNullable.of(isFlaky); + } + + + public AutoTestUpdateApiModel steps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + return this; + } + + public AutoTestUpdateApiModel addStepsItem(AutoTestStepApiModel stepsItem) { + if (this.steps == null || !this.steps.isPresent()) { + this.steps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.steps.get().add(stepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest steps + * @return steps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSteps() { + return steps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSteps_JsonNullable() { + return steps; + } + + @JsonProperty(JSON_PROPERTY_STEPS) + public void setSteps_JsonNullable(JsonNullable> steps) { + this.steps = steps; + } + + public void setSteps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + } + + + public AutoTestUpdateApiModel setup(@jakarta.annotation.Nullable List setup) { + this.setup = JsonNullable.>of(setup); + return this; + } + + public AutoTestUpdateApiModel addSetupItem(AutoTestStepApiModel setupItem) { + if (this.setup == null || !this.setup.isPresent()) { + this.setup = JsonNullable.>of(new ArrayList<>()); + } + try { + this.setup.get().add(setupItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest setup steps + * @return setup + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSetup() { + return setup.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SETUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSetup_JsonNullable() { + return setup; + } + + @JsonProperty(JSON_PROPERTY_SETUP) + public void setSetup_JsonNullable(JsonNullable> setup) { + this.setup = setup; + } + + public void setSetup(@jakarta.annotation.Nullable List setup) { + this.setup = JsonNullable.>of(setup); + } + + + public AutoTestUpdateApiModel teardown(@jakarta.annotation.Nullable List teardown) { + this.teardown = JsonNullable.>of(teardown); + return this; + } + + public AutoTestUpdateApiModel addTeardownItem(AutoTestStepApiModel teardownItem) { + if (this.teardown == null || !this.teardown.isPresent()) { + this.teardown = JsonNullable.>of(new ArrayList<>()); + } + try { + this.teardown.get().add(teardownItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest teardown steps + * @return teardown + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTeardown() { + return teardown.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTeardown_JsonNullable() { + return teardown; + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN) + public void setTeardown_JsonNullable(JsonNullable> teardown) { + this.teardown = teardown; + } + + public void setTeardown(@jakarta.annotation.Nullable List teardown) { + this.teardown = JsonNullable.>of(teardown); + } + + + public AutoTestUpdateApiModel labels(@jakarta.annotation.Nullable List labels) { + this.labels = JsonNullable.>of(labels); + return this; + } + + public AutoTestUpdateApiModel addLabelsItem(LabelApiModel labelsItem) { + if (this.labels == null || !this.labels.isPresent()) { + this.labels = JsonNullable.>of(new ArrayList<>()); + } + try { + this.labels.get().add(labelsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest labels + * @return labels + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLabels() { + return labels.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLabels_JsonNullable() { + return labels; + } + + @JsonProperty(JSON_PROPERTY_LABELS) + public void setLabels_JsonNullable(JsonNullable> labels) { + this.labels = labels; + } + + public void setLabels(@jakarta.annotation.Nullable List labels) { + this.labels = JsonNullable.>of(labels); + } + + + public AutoTestUpdateApiModel links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public AutoTestUpdateApiModel addLinksItem(LinkUpdateApiModel linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest links + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public AutoTestUpdateApiModel tags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public AutoTestUpdateApiModel addTagsItem(String tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.tags.get().add(tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the autotest tags + * @return tags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + } + + + /** + * Return true if this AutoTestUpdateApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestUpdateApiModel autoTestUpdateApiModel = (AutoTestUpdateApiModel) o; + return Objects.equals(this.projectId, autoTestUpdateApiModel.projectId) && + Objects.equals(this.externalId, autoTestUpdateApiModel.externalId) && + Objects.equals(this.name, autoTestUpdateApiModel.name) && + equalsNullable(this.id, autoTestUpdateApiModel.id) && + equalsNullable(this.externalKey, autoTestUpdateApiModel.externalKey) && + equalsNullable(this.namespace, autoTestUpdateApiModel.namespace) && + equalsNullable(this.classname, autoTestUpdateApiModel.classname) && + equalsNullable(this.title, autoTestUpdateApiModel.title) && + equalsNullable(this.description, autoTestUpdateApiModel.description) && + equalsNullable(this.isFlaky, autoTestUpdateApiModel.isFlaky) && + equalsNullable(this.steps, autoTestUpdateApiModel.steps) && + equalsNullable(this.setup, autoTestUpdateApiModel.setup) && + equalsNullable(this.teardown, autoTestUpdateApiModel.teardown) && + equalsNullable(this.labels, autoTestUpdateApiModel.labels) && + equalsNullable(this.links, autoTestUpdateApiModel.links) && + equalsNullable(this.tags, autoTestUpdateApiModel.tags); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, externalId, name, hashCodeNullable(id), hashCodeNullable(externalKey), hashCodeNullable(namespace), hashCodeNullable(classname), hashCodeNullable(title), hashCodeNullable(description), hashCodeNullable(isFlaky), hashCodeNullable(steps), hashCodeNullable(setup), hashCodeNullable(teardown), hashCodeNullable(labels), hashCodeNullable(links), hashCodeNullable(tags)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestUpdateApiModel {\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" externalKey: ").append(toIndentedString(externalKey)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" classname: ").append(toIndentedString(classname)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" isFlaky: ").append(toIndentedString(isFlaky)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).append("\n"); + sb.append(" setup: ").append(toIndentedString(setup)).append("\n"); + sb.append(" teardown: ").append(toIndentedString(teardown)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestWorkItemIdentifierApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestWorkItemIdentifierApiResult.java new file mode 100644 index 0000000..b2987f0 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AutoTestWorkItemIdentifierApiResult.java @@ -0,0 +1,143 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * AutoTestWorkItemIdentifierApiResult + */ +@JsonPropertyOrder({ + AutoTestWorkItemIdentifierApiResult.JSON_PROPERTY_ID, + AutoTestWorkItemIdentifierApiResult.JSON_PROPERTY_GLOBAL_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class AutoTestWorkItemIdentifierApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public AutoTestWorkItemIdentifierApiResult() { + } + + public AutoTestWorkItemIdentifierApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * WorkItem unique internal identifier + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public AutoTestWorkItemIdentifierApiResult globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * WorkItem Global unique identifier + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + /** + * Return true if this AutoTestWorkItemIdentifierApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AutoTestWorkItemIdentifierApiResult autoTestWorkItemIdentifierApiResult = (AutoTestWorkItemIdentifierApiResult) o; + return Objects.equals(this.id, autoTestWorkItemIdentifierApiResult.id) && + Objects.equals(this.globalId, autoTestWorkItemIdentifierApiResult.globalId); + } + + @Override + public int hashCode() { + return Objects.hash(id, globalId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AutoTestWorkItemIdentifierApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AvailableTestResultOutcome.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AvailableTestResultOutcome.java new file mode 100644 index 0000000..b2cdfca --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/AvailableTestResultOutcome.java @@ -0,0 +1,69 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets AvailableTestResultOutcome + */ +public enum AvailableTestResultOutcome { + + PASSED("Passed"), + + FAILED("Failed"), + + BLOCKED("Blocked"), + + SKIPPED("Skipped"), + + IN_PROGRESS("InProgress"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + AvailableTestResultOutcome(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AvailableTestResultOutcome fromValue(String value) { + for (AvailableTestResultOutcome b : AvailableTestResultOutcome.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ConfigurationFilterModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ConfigurationFilterModel.java new file mode 100644 index 0000000..addd06e --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ConfigurationFilterModel.java @@ -0,0 +1,276 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ConfigurationFilterModel + */ +@JsonPropertyOrder({ + ConfigurationFilterModel.JSON_PROPERTY_PROJECT_IDS, + ConfigurationFilterModel.JSON_PROPERTY_NAME, + ConfigurationFilterModel.JSON_PROPERTY_IS_DELETED, + ConfigurationFilterModel.JSON_PROPERTY_GLOBAL_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ConfigurationFilterModel { + public static final String JSON_PROPERTY_PROJECT_IDS = "projectIds"; + private JsonNullable> projectIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + private JsonNullable isDeleted = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_GLOBAL_IDS = "globalIds"; + private JsonNullable> globalIds = JsonNullable.>undefined(); + + public ConfigurationFilterModel() { + } + + public ConfigurationFilterModel projectIds(@jakarta.annotation.Nullable Set projectIds) { + this.projectIds = JsonNullable.>of(projectIds); + return this; + } + + public ConfigurationFilterModel addProjectIdsItem(UUID projectIdsItem) { + if (this.projectIds == null || !this.projectIds.isPresent()) { + this.projectIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.projectIds.get().add(projectIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of identifiers of projects from which configurations will be taken + * @return projectIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getProjectIds() { + return projectIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getProjectIds_JsonNullable() { + return projectIds; + } + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + public void setProjectIds_JsonNullable(JsonNullable> projectIds) { + this.projectIds = projectIds; + } + + public void setProjectIds(@jakarta.annotation.Nullable Set projectIds) { + this.projectIds = JsonNullable.>of(projectIds); + } + + + public ConfigurationFilterModel name(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Filter to search by name (case-insensitive, partial match) + * @return name + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public ConfigurationFilterModel isDeleted(@jakarta.annotation.Nullable Boolean isDeleted) { + this.isDeleted = JsonNullable.of(isDeleted); + return this; + } + + /** + * Is configurations deleted or existing + * @return isDeleted + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsDeleted() { + return isDeleted.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsDeleted_JsonNullable() { + return isDeleted; + } + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + public void setIsDeleted_JsonNullable(JsonNullable isDeleted) { + this.isDeleted = isDeleted; + } + + public void setIsDeleted(@jakarta.annotation.Nullable Boolean isDeleted) { + this.isDeleted = JsonNullable.of(isDeleted); + } + + + public ConfigurationFilterModel globalIds(@jakarta.annotation.Nullable Set globalIds) { + this.globalIds = JsonNullable.>of(globalIds); + return this; + } + + public ConfigurationFilterModel addGlobalIdsItem(Long globalIdsItem) { + if (this.globalIds == null || !this.globalIds.isPresent()) { + this.globalIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.globalIds.get().add(globalIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of global (integer) identifiers to filter configurations + * @return globalIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getGlobalIds() { + return globalIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_GLOBAL_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getGlobalIds_JsonNullable() { + return globalIds; + } + + @JsonProperty(JSON_PROPERTY_GLOBAL_IDS) + public void setGlobalIds_JsonNullable(JsonNullable> globalIds) { + this.globalIds = globalIds; + } + + public void setGlobalIds(@jakarta.annotation.Nullable Set globalIds) { + this.globalIds = JsonNullable.>of(globalIds); + } + + + /** + * Return true if this ConfigurationFilterModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigurationFilterModel configurationFilterModel = (ConfigurationFilterModel) o; + return equalsNullable(this.projectIds, configurationFilterModel.projectIds) && + equalsNullable(this.name, configurationFilterModel.name) && + equalsNullable(this.isDeleted, configurationFilterModel.isDeleted) && + equalsNullable(this.globalIds, configurationFilterModel.globalIds); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(projectIds), hashCodeNullable(name), hashCodeNullable(isDeleted), hashCodeNullable(globalIds)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigurationFilterModel {\n"); + sb.append(" projectIds: ").append(toIndentedString(projectIds)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" globalIds: ").append(toIndentedString(globalIds)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ConfigurationModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ConfigurationModel.java new file mode 100644 index 0000000..d179713 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ConfigurationModel.java @@ -0,0 +1,528 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ConfigurationModel + */ +@JsonPropertyOrder({ + ConfigurationModel.JSON_PROPERTY_PROJECT_ID, + ConfigurationModel.JSON_PROPERTY_IS_DEFAULT, + ConfigurationModel.JSON_PROPERTY_CREATED_DATE, + ConfigurationModel.JSON_PROPERTY_CREATED_BY_ID, + ConfigurationModel.JSON_PROPERTY_GLOBAL_ID, + ConfigurationModel.JSON_PROPERTY_ID, + ConfigurationModel.JSON_PROPERTY_IS_DELETED, + ConfigurationModel.JSON_PROPERTY_DESCRIPTION, + ConfigurationModel.JSON_PROPERTY_PARAMETERS, + ConfigurationModel.JSON_PROPERTY_NAME, + ConfigurationModel.JSON_PROPERTY_MODIFIED_DATE, + ConfigurationModel.JSON_PROPERTY_MODIFIED_BY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ConfigurationModel { + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_IS_DEFAULT = "isDefault"; + @jakarta.annotation.Nonnull + private Boolean isDefault; + + public static final String JSON_PROPERTY_CREATED_DATE = "createdDate"; + @jakarta.annotation.Nonnull + private OffsetDateTime createdDate; + + public static final String JSON_PROPERTY_CREATED_BY_ID = "createdById"; + @jakarta.annotation.Nonnull + private UUID createdById; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + private JsonNullable> parameters = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED_DATE = "modifiedDate"; + private JsonNullable modifiedDate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED_BY_ID = "modifiedById"; + private JsonNullable modifiedById = JsonNullable.undefined(); + + public ConfigurationModel() { + } + + public ConfigurationModel projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * This property is used to link configuration with project + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public ConfigurationModel isDefault(@jakarta.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get isDefault + * @return isDefault + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDefault() { + return isDefault; + } + + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDefault(@jakarta.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + } + + + public ConfigurationModel createdDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get createdDate + * @return createdDate + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedDate() { + return createdDate; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + } + + + public ConfigurationModel createdById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + return this; + } + + /** + * Get createdById + * @return createdById + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getCreatedById() { + return createdById; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + } + + + public ConfigurationModel globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Get globalId + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + public ConfigurationModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the entity + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public ConfigurationModel isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Indicates if the entity is deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public ConfigurationModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public ConfigurationModel parameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + return this; + } + + public ConfigurationModel putParametersItem(String key, String parametersItem) { + if (this.parameters == null || !this.parameters.isPresent()) { + this.parameters = JsonNullable.>of(new HashMap<>()); + } + try { + this.parameters.get().put(key, parametersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get parameters + * @return parameters + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map getParameters() { + return parameters.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getParameters_JsonNullable() { + return parameters; + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + public void setParameters_JsonNullable(JsonNullable> parameters) { + this.parameters = parameters; + } + + public void setParameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + } + + + public ConfigurationModel name(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public ConfigurationModel modifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + return this; + } + + /** + * Get modifiedDate + * @return modifiedDate + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getModifiedDate() { + return modifiedDate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedDate_JsonNullable() { + return modifiedDate; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + public void setModifiedDate_JsonNullable(JsonNullable modifiedDate) { + this.modifiedDate = modifiedDate; + } + + public void setModifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + } + + + public ConfigurationModel modifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + return this; + } + + /** + * Get modifiedById + * @return modifiedById + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getModifiedById() { + return modifiedById.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedById_JsonNullable() { + return modifiedById; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + public void setModifiedById_JsonNullable(JsonNullable modifiedById) { + this.modifiedById = modifiedById; + } + + public void setModifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + } + + + /** + * Return true if this ConfigurationModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigurationModel configurationModel = (ConfigurationModel) o; + return Objects.equals(this.projectId, configurationModel.projectId) && + Objects.equals(this.isDefault, configurationModel.isDefault) && + Objects.equals(this.createdDate, configurationModel.createdDate) && + Objects.equals(this.createdById, configurationModel.createdById) && + Objects.equals(this.globalId, configurationModel.globalId) && + Objects.equals(this.id, configurationModel.id) && + Objects.equals(this.isDeleted, configurationModel.isDeleted) && + equalsNullable(this.description, configurationModel.description) && + equalsNullable(this.parameters, configurationModel.parameters) && + equalsNullable(this.name, configurationModel.name) && + equalsNullable(this.modifiedDate, configurationModel.modifiedDate) && + equalsNullable(this.modifiedById, configurationModel.modifiedById); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, isDefault, createdDate, createdById, globalId, id, isDeleted, hashCodeNullable(description), hashCodeNullable(parameters), hashCodeNullable(name), hashCodeNullable(modifiedDate), hashCodeNullable(modifiedById)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigurationModel {\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" createdDate: ").append(toIndentedString(createdDate)).append("\n"); + sb.append(" createdById: ").append(toIndentedString(createdById)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" modifiedDate: ").append(toIndentedString(modifiedDate)).append("\n"); + sb.append(" modifiedById: ").append(toIndentedString(modifiedById)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ConfigurationShortModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ConfigurationShortModel.java new file mode 100644 index 0000000..616d983 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ConfigurationShortModel.java @@ -0,0 +1,143 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ConfigurationShortModel + */ +@JsonPropertyOrder({ + ConfigurationShortModel.JSON_PROPERTY_ID, + ConfigurationShortModel.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ConfigurationShortModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public ConfigurationShortModel() { + } + + public ConfigurationShortModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public ConfigurationShortModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this ConfigurationShortModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigurationShortModel configurationShortModel = (ConfigurationShortModel) o; + return Objects.equals(this.id, configurationShortModel.id) && + Objects.equals(this.name, configurationShortModel.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConfigurationShortModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateEmptyTestRunApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateEmptyTestRunApiModel.java new file mode 100644 index 0000000..63cda68 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateEmptyTestRunApiModel.java @@ -0,0 +1,400 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AssignAttachmentApiModel; +import ru.testit.adaptersapi.model.CreateLinkApiModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CreateEmptyTestRunApiModel + */ +@JsonPropertyOrder({ + CreateEmptyTestRunApiModel.JSON_PROPERTY_PROJECT_ID, + CreateEmptyTestRunApiModel.JSON_PROPERTY_NAME, + CreateEmptyTestRunApiModel.JSON_PROPERTY_DESCRIPTION, + CreateEmptyTestRunApiModel.JSON_PROPERTY_LAUNCH_SOURCE, + CreateEmptyTestRunApiModel.JSON_PROPERTY_ATTACHMENTS, + CreateEmptyTestRunApiModel.JSON_PROPERTY_LINKS, + CreateEmptyTestRunApiModel.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CreateEmptyTestRunApiModel { + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LAUNCH_SOURCE = "launchSource"; + private JsonNullable launchSource = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private JsonNullable> attachments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public CreateEmptyTestRunApiModel() { + } + + public CreateEmptyTestRunApiModel projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Project unique identifier This property is to link test run with a project + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public CreateEmptyTestRunApiModel name(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Test run name + * @return name + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public CreateEmptyTestRunApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Test run description + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public CreateEmptyTestRunApiModel launchSource(@jakarta.annotation.Nullable String launchSource) { + this.launchSource = JsonNullable.of(launchSource); + return this; + } + + /** + * Test run launch source + * @return launchSource + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getLaunchSource() { + return launchSource.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAUNCH_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLaunchSource_JsonNullable() { + return launchSource; + } + + @JsonProperty(JSON_PROPERTY_LAUNCH_SOURCE) + public void setLaunchSource_JsonNullable(JsonNullable launchSource) { + this.launchSource = launchSource; + } + + public void setLaunchSource(@jakarta.annotation.Nullable String launchSource) { + this.launchSource = JsonNullable.of(launchSource); + } + + + public CreateEmptyTestRunApiModel attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + return this; + } + + public CreateEmptyTestRunApiModel addAttachmentsItem(AssignAttachmentApiModel attachmentsItem) { + if (this.attachments == null || !this.attachments.isPresent()) { + this.attachments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attachments.get().add(attachmentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of attachments to relate to the test run + * @return attachments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttachments() { + return attachments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttachments_JsonNullable() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + public void setAttachments_JsonNullable(JsonNullable> attachments) { + this.attachments = attachments; + } + + public void setAttachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + } + + + public CreateEmptyTestRunApiModel links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public CreateEmptyTestRunApiModel addLinksItem(CreateLinkApiModel linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of links to relate to the test run + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public CreateEmptyTestRunApiModel tags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public CreateEmptyTestRunApiModel addTagsItem(String tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.tags.get().add(tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of tags to assign to the test run + * @return tags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + } + + + /** + * Return true if this CreateEmptyTestRunApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateEmptyTestRunApiModel createEmptyTestRunApiModel = (CreateEmptyTestRunApiModel) o; + return Objects.equals(this.projectId, createEmptyTestRunApiModel.projectId) && + equalsNullable(this.name, createEmptyTestRunApiModel.name) && + equalsNullable(this.description, createEmptyTestRunApiModel.description) && + equalsNullable(this.launchSource, createEmptyTestRunApiModel.launchSource) && + equalsNullable(this.attachments, createEmptyTestRunApiModel.attachments) && + equalsNullable(this.links, createEmptyTestRunApiModel.links) && + equalsNullable(this.tags, createEmptyTestRunApiModel.tags); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, hashCodeNullable(name), hashCodeNullable(description), hashCodeNullable(launchSource), hashCodeNullable(attachments), hashCodeNullable(links), hashCodeNullable(tags)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateEmptyTestRunApiModel {\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" launchSource: ").append(toIndentedString(launchSource)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateLinkApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateLinkApiModel.java new file mode 100644 index 0000000..2246551 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateLinkApiModel.java @@ -0,0 +1,236 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.LinkType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CreateLinkApiModel + */ +@JsonPropertyOrder({ + CreateLinkApiModel.JSON_PROPERTY_URL, + CreateLinkApiModel.JSON_PROPERTY_TYPE, + CreateLinkApiModel.JSON_PROPERTY_TITLE, + CreateLinkApiModel.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CreateLinkApiModel { + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull + private String url; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private LinkType type; + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public CreateLinkApiModel() { + } + + public CreateLinkApiModel url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Address can be specified without protocol, but necessarily with the domain. + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + + public CreateLinkApiModel type(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + return this; + } + + /** + * Specifies the type of the link. + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LinkType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + } + + + public CreateLinkApiModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Link name. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public CreateLinkApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Link description. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this CreateLinkApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateLinkApiModel createLinkApiModel = (CreateLinkApiModel) o; + return Objects.equals(this.url, createLinkApiModel.url) && + Objects.equals(this.type, createLinkApiModel.type) && + equalsNullable(this.title, createLinkApiModel.title) && + equalsNullable(this.description, createLinkApiModel.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(url, type, hashCodeNullable(title), hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateLinkApiModel {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateParameterApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateParameterApiModel.java new file mode 100644 index 0000000..5afe566 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateParameterApiModel.java @@ -0,0 +1,211 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CreateParameterApiModel + */ +@JsonPropertyOrder({ + CreateParameterApiModel.JSON_PROPERTY_NAME, + CreateParameterApiModel.JSON_PROPERTY_VALUE, + CreateParameterApiModel.JSON_PROPERTY_PROJECT_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CreateParameterApiModel { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull + private String value; + + public static final String JSON_PROPERTY_PROJECT_IDS = "projectIds"; + private JsonNullable> projectIds = JsonNullable.>undefined(); + + public CreateParameterApiModel() { + } + + public CreateParameterApiModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Key of the parameter + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateParameterApiModel value(@jakarta.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Value of the parameter + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nonnull String value) { + this.value = value; + } + + + public CreateParameterApiModel projectIds(@jakarta.annotation.Nullable List projectIds) { + this.projectIds = JsonNullable.>of(projectIds); + return this; + } + + public CreateParameterApiModel addProjectIdsItem(UUID projectIdsItem) { + if (this.projectIds == null || !this.projectIds.isPresent()) { + this.projectIds = JsonNullable.>of(new ArrayList<>()); + } + try { + this.projectIds.get().add(projectIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * List of projects where parameter should be available + * @return projectIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getProjectIds() { + return projectIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getProjectIds_JsonNullable() { + return projectIds; + } + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + public void setProjectIds_JsonNullable(JsonNullable> projectIds) { + this.projectIds = projectIds; + } + + public void setProjectIds(@jakarta.annotation.Nullable List projectIds) { + this.projectIds = JsonNullable.>of(projectIds); + } + + + /** + * Return true if this CreateParameterApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateParameterApiModel createParameterApiModel = (CreateParameterApiModel) o; + return Objects.equals(this.name, createParameterApiModel.name) && + Objects.equals(this.value, createParameterApiModel.value) && + equalsNullable(this.projectIds, createParameterApiModel.projectIds); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, value, hashCodeNullable(projectIds)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateParameterApiModel {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" projectIds: ").append(toIndentedString(projectIds)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateProjectApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateProjectApiModel.java new file mode 100644 index 0000000..3dc0b84 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateProjectApiModel.java @@ -0,0 +1,243 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CreateProjectApiModel + */ +@JsonPropertyOrder({ + CreateProjectApiModel.JSON_PROPERTY_NAME, + CreateProjectApiModel.JSON_PROPERTY_DESCRIPTION, + CreateProjectApiModel.JSON_PROPERTY_IS_FAVORITE, + CreateProjectApiModel.JSON_PROPERTY_WORKFLOW_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CreateProjectApiModel { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_FAVORITE = "isFavorite"; + private JsonNullable isFavorite = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WORKFLOW_ID = "workflowId"; + private JsonNullable workflowId = JsonNullable.undefined(); + + public CreateProjectApiModel() { + } + + public CreateProjectApiModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the project + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateProjectApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the project + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public CreateProjectApiModel isFavorite(@jakarta.annotation.Nullable Boolean isFavorite) { + this.isFavorite = JsonNullable.of(isFavorite); + return this; + } + + /** + * Indicates if the project is marked as favorite + * @return isFavorite + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsFavorite() { + return isFavorite.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsFavorite_JsonNullable() { + return isFavorite; + } + + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + public void setIsFavorite_JsonNullable(JsonNullable isFavorite) { + this.isFavorite = isFavorite; + } + + public void setIsFavorite(@jakarta.annotation.Nullable Boolean isFavorite) { + this.isFavorite = JsonNullable.of(isFavorite); + } + + + public CreateProjectApiModel workflowId(@jakarta.annotation.Nullable UUID workflowId) { + this.workflowId = JsonNullable.of(workflowId); + return this; + } + + /** + * Identifier of the workflow project should use + * @return workflowId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getWorkflowId() { + return workflowId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWorkflowId_JsonNullable() { + return workflowId; + } + + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + public void setWorkflowId_JsonNullable(JsonNullable workflowId) { + this.workflowId = workflowId; + } + + public void setWorkflowId(@jakarta.annotation.Nullable UUID workflowId) { + this.workflowId = JsonNullable.of(workflowId); + } + + + /** + * Return true if this CreateProjectApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateProjectApiModel createProjectApiModel = (CreateProjectApiModel) o; + return Objects.equals(this.name, createProjectApiModel.name) && + equalsNullable(this.description, createProjectApiModel.description) && + equalsNullable(this.isFavorite, createProjectApiModel.isFavorite) && + equalsNullable(this.workflowId, createProjectApiModel.workflowId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, hashCodeNullable(description), hashCodeNullable(isFavorite), hashCodeNullable(workflowId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateProjectApiModel {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" isFavorite: ").append(toIndentedString(isFavorite)).append("\n"); + sb.append(" workflowId: ").append(toIndentedString(workflowId)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateStepApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateStepApiModel.java new file mode 100644 index 0000000..b0aa1e6 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateStepApiModel.java @@ -0,0 +1,289 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CreateStepApiModel + */ +@JsonPropertyOrder({ + CreateStepApiModel.JSON_PROPERTY_ACTION, + CreateStepApiModel.JSON_PROPERTY_EXPECTED, + CreateStepApiModel.JSON_PROPERTY_TEST_DATA, + CreateStepApiModel.JSON_PROPERTY_COMMENTS, + CreateStepApiModel.JSON_PROPERTY_WORK_ITEM_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CreateStepApiModel { + public static final String JSON_PROPERTY_ACTION = "action"; + private JsonNullable action = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXPECTED = "expected"; + private JsonNullable expected = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEST_DATA = "testData"; + private JsonNullable testData = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMMENTS = "comments"; + private JsonNullable comments = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WORK_ITEM_ID = "workItemId"; + private JsonNullable workItemId = JsonNullable.undefined(); + + public CreateStepApiModel() { + } + + public CreateStepApiModel action(@jakarta.annotation.Nullable String action) { + this.action = JsonNullable.of(action); + return this; + } + + /** + * Action applied by user + * @return action + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getAction() { + return action.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAction_JsonNullable() { + return action; + } + + @JsonProperty(JSON_PROPERTY_ACTION) + public void setAction_JsonNullable(JsonNullable action) { + this.action = action; + } + + public void setAction(@jakarta.annotation.Nullable String action) { + this.action = JsonNullable.of(action); + } + + + public CreateStepApiModel expected(@jakarta.annotation.Nullable String expected) { + this.expected = JsonNullable.of(expected); + return this; + } + + /** + * Expected system reaction + * @return expected + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getExpected() { + return expected.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXPECTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExpected_JsonNullable() { + return expected; + } + + @JsonProperty(JSON_PROPERTY_EXPECTED) + public void setExpected_JsonNullable(JsonNullable expected) { + this.expected = expected; + } + + public void setExpected(@jakarta.annotation.Nullable String expected) { + this.expected = JsonNullable.of(expected); + } + + + public CreateStepApiModel testData(@jakarta.annotation.Nullable String testData) { + this.testData = JsonNullable.of(testData); + return this; + } + + /** + * Test data for step + * @return testData + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTestData() { + return testData.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEST_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTestData_JsonNullable() { + return testData; + } + + @JsonProperty(JSON_PROPERTY_TEST_DATA) + public void setTestData_JsonNullable(JsonNullable testData) { + this.testData = testData; + } + + public void setTestData(@jakarta.annotation.Nullable String testData) { + this.testData = JsonNullable.of(testData); + } + + + public CreateStepApiModel comments(@jakarta.annotation.Nullable String comments) { + this.comments = JsonNullable.of(comments); + return this; + } + + /** + * Comments for step + * @return comments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getComments() { + return comments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getComments_JsonNullable() { + return comments; + } + + @JsonProperty(JSON_PROPERTY_COMMENTS) + public void setComments_JsonNullable(JsonNullable comments) { + this.comments = comments; + } + + public void setComments(@jakarta.annotation.Nullable String comments) { + this.comments = JsonNullable.of(comments); + } + + + public CreateStepApiModel workItemId(@jakarta.annotation.Nullable UUID workItemId) { + this.workItemId = JsonNullable.of(workItemId); + return this; + } + + /** + * Unique identifier of workitem which relates to the step + * @return workItemId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getWorkItemId() { + return workItemId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WORK_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWorkItemId_JsonNullable() { + return workItemId; + } + + @JsonProperty(JSON_PROPERTY_WORK_ITEM_ID) + public void setWorkItemId_JsonNullable(JsonNullable workItemId) { + this.workItemId = workItemId; + } + + public void setWorkItemId(@jakarta.annotation.Nullable UUID workItemId) { + this.workItemId = JsonNullable.of(workItemId); + } + + + /** + * Return true if this CreateStepApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStepApiModel createStepApiModel = (CreateStepApiModel) o; + return equalsNullable(this.action, createStepApiModel.action) && + equalsNullable(this.expected, createStepApiModel.expected) && + equalsNullable(this.testData, createStepApiModel.testData) && + equalsNullable(this.comments, createStepApiModel.comments) && + equalsNullable(this.workItemId, createStepApiModel.workItemId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(action), hashCodeNullable(expected), hashCodeNullable(testData), hashCodeNullable(comments), hashCodeNullable(workItemId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStepApiModel {\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" expected: ").append(toIndentedString(expected)).append("\n"); + sb.append(" testData: ").append(toIndentedString(testData)).append("\n"); + sb.append(" comments: ").append(toIndentedString(comments)).append("\n"); + sb.append(" workItemId: ").append(toIndentedString(workItemId)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateWorkItemApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateWorkItemApiModel.java new file mode 100644 index 0000000..b40ee20 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CreateWorkItemApiModel.java @@ -0,0 +1,890 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AssignAttachmentApiModel; +import ru.testit.adaptersapi.model.AssignIterationApiModel; +import ru.testit.adaptersapi.model.AutoTestIdModel; +import ru.testit.adaptersapi.model.CreateLinkApiModel; +import ru.testit.adaptersapi.model.CreateStepApiModel; +import ru.testit.adaptersapi.model.TagModel; +import ru.testit.adaptersapi.model.WorkItemEntityTypeApiModel; +import ru.testit.adaptersapi.model.WorkItemParameterKeyApiModel; +import ru.testit.adaptersapi.model.WorkItemPriorityApiModel; +import ru.testit.adaptersapi.model.WorkItemStateApiModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CreateWorkItemApiModel + */ +@JsonPropertyOrder({ + CreateWorkItemApiModel.JSON_PROPERTY_PROJECT_ID, + CreateWorkItemApiModel.JSON_PROPERTY_NAME, + CreateWorkItemApiModel.JSON_PROPERTY_ENTITY_TYPE_NAME, + CreateWorkItemApiModel.JSON_PROPERTY_DURATION, + CreateWorkItemApiModel.JSON_PROPERTY_STATE, + CreateWorkItemApiModel.JSON_PROPERTY_PRIORITY, + CreateWorkItemApiModel.JSON_PROPERTY_SECTION_ID, + CreateWorkItemApiModel.JSON_PROPERTY_DESCRIPTION, + CreateWorkItemApiModel.JSON_PROPERTY_ATTRIBUTES, + CreateWorkItemApiModel.JSON_PROPERTY_TAGS, + CreateWorkItemApiModel.JSON_PROPERTY_PRECONDITION_STEPS, + CreateWorkItemApiModel.JSON_PROPERTY_STEPS, + CreateWorkItemApiModel.JSON_PROPERTY_POSTCONDITION_STEPS, + CreateWorkItemApiModel.JSON_PROPERTY_ITERATIONS, + CreateWorkItemApiModel.JSON_PROPERTY_AUTO_TESTS, + CreateWorkItemApiModel.JSON_PROPERTY_ATTACHMENTS, + CreateWorkItemApiModel.JSON_PROPERTY_LINKS, + CreateWorkItemApiModel.JSON_PROPERTY_PARAMETERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CreateWorkItemApiModel { + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ENTITY_TYPE_NAME = "entityTypeName"; + @jakarta.annotation.Nonnull + private WorkItemEntityTypeApiModel entityTypeName; + + public static final String JSON_PROPERTY_DURATION = "duration"; + @jakarta.annotation.Nonnull + private Long duration; + + public static final String JSON_PROPERTY_STATE = "state"; + @jakarta.annotation.Nonnull + private WorkItemStateApiModel state; + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + @jakarta.annotation.Nonnull + private WorkItemPriorityApiModel priority; + + public static final String JSON_PROPERTY_SECTION_ID = "sectionId"; + private JsonNullable sectionId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private JsonNullable> attributes = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PRECONDITION_STEPS = "preconditionSteps"; + private JsonNullable> preconditionSteps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + private JsonNullable> steps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_POSTCONDITION_STEPS = "postconditionSteps"; + private JsonNullable> postconditionSteps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ITERATIONS = "iterations"; + private JsonNullable> iterations = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_AUTO_TESTS = "autoTests"; + private JsonNullable> autoTests = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private JsonNullable> attachments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + private JsonNullable> parameters = JsonNullable.>undefined(); + + public CreateWorkItemApiModel() { + } + + public CreateWorkItemApiModel projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Unique identifier of the project + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public CreateWorkItemApiModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the work item + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateWorkItemApiModel entityTypeName(@jakarta.annotation.Nonnull WorkItemEntityTypeApiModel entityTypeName) { + this.entityTypeName = entityTypeName; + return this; + } + + /** + * Type of entity associated with this work item + * @return entityTypeName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkItemEntityTypeApiModel getEntityTypeName() { + return entityTypeName; + } + + + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEntityTypeName(@jakarta.annotation.Nonnull WorkItemEntityTypeApiModel entityTypeName) { + this.entityTypeName = entityTypeName; + } + + + public CreateWorkItemApiModel duration(@jakarta.annotation.Nonnull Long duration) { + this.duration = duration; + return this; + } + + /** + * Duration of the work item in milliseconds + * minimum: 0 + * maximum: 86400000 + * @return duration + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@jakarta.annotation.Nonnull Long duration) { + this.duration = duration; + } + + + public CreateWorkItemApiModel state(@jakarta.annotation.Nonnull WorkItemStateApiModel state) { + this.state = state; + return this; + } + + /** + * Current state of the work item + * @return state + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkItemStateApiModel getState() { + return state; + } + + + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setState(@jakarta.annotation.Nonnull WorkItemStateApiModel state) { + this.state = state; + } + + + public CreateWorkItemApiModel priority(@jakarta.annotation.Nonnull WorkItemPriorityApiModel priority) { + this.priority = priority; + return this; + } + + /** + * Priority level assigned to the work item + * @return priority + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkItemPriorityApiModel getPriority() { + return priority; + } + + + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPriority(@jakarta.annotation.Nonnull WorkItemPriorityApiModel priority) { + this.priority = priority; + } + + + public CreateWorkItemApiModel sectionId(@jakarta.annotation.Nullable UUID sectionId) { + this.sectionId = JsonNullable.of(sectionId); + return this; + } + + /** + * Unique identifier of the section within a project + * @return sectionId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getSectionId() { + return sectionId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SECTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSectionId_JsonNullable() { + return sectionId; + } + + @JsonProperty(JSON_PROPERTY_SECTION_ID) + public void setSectionId_JsonNullable(JsonNullable sectionId) { + this.sectionId = sectionId; + } + + public void setSectionId(@jakarta.annotation.Nullable UUID sectionId) { + this.sectionId = JsonNullable.of(sectionId); + } + + + public CreateWorkItemApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the work item + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public CreateWorkItemApiModel attributes(@jakarta.annotation.Nullable Map attributes) { + this.attributes = JsonNullable.>of(attributes); + return this; + } + + public CreateWorkItemApiModel putAttributesItem(String key, Object attributesItem) { + if (this.attributes == null || !this.attributes.isPresent()) { + this.attributes = JsonNullable.>of(new HashMap<>()); + } + try { + this.attributes.get().put(key, attributesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Set of custom attributes associated with the work item + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map getAttributes() { + return attributes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttributes_JsonNullable() { + return attributes; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + public void setAttributes_JsonNullable(JsonNullable> attributes) { + this.attributes = attributes; + } + + public void setAttributes(@jakarta.annotation.Nullable Map attributes) { + this.attributes = JsonNullable.>of(attributes); + } + + + public CreateWorkItemApiModel tags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public CreateWorkItemApiModel addTagsItem(TagModel tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.tags.get().add(tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Set of tags applied to the work item + * @return tags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + } + + + public CreateWorkItemApiModel preconditionSteps(@jakarta.annotation.Nullable List preconditionSteps) { + this.preconditionSteps = JsonNullable.>of(preconditionSteps); + return this; + } + + public CreateWorkItemApiModel addPreconditionStepsItem(CreateStepApiModel preconditionStepsItem) { + if (this.preconditionSteps == null || !this.preconditionSteps.isPresent()) { + this.preconditionSteps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.preconditionSteps.get().add(preconditionStepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Set of precondition steps that must be executed before the main steps + * @return preconditionSteps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getPreconditionSteps() { + return preconditionSteps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PRECONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getPreconditionSteps_JsonNullable() { + return preconditionSteps; + } + + @JsonProperty(JSON_PROPERTY_PRECONDITION_STEPS) + public void setPreconditionSteps_JsonNullable(JsonNullable> preconditionSteps) { + this.preconditionSteps = preconditionSteps; + } + + public void setPreconditionSteps(@jakarta.annotation.Nullable List preconditionSteps) { + this.preconditionSteps = JsonNullable.>of(preconditionSteps); + } + + + public CreateWorkItemApiModel steps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + return this; + } + + public CreateWorkItemApiModel addStepsItem(CreateStepApiModel stepsItem) { + if (this.steps == null || !this.steps.isPresent()) { + this.steps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.steps.get().add(stepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Set of main steps or actions defined for the work item + * @return steps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSteps() { + return steps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSteps_JsonNullable() { + return steps; + } + + @JsonProperty(JSON_PROPERTY_STEPS) + public void setSteps_JsonNullable(JsonNullable> steps) { + this.steps = steps; + } + + public void setSteps(@jakarta.annotation.Nullable List steps) { + this.steps = JsonNullable.>of(steps); + } + + + public CreateWorkItemApiModel postconditionSteps(@jakarta.annotation.Nullable List postconditionSteps) { + this.postconditionSteps = JsonNullable.>of(postconditionSteps); + return this; + } + + public CreateWorkItemApiModel addPostconditionStepsItem(CreateStepApiModel postconditionStepsItem) { + if (this.postconditionSteps == null || !this.postconditionSteps.isPresent()) { + this.postconditionSteps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.postconditionSteps.get().add(postconditionStepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Set of postcondition steps that are executed after completing the main steps + * @return postconditionSteps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getPostconditionSteps() { + return postconditionSteps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_POSTCONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getPostconditionSteps_JsonNullable() { + return postconditionSteps; + } + + @JsonProperty(JSON_PROPERTY_POSTCONDITION_STEPS) + public void setPostconditionSteps_JsonNullable(JsonNullable> postconditionSteps) { + this.postconditionSteps = postconditionSteps; + } + + public void setPostconditionSteps(@jakarta.annotation.Nullable List postconditionSteps) { + this.postconditionSteps = JsonNullable.>of(postconditionSteps); + } + + + public CreateWorkItemApiModel iterations(@jakarta.annotation.Nullable List iterations) { + this.iterations = JsonNullable.>of(iterations); + return this; + } + + public CreateWorkItemApiModel addIterationsItem(AssignIterationApiModel iterationsItem) { + if (this.iterations == null || !this.iterations.isPresent()) { + this.iterations = JsonNullable.>of(new ArrayList<>()); + } + try { + this.iterations.get().add(iterationsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Set of iterations associated with the work item + * @return iterations + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getIterations() { + return iterations.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ITERATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getIterations_JsonNullable() { + return iterations; + } + + @JsonProperty(JSON_PROPERTY_ITERATIONS) + public void setIterations_JsonNullable(JsonNullable> iterations) { + this.iterations = iterations; + } + + public void setIterations(@jakarta.annotation.Nullable List iterations) { + this.iterations = JsonNullable.>of(iterations); + } + + + public CreateWorkItemApiModel autoTests(@jakarta.annotation.Nullable List autoTests) { + this.autoTests = JsonNullable.>of(autoTests); + return this; + } + + public CreateWorkItemApiModel addAutoTestsItem(AutoTestIdModel autoTestsItem) { + if (this.autoTests == null || !this.autoTests.isPresent()) { + this.autoTests = JsonNullable.>of(new ArrayList<>()); + } + try { + this.autoTests.get().add(autoTestsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Set of automated tests linked to the work item + * @return autoTests + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAutoTests() { + return autoTests.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTO_TESTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAutoTests_JsonNullable() { + return autoTests; + } + + @JsonProperty(JSON_PROPERTY_AUTO_TESTS) + public void setAutoTests_JsonNullable(JsonNullable> autoTests) { + this.autoTests = autoTests; + } + + public void setAutoTests(@jakarta.annotation.Nullable List autoTests) { + this.autoTests = JsonNullable.>of(autoTests); + } + + + public CreateWorkItemApiModel attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + return this; + } + + public CreateWorkItemApiModel addAttachmentsItem(AssignAttachmentApiModel attachmentsItem) { + if (this.attachments == null || !this.attachments.isPresent()) { + this.attachments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attachments.get().add(attachmentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Set of files attached to the work item + * @return attachments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttachments() { + return attachments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttachments_JsonNullable() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + public void setAttachments_JsonNullable(JsonNullable> attachments) { + this.attachments = attachments; + } + + public void setAttachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + } + + + public CreateWorkItemApiModel links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public CreateWorkItemApiModel addLinksItem(CreateLinkApiModel linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Set of links related to the work item + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public CreateWorkItemApiModel parameters(@jakarta.annotation.Nullable List parameters) { + this.parameters = JsonNullable.>of(parameters); + return this; + } + + public CreateWorkItemApiModel addParametersItem(WorkItemParameterKeyApiModel parametersItem) { + if (this.parameters == null || !this.parameters.isPresent()) { + this.parameters = JsonNullable.>of(new ArrayList<>()); + } + try { + this.parameters.get().add(parametersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Set of parameter keys associated with the work item + * @return parameters + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getParameters() { + return parameters.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getParameters_JsonNullable() { + return parameters; + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + public void setParameters_JsonNullable(JsonNullable> parameters) { + this.parameters = parameters; + } + + public void setParameters(@jakarta.annotation.Nullable List parameters) { + this.parameters = JsonNullable.>of(parameters); + } + + + /** + * Return true if this CreateWorkItemApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWorkItemApiModel createWorkItemApiModel = (CreateWorkItemApiModel) o; + return Objects.equals(this.projectId, createWorkItemApiModel.projectId) && + Objects.equals(this.name, createWorkItemApiModel.name) && + Objects.equals(this.entityTypeName, createWorkItemApiModel.entityTypeName) && + Objects.equals(this.duration, createWorkItemApiModel.duration) && + Objects.equals(this.state, createWorkItemApiModel.state) && + Objects.equals(this.priority, createWorkItemApiModel.priority) && + equalsNullable(this.sectionId, createWorkItemApiModel.sectionId) && + equalsNullable(this.description, createWorkItemApiModel.description) && + equalsNullable(this.attributes, createWorkItemApiModel.attributes) && + equalsNullable(this.tags, createWorkItemApiModel.tags) && + equalsNullable(this.preconditionSteps, createWorkItemApiModel.preconditionSteps) && + equalsNullable(this.steps, createWorkItemApiModel.steps) && + equalsNullable(this.postconditionSteps, createWorkItemApiModel.postconditionSteps) && + equalsNullable(this.iterations, createWorkItemApiModel.iterations) && + equalsNullable(this.autoTests, createWorkItemApiModel.autoTests) && + equalsNullable(this.attachments, createWorkItemApiModel.attachments) && + equalsNullable(this.links, createWorkItemApiModel.links) && + equalsNullable(this.parameters, createWorkItemApiModel.parameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, name, entityTypeName, duration, state, priority, hashCodeNullable(sectionId), hashCodeNullable(description), hashCodeNullable(attributes), hashCodeNullable(tags), hashCodeNullable(preconditionSteps), hashCodeNullable(steps), hashCodeNullable(postconditionSteps), hashCodeNullable(iterations), hashCodeNullable(autoTests), hashCodeNullable(attachments), hashCodeNullable(links), hashCodeNullable(parameters)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWorkItemApiModel {\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" entityTypeName: ").append(toIndentedString(entityTypeName)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" sectionId: ").append(toIndentedString(sectionId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" preconditionSteps: ").append(toIndentedString(preconditionSteps)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).append("\n"); + sb.append(" postconditionSteps: ").append(toIndentedString(postconditionSteps)).append("\n"); + sb.append(" iterations: ").append(toIndentedString(iterations)).append("\n"); + sb.append(" autoTests: ").append(toIndentedString(autoTests)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeApiResult.java new file mode 100644 index 0000000..a08fa3b --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeApiResult.java @@ -0,0 +1,347 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import ru.testit.adaptersapi.model.CustomAttributeOptionApiResult; +import ru.testit.adaptersapi.model.CustomAttributeType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CustomAttributeApiResult + */ +@JsonPropertyOrder({ + CustomAttributeApiResult.JSON_PROPERTY_ID, + CustomAttributeApiResult.JSON_PROPERTY_OPTIONS, + CustomAttributeApiResult.JSON_PROPERTY_TYPE, + CustomAttributeApiResult.JSON_PROPERTY_IS_DELETED, + CustomAttributeApiResult.JSON_PROPERTY_NAME, + CustomAttributeApiResult.JSON_PROPERTY_IS_ENABLED, + CustomAttributeApiResult.JSON_PROPERTY_IS_REQUIRED, + CustomAttributeApiResult.JSON_PROPERTY_IS_GLOBAL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CustomAttributeApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_OPTIONS = "options"; + @jakarta.annotation.Nonnull + private List options = new ArrayList<>(); + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private CustomAttributeType type; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_IS_ENABLED = "isEnabled"; + @jakarta.annotation.Nonnull + private Boolean isEnabled; + + public static final String JSON_PROPERTY_IS_REQUIRED = "isRequired"; + @jakarta.annotation.Nonnull + private Boolean isRequired; + + public static final String JSON_PROPERTY_IS_GLOBAL = "isGlobal"; + @jakarta.annotation.Nonnull + private Boolean isGlobal; + + public CustomAttributeApiResult() { + } + + public CustomAttributeApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the attribute + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public CustomAttributeApiResult options(@jakarta.annotation.Nonnull List options) { + this.options = options; + return this; + } + + public CustomAttributeApiResult addOptionsItem(CustomAttributeOptionApiResult optionsItem) { + if (this.options == null) { + this.options = new ArrayList<>(); + } + this.options.add(optionsItem); + return this; + } + + /** + * Collection of the attribute options Available for attributes of type `options` and `multiple options` only + * @return options + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getOptions() { + return options; + } + + + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOptions(@jakarta.annotation.Nonnull List options) { + this.options = options; + } + + + public CustomAttributeApiResult type(@jakarta.annotation.Nonnull CustomAttributeType type) { + this.type = type; + return this; + } + + /** + * Type of the attribute + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CustomAttributeType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull CustomAttributeType type) { + this.type = type; + } + + + public CustomAttributeApiResult isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Indicates if the attribute is deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public CustomAttributeApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the attribute + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public CustomAttributeApiResult isEnabled(@jakarta.annotation.Nonnull Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * Indicates if the attribute is enabled + * @return isEnabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsEnabled() { + return isEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsEnabled(@jakarta.annotation.Nonnull Boolean isEnabled) { + this.isEnabled = isEnabled; + } + + + public CustomAttributeApiResult isRequired(@jakarta.annotation.Nonnull Boolean isRequired) { + this.isRequired = isRequired; + return this; + } + + /** + * Indicates if the attribute value is mandatory to specify + * @return isRequired + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsRequired() { + return isRequired; + } + + + @JsonProperty(JSON_PROPERTY_IS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsRequired(@jakarta.annotation.Nonnull Boolean isRequired) { + this.isRequired = isRequired; + } + + + public CustomAttributeApiResult isGlobal(@jakarta.annotation.Nonnull Boolean isGlobal) { + this.isGlobal = isGlobal; + return this; + } + + /** + * Indicates if the attribute is available across all projects + * @return isGlobal + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_GLOBAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsGlobal() { + return isGlobal; + } + + + @JsonProperty(JSON_PROPERTY_IS_GLOBAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsGlobal(@jakarta.annotation.Nonnull Boolean isGlobal) { + this.isGlobal = isGlobal; + } + + + /** + * Return true if this CustomAttributeApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomAttributeApiResult customAttributeApiResult = (CustomAttributeApiResult) o; + return Objects.equals(this.id, customAttributeApiResult.id) && + Objects.equals(this.options, customAttributeApiResult.options) && + Objects.equals(this.type, customAttributeApiResult.type) && + Objects.equals(this.isDeleted, customAttributeApiResult.isDeleted) && + Objects.equals(this.name, customAttributeApiResult.name) && + Objects.equals(this.isEnabled, customAttributeApiResult.isEnabled) && + Objects.equals(this.isRequired, customAttributeApiResult.isRequired) && + Objects.equals(this.isGlobal, customAttributeApiResult.isGlobal); + } + + @Override + public int hashCode() { + return Objects.hash(id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomAttributeApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); + sb.append(" isRequired: ").append(toIndentedString(isRequired)).append("\n"); + sb.append(" isGlobal: ").append(toIndentedString(isGlobal)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeGetModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeGetModel.java new file mode 100644 index 0000000..d924127 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeGetModel.java @@ -0,0 +1,347 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import ru.testit.adaptersapi.model.CustomAttributeOptionModel; +import ru.testit.adaptersapi.model.CustomAttributeTypesEnum; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CustomAttributeGetModel + */ +@JsonPropertyOrder({ + CustomAttributeGetModel.JSON_PROPERTY_ID, + CustomAttributeGetModel.JSON_PROPERTY_OPTIONS, + CustomAttributeGetModel.JSON_PROPERTY_TYPE, + CustomAttributeGetModel.JSON_PROPERTY_IS_DELETED, + CustomAttributeGetModel.JSON_PROPERTY_NAME, + CustomAttributeGetModel.JSON_PROPERTY_IS_ENABLED, + CustomAttributeGetModel.JSON_PROPERTY_IS_REQUIRED, + CustomAttributeGetModel.JSON_PROPERTY_IS_GLOBAL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CustomAttributeGetModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_OPTIONS = "options"; + @jakarta.annotation.Nonnull + private List options = new ArrayList<>(); + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private CustomAttributeTypesEnum type; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_IS_ENABLED = "isEnabled"; + @jakarta.annotation.Nonnull + private Boolean isEnabled; + + public static final String JSON_PROPERTY_IS_REQUIRED = "isRequired"; + @jakarta.annotation.Nonnull + private Boolean isRequired; + + public static final String JSON_PROPERTY_IS_GLOBAL = "isGlobal"; + @jakarta.annotation.Nonnull + private Boolean isGlobal; + + public CustomAttributeGetModel() { + } + + public CustomAttributeGetModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the attribute + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public CustomAttributeGetModel options(@jakarta.annotation.Nonnull List options) { + this.options = options; + return this; + } + + public CustomAttributeGetModel addOptionsItem(CustomAttributeOptionModel optionsItem) { + if (this.options == null) { + this.options = new ArrayList<>(); + } + this.options.add(optionsItem); + return this; + } + + /** + * Collection of the attribute options + * @return options + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getOptions() { + return options; + } + + + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOptions(@jakarta.annotation.Nonnull List options) { + this.options = options; + } + + + public CustomAttributeGetModel type(@jakarta.annotation.Nonnull CustomAttributeTypesEnum type) { + this.type = type; + return this; + } + + /** + * Type of the attribute + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CustomAttributeTypesEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull CustomAttributeTypesEnum type) { + this.type = type; + } + + + public CustomAttributeGetModel isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Indicates if the attribute is deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public CustomAttributeGetModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the attribute + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public CustomAttributeGetModel isEnabled(@jakarta.annotation.Nonnull Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * Indicates if the attribute is enabled + * @return isEnabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsEnabled() { + return isEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsEnabled(@jakarta.annotation.Nonnull Boolean isEnabled) { + this.isEnabled = isEnabled; + } + + + public CustomAttributeGetModel isRequired(@jakarta.annotation.Nonnull Boolean isRequired) { + this.isRequired = isRequired; + return this; + } + + /** + * Indicates if the attribute is mandatory to specify + * @return isRequired + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsRequired() { + return isRequired; + } + + + @JsonProperty(JSON_PROPERTY_IS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsRequired(@jakarta.annotation.Nonnull Boolean isRequired) { + this.isRequired = isRequired; + } + + + public CustomAttributeGetModel isGlobal(@jakarta.annotation.Nonnull Boolean isGlobal) { + this.isGlobal = isGlobal; + return this; + } + + /** + * Indicates if the attribute is available across all projects + * @return isGlobal + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_GLOBAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsGlobal() { + return isGlobal; + } + + + @JsonProperty(JSON_PROPERTY_IS_GLOBAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsGlobal(@jakarta.annotation.Nonnull Boolean isGlobal) { + this.isGlobal = isGlobal; + } + + + /** + * Return true if this CustomAttributeGetModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomAttributeGetModel customAttributeGetModel = (CustomAttributeGetModel) o; + return Objects.equals(this.id, customAttributeGetModel.id) && + Objects.equals(this.options, customAttributeGetModel.options) && + Objects.equals(this.type, customAttributeGetModel.type) && + Objects.equals(this.isDeleted, customAttributeGetModel.isDeleted) && + Objects.equals(this.name, customAttributeGetModel.name) && + Objects.equals(this.isEnabled, customAttributeGetModel.isEnabled) && + Objects.equals(this.isRequired, customAttributeGetModel.isRequired) && + Objects.equals(this.isGlobal, customAttributeGetModel.isGlobal); + } + + @Override + public int hashCode() { + return Objects.hash(id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomAttributeGetModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); + sb.append(" isRequired: ").append(toIndentedString(isRequired)).append("\n"); + sb.append(" isGlobal: ").append(toIndentedString(isGlobal)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeOptionApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeOptionApiResult.java new file mode 100644 index 0000000..226f025 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeOptionApiResult.java @@ -0,0 +1,229 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CustomAttributeOptionApiResult + */ +@JsonPropertyOrder({ + CustomAttributeOptionApiResult.JSON_PROPERTY_ID, + CustomAttributeOptionApiResult.JSON_PROPERTY_IS_DELETED, + CustomAttributeOptionApiResult.JSON_PROPERTY_IS_DEFAULT, + CustomAttributeOptionApiResult.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CustomAttributeOptionApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_IS_DEFAULT = "isDefault"; + @jakarta.annotation.Nonnull + private Boolean isDefault; + + public static final String JSON_PROPERTY_VALUE = "value"; + private JsonNullable value = JsonNullable.undefined(); + + public CustomAttributeOptionApiResult() { + } + + public CustomAttributeOptionApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the attribute option + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public CustomAttributeOptionApiResult isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Indicates if the attributes option is deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public CustomAttributeOptionApiResult isDefault(@jakarta.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Indicates if the attribute option is used by default + * @return isDefault + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDefault() { + return isDefault; + } + + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDefault(@jakarta.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + } + + + public CustomAttributeOptionApiResult value(@jakarta.annotation.Nullable String value) { + this.value = JsonNullable.of(value); + return this; + } + + /** + * Value of the attribute option + * @return value + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getValue() { + return value.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getValue_JsonNullable() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + public void setValue_JsonNullable(JsonNullable value) { + this.value = value; + } + + public void setValue(@jakarta.annotation.Nullable String value) { + this.value = JsonNullable.of(value); + } + + + /** + * Return true if this CustomAttributeOptionApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomAttributeOptionApiResult customAttributeOptionApiResult = (CustomAttributeOptionApiResult) o; + return Objects.equals(this.id, customAttributeOptionApiResult.id) && + Objects.equals(this.isDeleted, customAttributeOptionApiResult.isDeleted) && + Objects.equals(this.isDefault, customAttributeOptionApiResult.isDefault) && + equalsNullable(this.value, customAttributeOptionApiResult.value); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, isDeleted, isDefault, hashCodeNullable(value)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomAttributeOptionApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeOptionModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeOptionModel.java new file mode 100644 index 0000000..38d4824 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeOptionModel.java @@ -0,0 +1,229 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CustomAttributeOptionModel + */ +@JsonPropertyOrder({ + CustomAttributeOptionModel.JSON_PROPERTY_ID, + CustomAttributeOptionModel.JSON_PROPERTY_IS_DELETED, + CustomAttributeOptionModel.JSON_PROPERTY_IS_DEFAULT, + CustomAttributeOptionModel.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CustomAttributeOptionModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_IS_DEFAULT = "isDefault"; + @jakarta.annotation.Nonnull + private Boolean isDefault; + + public static final String JSON_PROPERTY_VALUE = "value"; + private JsonNullable value = JsonNullable.undefined(); + + public CustomAttributeOptionModel() { + } + + public CustomAttributeOptionModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the attribute option + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public CustomAttributeOptionModel isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Indicates if the attributes option is deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public CustomAttributeOptionModel isDefault(@jakarta.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Indicates if the attribute option is used by default + * @return isDefault + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDefault() { + return isDefault; + } + + + @JsonProperty(JSON_PROPERTY_IS_DEFAULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDefault(@jakarta.annotation.Nonnull Boolean isDefault) { + this.isDefault = isDefault; + } + + + public CustomAttributeOptionModel value(@jakarta.annotation.Nullable String value) { + this.value = JsonNullable.of(value); + return this; + } + + /** + * Value of the attribute option + * @return value + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getValue() { + return value.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getValue_JsonNullable() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + public void setValue_JsonNullable(JsonNullable value) { + this.value = value; + } + + public void setValue(@jakarta.annotation.Nullable String value) { + this.value = JsonNullable.of(value); + } + + + /** + * Return true if this CustomAttributeOptionModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomAttributeOptionModel customAttributeOptionModel = (CustomAttributeOptionModel) o; + return Objects.equals(this.id, customAttributeOptionModel.id) && + Objects.equals(this.isDeleted, customAttributeOptionModel.isDeleted) && + Objects.equals(this.isDefault, customAttributeOptionModel.isDefault) && + equalsNullable(this.value, customAttributeOptionModel.value); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, isDeleted, isDefault, hashCodeNullable(value)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomAttributeOptionModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributePutModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributePutModel.java new file mode 100644 index 0000000..e92de8c --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributePutModel.java @@ -0,0 +1,373 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.CustomAttributeOptionModel; +import ru.testit.adaptersapi.model.CustomAttributeTypesEnum; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * CustomAttributePutModel + */ +@JsonPropertyOrder({ + CustomAttributePutModel.JSON_PROPERTY_ID, + CustomAttributePutModel.JSON_PROPERTY_TYPE, + CustomAttributePutModel.JSON_PROPERTY_IS_DELETED, + CustomAttributePutModel.JSON_PROPERTY_NAME, + CustomAttributePutModel.JSON_PROPERTY_IS_ENABLED, + CustomAttributePutModel.JSON_PROPERTY_IS_REQUIRED, + CustomAttributePutModel.JSON_PROPERTY_IS_GLOBAL, + CustomAttributePutModel.JSON_PROPERTY_OPTIONS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class CustomAttributePutModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private CustomAttributeTypesEnum type; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_IS_ENABLED = "isEnabled"; + @jakarta.annotation.Nonnull + private Boolean isEnabled; + + public static final String JSON_PROPERTY_IS_REQUIRED = "isRequired"; + @jakarta.annotation.Nonnull + private Boolean isRequired; + + public static final String JSON_PROPERTY_IS_GLOBAL = "isGlobal"; + @jakarta.annotation.Nonnull + private Boolean isGlobal; + + public static final String JSON_PROPERTY_OPTIONS = "options"; + private JsonNullable> options = JsonNullable.>undefined(); + + public CustomAttributePutModel() { + } + + public CustomAttributePutModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the attribute + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public CustomAttributePutModel type(@jakarta.annotation.Nonnull CustomAttributeTypesEnum type) { + this.type = type; + return this; + } + + /** + * Type of the attribute + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CustomAttributeTypesEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull CustomAttributeTypesEnum type) { + this.type = type; + } + + + public CustomAttributePutModel isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Indicates if the entity is deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public CustomAttributePutModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the attribute + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public CustomAttributePutModel isEnabled(@jakarta.annotation.Nonnull Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * Indicates if the attribute is enabled + * @return isEnabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsEnabled() { + return isEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsEnabled(@jakarta.annotation.Nonnull Boolean isEnabled) { + this.isEnabled = isEnabled; + } + + + public CustomAttributePutModel isRequired(@jakarta.annotation.Nonnull Boolean isRequired) { + this.isRequired = isRequired; + return this; + } + + /** + * Indicates if the attribute value is mandatory to specify + * @return isRequired + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsRequired() { + return isRequired; + } + + + @JsonProperty(JSON_PROPERTY_IS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsRequired(@jakarta.annotation.Nonnull Boolean isRequired) { + this.isRequired = isRequired; + } + + + public CustomAttributePutModel isGlobal(@jakarta.annotation.Nonnull Boolean isGlobal) { + this.isGlobal = isGlobal; + return this; + } + + /** + * Indicates if the attribute is available across all projects + * @return isGlobal + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_GLOBAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsGlobal() { + return isGlobal; + } + + + @JsonProperty(JSON_PROPERTY_IS_GLOBAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsGlobal(@jakarta.annotation.Nonnull Boolean isGlobal) { + this.isGlobal = isGlobal; + } + + + public CustomAttributePutModel options(@jakarta.annotation.Nullable List options) { + this.options = JsonNullable.>of(options); + return this; + } + + public CustomAttributePutModel addOptionsItem(CustomAttributeOptionModel optionsItem) { + if (this.options == null || !this.options.isPresent()) { + this.options = JsonNullable.>of(new ArrayList<>()); + } + try { + this.options.get().add(optionsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the attribute options Available for attributes of type `options` and `multiple options` only + * @return options + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getOptions() { + return options.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getOptions_JsonNullable() { + return options; + } + + @JsonProperty(JSON_PROPERTY_OPTIONS) + public void setOptions_JsonNullable(JsonNullable> options) { + this.options = options; + } + + public void setOptions(@jakarta.annotation.Nullable List options) { + this.options = JsonNullable.>of(options); + } + + + /** + * Return true if this CustomAttributePutModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomAttributePutModel customAttributePutModel = (CustomAttributePutModel) o; + return Objects.equals(this.id, customAttributePutModel.id) && + Objects.equals(this.type, customAttributePutModel.type) && + Objects.equals(this.isDeleted, customAttributePutModel.isDeleted) && + Objects.equals(this.name, customAttributePutModel.name) && + Objects.equals(this.isEnabled, customAttributePutModel.isEnabled) && + Objects.equals(this.isRequired, customAttributePutModel.isRequired) && + Objects.equals(this.isGlobal, customAttributePutModel.isGlobal) && + equalsNullable(this.options, customAttributePutModel.options); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, isDeleted, name, isEnabled, isRequired, isGlobal, hashCodeNullable(options)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomAttributePutModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); + sb.append(" isRequired: ").append(toIndentedString(isRequired)).append("\n"); + sb.append(" isGlobal: ").append(toIndentedString(isGlobal)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeType.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeType.java new file mode 100644 index 0000000..464141b --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeType.java @@ -0,0 +1,71 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets CustomAttributeType + */ +public enum CustomAttributeType { + + STRING("string"), + + DATETIME("datetime"), + + OPTIONS("options"), + + USER("user"), + + MULTIPLE_OPTIONS("multipleOptions"), + + CHECKBOX("checkbox"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + CustomAttributeType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CustomAttributeType fromValue(String value) { + for (CustomAttributeType b : CustomAttributeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeTypesEnum.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeTypesEnum.java new file mode 100644 index 0000000..155dc9d --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/CustomAttributeTypesEnum.java @@ -0,0 +1,71 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets CustomAttributeTypesEnum + */ +public enum CustomAttributeTypesEnum { + + STRING("string"), + + DATETIME("datetime"), + + OPTIONS("options"), + + USER("user"), + + MULTIPLE_OPTIONS("multipleOptions"), + + CHECKBOX("checkbox"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + CustomAttributeTypesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CustomAttributeTypesEnum fromValue(String value) { + for (CustomAttributeTypesEnum b : CustomAttributeTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/DateTimeRangeSelectorModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/DateTimeRangeSelectorModel.java new file mode 100644 index 0000000..b069c1e --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/DateTimeRangeSelectorModel.java @@ -0,0 +1,172 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * DateTimeRangeSelectorModel + */ +@JsonPropertyOrder({ + DateTimeRangeSelectorModel.JSON_PROPERTY_FROM, + DateTimeRangeSelectorModel.JSON_PROPERTY_TO +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class DateTimeRangeSelectorModel { + public static final String JSON_PROPERTY_FROM = "from"; + private JsonNullable from = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TO = "to"; + private JsonNullable to = JsonNullable.undefined(); + + public DateTimeRangeSelectorModel() { + } + + public DateTimeRangeSelectorModel from(@jakarta.annotation.Nullable OffsetDateTime from) { + this.from = JsonNullable.of(from); + return this; + } + + /** + * Get from + * @return from + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getFrom() { + return from.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFrom_JsonNullable() { + return from; + } + + @JsonProperty(JSON_PROPERTY_FROM) + public void setFrom_JsonNullable(JsonNullable from) { + this.from = from; + } + + public void setFrom(@jakarta.annotation.Nullable OffsetDateTime from) { + this.from = JsonNullable.of(from); + } + + + public DateTimeRangeSelectorModel to(@jakarta.annotation.Nullable OffsetDateTime to) { + this.to = JsonNullable.of(to); + return this; + } + + /** + * Get to + * @return to + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getTo() { + return to.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTo_JsonNullable() { + return to; + } + + @JsonProperty(JSON_PROPERTY_TO) + public void setTo_JsonNullable(JsonNullable to) { + this.to = to; + } + + public void setTo(@jakarta.annotation.Nullable OffsetDateTime to) { + this.to = JsonNullable.of(to); + } + + + /** + * Return true if this DateTimeRangeSelectorModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DateTimeRangeSelectorModel dateTimeRangeSelectorModel = (DateTimeRangeSelectorModel) o; + return equalsNullable(this.from, dateTimeRangeSelectorModel.from) && + equalsNullable(this.to, dateTimeRangeSelectorModel.to); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(from), hashCodeNullable(to)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DateTimeRangeSelectorModel {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/DeletionState.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/DeletionState.java new file mode 100644 index 0000000..6ddeb42 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/DeletionState.java @@ -0,0 +1,65 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets DeletionState + */ +public enum DeletionState { + + ANY("Any"), + + DELETED("Deleted"), + + NOT_DELETED("NotDeleted"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + DeletionState(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DeletionState fromValue(String value) { + for (DeletionState b : DeletionState.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/DetailedProjectApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/DetailedProjectApiResult.java new file mode 100644 index 0000000..c42c6e2 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/DetailedProjectApiResult.java @@ -0,0 +1,412 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.CustomAttributeApiResult; +import ru.testit.adaptersapi.model.WorkflowApiResult; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * DetailedProjectApiResult + */ +@JsonPropertyOrder({ + DetailedProjectApiResult.JSON_PROPERTY_WORKFLOW, + DetailedProjectApiResult.JSON_PROPERTY_ID, + DetailedProjectApiResult.JSON_PROPERTY_NAME, + DetailedProjectApiResult.JSON_PROPERTY_IS_FAVORITE, + DetailedProjectApiResult.JSON_PROPERTY_IS_DELETED, + DetailedProjectApiResult.JSON_PROPERTY_GLOBAL_ID, + DetailedProjectApiResult.JSON_PROPERTY_WORKFLOW_ID, + DetailedProjectApiResult.JSON_PROPERTY_ATTRIBUTES_SCHEME, + DetailedProjectApiResult.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class DetailedProjectApiResult { + public static final String JSON_PROPERTY_WORKFLOW = "workflow"; + @jakarta.annotation.Nonnull + private WorkflowApiResult workflow; + + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_IS_FAVORITE = "isFavorite"; + @jakarta.annotation.Nonnull + private Boolean isFavorite; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public static final String JSON_PROPERTY_WORKFLOW_ID = "workflowId"; + @jakarta.annotation.Nonnull + private UUID workflowId; + + public static final String JSON_PROPERTY_ATTRIBUTES_SCHEME = "attributesScheme"; + private JsonNullable> attributesScheme = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public DetailedProjectApiResult() { + } + + public DetailedProjectApiResult workflow(@jakarta.annotation.Nonnull WorkflowApiResult workflow) { + this.workflow = workflow; + return this; + } + + /** + * ID of the workflow used in project + * @return workflow + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WORKFLOW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkflowApiResult getWorkflow() { + return workflow; + } + + + @JsonProperty(JSON_PROPERTY_WORKFLOW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWorkflow(@jakarta.annotation.Nonnull WorkflowApiResult workflow) { + this.workflow = workflow; + } + + + public DetailedProjectApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the project + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public DetailedProjectApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the project + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public DetailedProjectApiResult isFavorite(@jakarta.annotation.Nonnull Boolean isFavorite) { + this.isFavorite = isFavorite; + return this; + } + + /** + * Indicates if the project is marked as favorite + * @return isFavorite + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsFavorite() { + return isFavorite; + } + + + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsFavorite(@jakarta.annotation.Nonnull Boolean isFavorite) { + this.isFavorite = isFavorite; + } + + + public DetailedProjectApiResult isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Indicates if the project is deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public DetailedProjectApiResult globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Global ID of the project + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + public DetailedProjectApiResult workflowId(@jakarta.annotation.Nonnull UUID workflowId) { + this.workflowId = workflowId; + return this; + } + + /** + * ID of the workflow used in project + * @return workflowId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getWorkflowId() { + return workflowId; + } + + + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWorkflowId(@jakarta.annotation.Nonnull UUID workflowId) { + this.workflowId = workflowId; + } + + + public DetailedProjectApiResult attributesScheme(@jakarta.annotation.Nullable List attributesScheme) { + this.attributesScheme = JsonNullable.>of(attributesScheme); + return this; + } + + public DetailedProjectApiResult addAttributesSchemeItem(CustomAttributeApiResult attributesSchemeItem) { + if (this.attributesScheme == null || !this.attributesScheme.isPresent()) { + this.attributesScheme = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attributesScheme.get().add(attributesSchemeItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of the project attributes + * @return attributesScheme + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttributesScheme() { + return attributesScheme.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES_SCHEME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttributesScheme_JsonNullable() { + return attributesScheme; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES_SCHEME) + public void setAttributesScheme_JsonNullable(JsonNullable> attributesScheme) { + this.attributesScheme = attributesScheme; + } + + public void setAttributesScheme(@jakarta.annotation.Nullable List attributesScheme) { + this.attributesScheme = JsonNullable.>of(attributesScheme); + } + + + public DetailedProjectApiResult description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the project + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this DetailedProjectApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetailedProjectApiResult detailedProjectApiResult = (DetailedProjectApiResult) o; + return Objects.equals(this.workflow, detailedProjectApiResult.workflow) && + Objects.equals(this.id, detailedProjectApiResult.id) && + Objects.equals(this.name, detailedProjectApiResult.name) && + Objects.equals(this.isFavorite, detailedProjectApiResult.isFavorite) && + Objects.equals(this.isDeleted, detailedProjectApiResult.isDeleted) && + Objects.equals(this.globalId, detailedProjectApiResult.globalId) && + Objects.equals(this.workflowId, detailedProjectApiResult.workflowId) && + equalsNullable(this.attributesScheme, detailedProjectApiResult.attributesScheme) && + equalsNullable(this.description, detailedProjectApiResult.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(workflow, id, name, isFavorite, isDeleted, globalId, workflowId, hashCodeNullable(attributesScheme), hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DetailedProjectApiResult {\n"); + sb.append(" workflow: ").append(toIndentedString(workflow)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isFavorite: ").append(toIndentedString(isFavorite)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).append("\n"); + sb.append(" workflowId: ").append(toIndentedString(workflowId)).append("\n"); + sb.append(" attributesScheme: ").append(toIndentedString(attributesScheme)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/FailureCategoryModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/FailureCategoryModel.java new file mode 100644 index 0000000..a1fecb9 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/FailureCategoryModel.java @@ -0,0 +1,69 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets FailureCategoryModel + */ +public enum FailureCategoryModel { + + INFRASTRUCTURE_DEFECT("InfrastructureDefect"), + + PRODUCT_DEFECT("ProductDefect"), + + TEST_DEFECT("TestDefect"), + + NO_DEFECT("NoDefect"), + + NO_ANALYTICS("NoAnalytics"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + FailureCategoryModel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FailureCategoryModel fromValue(String value) { + for (FailureCategoryModel b : FailureCategoryModel.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/GuidExtractionModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/GuidExtractionModel.java new file mode 100644 index 0000000..3945adf --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/GuidExtractionModel.java @@ -0,0 +1,198 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * GuidExtractionModel + */ +@JsonPropertyOrder({ + GuidExtractionModel.JSON_PROPERTY_INCLUDE, + GuidExtractionModel.JSON_PROPERTY_EXCLUDE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class GuidExtractionModel { + public static final String JSON_PROPERTY_INCLUDE = "include"; + private JsonNullable> include = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_EXCLUDE = "exclude"; + private JsonNullable> exclude = JsonNullable.>undefined(); + + public GuidExtractionModel() { + } + + public GuidExtractionModel include(@jakarta.annotation.Nullable List include) { + this.include = JsonNullable.>of(include); + return this; + } + + public GuidExtractionModel addIncludeItem(UUID includeItem) { + if (this.include == null || !this.include.isPresent()) { + this.include = JsonNullable.>of(new ArrayList<>()); + } + try { + this.include.get().add(includeItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get include + * @return include + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getInclude() { + return include.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCLUDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getInclude_JsonNullable() { + return include; + } + + @JsonProperty(JSON_PROPERTY_INCLUDE) + public void setInclude_JsonNullable(JsonNullable> include) { + this.include = include; + } + + public void setInclude(@jakarta.annotation.Nullable List include) { + this.include = JsonNullable.>of(include); + } + + + public GuidExtractionModel exclude(@jakarta.annotation.Nullable List exclude) { + this.exclude = JsonNullable.>of(exclude); + return this; + } + + public GuidExtractionModel addExcludeItem(UUID excludeItem) { + if (this.exclude == null || !this.exclude.isPresent()) { + this.exclude = JsonNullable.>of(new ArrayList<>()); + } + try { + this.exclude.get().add(excludeItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get exclude + * @return exclude + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getExclude() { + return exclude.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getExclude_JsonNullable() { + return exclude; + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE) + public void setExclude_JsonNullable(JsonNullable> exclude) { + this.exclude = exclude; + } + + public void setExclude(@jakarta.annotation.Nullable List exclude) { + this.exclude = JsonNullable.>of(exclude); + } + + + /** + * Return true if this GuidExtractionModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GuidExtractionModel guidExtractionModel = (GuidExtractionModel) o; + return equalsNullable(this.include, guidExtractionModel.include) && + equalsNullable(this.exclude, guidExtractionModel.exclude); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(include), hashCodeNullable(exclude)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GuidExtractionModel {\n"); + sb.append(" include: ").append(toIndentedString(include)).append("\n"); + sb.append(" exclude: ").append(toIndentedString(exclude)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ImageResizeType.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ImageResizeType.java new file mode 100644 index 0000000..88230cb --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ImageResizeType.java @@ -0,0 +1,63 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets ImageResizeType + */ +public enum ImageResizeType { + + CROP("Crop"), + + ADD_BACKGROUND_STRIPES("AddBackgroundStripes"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + ImageResizeType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ImageResizeType fromValue(String value) { + for (ImageResizeType b : ImageResizeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/Int32RangeSelectorModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/Int32RangeSelectorModel.java new file mode 100644 index 0000000..ed5a607 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/Int32RangeSelectorModel.java @@ -0,0 +1,171 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * Int32RangeSelectorModel + */ +@JsonPropertyOrder({ + Int32RangeSelectorModel.JSON_PROPERTY_FROM, + Int32RangeSelectorModel.JSON_PROPERTY_TO +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class Int32RangeSelectorModel { + public static final String JSON_PROPERTY_FROM = "from"; + private JsonNullable from = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TO = "to"; + private JsonNullable to = JsonNullable.undefined(); + + public Int32RangeSelectorModel() { + } + + public Int32RangeSelectorModel from(@jakarta.annotation.Nullable Integer from) { + this.from = JsonNullable.of(from); + return this; + } + + /** + * Get from + * @return from + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Integer getFrom() { + return from.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFrom_JsonNullable() { + return from; + } + + @JsonProperty(JSON_PROPERTY_FROM) + public void setFrom_JsonNullable(JsonNullable from) { + this.from = from; + } + + public void setFrom(@jakarta.annotation.Nullable Integer from) { + this.from = JsonNullable.of(from); + } + + + public Int32RangeSelectorModel to(@jakarta.annotation.Nullable Integer to) { + this.to = JsonNullable.of(to); + return this; + } + + /** + * Get to + * @return to + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Integer getTo() { + return to.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTo_JsonNullable() { + return to; + } + + @JsonProperty(JSON_PROPERTY_TO) + public void setTo_JsonNullable(JsonNullable to) { + this.to = to; + } + + public void setTo(@jakarta.annotation.Nullable Integer to) { + this.to = JsonNullable.of(to); + } + + + /** + * Return true if this Int32RangeSelectorModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Int32RangeSelectorModel int32RangeSelectorModel = (Int32RangeSelectorModel) o; + return equalsNullable(this.from, int32RangeSelectorModel.from) && + equalsNullable(this.to, int32RangeSelectorModel.to); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(from), hashCodeNullable(to)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Int32RangeSelectorModel {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/Int64RangeSelectorModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/Int64RangeSelectorModel.java new file mode 100644 index 0000000..6720bc2 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/Int64RangeSelectorModel.java @@ -0,0 +1,171 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * Int64RangeSelectorModel + */ +@JsonPropertyOrder({ + Int64RangeSelectorModel.JSON_PROPERTY_FROM, + Int64RangeSelectorModel.JSON_PROPERTY_TO +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class Int64RangeSelectorModel { + public static final String JSON_PROPERTY_FROM = "from"; + private JsonNullable from = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TO = "to"; + private JsonNullable to = JsonNullable.undefined(); + + public Int64RangeSelectorModel() { + } + + public Int64RangeSelectorModel from(@jakarta.annotation.Nullable Long from) { + this.from = JsonNullable.of(from); + return this; + } + + /** + * Get from + * @return from + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Long getFrom() { + return from.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFrom_JsonNullable() { + return from; + } + + @JsonProperty(JSON_PROPERTY_FROM) + public void setFrom_JsonNullable(JsonNullable from) { + this.from = from; + } + + public void setFrom(@jakarta.annotation.Nullable Long from) { + this.from = JsonNullable.of(from); + } + + + public Int64RangeSelectorModel to(@jakarta.annotation.Nullable Long to) { + this.to = JsonNullable.of(to); + return this; + } + + /** + * Get to + * @return to + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Long getTo() { + return to.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTo_JsonNullable() { + return to; + } + + @JsonProperty(JSON_PROPERTY_TO) + public void setTo_JsonNullable(JsonNullable to) { + this.to = to; + } + + public void setTo(@jakarta.annotation.Nullable Long to) { + this.to = JsonNullable.of(to); + } + + + /** + * Return true if this Int64RangeSelectorModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Int64RangeSelectorModel int64RangeSelectorModel = (Int64RangeSelectorModel) o; + return equalsNullable(this.from, int64RangeSelectorModel.from) && + equalsNullable(this.to, int64RangeSelectorModel.to); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(from), hashCodeNullable(to)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Int64RangeSelectorModel {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/IterationApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/IterationApiResult.java new file mode 100644 index 0000000..0907bd7 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/IterationApiResult.java @@ -0,0 +1,180 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.ParameterShortApiResult; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * IterationApiResult + */ +@JsonPropertyOrder({ + IterationApiResult.JSON_PROPERTY_ID, + IterationApiResult.JSON_PROPERTY_PARAMETERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class IterationApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + private JsonNullable> parameters = JsonNullable.>undefined(); + + public IterationApiResult() { + } + + public IterationApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public IterationApiResult parameters(@jakarta.annotation.Nullable List parameters) { + this.parameters = JsonNullable.>of(parameters); + return this; + } + + public IterationApiResult addParametersItem(ParameterShortApiResult parametersItem) { + if (this.parameters == null || !this.parameters.isPresent()) { + this.parameters = JsonNullable.>of(new ArrayList<>()); + } + try { + this.parameters.get().add(parametersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get parameters + * @return parameters + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getParameters() { + return parameters.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getParameters_JsonNullable() { + return parameters; + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + public void setParameters_JsonNullable(JsonNullable> parameters) { + this.parameters = parameters; + } + + public void setParameters(@jakarta.annotation.Nullable List parameters) { + this.parameters = JsonNullable.>of(parameters); + } + + + /** + * Return true if this IterationApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IterationApiResult iterationApiResult = (IterationApiResult) o; + return Objects.equals(this.id, iterationApiResult.id) && + equalsNullable(this.parameters, iterationApiResult.parameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, hashCodeNullable(parameters)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IterationApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/IterationModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/IterationModel.java new file mode 100644 index 0000000..e3b5bd6 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/IterationModel.java @@ -0,0 +1,180 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.ParameterShortModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * IterationModel + */ +@JsonPropertyOrder({ + IterationModel.JSON_PROPERTY_ID, + IterationModel.JSON_PROPERTY_PARAMETERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class IterationModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + private JsonNullable> parameters = JsonNullable.>undefined(); + + public IterationModel() { + } + + public IterationModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public IterationModel parameters(@jakarta.annotation.Nullable List parameters) { + this.parameters = JsonNullable.>of(parameters); + return this; + } + + public IterationModel addParametersItem(ParameterShortModel parametersItem) { + if (this.parameters == null || !this.parameters.isPresent()) { + this.parameters = JsonNullable.>of(new ArrayList<>()); + } + try { + this.parameters.get().add(parametersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get parameters + * @return parameters + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getParameters() { + return parameters.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getParameters_JsonNullable() { + return parameters; + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + public void setParameters_JsonNullable(JsonNullable> parameters) { + this.parameters = parameters; + } + + public void setParameters(@jakarta.annotation.Nullable List parameters) { + this.parameters = JsonNullable.>of(parameters); + } + + + /** + * Return true if this IterationModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IterationModel iterationModel = (IterationModel) o; + return Objects.equals(this.id, iterationModel.id) && + equalsNullable(this.parameters, iterationModel.parameters); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, hashCodeNullable(parameters)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IterationModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LabelApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LabelApiModel.java new file mode 100644 index 0000000..3fafe55 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LabelApiModel.java @@ -0,0 +1,142 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * LabelApiModel + */ +@JsonPropertyOrder({ + LabelApiModel.JSON_PROPERTY_NAME, + LabelApiModel.JSON_PROPERTY_GLOBAL_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class LabelApiModel { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public LabelApiModel() { + } + + public LabelApiModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the label + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public LabelApiModel globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Global ID of the label + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + /** + * Return true if this LabelApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LabelApiModel labelApiModel = (LabelApiModel) o; + return Objects.equals(this.name, labelApiModel.name) && + Objects.equals(this.globalId, labelApiModel.globalId); + } + + @Override + public int hashCode() { + return Objects.hash(name, globalId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LabelApiModel {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LabelApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LabelApiResult.java new file mode 100644 index 0000000..ae4a4c7 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LabelApiResult.java @@ -0,0 +1,142 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * LabelApiResult + */ +@JsonPropertyOrder({ + LabelApiResult.JSON_PROPERTY_NAME, + LabelApiResult.JSON_PROPERTY_GLOBAL_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class LabelApiResult { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public LabelApiResult() { + } + + public LabelApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the label + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public LabelApiResult globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Global ID of the label + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + /** + * Return true if this LabelApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LabelApiResult labelApiResult = (LabelApiResult) o; + return Objects.equals(this.name, labelApiResult.name) && + Objects.equals(this.globalId, labelApiResult.globalId); + } + + @Override + public int hashCode() { + return Objects.hash(name, globalId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LabelApiResult {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LabelShortModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LabelShortModel.java new file mode 100644 index 0000000..37cfa14 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LabelShortModel.java @@ -0,0 +1,142 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * LabelShortModel + */ +@JsonPropertyOrder({ + LabelShortModel.JSON_PROPERTY_GLOBAL_ID, + LabelShortModel.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class LabelShortModel { + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public LabelShortModel() { + } + + public LabelShortModel globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Global ID of the label + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + public LabelShortModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the label + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this LabelShortModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LabelShortModel labelShortModel = (LabelShortModel) o; + return Objects.equals(this.globalId, labelShortModel.globalId) && + Objects.equals(this.name, labelShortModel.name); + } + + @Override + public int hashCode() { + return Objects.hash(globalId, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LabelShortModel {\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkApiResult.java new file mode 100644 index 0000000..cdd77b4 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkApiResult.java @@ -0,0 +1,276 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.LinkType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * LinkApiResult + */ +@JsonPropertyOrder({ + LinkApiResult.JSON_PROPERTY_URL, + LinkApiResult.JSON_PROPERTY_TYPE, + LinkApiResult.JSON_PROPERTY_ID, + LinkApiResult.JSON_PROPERTY_TITLE, + LinkApiResult.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class LinkApiResult { + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull + private String url; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private LinkType type; + + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public LinkApiResult() { + } + + public LinkApiResult url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Address can be specified without protocol, but necessarily with the domain. + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + + public LinkApiResult type(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + return this; + } + + /** + * Specifies the type of the link. + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LinkType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + } + + + public LinkApiResult id(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Link unique identifier + * @return id + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + } + + + public LinkApiResult title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Link name. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public LinkApiResult description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Link description. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this LinkApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LinkApiResult linkApiResult = (LinkApiResult) o; + return Objects.equals(this.url, linkApiResult.url) && + Objects.equals(this.type, linkApiResult.type) && + equalsNullable(this.id, linkApiResult.id) && + equalsNullable(this.title, linkApiResult.title) && + equalsNullable(this.description, linkApiResult.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(url, type, hashCodeNullable(id), hashCodeNullable(title), hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LinkApiResult {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkCreateApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkCreateApiModel.java new file mode 100644 index 0000000..1881c49 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkCreateApiModel.java @@ -0,0 +1,236 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.LinkType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * LinkCreateApiModel + */ +@JsonPropertyOrder({ + LinkCreateApiModel.JSON_PROPERTY_URL, + LinkCreateApiModel.JSON_PROPERTY_TYPE, + LinkCreateApiModel.JSON_PROPERTY_TITLE, + LinkCreateApiModel.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class LinkCreateApiModel { + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull + private String url; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private LinkType type; + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public LinkCreateApiModel() { + } + + public LinkCreateApiModel url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Address can be specified without protocol, but necessarily with the domain. + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + + public LinkCreateApiModel type(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + return this; + } + + /** + * Specifies the type of the link. + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LinkType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + } + + + public LinkCreateApiModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Link name. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public LinkCreateApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Link description. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this LinkCreateApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LinkCreateApiModel linkCreateApiModel = (LinkCreateApiModel) o; + return Objects.equals(this.url, linkCreateApiModel.url) && + Objects.equals(this.type, linkCreateApiModel.type) && + equalsNullable(this.title, linkCreateApiModel.title) && + equalsNullable(this.description, linkCreateApiModel.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(url, type, hashCodeNullable(title), hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LinkCreateApiModel {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkModel.java new file mode 100644 index 0000000..b654b3d --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkModel.java @@ -0,0 +1,308 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.LinkType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * LinkModel + */ +@JsonPropertyOrder({ + LinkModel.JSON_PROPERTY_URL, + LinkModel.JSON_PROPERTY_TYPE, + LinkModel.JSON_PROPERTY_HAS_INFO, + LinkModel.JSON_PROPERTY_ID, + LinkModel.JSON_PROPERTY_TITLE, + LinkModel.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class LinkModel { + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull + private String url; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private LinkType type; + + public static final String JSON_PROPERTY_HAS_INFO = "hasInfo"; + @jakarta.annotation.Nonnull + private Boolean hasInfo; + + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public LinkModel() { + } + + public LinkModel url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Address can be specified without protocol, but necessarily with the domain. + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + + public LinkModel type(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + return this; + } + + /** + * Specifies the type of the link. + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LinkType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + } + + + public LinkModel hasInfo(@jakarta.annotation.Nonnull Boolean hasInfo) { + this.hasInfo = hasInfo; + return this; + } + + /** + * Get hasInfo + * @return hasInfo + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HAS_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getHasInfo() { + return hasInfo; + } + + + @JsonProperty(JSON_PROPERTY_HAS_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHasInfo(@jakarta.annotation.Nonnull Boolean hasInfo) { + this.hasInfo = hasInfo; + } + + + public LinkModel id(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + } + + + public LinkModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Link name. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public LinkModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Link description. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this LinkModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LinkModel linkModel = (LinkModel) o; + return Objects.equals(this.url, linkModel.url) && + Objects.equals(this.type, linkModel.type) && + Objects.equals(this.hasInfo, linkModel.hasInfo) && + equalsNullable(this.id, linkModel.id) && + equalsNullable(this.title, linkModel.title) && + equalsNullable(this.description, linkModel.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(url, type, hasInfo, hashCodeNullable(id), hashCodeNullable(title), hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LinkModel {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" hasInfo: ").append(toIndentedString(hasInfo)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkPostModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkPostModel.java new file mode 100644 index 0000000..6178a48 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkPostModel.java @@ -0,0 +1,268 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.LinkType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * LinkPostModel + */ +@JsonPropertyOrder({ + LinkPostModel.JSON_PROPERTY_URL, + LinkPostModel.JSON_PROPERTY_TYPE, + LinkPostModel.JSON_PROPERTY_HAS_INFO, + LinkPostModel.JSON_PROPERTY_TITLE, + LinkPostModel.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class LinkPostModel { + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull + private String url; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private LinkType type; + + public static final String JSON_PROPERTY_HAS_INFO = "hasInfo"; + @jakarta.annotation.Nonnull + private Boolean hasInfo; + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public LinkPostModel() { + } + + public LinkPostModel url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Address can be specified without protocol, but necessarily with the domain. + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + + public LinkPostModel type(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + return this; + } + + /** + * Specifies the type of the link. + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LinkType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + } + + + public LinkPostModel hasInfo(@jakarta.annotation.Nonnull Boolean hasInfo) { + this.hasInfo = hasInfo; + return this; + } + + /** + * Get hasInfo + * @return hasInfo + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HAS_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getHasInfo() { + return hasInfo; + } + + + @JsonProperty(JSON_PROPERTY_HAS_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHasInfo(@jakarta.annotation.Nonnull Boolean hasInfo) { + this.hasInfo = hasInfo; + } + + + public LinkPostModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Link name. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public LinkPostModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Link description. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this LinkPostModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LinkPostModel linkPostModel = (LinkPostModel) o; + return Objects.equals(this.url, linkPostModel.url) && + Objects.equals(this.type, linkPostModel.type) && + Objects.equals(this.hasInfo, linkPostModel.hasInfo) && + equalsNullable(this.title, linkPostModel.title) && + equalsNullable(this.description, linkPostModel.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(url, type, hasInfo, hashCodeNullable(title), hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LinkPostModel {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" hasInfo: ").append(toIndentedString(hasInfo)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkPutModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkPutModel.java new file mode 100644 index 0000000..716332e --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkPutModel.java @@ -0,0 +1,308 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.LinkType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * LinkPutModel + */ +@JsonPropertyOrder({ + LinkPutModel.JSON_PROPERTY_URL, + LinkPutModel.JSON_PROPERTY_TYPE, + LinkPutModel.JSON_PROPERTY_HAS_INFO, + LinkPutModel.JSON_PROPERTY_ID, + LinkPutModel.JSON_PROPERTY_TITLE, + LinkPutModel.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class LinkPutModel { + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull + private String url; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private LinkType type; + + public static final String JSON_PROPERTY_HAS_INFO = "hasInfo"; + @jakarta.annotation.Nonnull + private Boolean hasInfo; + + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public LinkPutModel() { + } + + public LinkPutModel url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Address can be specified without protocol, but necessarily with the domain. + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + + public LinkPutModel type(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + return this; + } + + /** + * Specifies the type of the link. + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LinkType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + } + + + public LinkPutModel hasInfo(@jakarta.annotation.Nonnull Boolean hasInfo) { + this.hasInfo = hasInfo; + return this; + } + + /** + * Get hasInfo + * @return hasInfo + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HAS_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getHasInfo() { + return hasInfo; + } + + + @JsonProperty(JSON_PROPERTY_HAS_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHasInfo(@jakarta.annotation.Nonnull Boolean hasInfo) { + this.hasInfo = hasInfo; + } + + + public LinkPutModel id(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + } + + + public LinkPutModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Link name. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public LinkPutModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Link description. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this LinkPutModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LinkPutModel linkPutModel = (LinkPutModel) o; + return Objects.equals(this.url, linkPutModel.url) && + Objects.equals(this.type, linkPutModel.type) && + Objects.equals(this.hasInfo, linkPutModel.hasInfo) && + equalsNullable(this.id, linkPutModel.id) && + equalsNullable(this.title, linkPutModel.title) && + equalsNullable(this.description, linkPutModel.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(url, type, hasInfo, hashCodeNullable(id), hashCodeNullable(title), hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LinkPutModel {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" hasInfo: ").append(toIndentedString(hasInfo)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkShortApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkShortApiResult.java new file mode 100644 index 0000000..53be969 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkShortApiResult.java @@ -0,0 +1,236 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * LinkShortApiResult + */ +@JsonPropertyOrder({ + LinkShortApiResult.JSON_PROPERTY_ID, + LinkShortApiResult.JSON_PROPERTY_URL, + LinkShortApiResult.JSON_PROPERTY_TITLE, + LinkShortApiResult.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class LinkShortApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull + private String url; + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public LinkShortApiResult() { + } + + public LinkShortApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public LinkShortApiResult url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + + public LinkShortApiResult title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Get title + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public LinkShortApiResult type(@jakarta.annotation.Nullable String type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@jakarta.annotation.Nullable String type) { + this.type = JsonNullable.of(type); + } + + + /** + * Return true if this LinkShortApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LinkShortApiResult linkShortApiResult = (LinkShortApiResult) o; + return Objects.equals(this.id, linkShortApiResult.id) && + Objects.equals(this.url, linkShortApiResult.url) && + equalsNullable(this.title, linkShortApiResult.title) && + equalsNullable(this.type, linkShortApiResult.type); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, url, hashCodeNullable(title), hashCodeNullable(type)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LinkShortApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkType.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkType.java new file mode 100644 index 0000000..3ca04ba --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkType.java @@ -0,0 +1,71 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets LinkType + */ +public enum LinkType { + + RELATED("Related"), + + BLOCKED_BY("BlockedBy"), + + DEFECT("Defect"), + + ISSUE("Issue"), + + REQUIREMENT("Requirement"), + + REPOSITORY("Repository"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + LinkType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LinkType fromValue(String value) { + for (LinkType b : LinkType.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkUpdateApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkUpdateApiModel.java new file mode 100644 index 0000000..d688074 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/LinkUpdateApiModel.java @@ -0,0 +1,276 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.LinkType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * LinkUpdateApiModel + */ +@JsonPropertyOrder({ + LinkUpdateApiModel.JSON_PROPERTY_URL, + LinkUpdateApiModel.JSON_PROPERTY_TYPE, + LinkUpdateApiModel.JSON_PROPERTY_ID, + LinkUpdateApiModel.JSON_PROPERTY_TITLE, + LinkUpdateApiModel.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class LinkUpdateApiModel { + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull + private String url; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private LinkType type; + + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public LinkUpdateApiModel() { + } + + public LinkUpdateApiModel url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Address can be specified without protocol, but necessarily with the domain. + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + + public LinkUpdateApiModel type(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + return this; + } + + /** + * Specifies the type of the link. + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LinkType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + } + + + public LinkUpdateApiModel id(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Link unique identifier + * @return id + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + } + + + public LinkUpdateApiModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Link name. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public LinkUpdateApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Link description. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this LinkUpdateApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LinkUpdateApiModel linkUpdateApiModel = (LinkUpdateApiModel) o; + return Objects.equals(this.url, linkUpdateApiModel.url) && + Objects.equals(this.type, linkUpdateApiModel.type) && + equalsNullable(this.id, linkUpdateApiModel.id) && + equalsNullable(this.title, linkUpdateApiModel.title) && + equalsNullable(this.description, linkUpdateApiModel.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(url, type, hashCodeNullable(id), hashCodeNullable(title), hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LinkUpdateApiModel {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ManualRerunApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ManualRerunApiResult.java new file mode 100644 index 0000000..2d64aac --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ManualRerunApiResult.java @@ -0,0 +1,110 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ManualRerunApiResult + */ +@JsonPropertyOrder({ + ManualRerunApiResult.JSON_PROPERTY_TEST_RESULTS_COUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ManualRerunApiResult { + public static final String JSON_PROPERTY_TEST_RESULTS_COUNT = "testResultsCount"; + @jakarta.annotation.Nonnull + private Integer testResultsCount; + + public ManualRerunApiResult() { + } + + public ManualRerunApiResult testResultsCount(@jakarta.annotation.Nonnull Integer testResultsCount) { + this.testResultsCount = testResultsCount; + return this; + } + + /** + * Get testResultsCount + * @return testResultsCount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEST_RESULTS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getTestResultsCount() { + return testResultsCount; + } + + + @JsonProperty(JSON_PROPERTY_TEST_RESULTS_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTestResultsCount(@jakarta.annotation.Nonnull Integer testResultsCount) { + this.testResultsCount = testResultsCount; + } + + + /** + * Return true if this ManualRerunApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManualRerunApiResult manualRerunApiResult = (ManualRerunApiResult) o; + return Objects.equals(this.testResultsCount, manualRerunApiResult.testResultsCount); + } + + @Override + public int hashCode() { + return Objects.hash(testResultsCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManualRerunApiResult {\n"); + sb.append(" testResultsCount: ").append(toIndentedString(testResultsCount)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ManualRerunSelectTestResultsApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ManualRerunSelectTestResultsApiModel.java new file mode 100644 index 0000000..405cba3 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ManualRerunSelectTestResultsApiModel.java @@ -0,0 +1,227 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.ManualRerunTestResultApiModel; +import ru.testit.adaptersapi.model.TestResultsFilterApiModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ManualRerunSelectTestResultsApiModel + */ +@JsonPropertyOrder({ + ManualRerunSelectTestResultsApiModel.JSON_PROPERTY_FILTER, + ManualRerunSelectTestResultsApiModel.JSON_PROPERTY_EXTRACTION_MODEL, + ManualRerunSelectTestResultsApiModel.JSON_PROPERTY_WEBHOOK_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ManualRerunSelectTestResultsApiModel { + public static final String JSON_PROPERTY_FILTER = "filter"; + private JsonNullable filter = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXTRACTION_MODEL = "extractionModel"; + private JsonNullable extractionModel = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WEBHOOK_IDS = "webhookIds"; + private JsonNullable> webhookIds = JsonNullable.>undefined(); + + public ManualRerunSelectTestResultsApiModel() { + } + + public ManualRerunSelectTestResultsApiModel filter(@jakarta.annotation.Nullable TestResultsFilterApiModel filter) { + this.filter = JsonNullable.of(filter); + return this; + } + + /** + * Test results filter. + * @return filter + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public TestResultsFilterApiModel getFilter() { + return filter.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFilter_JsonNullable() { + return filter; + } + + @JsonProperty(JSON_PROPERTY_FILTER) + public void setFilter_JsonNullable(JsonNullable filter) { + this.filter = filter; + } + + public void setFilter(@jakarta.annotation.Nullable TestResultsFilterApiModel filter) { + this.filter = JsonNullable.of(filter); + } + + + public ManualRerunSelectTestResultsApiModel extractionModel(@jakarta.annotation.Nullable ManualRerunTestResultApiModel extractionModel) { + this.extractionModel = JsonNullable.of(extractionModel); + return this; + } + + /** + * Test results extraction model. + * @return extractionModel + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public ManualRerunTestResultApiModel getExtractionModel() { + return extractionModel.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXTRACTION_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExtractionModel_JsonNullable() { + return extractionModel; + } + + @JsonProperty(JSON_PROPERTY_EXTRACTION_MODEL) + public void setExtractionModel_JsonNullable(JsonNullable extractionModel) { + this.extractionModel = extractionModel; + } + + public void setExtractionModel(@jakarta.annotation.Nullable ManualRerunTestResultApiModel extractionModel) { + this.extractionModel = JsonNullable.of(extractionModel); + } + + + public ManualRerunSelectTestResultsApiModel webhookIds(@jakarta.annotation.Nullable List webhookIds) { + this.webhookIds = JsonNullable.>of(webhookIds); + return this; + } + + public ManualRerunSelectTestResultsApiModel addWebhookIdsItem(UUID webhookIdsItem) { + if (this.webhookIds == null || !this.webhookIds.isPresent()) { + this.webhookIds = JsonNullable.>of(new ArrayList<>()); + } + try { + this.webhookIds.get().add(webhookIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Webhook ids to rerun. + * @return webhookIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getWebhookIds() { + return webhookIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getWebhookIds_JsonNullable() { + return webhookIds; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_IDS) + public void setWebhookIds_JsonNullable(JsonNullable> webhookIds) { + this.webhookIds = webhookIds; + } + + public void setWebhookIds(@jakarta.annotation.Nullable List webhookIds) { + this.webhookIds = JsonNullable.>of(webhookIds); + } + + + /** + * Return true if this ManualRerunSelectTestResultsApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManualRerunSelectTestResultsApiModel manualRerunSelectTestResultsApiModel = (ManualRerunSelectTestResultsApiModel) o; + return equalsNullable(this.filter, manualRerunSelectTestResultsApiModel.filter) && + equalsNullable(this.extractionModel, manualRerunSelectTestResultsApiModel.extractionModel) && + equalsNullable(this.webhookIds, manualRerunSelectTestResultsApiModel.webhookIds); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(filter), hashCodeNullable(extractionModel), hashCodeNullable(webhookIds)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManualRerunSelectTestResultsApiModel {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" extractionModel: ").append(toIndentedString(extractionModel)).append("\n"); + sb.append(" webhookIds: ").append(toIndentedString(webhookIds)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ManualRerunTestResultApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ManualRerunTestResultApiModel.java new file mode 100644 index 0000000..9676641 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ManualRerunTestResultApiModel.java @@ -0,0 +1,133 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.GuidExtractionModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ManualRerunTestResultApiModel + */ +@JsonPropertyOrder({ + ManualRerunTestResultApiModel.JSON_PROPERTY_TEST_RESULT_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ManualRerunTestResultApiModel { + public static final String JSON_PROPERTY_TEST_RESULT_IDS = "testResultIds"; + private JsonNullable testResultIds = JsonNullable.undefined(); + + public ManualRerunTestResultApiModel() { + } + + public ManualRerunTestResultApiModel testResultIds(@jakarta.annotation.Nullable GuidExtractionModel testResultIds) { + this.testResultIds = JsonNullable.of(testResultIds); + return this; + } + + /** + * Set of extracted test result IDs + * @return testResultIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public GuidExtractionModel getTestResultIds() { + return testResultIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEST_RESULT_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTestResultIds_JsonNullable() { + return testResultIds; + } + + @JsonProperty(JSON_PROPERTY_TEST_RESULT_IDS) + public void setTestResultIds_JsonNullable(JsonNullable testResultIds) { + this.testResultIds = testResultIds; + } + + public void setTestResultIds(@jakarta.annotation.Nullable GuidExtractionModel testResultIds) { + this.testResultIds = JsonNullable.of(testResultIds); + } + + + /** + * Return true if this ManualRerunTestResultApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManualRerunTestResultApiModel manualRerunTestResultApiModel = (ManualRerunTestResultApiModel) o; + return equalsNullable(this.testResultIds, manualRerunTestResultApiModel.testResultIds); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(testResultIds)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManualRerunTestResultApiModel {\n"); + sb.append(" testResultIds: ").append(toIndentedString(testResultIds)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/Operation.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/Operation.java new file mode 100644 index 0000000..a890951 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/Operation.java @@ -0,0 +1,249 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * Operation + */ +@JsonPropertyOrder({ + Operation.JSON_PROPERTY_VALUE, + Operation.JSON_PROPERTY_PATH, + Operation.JSON_PROPERTY_OP, + Operation.JSON_PROPERTY_FROM +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class Operation { + public static final String JSON_PROPERTY_VALUE = "value"; + private JsonNullable value = JsonNullable.of(null); + + public static final String JSON_PROPERTY_PATH = "path"; + private JsonNullable path = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OP = "op"; + private JsonNullable op = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FROM = "from"; + private JsonNullable from = JsonNullable.undefined(); + + public Operation() { + } + + public Operation value(@jakarta.annotation.Nullable Object value) { + this.value = JsonNullable.of(value); + return this; + } + + /** + * Get value + * @return value + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Object getValue() { + return value.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getValue_JsonNullable() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + public void setValue_JsonNullable(JsonNullable value) { + this.value = value; + } + + public void setValue(@jakarta.annotation.Nullable Object value) { + this.value = JsonNullable.of(value); + } + + + public Operation path(@jakarta.annotation.Nullable String path) { + this.path = JsonNullable.of(path); + return this; + } + + /** + * Get path + * @return path + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getPath() { + return path.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPath_JsonNullable() { + return path; + } + + @JsonProperty(JSON_PROPERTY_PATH) + public void setPath_JsonNullable(JsonNullable path) { + this.path = path; + } + + public void setPath(@jakarta.annotation.Nullable String path) { + this.path = JsonNullable.of(path); + } + + + public Operation op(@jakarta.annotation.Nullable String op) { + this.op = JsonNullable.of(op); + return this; + } + + /** + * Get op + * @return op + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getOp() { + return op.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOp_JsonNullable() { + return op; + } + + @JsonProperty(JSON_PROPERTY_OP) + public void setOp_JsonNullable(JsonNullable op) { + this.op = op; + } + + public void setOp(@jakarta.annotation.Nullable String op) { + this.op = JsonNullable.of(op); + } + + + public Operation from(@jakarta.annotation.Nullable String from) { + this.from = JsonNullable.of(from); + return this; + } + + /** + * Get from + * @return from + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getFrom() { + return from.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFrom_JsonNullable() { + return from; + } + + @JsonProperty(JSON_PROPERTY_FROM) + public void setFrom_JsonNullable(JsonNullable from) { + this.from = from; + } + + public void setFrom(@jakarta.annotation.Nullable String from) { + this.from = JsonNullable.of(from); + } + + + /** + * Return true if this Operation object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Operation operation = (Operation) o; + return equalsNullable(this.value, operation.value) && + equalsNullable(this.path, operation.path) && + equalsNullable(this.op, operation.op) && + equalsNullable(this.from, operation.from); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(value), hashCodeNullable(path), hashCodeNullable(op), hashCodeNullable(from)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Operation {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" op: ").append(toIndentedString(op)).append("\n"); + sb.append(" from: ").append(toIndentedString(from)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterApiResult.java new file mode 100644 index 0000000..e808ef6 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterApiResult.java @@ -0,0 +1,281 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ParameterApiResult + */ +@JsonPropertyOrder({ + ParameterApiResult.JSON_PROPERTY_ID, + ParameterApiResult.JSON_PROPERTY_PARAMETER_KEY_ID, + ParameterApiResult.JSON_PROPERTY_NAME, + ParameterApiResult.JSON_PROPERTY_VALUE, + ParameterApiResult.JSON_PROPERTY_IS_DELETED, + ParameterApiResult.JSON_PROPERTY_PROJECT_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ParameterApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_PARAMETER_KEY_ID = "parameterKeyId"; + @jakarta.annotation.Nonnull + private UUID parameterKeyId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull + private String value; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_PROJECT_IDS = "projectIds"; + @jakarta.annotation.Nonnull + private List projectIds = new ArrayList<>(); + + public ParameterApiResult() { + } + + public ParameterApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public ParameterApiResult parameterKeyId(@jakarta.annotation.Nonnull UUID parameterKeyId) { + this.parameterKeyId = parameterKeyId; + return this; + } + + /** + * Get parameterKeyId + * @return parameterKeyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMETER_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getParameterKeyId() { + return parameterKeyId; + } + + + @JsonProperty(JSON_PROPERTY_PARAMETER_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParameterKeyId(@jakarta.annotation.Nonnull UUID parameterKeyId) { + this.parameterKeyId = parameterKeyId; + } + + + public ParameterApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public ParameterApiResult value(@jakarta.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nonnull String value) { + this.value = value; + } + + + public ParameterApiResult isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Get isDeleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public ParameterApiResult projectIds(@jakarta.annotation.Nonnull List projectIds) { + this.projectIds = projectIds; + return this; + } + + public ParameterApiResult addProjectIdsItem(UUID projectIdsItem) { + if (this.projectIds == null) { + this.projectIds = new ArrayList<>(); + } + this.projectIds.add(projectIdsItem); + return this; + } + + /** + * Get projectIds + * @return projectIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getProjectIds() { + return projectIds; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectIds(@jakarta.annotation.Nonnull List projectIds) { + this.projectIds = projectIds; + } + + + /** + * Return true if this ParameterApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterApiResult parameterApiResult = (ParameterApiResult) o; + return Objects.equals(this.id, parameterApiResult.id) && + Objects.equals(this.parameterKeyId, parameterApiResult.parameterKeyId) && + Objects.equals(this.name, parameterApiResult.name) && + Objects.equals(this.value, parameterApiResult.value) && + Objects.equals(this.isDeleted, parameterApiResult.isDeleted) && + Objects.equals(this.projectIds, parameterApiResult.projectIds); + } + + @Override + public int hashCode() { + return Objects.hash(id, parameterKeyId, name, value, isDeleted, projectIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" parameterKeyId: ").append(toIndentedString(parameterKeyId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" projectIds: ").append(toIndentedString(projectIds)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterIterationModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterIterationModel.java new file mode 100644 index 0000000..91dd2c1 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterIterationModel.java @@ -0,0 +1,165 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ParameterIterationModel + */ +@JsonPropertyOrder({ + ParameterIterationModel.JSON_PROPERTY_ID, + ParameterIterationModel.JSON_PROPERTY_SHARED_STEP_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ParameterIterationModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_SHARED_STEP_ID = "sharedStepId"; + private JsonNullable sharedStepId = JsonNullable.undefined(); + + public ParameterIterationModel() { + } + + public ParameterIterationModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public ParameterIterationModel sharedStepId(@jakarta.annotation.Nullable UUID sharedStepId) { + this.sharedStepId = JsonNullable.of(sharedStepId); + return this; + } + + /** + * Get sharedStepId + * @return sharedStepId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getSharedStepId() { + return sharedStepId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SHARED_STEP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSharedStepId_JsonNullable() { + return sharedStepId; + } + + @JsonProperty(JSON_PROPERTY_SHARED_STEP_ID) + public void setSharedStepId_JsonNullable(JsonNullable sharedStepId) { + this.sharedStepId = sharedStepId; + } + + public void setSharedStepId(@jakarta.annotation.Nullable UUID sharedStepId) { + this.sharedStepId = JsonNullable.of(sharedStepId); + } + + + /** + * Return true if this ParameterIterationModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterIterationModel parameterIterationModel = (ParameterIterationModel) o; + return Objects.equals(this.id, parameterIterationModel.id) && + equalsNullable(this.sharedStepId, parameterIterationModel.sharedStepId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, hashCodeNullable(sharedStepId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterIterationModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" sharedStepId: ").append(toIndentedString(sharedStepId)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterShortApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterShortApiResult.java new file mode 100644 index 0000000..e257f05 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterShortApiResult.java @@ -0,0 +1,207 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ParameterShortApiResult + */ +@JsonPropertyOrder({ + ParameterShortApiResult.JSON_PROPERTY_ID, + ParameterShortApiResult.JSON_PROPERTY_PARAMETER_KEY_ID, + ParameterShortApiResult.JSON_PROPERTY_VALUE, + ParameterShortApiResult.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ParameterShortApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_PARAMETER_KEY_ID = "parameterKeyId"; + @jakarta.annotation.Nonnull + private UUID parameterKeyId; + + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull + private String value; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public ParameterShortApiResult() { + } + + public ParameterShortApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public ParameterShortApiResult parameterKeyId(@jakarta.annotation.Nonnull UUID parameterKeyId) { + this.parameterKeyId = parameterKeyId; + return this; + } + + /** + * Get parameterKeyId + * @return parameterKeyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMETER_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getParameterKeyId() { + return parameterKeyId; + } + + + @JsonProperty(JSON_PROPERTY_PARAMETER_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParameterKeyId(@jakarta.annotation.Nonnull UUID parameterKeyId) { + this.parameterKeyId = parameterKeyId; + } + + + public ParameterShortApiResult value(@jakarta.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Value of the parameter + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nonnull String value) { + this.value = value; + } + + + public ParameterShortApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Key of the parameter + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this ParameterShortApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterShortApiResult parameterShortApiResult = (ParameterShortApiResult) o; + return Objects.equals(this.id, parameterShortApiResult.id) && + Objects.equals(this.parameterKeyId, parameterShortApiResult.parameterKeyId) && + Objects.equals(this.value, parameterShortApiResult.value) && + Objects.equals(this.name, parameterShortApiResult.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, parameterKeyId, value, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterShortApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" parameterKeyId: ").append(toIndentedString(parameterKeyId)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterShortModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterShortModel.java new file mode 100644 index 0000000..5109b1f --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParameterShortModel.java @@ -0,0 +1,303 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ParameterShortModel + */ +@JsonPropertyOrder({ + ParameterShortModel.JSON_PROPERTY_ID, + ParameterShortModel.JSON_PROPERTY_PARAMETER_KEY_ID, + ParameterShortModel.JSON_PROPERTY_VALUE, + ParameterShortModel.JSON_PROPERTY_NAME, + ParameterShortModel.JSON_PROPERTY_PROJECT_IDS, + ParameterShortModel.JSON_PROPERTY_SHARED_STEP_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ParameterShortModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_PARAMETER_KEY_ID = "parameterKeyId"; + @jakarta.annotation.Nonnull + private UUID parameterKeyId; + + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull + private String value; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_PROJECT_IDS = "projectIds"; + @jakarta.annotation.Nonnull + private List projectIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SHARED_STEP_ID = "sharedStepId"; + private JsonNullable sharedStepId = JsonNullable.undefined(); + + public ParameterShortModel() { + } + + public ParameterShortModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public ParameterShortModel parameterKeyId(@jakarta.annotation.Nonnull UUID parameterKeyId) { + this.parameterKeyId = parameterKeyId; + return this; + } + + /** + * Get parameterKeyId + * @return parameterKeyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMETER_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getParameterKeyId() { + return parameterKeyId; + } + + + @JsonProperty(JSON_PROPERTY_PARAMETER_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParameterKeyId(@jakarta.annotation.Nonnull UUID parameterKeyId) { + this.parameterKeyId = parameterKeyId; + } + + + public ParameterShortModel value(@jakarta.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Value of the parameter + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nonnull String value) { + this.value = value; + } + + + public ParameterShortModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Key of the parameter + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public ParameterShortModel projectIds(@jakarta.annotation.Nonnull List projectIds) { + this.projectIds = projectIds; + return this; + } + + public ParameterShortModel addProjectIdsItem(UUID projectIdsItem) { + if (this.projectIds == null) { + this.projectIds = new ArrayList<>(); + } + this.projectIds.add(projectIdsItem); + return this; + } + + /** + * Get projectIds + * @return projectIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getProjectIds() { + return projectIds; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectIds(@jakarta.annotation.Nonnull List projectIds) { + this.projectIds = projectIds; + } + + + public ParameterShortModel sharedStepId(@jakarta.annotation.Nullable UUID sharedStepId) { + this.sharedStepId = JsonNullable.of(sharedStepId); + return this; + } + + /** + * Get sharedStepId + * @return sharedStepId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getSharedStepId() { + return sharedStepId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SHARED_STEP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSharedStepId_JsonNullable() { + return sharedStepId; + } + + @JsonProperty(JSON_PROPERTY_SHARED_STEP_ID) + public void setSharedStepId_JsonNullable(JsonNullable sharedStepId) { + this.sharedStepId = sharedStepId; + } + + public void setSharedStepId(@jakarta.annotation.Nullable UUID sharedStepId) { + this.sharedStepId = JsonNullable.of(sharedStepId); + } + + + /** + * Return true if this ParameterShortModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterShortModel parameterShortModel = (ParameterShortModel) o; + return Objects.equals(this.id, parameterShortModel.id) && + Objects.equals(this.parameterKeyId, parameterShortModel.parameterKeyId) && + Objects.equals(this.value, parameterShortModel.value) && + Objects.equals(this.name, parameterShortModel.name) && + Objects.equals(this.projectIds, parameterShortModel.projectIds) && + equalsNullable(this.sharedStepId, parameterShortModel.sharedStepId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, parameterKeyId, value, name, projectIds, hashCodeNullable(sharedStepId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterShortModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" parameterKeyId: ").append(toIndentedString(parameterKeyId)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" projectIds: ").append(toIndentedString(projectIds)).append("\n"); + sb.append(" sharedStepId: ").append(toIndentedString(sharedStepId)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParametersFilterApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParametersFilterApiModel.java new file mode 100644 index 0000000..fa651f1 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ParametersFilterApiModel.java @@ -0,0 +1,225 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ParametersFilterApiModel + */ +@JsonPropertyOrder({ + ParametersFilterApiModel.JSON_PROPERTY_NAME, + ParametersFilterApiModel.JSON_PROPERTY_IS_DELETED, + ParametersFilterApiModel.JSON_PROPERTY_PROJECT_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ParametersFilterApiModel { + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + private JsonNullable isDeleted = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PROJECT_IDS = "projectIds"; + private JsonNullable> projectIds = JsonNullable.>undefined(); + + public ParametersFilterApiModel() { + } + + public ParametersFilterApiModel name(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public ParametersFilterApiModel isDeleted(@jakarta.annotation.Nullable Boolean isDeleted) { + this.isDeleted = JsonNullable.of(isDeleted); + return this; + } + + /** + * Get isDeleted + * @return isDeleted + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsDeleted() { + return isDeleted.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsDeleted_JsonNullable() { + return isDeleted; + } + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + public void setIsDeleted_JsonNullable(JsonNullable isDeleted) { + this.isDeleted = isDeleted; + } + + public void setIsDeleted(@jakarta.annotation.Nullable Boolean isDeleted) { + this.isDeleted = JsonNullable.of(isDeleted); + } + + + public ParametersFilterApiModel projectIds(@jakarta.annotation.Nullable List projectIds) { + this.projectIds = JsonNullable.>of(projectIds); + return this; + } + + public ParametersFilterApiModel addProjectIdsItem(UUID projectIdsItem) { + if (this.projectIds == null || !this.projectIds.isPresent()) { + this.projectIds = JsonNullable.>of(new ArrayList<>()); + } + try { + this.projectIds.get().add(projectIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get projectIds + * @return projectIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getProjectIds() { + return projectIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getProjectIds_JsonNullable() { + return projectIds; + } + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + public void setProjectIds_JsonNullable(JsonNullable> projectIds) { + this.projectIds = projectIds; + } + + public void setProjectIds(@jakarta.annotation.Nullable List projectIds) { + this.projectIds = JsonNullable.>of(projectIds); + } + + + /** + * Return true if this ParametersFilterApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParametersFilterApiModel parametersFilterApiModel = (ParametersFilterApiModel) o; + return equalsNullable(this.name, parametersFilterApiModel.name) && + equalsNullable(this.isDeleted, parametersFilterApiModel.isDeleted) && + equalsNullable(this.projectIds, parametersFilterApiModel.projectIds); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(name), hashCodeNullable(isDeleted), hashCodeNullable(projectIds)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParametersFilterApiModel {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" projectIds: ").append(toIndentedString(projectIds)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProblemDetails.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProblemDetails.java new file mode 100644 index 0000000..15e8998 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProblemDetails.java @@ -0,0 +1,331 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ProblemDetails + */ +@JsonPropertyOrder({ + ProblemDetails.JSON_PROPERTY_TYPE, + ProblemDetails.JSON_PROPERTY_TITLE, + ProblemDetails.JSON_PROPERTY_STATUS, + ProblemDetails.JSON_PROPERTY_DETAIL, + ProblemDetails.JSON_PROPERTY_INSTANCE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ProblemDetails { + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private JsonNullable status = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INSTANCE = "instance"; + private JsonNullable instance = JsonNullable.undefined(); + + public ProblemDetails() { + } + + public ProblemDetails type(@jakarta.annotation.Nullable String type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@jakarta.annotation.Nullable String type) { + this.type = JsonNullable.of(type); + } + + + public ProblemDetails title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Get title + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public ProblemDetails status(@jakarta.annotation.Nullable Integer status) { + this.status = JsonNullable.of(status); + return this; + } + + /** + * Get status + * @return status + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Integer getStatus() { + return status.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStatus_JsonNullable() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + public void setStatus_JsonNullable(JsonNullable status) { + this.status = status; + } + + public void setStatus(@jakarta.annotation.Nullable Integer status) { + this.status = JsonNullable.of(status); + } + + + public ProblemDetails detail(@jakarta.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@jakarta.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public ProblemDetails instance(@jakarta.annotation.Nullable String instance) { + this.instance = JsonNullable.of(instance); + return this; + } + + /** + * Get instance + * @return instance + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getInstance() { + return instance.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INSTANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInstance_JsonNullable() { + return instance; + } + + @JsonProperty(JSON_PROPERTY_INSTANCE) + public void setInstance_JsonNullable(JsonNullable instance) { + this.instance = instance; + } + + public void setInstance(@jakarta.annotation.Nullable String instance) { + this.instance = JsonNullable.of(instance); + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public ProblemDetails putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap<>(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ProblemDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProblemDetails problemDetails = (ProblemDetails) o; + return equalsNullable(this.type, problemDetails.type) && + equalsNullable(this.title, problemDetails.title) && + equalsNullable(this.status, problemDetails.status) && + equalsNullable(this.detail, problemDetails.detail) && + equalsNullable(this.instance, problemDetails.instance)&& + Objects.equals(this.additionalProperties, problemDetails.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(type), hashCodeNullable(title), hashCodeNullable(status), hashCodeNullable(detail), hashCodeNullable(instance), additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProblemDetails {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectApiResult.java new file mode 100644 index 0000000..2f3106f --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectApiResult.java @@ -0,0 +1,325 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ProjectApiResult + */ +@JsonPropertyOrder({ + ProjectApiResult.JSON_PROPERTY_ID, + ProjectApiResult.JSON_PROPERTY_NAME, + ProjectApiResult.JSON_PROPERTY_IS_FAVORITE, + ProjectApiResult.JSON_PROPERTY_IS_DELETED, + ProjectApiResult.JSON_PROPERTY_GLOBAL_ID, + ProjectApiResult.JSON_PROPERTY_WORKFLOW_ID, + ProjectApiResult.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ProjectApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_IS_FAVORITE = "isFavorite"; + @jakarta.annotation.Nonnull + private Boolean isFavorite; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public static final String JSON_PROPERTY_WORKFLOW_ID = "workflowId"; + @jakarta.annotation.Nonnull + private UUID workflowId; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public ProjectApiResult() { + } + + public ProjectApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the project + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public ProjectApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the project + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public ProjectApiResult isFavorite(@jakarta.annotation.Nonnull Boolean isFavorite) { + this.isFavorite = isFavorite; + return this; + } + + /** + * Indicates if the project is marked as favorite + * @return isFavorite + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsFavorite() { + return isFavorite; + } + + + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsFavorite(@jakarta.annotation.Nonnull Boolean isFavorite) { + this.isFavorite = isFavorite; + } + + + public ProjectApiResult isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Indicates if the project is deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public ProjectApiResult globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Global ID of the project + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + public ProjectApiResult workflowId(@jakarta.annotation.Nonnull UUID workflowId) { + this.workflowId = workflowId; + return this; + } + + /** + * ID of the workflow used in project + * @return workflowId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getWorkflowId() { + return workflowId; + } + + + @JsonProperty(JSON_PROPERTY_WORKFLOW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWorkflowId(@jakarta.annotation.Nonnull UUID workflowId) { + this.workflowId = workflowId; + } + + + public ProjectApiResult description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the project + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this ProjectApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProjectApiResult projectApiResult = (ProjectApiResult) o; + return Objects.equals(this.id, projectApiResult.id) && + Objects.equals(this.name, projectApiResult.name) && + Objects.equals(this.isFavorite, projectApiResult.isFavorite) && + Objects.equals(this.isDeleted, projectApiResult.isDeleted) && + Objects.equals(this.globalId, projectApiResult.globalId) && + Objects.equals(this.workflowId, projectApiResult.workflowId) && + equalsNullable(this.description, projectApiResult.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, isFavorite, isDeleted, globalId, workflowId, hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProjectApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isFavorite: ").append(toIndentedString(isFavorite)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).append("\n"); + sb.append(" workflowId: ").append(toIndentedString(workflowId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectAttributesFilterModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectAttributesFilterModel.java new file mode 100644 index 0000000..6cb6807 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectAttributesFilterModel.java @@ -0,0 +1,287 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.Set; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.CustomAttributeTypesEnum; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ProjectAttributesFilterModel + */ +@JsonPropertyOrder({ + ProjectAttributesFilterModel.JSON_PROPERTY_NAME, + ProjectAttributesFilterModel.JSON_PROPERTY_TYPES, + ProjectAttributesFilterModel.JSON_PROPERTY_IS_REQUIRED, + ProjectAttributesFilterModel.JSON_PROPERTY_IS_GLOBAL, + ProjectAttributesFilterModel.JSON_PROPERTY_IS_ENABLED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ProjectAttributesFilterModel { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TYPES = "types"; + @jakarta.annotation.Nonnull + private Set types = new LinkedHashSet<>(); + + public static final String JSON_PROPERTY_IS_REQUIRED = "isRequired"; + private JsonNullable isRequired = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_GLOBAL = "isGlobal"; + private JsonNullable isGlobal = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_ENABLED = "isEnabled"; + private JsonNullable isEnabled = JsonNullable.undefined(); + + public ProjectAttributesFilterModel() { + } + + public ProjectAttributesFilterModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Specifies an attribute name to search for + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public ProjectAttributesFilterModel types(@jakarta.annotation.Nonnull Set types) { + this.types = types; + return this; + } + + public ProjectAttributesFilterModel addTypesItem(CustomAttributeTypesEnum typesItem) { + if (this.types == null) { + this.types = new LinkedHashSet<>(); + } + this.types.add(typesItem); + return this; + } + + /** + * Specifies an attribute types to search for + * @return types + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Set getTypes() { + return types; + } + + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(JSON_PROPERTY_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTypes(@jakarta.annotation.Nonnull Set types) { + this.types = types; + } + + + public ProjectAttributesFilterModel isRequired(@jakarta.annotation.Nullable Boolean isRequired) { + this.isRequired = JsonNullable.of(isRequired); + return this; + } + + /** + * Specifies an attribute mandatory status to search for + * @return isRequired + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsRequired() { + return isRequired.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsRequired_JsonNullable() { + return isRequired; + } + + @JsonProperty(JSON_PROPERTY_IS_REQUIRED) + public void setIsRequired_JsonNullable(JsonNullable isRequired) { + this.isRequired = isRequired; + } + + public void setIsRequired(@jakarta.annotation.Nullable Boolean isRequired) { + this.isRequired = JsonNullable.of(isRequired); + } + + + public ProjectAttributesFilterModel isGlobal(@jakarta.annotation.Nullable Boolean isGlobal) { + this.isGlobal = JsonNullable.of(isGlobal); + return this; + } + + /** + * Specifies an attribute global status to search for + * @return isGlobal + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsGlobal() { + return isGlobal.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_GLOBAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsGlobal_JsonNullable() { + return isGlobal; + } + + @JsonProperty(JSON_PROPERTY_IS_GLOBAL) + public void setIsGlobal_JsonNullable(JsonNullable isGlobal) { + this.isGlobal = isGlobal; + } + + public void setIsGlobal(@jakarta.annotation.Nullable Boolean isGlobal) { + this.isGlobal = JsonNullable.of(isGlobal); + } + + + public ProjectAttributesFilterModel isEnabled(@jakarta.annotation.Nullable Boolean isEnabled) { + this.isEnabled = JsonNullable.of(isEnabled); + return this; + } + + /** + * Specifies an attribute enabled status to search for + * @return isEnabled + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsEnabled() { + return isEnabled.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsEnabled_JsonNullable() { + return isEnabled; + } + + @JsonProperty(JSON_PROPERTY_IS_ENABLED) + public void setIsEnabled_JsonNullable(JsonNullable isEnabled) { + this.isEnabled = isEnabled; + } + + public void setIsEnabled(@jakarta.annotation.Nullable Boolean isEnabled) { + this.isEnabled = JsonNullable.of(isEnabled); + } + + + /** + * Return true if this ProjectAttributesFilterModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProjectAttributesFilterModel projectAttributesFilterModel = (ProjectAttributesFilterModel) o; + return Objects.equals(this.name, projectAttributesFilterModel.name) && + Objects.equals(this.types, projectAttributesFilterModel.types) && + equalsNullable(this.isRequired, projectAttributesFilterModel.isRequired) && + equalsNullable(this.isGlobal, projectAttributesFilterModel.isGlobal) && + equalsNullable(this.isEnabled, projectAttributesFilterModel.isEnabled); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, types, hashCodeNullable(isRequired), hashCodeNullable(isGlobal), hashCodeNullable(isEnabled)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProjectAttributesFilterModel {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" types: ").append(toIndentedString(types)).append("\n"); + sb.append(" isRequired: ").append(toIndentedString(isRequired)).append("\n"); + sb.append(" isGlobal: ").append(toIndentedString(isGlobal)).append("\n"); + sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectTypeModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectTypeModel.java new file mode 100644 index 0000000..d3abb54 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectTypeModel.java @@ -0,0 +1,63 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets ProjectTypeModel + */ +public enum ProjectTypeModel { + + REGULAR("Regular"), + + DEMO("Demo"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + ProjectTypeModel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProjectTypeModel fromValue(String value) { + for (ProjectTypeModel b : ProjectTypeModel.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectsFilterModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectsFilterModel.java new file mode 100644 index 0000000..ecec9fc --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ProjectsFilterModel.java @@ -0,0 +1,564 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.DateTimeRangeSelectorModel; +import ru.testit.adaptersapi.model.Int32RangeSelectorModel; +import ru.testit.adaptersapi.model.ProjectTypeModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ProjectsFilterModel + */ +@JsonPropertyOrder({ + ProjectsFilterModel.JSON_PROPERTY_NAME, + ProjectsFilterModel.JSON_PROPERTY_IS_FAVORITE, + ProjectsFilterModel.JSON_PROPERTY_IS_DELETED, + ProjectsFilterModel.JSON_PROPERTY_TEST_CASES_COUNT, + ProjectsFilterModel.JSON_PROPERTY_CHECKLISTS_COUNT, + ProjectsFilterModel.JSON_PROPERTY_SHARED_STEPS_COUNT, + ProjectsFilterModel.JSON_PROPERTY_AUTOTESTS_COUNT, + ProjectsFilterModel.JSON_PROPERTY_GLOBAL_IDS, + ProjectsFilterModel.JSON_PROPERTY_CREATED_DATE, + ProjectsFilterModel.JSON_PROPERTY_CREATED_BY_IDS, + ProjectsFilterModel.JSON_PROPERTY_TYPES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ProjectsFilterModel { + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_FAVORITE = "isFavorite"; + private JsonNullable isFavorite = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + private JsonNullable isDeleted = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEST_CASES_COUNT = "testCasesCount"; + private JsonNullable testCasesCount = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CHECKLISTS_COUNT = "checklistsCount"; + private JsonNullable checklistsCount = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SHARED_STEPS_COUNT = "sharedStepsCount"; + private JsonNullable sharedStepsCount = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AUTOTESTS_COUNT = "autotestsCount"; + private JsonNullable autotestsCount = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_GLOBAL_IDS = "globalIds"; + private JsonNullable> globalIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_CREATED_DATE = "createdDate"; + private JsonNullable createdDate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_BY_IDS = "createdByIds"; + private JsonNullable> createdByIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TYPES = "types"; + private JsonNullable> types = JsonNullable.>undefined(); + + public ProjectsFilterModel() { + } + + public ProjectsFilterModel name(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Specifies a project name to search for + * @return name + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public ProjectsFilterModel isFavorite(@jakarta.annotation.Nullable Boolean isFavorite) { + this.isFavorite = JsonNullable.of(isFavorite); + return this; + } + + /** + * Specifies a project favorite status to search for + * @return isFavorite + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsFavorite() { + return isFavorite.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsFavorite_JsonNullable() { + return isFavorite; + } + + @JsonProperty(JSON_PROPERTY_IS_FAVORITE) + public void setIsFavorite_JsonNullable(JsonNullable isFavorite) { + this.isFavorite = isFavorite; + } + + public void setIsFavorite(@jakarta.annotation.Nullable Boolean isFavorite) { + this.isFavorite = JsonNullable.of(isFavorite); + } + + + public ProjectsFilterModel isDeleted(@jakarta.annotation.Nullable Boolean isDeleted) { + this.isDeleted = JsonNullable.of(isDeleted); + return this; + } + + /** + * Specifies a project deleted status to search for + * @return isDeleted + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsDeleted() { + return isDeleted.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsDeleted_JsonNullable() { + return isDeleted; + } + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + public void setIsDeleted_JsonNullable(JsonNullable isDeleted) { + this.isDeleted = isDeleted; + } + + public void setIsDeleted(@jakarta.annotation.Nullable Boolean isDeleted) { + this.isDeleted = JsonNullable.of(isDeleted); + } + + + public ProjectsFilterModel testCasesCount(@jakarta.annotation.Nullable Int32RangeSelectorModel testCasesCount) { + this.testCasesCount = JsonNullable.of(testCasesCount); + return this; + } + + /** + * Specifies a project range of test cases count to search for + * @return testCasesCount + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Int32RangeSelectorModel getTestCasesCount() { + return testCasesCount.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEST_CASES_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTestCasesCount_JsonNullable() { + return testCasesCount; + } + + @JsonProperty(JSON_PROPERTY_TEST_CASES_COUNT) + public void setTestCasesCount_JsonNullable(JsonNullable testCasesCount) { + this.testCasesCount = testCasesCount; + } + + public void setTestCasesCount(@jakarta.annotation.Nullable Int32RangeSelectorModel testCasesCount) { + this.testCasesCount = JsonNullable.of(testCasesCount); + } + + + public ProjectsFilterModel checklistsCount(@jakarta.annotation.Nullable Int32RangeSelectorModel checklistsCount) { + this.checklistsCount = JsonNullable.of(checklistsCount); + return this; + } + + /** + * Specifies a project range of checklists count to search for + * @return checklistsCount + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Int32RangeSelectorModel getChecklistsCount() { + return checklistsCount.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CHECKLISTS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getChecklistsCount_JsonNullable() { + return checklistsCount; + } + + @JsonProperty(JSON_PROPERTY_CHECKLISTS_COUNT) + public void setChecklistsCount_JsonNullable(JsonNullable checklistsCount) { + this.checklistsCount = checklistsCount; + } + + public void setChecklistsCount(@jakarta.annotation.Nullable Int32RangeSelectorModel checklistsCount) { + this.checklistsCount = JsonNullable.of(checklistsCount); + } + + + public ProjectsFilterModel sharedStepsCount(@jakarta.annotation.Nullable Int32RangeSelectorModel sharedStepsCount) { + this.sharedStepsCount = JsonNullable.of(sharedStepsCount); + return this; + } + + /** + * Specifies a project range of shared steps count to search for + * @return sharedStepsCount + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Int32RangeSelectorModel getSharedStepsCount() { + return sharedStepsCount.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SHARED_STEPS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSharedStepsCount_JsonNullable() { + return sharedStepsCount; + } + + @JsonProperty(JSON_PROPERTY_SHARED_STEPS_COUNT) + public void setSharedStepsCount_JsonNullable(JsonNullable sharedStepsCount) { + this.sharedStepsCount = sharedStepsCount; + } + + public void setSharedStepsCount(@jakarta.annotation.Nullable Int32RangeSelectorModel sharedStepsCount) { + this.sharedStepsCount = JsonNullable.of(sharedStepsCount); + } + + + public ProjectsFilterModel autotestsCount(@jakarta.annotation.Nullable Int32RangeSelectorModel autotestsCount) { + this.autotestsCount = JsonNullable.of(autotestsCount); + return this; + } + + /** + * Specifies a project range of autotests count to search for + * @return autotestsCount + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Int32RangeSelectorModel getAutotestsCount() { + return autotestsCount.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTOTESTS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAutotestsCount_JsonNullable() { + return autotestsCount; + } + + @JsonProperty(JSON_PROPERTY_AUTOTESTS_COUNT) + public void setAutotestsCount_JsonNullable(JsonNullable autotestsCount) { + this.autotestsCount = autotestsCount; + } + + public void setAutotestsCount(@jakarta.annotation.Nullable Int32RangeSelectorModel autotestsCount) { + this.autotestsCount = JsonNullable.of(autotestsCount); + } + + + public ProjectsFilterModel globalIds(@jakarta.annotation.Nullable Set globalIds) { + this.globalIds = JsonNullable.>of(globalIds); + return this; + } + + public ProjectsFilterModel addGlobalIdsItem(Long globalIdsItem) { + if (this.globalIds == null || !this.globalIds.isPresent()) { + this.globalIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.globalIds.get().add(globalIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies a project global IDs to search for + * @return globalIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getGlobalIds() { + return globalIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_GLOBAL_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getGlobalIds_JsonNullable() { + return globalIds; + } + + @JsonProperty(JSON_PROPERTY_GLOBAL_IDS) + public void setGlobalIds_JsonNullable(JsonNullable> globalIds) { + this.globalIds = globalIds; + } + + public void setGlobalIds(@jakarta.annotation.Nullable Set globalIds) { + this.globalIds = JsonNullable.>of(globalIds); + } + + + public ProjectsFilterModel createdDate(@jakarta.annotation.Nullable DateTimeRangeSelectorModel createdDate) { + this.createdDate = JsonNullable.of(createdDate); + return this; + } + + /** + * Specifies a project range of creation date to search for + * @return createdDate + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public DateTimeRangeSelectorModel getCreatedDate() { + return createdDate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getCreatedDate_JsonNullable() { + return createdDate; + } + + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + public void setCreatedDate_JsonNullable(JsonNullable createdDate) { + this.createdDate = createdDate; + } + + public void setCreatedDate(@jakarta.annotation.Nullable DateTimeRangeSelectorModel createdDate) { + this.createdDate = JsonNullable.of(createdDate); + } + + + public ProjectsFilterModel createdByIds(@jakarta.annotation.Nullable Set createdByIds) { + this.createdByIds = JsonNullable.>of(createdByIds); + return this; + } + + public ProjectsFilterModel addCreatedByIdsItem(UUID createdByIdsItem) { + if (this.createdByIds == null || !this.createdByIds.isPresent()) { + this.createdByIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.createdByIds.get().add(createdByIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies an autotest creator IDs to search for + * @return createdByIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getCreatedByIds() { + return createdByIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getCreatedByIds_JsonNullable() { + return createdByIds; + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY_IDS) + public void setCreatedByIds_JsonNullable(JsonNullable> createdByIds) { + this.createdByIds = createdByIds; + } + + public void setCreatedByIds(@jakarta.annotation.Nullable Set createdByIds) { + this.createdByIds = JsonNullable.>of(createdByIds); + } + + + public ProjectsFilterModel types(@jakarta.annotation.Nullable Set types) { + this.types = JsonNullable.>of(types); + return this; + } + + public ProjectsFilterModel addTypesItem(ProjectTypeModel typesItem) { + if (this.types == null || !this.types.isPresent()) { + this.types = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.types.get().add(typesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of project types to search for + * @return types + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getTypes() { + return types.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTypes_JsonNullable() { + return types; + } + + @JsonProperty(JSON_PROPERTY_TYPES) + public void setTypes_JsonNullable(JsonNullable> types) { + this.types = types; + } + + public void setTypes(@jakarta.annotation.Nullable Set types) { + this.types = JsonNullable.>of(types); + } + + + /** + * Return true if this ProjectsFilterModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProjectsFilterModel projectsFilterModel = (ProjectsFilterModel) o; + return equalsNullable(this.name, projectsFilterModel.name) && + equalsNullable(this.isFavorite, projectsFilterModel.isFavorite) && + equalsNullable(this.isDeleted, projectsFilterModel.isDeleted) && + equalsNullable(this.testCasesCount, projectsFilterModel.testCasesCount) && + equalsNullable(this.checklistsCount, projectsFilterModel.checklistsCount) && + equalsNullable(this.sharedStepsCount, projectsFilterModel.sharedStepsCount) && + equalsNullable(this.autotestsCount, projectsFilterModel.autotestsCount) && + equalsNullable(this.globalIds, projectsFilterModel.globalIds) && + equalsNullable(this.createdDate, projectsFilterModel.createdDate) && + equalsNullable(this.createdByIds, projectsFilterModel.createdByIds) && + equalsNullable(this.types, projectsFilterModel.types); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(name), hashCodeNullable(isFavorite), hashCodeNullable(isDeleted), hashCodeNullable(testCasesCount), hashCodeNullable(checklistsCount), hashCodeNullable(sharedStepsCount), hashCodeNullable(autotestsCount), hashCodeNullable(globalIds), hashCodeNullable(createdDate), hashCodeNullable(createdByIds), hashCodeNullable(types)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProjectsFilterModel {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isFavorite: ").append(toIndentedString(isFavorite)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" testCasesCount: ").append(toIndentedString(testCasesCount)).append("\n"); + sb.append(" checklistsCount: ").append(toIndentedString(checklistsCount)).append("\n"); + sb.append(" sharedStepsCount: ").append(toIndentedString(sharedStepsCount)).append("\n"); + sb.append(" autotestsCount: ").append(toIndentedString(autotestsCount)).append("\n"); + sb.append(" globalIds: ").append(toIndentedString(globalIds)).append("\n"); + sb.append(" createdDate: ").append(toIndentedString(createdDate)).append("\n"); + sb.append(" createdByIds: ").append(toIndentedString(createdByIds)).append("\n"); + sb.append(" types: ").append(toIndentedString(types)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SectionModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SectionModel.java new file mode 100644 index 0000000..c0ef0cd --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SectionModel.java @@ -0,0 +1,411 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * SectionModel + */ +@JsonPropertyOrder({ + SectionModel.JSON_PROPERTY_IS_DELETED, + SectionModel.JSON_PROPERTY_ID, + SectionModel.JSON_PROPERTY_CREATED_DATE, + SectionModel.JSON_PROPERTY_CREATED_BY_ID, + SectionModel.JSON_PROPERTY_NAME, + SectionModel.JSON_PROPERTY_PROJECT_ID, + SectionModel.JSON_PROPERTY_PARENT_ID, + SectionModel.JSON_PROPERTY_MODIFIED_DATE, + SectionModel.JSON_PROPERTY_MODIFIED_BY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class SectionModel { + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_CREATED_DATE = "createdDate"; + @jakarta.annotation.Nonnull + private OffsetDateTime createdDate; + + public static final String JSON_PROPERTY_CREATED_BY_ID = "createdById"; + @jakarta.annotation.Nonnull + private UUID createdById; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + private JsonNullable projectId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PARENT_ID = "parentId"; + private JsonNullable parentId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED_DATE = "modifiedDate"; + private JsonNullable modifiedDate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED_BY_ID = "modifiedById"; + private JsonNullable modifiedById = JsonNullable.undefined(); + + public SectionModel() { + } + + public SectionModel isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Get isDeleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public SectionModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public SectionModel createdDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get createdDate + * @return createdDate + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedDate() { + return createdDate; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + } + + + public SectionModel createdById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + return this; + } + + /** + * Get createdById + * @return createdById + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getCreatedById() { + return createdById; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + } + + + public SectionModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public SectionModel projectId(@jakarta.annotation.Nullable UUID projectId) { + this.projectId = JsonNullable.of(projectId); + return this; + } + + /** + * Get projectId + * @return projectId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getProjectId() { + return projectId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getProjectId_JsonNullable() { + return projectId; + } + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + public void setProjectId_JsonNullable(JsonNullable projectId) { + this.projectId = projectId; + } + + public void setProjectId(@jakarta.annotation.Nullable UUID projectId) { + this.projectId = JsonNullable.of(projectId); + } + + + public SectionModel parentId(@jakarta.annotation.Nullable UUID parentId) { + this.parentId = JsonNullable.of(parentId); + return this; + } + + /** + * Get parentId + * @return parentId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getParentId() { + return parentId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getParentId_JsonNullable() { + return parentId; + } + + @JsonProperty(JSON_PROPERTY_PARENT_ID) + public void setParentId_JsonNullable(JsonNullable parentId) { + this.parentId = parentId; + } + + public void setParentId(@jakarta.annotation.Nullable UUID parentId) { + this.parentId = JsonNullable.of(parentId); + } + + + public SectionModel modifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + return this; + } + + /** + * Get modifiedDate + * @return modifiedDate + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getModifiedDate() { + return modifiedDate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedDate_JsonNullable() { + return modifiedDate; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + public void setModifiedDate_JsonNullable(JsonNullable modifiedDate) { + this.modifiedDate = modifiedDate; + } + + public void setModifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + } + + + public SectionModel modifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + return this; + } + + /** + * Get modifiedById + * @return modifiedById + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getModifiedById() { + return modifiedById.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedById_JsonNullable() { + return modifiedById; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + public void setModifiedById_JsonNullable(JsonNullable modifiedById) { + this.modifiedById = modifiedById; + } + + public void setModifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + } + + + /** + * Return true if this SectionModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SectionModel sectionModel = (SectionModel) o; + return Objects.equals(this.isDeleted, sectionModel.isDeleted) && + Objects.equals(this.id, sectionModel.id) && + Objects.equals(this.createdDate, sectionModel.createdDate) && + Objects.equals(this.createdById, sectionModel.createdById) && + Objects.equals(this.name, sectionModel.name) && + equalsNullable(this.projectId, sectionModel.projectId) && + equalsNullable(this.parentId, sectionModel.parentId) && + equalsNullable(this.modifiedDate, sectionModel.modifiedDate) && + equalsNullable(this.modifiedById, sectionModel.modifiedById); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(isDeleted, id, createdDate, createdById, name, hashCodeNullable(projectId), hashCodeNullable(parentId), hashCodeNullable(modifiedDate), hashCodeNullable(modifiedById)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SectionModel {\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdDate: ").append(toIndentedString(createdDate)).append("\n"); + sb.append(" createdById: ").append(toIndentedString(createdById)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" modifiedDate: ").append(toIndentedString(modifiedDate)).append("\n"); + sb.append(" modifiedById: ").append(toIndentedString(modifiedById)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SectionPostModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SectionPostModel.java new file mode 100644 index 0000000..e117d43 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SectionPostModel.java @@ -0,0 +1,343 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentPutModel; +import ru.testit.adaptersapi.model.StepPostModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * SectionPostModel + */ +@JsonPropertyOrder({ + SectionPostModel.JSON_PROPERTY_NAME, + SectionPostModel.JSON_PROPERTY_PROJECT_ID, + SectionPostModel.JSON_PROPERTY_ATTACHMENTS, + SectionPostModel.JSON_PROPERTY_PARENT_ID, + SectionPostModel.JSON_PROPERTY_PRECONDITION_STEPS, + SectionPostModel.JSON_PROPERTY_POSTCONDITION_STEPS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class SectionPostModel { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nonnull + private List attachments = new ArrayList<>(); + + public static final String JSON_PROPERTY_PARENT_ID = "parentId"; + private JsonNullable parentId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PRECONDITION_STEPS = "preconditionSteps"; + private JsonNullable> preconditionSteps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_POSTCONDITION_STEPS = "postconditionSteps"; + private JsonNullable> postconditionSteps = JsonNullable.>undefined(); + + public SectionPostModel() { + } + + public SectionPostModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public SectionPostModel projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Get projectId + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public SectionPostModel attachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + return this; + } + + public SectionPostModel addAttachmentsItem(AttachmentPutModel attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * Get attachments + * @return attachments + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getAttachments() { + return attachments; + } + + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + } + + + public SectionPostModel parentId(@jakarta.annotation.Nullable UUID parentId) { + this.parentId = JsonNullable.of(parentId); + return this; + } + + /** + * Get parentId + * @return parentId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getParentId() { + return parentId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getParentId_JsonNullable() { + return parentId; + } + + @JsonProperty(JSON_PROPERTY_PARENT_ID) + public void setParentId_JsonNullable(JsonNullable parentId) { + this.parentId = parentId; + } + + public void setParentId(@jakarta.annotation.Nullable UUID parentId) { + this.parentId = JsonNullable.of(parentId); + } + + + public SectionPostModel preconditionSteps(@jakarta.annotation.Nullable List preconditionSteps) { + this.preconditionSteps = JsonNullable.>of(preconditionSteps); + return this; + } + + public SectionPostModel addPreconditionStepsItem(StepPostModel preconditionStepsItem) { + if (this.preconditionSteps == null || !this.preconditionSteps.isPresent()) { + this.preconditionSteps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.preconditionSteps.get().add(preconditionStepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get preconditionSteps + * @return preconditionSteps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getPreconditionSteps() { + return preconditionSteps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PRECONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getPreconditionSteps_JsonNullable() { + return preconditionSteps; + } + + @JsonProperty(JSON_PROPERTY_PRECONDITION_STEPS) + public void setPreconditionSteps_JsonNullable(JsonNullable> preconditionSteps) { + this.preconditionSteps = preconditionSteps; + } + + public void setPreconditionSteps(@jakarta.annotation.Nullable List preconditionSteps) { + this.preconditionSteps = JsonNullable.>of(preconditionSteps); + } + + + public SectionPostModel postconditionSteps(@jakarta.annotation.Nullable List postconditionSteps) { + this.postconditionSteps = JsonNullable.>of(postconditionSteps); + return this; + } + + public SectionPostModel addPostconditionStepsItem(StepPostModel postconditionStepsItem) { + if (this.postconditionSteps == null || !this.postconditionSteps.isPresent()) { + this.postconditionSteps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.postconditionSteps.get().add(postconditionStepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get postconditionSteps + * @return postconditionSteps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getPostconditionSteps() { + return postconditionSteps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_POSTCONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getPostconditionSteps_JsonNullable() { + return postconditionSteps; + } + + @JsonProperty(JSON_PROPERTY_POSTCONDITION_STEPS) + public void setPostconditionSteps_JsonNullable(JsonNullable> postconditionSteps) { + this.postconditionSteps = postconditionSteps; + } + + public void setPostconditionSteps(@jakarta.annotation.Nullable List postconditionSteps) { + this.postconditionSteps = JsonNullable.>of(postconditionSteps); + } + + + /** + * Return true if this SectionPostModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SectionPostModel sectionPostModel = (SectionPostModel) o; + return Objects.equals(this.name, sectionPostModel.name) && + Objects.equals(this.projectId, sectionPostModel.projectId) && + Objects.equals(this.attachments, sectionPostModel.attachments) && + equalsNullable(this.parentId, sectionPostModel.parentId) && + equalsNullable(this.preconditionSteps, sectionPostModel.preconditionSteps) && + equalsNullable(this.postconditionSteps, sectionPostModel.postconditionSteps); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, projectId, attachments, hashCodeNullable(parentId), hashCodeNullable(preconditionSteps), hashCodeNullable(postconditionSteps)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SectionPostModel {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" preconditionSteps: ").append(toIndentedString(preconditionSteps)).append("\n"); + sb.append(" postconditionSteps: ").append(toIndentedString(postconditionSteps)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SectionWithStepsModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SectionWithStepsModel.java new file mode 100644 index 0000000..1afb6e1 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SectionWithStepsModel.java @@ -0,0 +1,568 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentModel; +import ru.testit.adaptersapi.model.StepModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * SectionWithStepsModel + */ +@JsonPropertyOrder({ + SectionWithStepsModel.JSON_PROPERTY_IS_DELETED, + SectionWithStepsModel.JSON_PROPERTY_ID, + SectionWithStepsModel.JSON_PROPERTY_CREATED_DATE, + SectionWithStepsModel.JSON_PROPERTY_CREATED_BY_ID, + SectionWithStepsModel.JSON_PROPERTY_NAME, + SectionWithStepsModel.JSON_PROPERTY_ATTACHMENTS, + SectionWithStepsModel.JSON_PROPERTY_PRECONDITION_STEPS, + SectionWithStepsModel.JSON_PROPERTY_POSTCONDITION_STEPS, + SectionWithStepsModel.JSON_PROPERTY_PROJECT_ID, + SectionWithStepsModel.JSON_PROPERTY_PARENT_ID, + SectionWithStepsModel.JSON_PROPERTY_MODIFIED_DATE, + SectionWithStepsModel.JSON_PROPERTY_MODIFIED_BY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class SectionWithStepsModel { + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_CREATED_DATE = "createdDate"; + @jakarta.annotation.Nonnull + private OffsetDateTime createdDate; + + public static final String JSON_PROPERTY_CREATED_BY_ID = "createdById"; + @jakarta.annotation.Nonnull + private UUID createdById; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private JsonNullable> attachments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PRECONDITION_STEPS = "preconditionSteps"; + private JsonNullable> preconditionSteps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_POSTCONDITION_STEPS = "postconditionSteps"; + private JsonNullable> postconditionSteps = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + private JsonNullable projectId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PARENT_ID = "parentId"; + private JsonNullable parentId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED_DATE = "modifiedDate"; + private JsonNullable modifiedDate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED_BY_ID = "modifiedById"; + private JsonNullable modifiedById = JsonNullable.undefined(); + + public SectionWithStepsModel() { + } + + public SectionWithStepsModel isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Get isDeleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public SectionWithStepsModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public SectionWithStepsModel createdDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get createdDate + * @return createdDate + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedDate() { + return createdDate; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + } + + + public SectionWithStepsModel createdById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + return this; + } + + /** + * Get createdById + * @return createdById + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getCreatedById() { + return createdById; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + } + + + public SectionWithStepsModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public SectionWithStepsModel attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + return this; + } + + public SectionWithStepsModel addAttachmentsItem(AttachmentModel attachmentsItem) { + if (this.attachments == null || !this.attachments.isPresent()) { + this.attachments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attachments.get().add(attachmentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get attachments + * @return attachments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttachments() { + return attachments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttachments_JsonNullable() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + public void setAttachments_JsonNullable(JsonNullable> attachments) { + this.attachments = attachments; + } + + public void setAttachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + } + + + public SectionWithStepsModel preconditionSteps(@jakarta.annotation.Nullable List preconditionSteps) { + this.preconditionSteps = JsonNullable.>of(preconditionSteps); + return this; + } + + public SectionWithStepsModel addPreconditionStepsItem(StepModel preconditionStepsItem) { + if (this.preconditionSteps == null || !this.preconditionSteps.isPresent()) { + this.preconditionSteps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.preconditionSteps.get().add(preconditionStepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get preconditionSteps + * @return preconditionSteps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getPreconditionSteps() { + return preconditionSteps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PRECONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getPreconditionSteps_JsonNullable() { + return preconditionSteps; + } + + @JsonProperty(JSON_PROPERTY_PRECONDITION_STEPS) + public void setPreconditionSteps_JsonNullable(JsonNullable> preconditionSteps) { + this.preconditionSteps = preconditionSteps; + } + + public void setPreconditionSteps(@jakarta.annotation.Nullable List preconditionSteps) { + this.preconditionSteps = JsonNullable.>of(preconditionSteps); + } + + + public SectionWithStepsModel postconditionSteps(@jakarta.annotation.Nullable List postconditionSteps) { + this.postconditionSteps = JsonNullable.>of(postconditionSteps); + return this; + } + + public SectionWithStepsModel addPostconditionStepsItem(StepModel postconditionStepsItem) { + if (this.postconditionSteps == null || !this.postconditionSteps.isPresent()) { + this.postconditionSteps = JsonNullable.>of(new ArrayList<>()); + } + try { + this.postconditionSteps.get().add(postconditionStepsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get postconditionSteps + * @return postconditionSteps + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getPostconditionSteps() { + return postconditionSteps.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_POSTCONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getPostconditionSteps_JsonNullable() { + return postconditionSteps; + } + + @JsonProperty(JSON_PROPERTY_POSTCONDITION_STEPS) + public void setPostconditionSteps_JsonNullable(JsonNullable> postconditionSteps) { + this.postconditionSteps = postconditionSteps; + } + + public void setPostconditionSteps(@jakarta.annotation.Nullable List postconditionSteps) { + this.postconditionSteps = JsonNullable.>of(postconditionSteps); + } + + + public SectionWithStepsModel projectId(@jakarta.annotation.Nullable UUID projectId) { + this.projectId = JsonNullable.of(projectId); + return this; + } + + /** + * Get projectId + * @return projectId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getProjectId() { + return projectId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getProjectId_JsonNullable() { + return projectId; + } + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + public void setProjectId_JsonNullable(JsonNullable projectId) { + this.projectId = projectId; + } + + public void setProjectId(@jakarta.annotation.Nullable UUID projectId) { + this.projectId = JsonNullable.of(projectId); + } + + + public SectionWithStepsModel parentId(@jakarta.annotation.Nullable UUID parentId) { + this.parentId = JsonNullable.of(parentId); + return this; + } + + /** + * Get parentId + * @return parentId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getParentId() { + return parentId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getParentId_JsonNullable() { + return parentId; + } + + @JsonProperty(JSON_PROPERTY_PARENT_ID) + public void setParentId_JsonNullable(JsonNullable parentId) { + this.parentId = parentId; + } + + public void setParentId(@jakarta.annotation.Nullable UUID parentId) { + this.parentId = JsonNullable.of(parentId); + } + + + public SectionWithStepsModel modifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + return this; + } + + /** + * Get modifiedDate + * @return modifiedDate + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getModifiedDate() { + return modifiedDate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedDate_JsonNullable() { + return modifiedDate; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + public void setModifiedDate_JsonNullable(JsonNullable modifiedDate) { + this.modifiedDate = modifiedDate; + } + + public void setModifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + } + + + public SectionWithStepsModel modifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + return this; + } + + /** + * Get modifiedById + * @return modifiedById + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getModifiedById() { + return modifiedById.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedById_JsonNullable() { + return modifiedById; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + public void setModifiedById_JsonNullable(JsonNullable modifiedById) { + this.modifiedById = modifiedById; + } + + public void setModifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + } + + + /** + * Return true if this SectionWithStepsModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SectionWithStepsModel sectionWithStepsModel = (SectionWithStepsModel) o; + return Objects.equals(this.isDeleted, sectionWithStepsModel.isDeleted) && + Objects.equals(this.id, sectionWithStepsModel.id) && + Objects.equals(this.createdDate, sectionWithStepsModel.createdDate) && + Objects.equals(this.createdById, sectionWithStepsModel.createdById) && + Objects.equals(this.name, sectionWithStepsModel.name) && + equalsNullable(this.attachments, sectionWithStepsModel.attachments) && + equalsNullable(this.preconditionSteps, sectionWithStepsModel.preconditionSteps) && + equalsNullable(this.postconditionSteps, sectionWithStepsModel.postconditionSteps) && + equalsNullable(this.projectId, sectionWithStepsModel.projectId) && + equalsNullable(this.parentId, sectionWithStepsModel.parentId) && + equalsNullable(this.modifiedDate, sectionWithStepsModel.modifiedDate) && + equalsNullable(this.modifiedById, sectionWithStepsModel.modifiedById); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(isDeleted, id, createdDate, createdById, name, hashCodeNullable(attachments), hashCodeNullable(preconditionSteps), hashCodeNullable(postconditionSteps), hashCodeNullable(projectId), hashCodeNullable(parentId), hashCodeNullable(modifiedDate), hashCodeNullable(modifiedById)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SectionWithStepsModel {\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdDate: ").append(toIndentedString(createdDate)).append("\n"); + sb.append(" createdById: ").append(toIndentedString(createdById)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" preconditionSteps: ").append(toIndentedString(preconditionSteps)).append("\n"); + sb.append(" postconditionSteps: ").append(toIndentedString(postconditionSteps)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" modifiedDate: ").append(toIndentedString(modifiedDate)).append("\n"); + sb.append(" modifiedById: ").append(toIndentedString(modifiedById)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SharedStepModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SharedStepModel.java new file mode 100644 index 0000000..5bfe980 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SharedStepModel.java @@ -0,0 +1,255 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import ru.testit.adaptersapi.model.StepModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * SharedStepModel + */ +@JsonPropertyOrder({ + SharedStepModel.JSON_PROPERTY_VERSION_ID, + SharedStepModel.JSON_PROPERTY_GLOBAL_ID, + SharedStepModel.JSON_PROPERTY_NAME, + SharedStepModel.JSON_PROPERTY_STEPS, + SharedStepModel.JSON_PROPERTY_IS_DELETED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class SharedStepModel { + public static final String JSON_PROPERTY_VERSION_ID = "versionId"; + @jakarta.annotation.Nonnull + private UUID versionId; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_STEPS = "steps"; + @Deprecated + @jakarta.annotation.Nonnull + private List steps = new ArrayList<>(); + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public SharedStepModel() { + } + + public SharedStepModel versionId(@jakarta.annotation.Nonnull UUID versionId) { + this.versionId = versionId; + return this; + } + + /** + * Get versionId + * @return versionId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getVersionId() { + return versionId; + } + + + @JsonProperty(JSON_PROPERTY_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersionId(@jakarta.annotation.Nonnull UUID versionId) { + this.versionId = versionId; + } + + + public SharedStepModel globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Get globalId + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + public SharedStepModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + @Deprecated + public SharedStepModel steps(@jakarta.annotation.Nonnull List steps) { + this.steps = steps; + return this; + } + + public SharedStepModel addStepsItem(StepModel stepsItem) { + if (this.steps == null) { + this.steps = new ArrayList<>(); + } + this.steps.add(stepsItem); + return this; + } + + /** + * Get steps + * @return steps + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getSteps() { + return steps; + } + + + @Deprecated + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSteps(@jakarta.annotation.Nonnull List steps) { + this.steps = steps; + } + + + public SharedStepModel isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Get isDeleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + /** + * Return true if this SharedStepModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedStepModel sharedStepModel = (SharedStepModel) o; + return Objects.equals(this.versionId, sharedStepModel.versionId) && + Objects.equals(this.globalId, sharedStepModel.globalId) && + Objects.equals(this.name, sharedStepModel.name) && + Objects.equals(this.steps, sharedStepModel.steps) && + Objects.equals(this.isDeleted, sharedStepModel.isDeleted); + } + + @Override + public int hashCode() { + return Objects.hash(versionId, globalId, name, steps, isDeleted); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedStepModel {\n"); + sb.append(" versionId: ").append(toIndentedString(versionId)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SharedStepResultApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SharedStepResultApiModel.java new file mode 100644 index 0000000..1439e3f --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/SharedStepResultApiModel.java @@ -0,0 +1,143 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * SharedStepResultApiModel + */ +@JsonPropertyOrder({ + SharedStepResultApiModel.JSON_PROPERTY_STEP_ID, + SharedStepResultApiModel.JSON_PROPERTY_OUTCOME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class SharedStepResultApiModel { + public static final String JSON_PROPERTY_STEP_ID = "stepId"; + @jakarta.annotation.Nonnull + private UUID stepId; + + public static final String JSON_PROPERTY_OUTCOME = "outcome"; + @jakarta.annotation.Nonnull + private String outcome; + + public SharedStepResultApiModel() { + } + + public SharedStepResultApiModel stepId(@jakarta.annotation.Nonnull UUID stepId) { + this.stepId = stepId; + return this; + } + + /** + * Get stepId + * @return stepId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STEP_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getStepId() { + return stepId; + } + + + @JsonProperty(JSON_PROPERTY_STEP_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStepId(@jakarta.annotation.Nonnull UUID stepId) { + this.stepId = stepId; + } + + + public SharedStepResultApiModel outcome(@jakarta.annotation.Nonnull String outcome) { + this.outcome = outcome; + return this; + } + + /** + * Get outcome + * @return outcome + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getOutcome() { + return outcome; + } + + + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutcome(@jakarta.annotation.Nonnull String outcome) { + this.outcome = outcome; + } + + + /** + * Return true if this SharedStepResultApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedStepResultApiModel sharedStepResultApiModel = (SharedStepResultApiModel) o; + return Objects.equals(this.stepId, sharedStepResultApiModel.stepId) && + Objects.equals(this.outcome, sharedStepResultApiModel.outcome); + } + + @Override + public int hashCode() { + return Objects.hash(stepId, outcome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedStepResultApiModel {\n"); + sb.append(" stepId: ").append(toIndentedString(stepId)).append("\n"); + sb.append(" outcome: ").append(toIndentedString(outcome)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepCommentApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepCommentApiModel.java new file mode 100644 index 0000000..300e538 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepCommentApiModel.java @@ -0,0 +1,454 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentApiResult; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * StepCommentApiModel + */ +@JsonPropertyOrder({ + StepCommentApiModel.JSON_PROPERTY_ID, + StepCommentApiModel.JSON_PROPERTY_STEP_ID, + StepCommentApiModel.JSON_PROPERTY_ATTACHMENTS, + StepCommentApiModel.JSON_PROPERTY_TEST_RESULT_ID, + StepCommentApiModel.JSON_PROPERTY_CREATED_BY_ID, + StepCommentApiModel.JSON_PROPERTY_CREATED_DATE, + StepCommentApiModel.JSON_PROPERTY_TEXT, + StepCommentApiModel.JSON_PROPERTY_PARENT_STEP_ID, + StepCommentApiModel.JSON_PROPERTY_MODIFIED_BY_ID, + StepCommentApiModel.JSON_PROPERTY_MODIFIED_DATE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class StepCommentApiModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_STEP_ID = "stepId"; + @jakarta.annotation.Nonnull + private UUID stepId; + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nonnull + private List attachments = new ArrayList<>(); + + public static final String JSON_PROPERTY_TEST_RESULT_ID = "testResultId"; + @jakarta.annotation.Nonnull + private UUID testResultId; + + public static final String JSON_PROPERTY_CREATED_BY_ID = "createdById"; + @jakarta.annotation.Nonnull + private UUID createdById; + + public static final String JSON_PROPERTY_CREATED_DATE = "createdDate"; + @jakarta.annotation.Nonnull + private OffsetDateTime createdDate; + + public static final String JSON_PROPERTY_TEXT = "text"; + private JsonNullable text = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PARENT_STEP_ID = "parentStepId"; + private JsonNullable parentStepId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED_BY_ID = "modifiedById"; + private JsonNullable modifiedById = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODIFIED_DATE = "modifiedDate"; + private JsonNullable modifiedDate = JsonNullable.undefined(); + + public StepCommentApiModel() { + } + + public StepCommentApiModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public StepCommentApiModel stepId(@jakarta.annotation.Nonnull UUID stepId) { + this.stepId = stepId; + return this; + } + + /** + * Get stepId + * @return stepId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STEP_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getStepId() { + return stepId; + } + + + @JsonProperty(JSON_PROPERTY_STEP_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStepId(@jakarta.annotation.Nonnull UUID stepId) { + this.stepId = stepId; + } + + + public StepCommentApiModel attachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + return this; + } + + public StepCommentApiModel addAttachmentsItem(AttachmentApiResult attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * Get attachments + * @return attachments + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getAttachments() { + return attachments; + } + + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + } + + + public StepCommentApiModel testResultId(@jakarta.annotation.Nonnull UUID testResultId) { + this.testResultId = testResultId; + return this; + } + + /** + * Get testResultId + * @return testResultId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEST_RESULT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getTestResultId() { + return testResultId; + } + + + @JsonProperty(JSON_PROPERTY_TEST_RESULT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTestResultId(@jakarta.annotation.Nonnull UUID testResultId) { + this.testResultId = testResultId; + } + + + public StepCommentApiModel createdById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + return this; + } + + /** + * Get createdById + * @return createdById + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getCreatedById() { + return createdById; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_BY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedById(@jakarta.annotation.Nonnull UUID createdById) { + this.createdById = createdById; + } + + + public StepCommentApiModel createdDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get createdDate + * @return createdDate + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getCreatedDate() { + return createdDate; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedDate(@jakarta.annotation.Nonnull OffsetDateTime createdDate) { + this.createdDate = createdDate; + } + + + public StepCommentApiModel text(@jakarta.annotation.Nullable String text) { + this.text = JsonNullable.of(text); + return this; + } + + /** + * Get text + * @return text + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getText() { + return text.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getText_JsonNullable() { + return text; + } + + @JsonProperty(JSON_PROPERTY_TEXT) + public void setText_JsonNullable(JsonNullable text) { + this.text = text; + } + + public void setText(@jakarta.annotation.Nullable String text) { + this.text = JsonNullable.of(text); + } + + + public StepCommentApiModel parentStepId(@jakarta.annotation.Nullable UUID parentStepId) { + this.parentStepId = JsonNullable.of(parentStepId); + return this; + } + + /** + * Get parentStepId + * @return parentStepId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getParentStepId() { + return parentStepId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARENT_STEP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getParentStepId_JsonNullable() { + return parentStepId; + } + + @JsonProperty(JSON_PROPERTY_PARENT_STEP_ID) + public void setParentStepId_JsonNullable(JsonNullable parentStepId) { + this.parentStepId = parentStepId; + } + + public void setParentStepId(@jakarta.annotation.Nullable UUID parentStepId) { + this.parentStepId = JsonNullable.of(parentStepId); + } + + + public StepCommentApiModel modifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + return this; + } + + /** + * Get modifiedById + * @return modifiedById + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getModifiedById() { + return modifiedById.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedById_JsonNullable() { + return modifiedById; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_ID) + public void setModifiedById_JsonNullable(JsonNullable modifiedById) { + this.modifiedById = modifiedById; + } + + public void setModifiedById(@jakarta.annotation.Nullable UUID modifiedById) { + this.modifiedById = JsonNullable.of(modifiedById); + } + + + public StepCommentApiModel modifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + return this; + } + + /** + * Get modifiedDate + * @return modifiedDate + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getModifiedDate() { + return modifiedDate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getModifiedDate_JsonNullable() { + return modifiedDate; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_DATE) + public void setModifiedDate_JsonNullable(JsonNullable modifiedDate) { + this.modifiedDate = modifiedDate; + } + + public void setModifiedDate(@jakarta.annotation.Nullable OffsetDateTime modifiedDate) { + this.modifiedDate = JsonNullable.of(modifiedDate); + } + + + /** + * Return true if this StepCommentApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StepCommentApiModel stepCommentApiModel = (StepCommentApiModel) o; + return Objects.equals(this.id, stepCommentApiModel.id) && + Objects.equals(this.stepId, stepCommentApiModel.stepId) && + Objects.equals(this.attachments, stepCommentApiModel.attachments) && + Objects.equals(this.testResultId, stepCommentApiModel.testResultId) && + Objects.equals(this.createdById, stepCommentApiModel.createdById) && + Objects.equals(this.createdDate, stepCommentApiModel.createdDate) && + equalsNullable(this.text, stepCommentApiModel.text) && + equalsNullable(this.parentStepId, stepCommentApiModel.parentStepId) && + equalsNullable(this.modifiedById, stepCommentApiModel.modifiedById) && + equalsNullable(this.modifiedDate, stepCommentApiModel.modifiedDate); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, stepId, attachments, testResultId, createdById, createdDate, hashCodeNullable(text), hashCodeNullable(parentStepId), hashCodeNullable(modifiedById), hashCodeNullable(modifiedDate)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StepCommentApiModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" stepId: ").append(toIndentedString(stepId)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" testResultId: ").append(toIndentedString(testResultId)).append("\n"); + sb.append(" createdById: ").append(toIndentedString(createdById)).append("\n"); + sb.append(" createdDate: ").append(toIndentedString(createdDate)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" parentStepId: ").append(toIndentedString(parentStepId)).append("\n"); + sb.append(" modifiedById: ").append(toIndentedString(modifiedById)).append("\n"); + sb.append(" modifiedDate: ").append(toIndentedString(modifiedDate)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepModel.java new file mode 100644 index 0000000..aeb390b --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepModel.java @@ -0,0 +1,361 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.SharedStepModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * StepModel + */ +@JsonPropertyOrder({ + StepModel.JSON_PROPERTY_ID, + StepModel.JSON_PROPERTY_WORK_ITEM, + StepModel.JSON_PROPERTY_ACTION, + StepModel.JSON_PROPERTY_EXPECTED, + StepModel.JSON_PROPERTY_TEST_DATA, + StepModel.JSON_PROPERTY_COMMENTS, + StepModel.JSON_PROPERTY_WORK_ITEM_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class StepModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_WORK_ITEM = "workItem"; + private JsonNullable workItem = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ACTION = "action"; + private JsonNullable action = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXPECTED = "expected"; + private JsonNullable expected = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEST_DATA = "testData"; + private JsonNullable testData = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMMENTS = "comments"; + private JsonNullable comments = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WORK_ITEM_ID = "workItemId"; + private JsonNullable workItemId = JsonNullable.undefined(); + + public StepModel() { + } + + public StepModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public StepModel workItem(@jakarta.annotation.Nullable SharedStepModel workItem) { + this.workItem = JsonNullable.of(workItem); + return this; + } + + /** + * Nested shared steps are allowed + * @return workItem + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public SharedStepModel getWorkItem() { + return workItem.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WORK_ITEM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWorkItem_JsonNullable() { + return workItem; + } + + @JsonProperty(JSON_PROPERTY_WORK_ITEM) + public void setWorkItem_JsonNullable(JsonNullable workItem) { + this.workItem = workItem; + } + + public void setWorkItem(@jakarta.annotation.Nullable SharedStepModel workItem) { + this.workItem = JsonNullable.of(workItem); + } + + + public StepModel action(@jakarta.annotation.Nullable String action) { + this.action = JsonNullable.of(action); + return this; + } + + /** + * Get action + * @return action + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getAction() { + return action.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAction_JsonNullable() { + return action; + } + + @JsonProperty(JSON_PROPERTY_ACTION) + public void setAction_JsonNullable(JsonNullable action) { + this.action = action; + } + + public void setAction(@jakarta.annotation.Nullable String action) { + this.action = JsonNullable.of(action); + } + + + public StepModel expected(@jakarta.annotation.Nullable String expected) { + this.expected = JsonNullable.of(expected); + return this; + } + + /** + * Get expected + * @return expected + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getExpected() { + return expected.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXPECTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExpected_JsonNullable() { + return expected; + } + + @JsonProperty(JSON_PROPERTY_EXPECTED) + public void setExpected_JsonNullable(JsonNullable expected) { + this.expected = expected; + } + + public void setExpected(@jakarta.annotation.Nullable String expected) { + this.expected = JsonNullable.of(expected); + } + + + public StepModel testData(@jakarta.annotation.Nullable String testData) { + this.testData = JsonNullable.of(testData); + return this; + } + + /** + * Get testData + * @return testData + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTestData() { + return testData.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEST_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTestData_JsonNullable() { + return testData; + } + + @JsonProperty(JSON_PROPERTY_TEST_DATA) + public void setTestData_JsonNullable(JsonNullable testData) { + this.testData = testData; + } + + public void setTestData(@jakarta.annotation.Nullable String testData) { + this.testData = JsonNullable.of(testData); + } + + + public StepModel comments(@jakarta.annotation.Nullable String comments) { + this.comments = JsonNullable.of(comments); + return this; + } + + /** + * Get comments + * @return comments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getComments() { + return comments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getComments_JsonNullable() { + return comments; + } + + @JsonProperty(JSON_PROPERTY_COMMENTS) + public void setComments_JsonNullable(JsonNullable comments) { + this.comments = comments; + } + + public void setComments(@jakarta.annotation.Nullable String comments) { + this.comments = JsonNullable.of(comments); + } + + + public StepModel workItemId(@jakarta.annotation.Nullable UUID workItemId) { + this.workItemId = JsonNullable.of(workItemId); + return this; + } + + /** + * Get workItemId + * @return workItemId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getWorkItemId() { + return workItemId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WORK_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWorkItemId_JsonNullable() { + return workItemId; + } + + @JsonProperty(JSON_PROPERTY_WORK_ITEM_ID) + public void setWorkItemId_JsonNullable(JsonNullable workItemId) { + this.workItemId = workItemId; + } + + public void setWorkItemId(@jakarta.annotation.Nullable UUID workItemId) { + this.workItemId = JsonNullable.of(workItemId); + } + + + /** + * Return true if this StepModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StepModel stepModel = (StepModel) o; + return Objects.equals(this.id, stepModel.id) && + equalsNullable(this.workItem, stepModel.workItem) && + equalsNullable(this.action, stepModel.action) && + equalsNullable(this.expected, stepModel.expected) && + equalsNullable(this.testData, stepModel.testData) && + equalsNullable(this.comments, stepModel.comments) && + equalsNullable(this.workItemId, stepModel.workItemId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, hashCodeNullable(workItem), hashCodeNullable(action), hashCodeNullable(expected), hashCodeNullable(testData), hashCodeNullable(comments), hashCodeNullable(workItemId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StepModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" workItem: ").append(toIndentedString(workItem)).append("\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" expected: ").append(toIndentedString(expected)).append("\n"); + sb.append(" testData: ").append(toIndentedString(testData)).append("\n"); + sb.append(" comments: ").append(toIndentedString(comments)).append("\n"); + sb.append(" workItemId: ").append(toIndentedString(workItemId)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepPostModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepPostModel.java new file mode 100644 index 0000000..36ccc80 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepPostModel.java @@ -0,0 +1,289 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * StepPostModel + */ +@JsonPropertyOrder({ + StepPostModel.JSON_PROPERTY_ACTION, + StepPostModel.JSON_PROPERTY_EXPECTED, + StepPostModel.JSON_PROPERTY_TEST_DATA, + StepPostModel.JSON_PROPERTY_COMMENTS, + StepPostModel.JSON_PROPERTY_WORK_ITEM_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class StepPostModel { + public static final String JSON_PROPERTY_ACTION = "action"; + private JsonNullable action = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXPECTED = "expected"; + private JsonNullable expected = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEST_DATA = "testData"; + private JsonNullable testData = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMMENTS = "comments"; + private JsonNullable comments = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_WORK_ITEM_ID = "workItemId"; + private JsonNullable workItemId = JsonNullable.undefined(); + + public StepPostModel() { + } + + public StepPostModel action(@jakarta.annotation.Nullable String action) { + this.action = JsonNullable.of(action); + return this; + } + + /** + * Get action + * @return action + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getAction() { + return action.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAction_JsonNullable() { + return action; + } + + @JsonProperty(JSON_PROPERTY_ACTION) + public void setAction_JsonNullable(JsonNullable action) { + this.action = action; + } + + public void setAction(@jakarta.annotation.Nullable String action) { + this.action = JsonNullable.of(action); + } + + + public StepPostModel expected(@jakarta.annotation.Nullable String expected) { + this.expected = JsonNullable.of(expected); + return this; + } + + /** + * Get expected + * @return expected + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getExpected() { + return expected.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXPECTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getExpected_JsonNullable() { + return expected; + } + + @JsonProperty(JSON_PROPERTY_EXPECTED) + public void setExpected_JsonNullable(JsonNullable expected) { + this.expected = expected; + } + + public void setExpected(@jakarta.annotation.Nullable String expected) { + this.expected = JsonNullable.of(expected); + } + + + public StepPostModel testData(@jakarta.annotation.Nullable String testData) { + this.testData = JsonNullable.of(testData); + return this; + } + + /** + * Get testData + * @return testData + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTestData() { + return testData.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEST_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTestData_JsonNullable() { + return testData; + } + + @JsonProperty(JSON_PROPERTY_TEST_DATA) + public void setTestData_JsonNullable(JsonNullable testData) { + this.testData = testData; + } + + public void setTestData(@jakarta.annotation.Nullable String testData) { + this.testData = JsonNullable.of(testData); + } + + + public StepPostModel comments(@jakarta.annotation.Nullable String comments) { + this.comments = JsonNullable.of(comments); + return this; + } + + /** + * Get comments + * @return comments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getComments() { + return comments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getComments_JsonNullable() { + return comments; + } + + @JsonProperty(JSON_PROPERTY_COMMENTS) + public void setComments_JsonNullable(JsonNullable comments) { + this.comments = comments; + } + + public void setComments(@jakarta.annotation.Nullable String comments) { + this.comments = JsonNullable.of(comments); + } + + + public StepPostModel workItemId(@jakarta.annotation.Nullable UUID workItemId) { + this.workItemId = JsonNullable.of(workItemId); + return this; + } + + /** + * Get workItemId + * @return workItemId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getWorkItemId() { + return workItemId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WORK_ITEM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWorkItemId_JsonNullable() { + return workItemId; + } + + @JsonProperty(JSON_PROPERTY_WORK_ITEM_ID) + public void setWorkItemId_JsonNullable(JsonNullable workItemId) { + this.workItemId = workItemId; + } + + public void setWorkItemId(@jakarta.annotation.Nullable UUID workItemId) { + this.workItemId = JsonNullable.of(workItemId); + } + + + /** + * Return true if this StepPostModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StepPostModel stepPostModel = (StepPostModel) o; + return equalsNullable(this.action, stepPostModel.action) && + equalsNullable(this.expected, stepPostModel.expected) && + equalsNullable(this.testData, stepPostModel.testData) && + equalsNullable(this.comments, stepPostModel.comments) && + equalsNullable(this.workItemId, stepPostModel.workItemId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(action), hashCodeNullable(expected), hashCodeNullable(testData), hashCodeNullable(comments), hashCodeNullable(workItemId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StepPostModel {\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" expected: ").append(toIndentedString(expected)).append("\n"); + sb.append(" testData: ").append(toIndentedString(testData)).append("\n"); + sb.append(" comments: ").append(toIndentedString(comments)).append("\n"); + sb.append(" workItemId: ").append(toIndentedString(workItemId)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepResultApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepResultApiModel.java new file mode 100644 index 0000000..fcabb9a --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/StepResultApiModel.java @@ -0,0 +1,291 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.SharedStepResultApiModel; +import ru.testit.adaptersapi.model.StepCommentApiModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * StepResultApiModel + */ +@JsonPropertyOrder({ + StepResultApiModel.JSON_PROPERTY_STEP_ID, + StepResultApiModel.JSON_PROPERTY_OUTCOME, + StepResultApiModel.JSON_PROPERTY_SHARED_STEP_VERSION_ID, + StepResultApiModel.JSON_PROPERTY_SHARED_STEP_RESULTS, + StepResultApiModel.JSON_PROPERTY_COMMENT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class StepResultApiModel { + public static final String JSON_PROPERTY_STEP_ID = "stepId"; + @jakarta.annotation.Nonnull + private UUID stepId; + + public static final String JSON_PROPERTY_OUTCOME = "outcome"; + @jakarta.annotation.Nonnull + private String outcome; + + public static final String JSON_PROPERTY_SHARED_STEP_VERSION_ID = "sharedStepVersionId"; + private JsonNullable sharedStepVersionId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SHARED_STEP_RESULTS = "sharedStepResults"; + private JsonNullable> sharedStepResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_COMMENT = "comment"; + private JsonNullable comment = JsonNullable.undefined(); + + public StepResultApiModel() { + } + + public StepResultApiModel stepId(@jakarta.annotation.Nonnull UUID stepId) { + this.stepId = stepId; + return this; + } + + /** + * Get stepId + * @return stepId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STEP_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getStepId() { + return stepId; + } + + + @JsonProperty(JSON_PROPERTY_STEP_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStepId(@jakarta.annotation.Nonnull UUID stepId) { + this.stepId = stepId; + } + + + public StepResultApiModel outcome(@jakarta.annotation.Nonnull String outcome) { + this.outcome = outcome; + return this; + } + + /** + * Get outcome + * @return outcome + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getOutcome() { + return outcome; + } + + + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutcome(@jakarta.annotation.Nonnull String outcome) { + this.outcome = outcome; + } + + + public StepResultApiModel sharedStepVersionId(@jakarta.annotation.Nullable UUID sharedStepVersionId) { + this.sharedStepVersionId = JsonNullable.of(sharedStepVersionId); + return this; + } + + /** + * Get sharedStepVersionId + * @return sharedStepVersionId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getSharedStepVersionId() { + return sharedStepVersionId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SHARED_STEP_VERSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSharedStepVersionId_JsonNullable() { + return sharedStepVersionId; + } + + @JsonProperty(JSON_PROPERTY_SHARED_STEP_VERSION_ID) + public void setSharedStepVersionId_JsonNullable(JsonNullable sharedStepVersionId) { + this.sharedStepVersionId = sharedStepVersionId; + } + + public void setSharedStepVersionId(@jakarta.annotation.Nullable UUID sharedStepVersionId) { + this.sharedStepVersionId = JsonNullable.of(sharedStepVersionId); + } + + + public StepResultApiModel sharedStepResults(@jakarta.annotation.Nullable List sharedStepResults) { + this.sharedStepResults = JsonNullable.>of(sharedStepResults); + return this; + } + + public StepResultApiModel addSharedStepResultsItem(SharedStepResultApiModel sharedStepResultsItem) { + if (this.sharedStepResults == null || !this.sharedStepResults.isPresent()) { + this.sharedStepResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.sharedStepResults.get().add(sharedStepResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get sharedStepResults + * @return sharedStepResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSharedStepResults() { + return sharedStepResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SHARED_STEP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSharedStepResults_JsonNullable() { + return sharedStepResults; + } + + @JsonProperty(JSON_PROPERTY_SHARED_STEP_RESULTS) + public void setSharedStepResults_JsonNullable(JsonNullable> sharedStepResults) { + this.sharedStepResults = sharedStepResults; + } + + public void setSharedStepResults(@jakarta.annotation.Nullable List sharedStepResults) { + this.sharedStepResults = JsonNullable.>of(sharedStepResults); + } + + + public StepResultApiModel comment(@jakarta.annotation.Nullable StepCommentApiModel comment) { + this.comment = JsonNullable.of(comment); + return this; + } + + /** + * Get comment + * @return comment + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public StepCommentApiModel getComment() { + return comment.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getComment_JsonNullable() { + return comment; + } + + @JsonProperty(JSON_PROPERTY_COMMENT) + public void setComment_JsonNullable(JsonNullable comment) { + this.comment = comment; + } + + public void setComment(@jakarta.annotation.Nullable StepCommentApiModel comment) { + this.comment = JsonNullable.of(comment); + } + + + /** + * Return true if this StepResultApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StepResultApiModel stepResultApiModel = (StepResultApiModel) o; + return Objects.equals(this.stepId, stepResultApiModel.stepId) && + Objects.equals(this.outcome, stepResultApiModel.outcome) && + equalsNullable(this.sharedStepVersionId, stepResultApiModel.sharedStepVersionId) && + equalsNullable(this.sharedStepResults, stepResultApiModel.sharedStepResults) && + equalsNullable(this.comment, stepResultApiModel.comment); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(stepId, outcome, hashCodeNullable(sharedStepVersionId), hashCodeNullable(sharedStepResults), hashCodeNullable(comment)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StepResultApiModel {\n"); + sb.append(" stepId: ").append(toIndentedString(stepId)).append("\n"); + sb.append(" outcome: ").append(toIndentedString(outcome)).append("\n"); + sb.append(" sharedStepVersionId: ").append(toIndentedString(sharedStepVersionId)).append("\n"); + sb.append(" sharedStepResults: ").append(toIndentedString(sharedStepResults)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TagModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TagModel.java new file mode 100644 index 0000000..1126b32 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TagModel.java @@ -0,0 +1,110 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * TagModel + */ +@JsonPropertyOrder({ + TagModel.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TagModel { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public TagModel() { + } + + public TagModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + /** + * Return true if this TagModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagModel tagModel = (TagModel) o; + return Objects.equals(this.name, tagModel.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagModel {\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultLinkApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultLinkApiResult.java new file mode 100644 index 0000000..8c791d7 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultLinkApiResult.java @@ -0,0 +1,322 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.LinkType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * TestResultLinkApiResult + */ +@JsonPropertyOrder({ + TestResultLinkApiResult.JSON_PROPERTY_URL, + TestResultLinkApiResult.JSON_PROPERTY_TYPE, + TestResultLinkApiResult.JSON_PROPERTY_ID, + TestResultLinkApiResult.JSON_PROPERTY_TITLE, + TestResultLinkApiResult.JSON_PROPERTY_DESCRIPTION, + TestResultLinkApiResult.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestResultLinkApiResult { + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull + private String url; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private LinkType type; + + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + @Deprecated + private JsonNullable name = JsonNullable.undefined(); + + public TestResultLinkApiResult() { + } + + @JsonCreator + public TestResultLinkApiResult( + @JsonProperty(JSON_PROPERTY_NAME) String name + ) { + this(); + this.name = name == null ? JsonNullable.undefined() : JsonNullable.of(name); + } + + public TestResultLinkApiResult url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Address can be specified without protocol, but necessarily with the domain. + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + + public TestResultLinkApiResult type(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + return this; + } + + /** + * Specifies the type of the link. + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LinkType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + } + + + public TestResultLinkApiResult id(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Link unique identifier + * @return id + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + } + + + public TestResultLinkApiResult title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Link name. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public TestResultLinkApiResult description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Link description. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Link name. Backward compatibility. + * @return name + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + + public String getName() { + + if (name == null) { + name = JsonNullable.undefined(); + } + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + private void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + + + /** + * Return true if this TestResultLinkApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestResultLinkApiResult testResultLinkApiResult = (TestResultLinkApiResult) o; + return Objects.equals(this.url, testResultLinkApiResult.url) && + Objects.equals(this.type, testResultLinkApiResult.type) && + equalsNullable(this.id, testResultLinkApiResult.id) && + equalsNullable(this.title, testResultLinkApiResult.title) && + equalsNullable(this.description, testResultLinkApiResult.description) && + equalsNullable(this.name, testResultLinkApiResult.name); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(url, type, hashCodeNullable(id), hashCodeNullable(title), hashCodeNullable(description), hashCodeNullable(name)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestResultLinkApiResult {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultOutcome.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultOutcome.java new file mode 100644 index 0000000..7523080 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultOutcome.java @@ -0,0 +1,69 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets TestResultOutcome + */ +public enum TestResultOutcome { + + IN_PROGRESS("InProgress"), + + PASSED("Passed"), + + FAILED("Failed"), + + SKIPPED("Skipped"), + + BLOCKED("Blocked"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + TestResultOutcome(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TestResultOutcome fromValue(String value) { + for (TestResultOutcome b : TestResultOutcome.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultResponse.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultResponse.java new file mode 100644 index 0000000..8805329 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultResponse.java @@ -0,0 +1,1057 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentApiResult; +import ru.testit.adaptersapi.model.AutoTest; +import ru.testit.adaptersapi.model.AutoTestStepResult; +import ru.testit.adaptersapi.model.LinkApiResult; +import ru.testit.adaptersapi.model.StepCommentApiModel; +import ru.testit.adaptersapi.model.StepResultApiModel; +import ru.testit.adaptersapi.model.TestResultOutcome; +import ru.testit.adaptersapi.model.TestStatusApiResult; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * TestResultResponse + */ +@JsonPropertyOrder({ + TestResultResponse.JSON_PROPERTY_ID, + TestResultResponse.JSON_PROPERTY_FAILURE_CLASS_IDS, + TestResultResponse.JSON_PROPERTY_CONFIGURATION_ID, + TestResultResponse.JSON_PROPERTY_TEST_RUN_ID, + TestResultResponse.JSON_PROPERTY_STEP_COMMENTS, + TestResultResponse.JSON_PROPERTY_OUTCOME, + TestResultResponse.JSON_PROPERTY_STATUS, + TestResultResponse.JSON_PROPERTY_COMMENT, + TestResultResponse.JSON_PROPERTY_LINKS, + TestResultResponse.JSON_PROPERTY_STEP_RESULTS, + TestResultResponse.JSON_PROPERTY_ATTACHMENTS, + TestResultResponse.JSON_PROPERTY_AUTO_TEST_ID, + TestResultResponse.JSON_PROPERTY_DURATION_IN_MS, + TestResultResponse.JSON_PROPERTY_TRACES, + TestResultResponse.JSON_PROPERTY_FAILURE_TYPE, + TestResultResponse.JSON_PROPERTY_MESSAGE, + TestResultResponse.JSON_PROPERTY_AUTO_TEST, + TestResultResponse.JSON_PROPERTY_AUTO_TEST_STEP_RESULTS, + TestResultResponse.JSON_PROPERTY_SETUP_RESULTS, + TestResultResponse.JSON_PROPERTY_TEARDOWN_RESULTS, + TestResultResponse.JSON_PROPERTY_PARAMETERS, + TestResultResponse.JSON_PROPERTY_PROPERTIES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestResultResponse { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_FAILURE_CLASS_IDS = "failureClassIds"; + @jakarta.annotation.Nonnull + private List failureClassIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_CONFIGURATION_ID = "configurationId"; + @jakarta.annotation.Nonnull + private UUID configurationId; + + public static final String JSON_PROPERTY_TEST_RUN_ID = "testRunId"; + @jakarta.annotation.Nonnull + private UUID testRunId; + + public static final String JSON_PROPERTY_STEP_COMMENTS = "stepComments"; + private JsonNullable> stepComments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OUTCOME = "outcome"; + @Deprecated + private JsonNullable outcome = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private JsonNullable status = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMMENT = "comment"; + private JsonNullable comment = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_STEP_RESULTS = "stepResults"; + private JsonNullable> stepResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private JsonNullable> attachments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_AUTO_TEST_ID = "autoTestId"; + private JsonNullable autoTestId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION_IN_MS = "durationInMs"; + private JsonNullable durationInMs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TRACES = "traces"; + private JsonNullable traces = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FAILURE_TYPE = "failureType"; + private JsonNullable failureType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AUTO_TEST = "autoTest"; + private JsonNullable autoTest = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AUTO_TEST_STEP_RESULTS = "autoTestStepResults"; + private JsonNullable> autoTestStepResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_SETUP_RESULTS = "setupResults"; + private JsonNullable> setupResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TEARDOWN_RESULTS = "teardownResults"; + private JsonNullable> teardownResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + private JsonNullable> parameters = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PROPERTIES = "properties"; + private JsonNullable> properties = JsonNullable.>undefined(); + + public TestResultResponse() { + } + + public TestResultResponse id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public TestResultResponse failureClassIds(@jakarta.annotation.Nonnull List failureClassIds) { + this.failureClassIds = failureClassIds; + return this; + } + + public TestResultResponse addFailureClassIdsItem(UUID failureClassIdsItem) { + if (this.failureClassIds == null) { + this.failureClassIds = new ArrayList<>(); + } + this.failureClassIds.add(failureClassIdsItem); + return this; + } + + /** + * Get failureClassIds + * @return failureClassIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAILURE_CLASS_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getFailureClassIds() { + return failureClassIds; + } + + + @JsonProperty(JSON_PROPERTY_FAILURE_CLASS_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailureClassIds(@jakarta.annotation.Nonnull List failureClassIds) { + this.failureClassIds = failureClassIds; + } + + + public TestResultResponse configurationId(@jakarta.annotation.Nonnull UUID configurationId) { + this.configurationId = configurationId; + return this; + } + + /** + * Get configurationId + * @return configurationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIGURATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getConfigurationId() { + return configurationId; + } + + + @JsonProperty(JSON_PROPERTY_CONFIGURATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfigurationId(@jakarta.annotation.Nonnull UUID configurationId) { + this.configurationId = configurationId; + } + + + public TestResultResponse testRunId(@jakarta.annotation.Nonnull UUID testRunId) { + this.testRunId = testRunId; + return this; + } + + /** + * Get testRunId + * @return testRunId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEST_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getTestRunId() { + return testRunId; + } + + + @JsonProperty(JSON_PROPERTY_TEST_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTestRunId(@jakarta.annotation.Nonnull UUID testRunId) { + this.testRunId = testRunId; + } + + + public TestResultResponse stepComments(@jakarta.annotation.Nullable List stepComments) { + this.stepComments = JsonNullable.>of(stepComments); + return this; + } + + public TestResultResponse addStepCommentsItem(StepCommentApiModel stepCommentsItem) { + if (this.stepComments == null || !this.stepComments.isPresent()) { + this.stepComments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.stepComments.get().add(stepCommentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get stepComments + * @return stepComments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getStepComments() { + return stepComments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEP_COMMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStepComments_JsonNullable() { + return stepComments; + } + + @JsonProperty(JSON_PROPERTY_STEP_COMMENTS) + public void setStepComments_JsonNullable(JsonNullable> stepComments) { + this.stepComments = stepComments; + } + + public void setStepComments(@jakarta.annotation.Nullable List stepComments) { + this.stepComments = JsonNullable.>of(stepComments); + } + + + @Deprecated + public TestResultResponse outcome(@jakarta.annotation.Nullable TestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + return this; + } + + /** + * Get outcome + * @return outcome + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + + public TestResultOutcome getOutcome() { + return outcome.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutcome_JsonNullable() { + return outcome; + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + public void setOutcome_JsonNullable(JsonNullable outcome) { + this.outcome = outcome; + } + + @Deprecated + public void setOutcome(@jakarta.annotation.Nullable TestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + } + + + public TestResultResponse status(@jakarta.annotation.Nullable TestStatusApiResult status) { + this.status = JsonNullable.of(status); + return this; + } + + /** + * Get status + * @return status + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public TestStatusApiResult getStatus() { + return status.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStatus_JsonNullable() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + public void setStatus_JsonNullable(JsonNullable status) { + this.status = status; + } + + public void setStatus(@jakarta.annotation.Nullable TestStatusApiResult status) { + this.status = JsonNullable.of(status); + } + + + public TestResultResponse comment(@jakarta.annotation.Nullable String comment) { + this.comment = JsonNullable.of(comment); + return this; + } + + /** + * Get comment + * @return comment + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getComment() { + return comment.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getComment_JsonNullable() { + return comment; + } + + @JsonProperty(JSON_PROPERTY_COMMENT) + public void setComment_JsonNullable(JsonNullable comment) { + this.comment = comment; + } + + public void setComment(@jakarta.annotation.Nullable String comment) { + this.comment = JsonNullable.of(comment); + } + + + public TestResultResponse links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public TestResultResponse addLinksItem(LinkApiResult linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get links + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public TestResultResponse stepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + return this; + } + + public TestResultResponse addStepResultsItem(StepResultApiModel stepResultsItem) { + if (this.stepResults == null || !this.stepResults.isPresent()) { + this.stepResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.stepResults.get().add(stepResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get stepResults + * @return stepResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getStepResults() { + return stepResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStepResults_JsonNullable() { + return stepResults; + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + public void setStepResults_JsonNullable(JsonNullable> stepResults) { + this.stepResults = stepResults; + } + + public void setStepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + } + + + public TestResultResponse attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + return this; + } + + public TestResultResponse addAttachmentsItem(AttachmentApiResult attachmentsItem) { + if (this.attachments == null || !this.attachments.isPresent()) { + this.attachments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attachments.get().add(attachmentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get attachments + * @return attachments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttachments() { + return attachments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttachments_JsonNullable() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + public void setAttachments_JsonNullable(JsonNullable> attachments) { + this.attachments = attachments; + } + + public void setAttachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + } + + + public TestResultResponse autoTestId(@jakarta.annotation.Nullable UUID autoTestId) { + this.autoTestId = JsonNullable.of(autoTestId); + return this; + } + + /** + * Get autoTestId + * @return autoTestId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getAutoTestId() { + return autoTestId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAutoTestId_JsonNullable() { + return autoTestId; + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_ID) + public void setAutoTestId_JsonNullable(JsonNullable autoTestId) { + this.autoTestId = autoTestId; + } + + public void setAutoTestId(@jakarta.annotation.Nullable UUID autoTestId) { + this.autoTestId = JsonNullable.of(autoTestId); + } + + + public TestResultResponse durationInMs(@jakarta.annotation.Nullable Long durationInMs) { + this.durationInMs = JsonNullable.of(durationInMs); + return this; + } + + /** + * Get durationInMs + * @return durationInMs + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Long getDurationInMs() { + return durationInMs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION_IN_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDurationInMs_JsonNullable() { + return durationInMs; + } + + @JsonProperty(JSON_PROPERTY_DURATION_IN_MS) + public void setDurationInMs_JsonNullable(JsonNullable durationInMs) { + this.durationInMs = durationInMs; + } + + public void setDurationInMs(@jakarta.annotation.Nullable Long durationInMs) { + this.durationInMs = JsonNullable.of(durationInMs); + } + + + public TestResultResponse traces(@jakarta.annotation.Nullable String traces) { + this.traces = JsonNullable.of(traces); + return this; + } + + /** + * Get traces + * @return traces + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTraces() { + return traces.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TRACES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTraces_JsonNullable() { + return traces; + } + + @JsonProperty(JSON_PROPERTY_TRACES) + public void setTraces_JsonNullable(JsonNullable traces) { + this.traces = traces; + } + + public void setTraces(@jakarta.annotation.Nullable String traces) { + this.traces = JsonNullable.of(traces); + } + + + public TestResultResponse failureType(@jakarta.annotation.Nullable String failureType) { + this.failureType = JsonNullable.of(failureType); + return this; + } + + /** + * Get failureType + * @return failureType + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getFailureType() { + return failureType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FAILURE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getFailureType_JsonNullable() { + return failureType; + } + + @JsonProperty(JSON_PROPERTY_FAILURE_TYPE) + public void setFailureType_JsonNullable(JsonNullable failureType) { + this.failureType = failureType; + } + + public void setFailureType(@jakarta.annotation.Nullable String failureType) { + this.failureType = JsonNullable.of(failureType); + } + + + public TestResultResponse message(@jakarta.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public TestResultResponse autoTest(@jakarta.annotation.Nullable AutoTest autoTest) { + this.autoTest = JsonNullable.of(autoTest); + return this; + } + + /** + * Get autoTest + * @return autoTest + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public AutoTest getAutoTest() { + return autoTest.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAutoTest_JsonNullable() { + return autoTest; + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST) + public void setAutoTest_JsonNullable(JsonNullable autoTest) { + this.autoTest = autoTest; + } + + public void setAutoTest(@jakarta.annotation.Nullable AutoTest autoTest) { + this.autoTest = JsonNullable.of(autoTest); + } + + + public TestResultResponse autoTestStepResults(@jakarta.annotation.Nullable List autoTestStepResults) { + this.autoTestStepResults = JsonNullable.>of(autoTestStepResults); + return this; + } + + public TestResultResponse addAutoTestStepResultsItem(AutoTestStepResult autoTestStepResultsItem) { + if (this.autoTestStepResults == null || !this.autoTestStepResults.isPresent()) { + this.autoTestStepResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.autoTestStepResults.get().add(autoTestStepResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get autoTestStepResults + * @return autoTestStepResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAutoTestStepResults() { + return autoTestStepResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_STEP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAutoTestStepResults_JsonNullable() { + return autoTestStepResults; + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_STEP_RESULTS) + public void setAutoTestStepResults_JsonNullable(JsonNullable> autoTestStepResults) { + this.autoTestStepResults = autoTestStepResults; + } + + public void setAutoTestStepResults(@jakarta.annotation.Nullable List autoTestStepResults) { + this.autoTestStepResults = JsonNullable.>of(autoTestStepResults); + } + + + public TestResultResponse setupResults(@jakarta.annotation.Nullable List setupResults) { + this.setupResults = JsonNullable.>of(setupResults); + return this; + } + + public TestResultResponse addSetupResultsItem(AutoTestStepResult setupResultsItem) { + if (this.setupResults == null || !this.setupResults.isPresent()) { + this.setupResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.setupResults.get().add(setupResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get setupResults + * @return setupResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSetupResults() { + return setupResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SETUP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSetupResults_JsonNullable() { + return setupResults; + } + + @JsonProperty(JSON_PROPERTY_SETUP_RESULTS) + public void setSetupResults_JsonNullable(JsonNullable> setupResults) { + this.setupResults = setupResults; + } + + public void setSetupResults(@jakarta.annotation.Nullable List setupResults) { + this.setupResults = JsonNullable.>of(setupResults); + } + + + public TestResultResponse teardownResults(@jakarta.annotation.Nullable List teardownResults) { + this.teardownResults = JsonNullable.>of(teardownResults); + return this; + } + + public TestResultResponse addTeardownResultsItem(AutoTestStepResult teardownResultsItem) { + if (this.teardownResults == null || !this.teardownResults.isPresent()) { + this.teardownResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.teardownResults.get().add(teardownResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get teardownResults + * @return teardownResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTeardownResults() { + return teardownResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTeardownResults_JsonNullable() { + return teardownResults; + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN_RESULTS) + public void setTeardownResults_JsonNullable(JsonNullable> teardownResults) { + this.teardownResults = teardownResults; + } + + public void setTeardownResults(@jakarta.annotation.Nullable List teardownResults) { + this.teardownResults = JsonNullable.>of(teardownResults); + } + + + public TestResultResponse parameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + return this; + } + + public TestResultResponse putParametersItem(String key, String parametersItem) { + if (this.parameters == null || !this.parameters.isPresent()) { + this.parameters = JsonNullable.>of(new HashMap<>()); + } + try { + this.parameters.get().put(key, parametersItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get parameters + * @return parameters + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map getParameters() { + return parameters.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getParameters_JsonNullable() { + return parameters; + } + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + public void setParameters_JsonNullable(JsonNullable> parameters) { + this.parameters = parameters; + } + + public void setParameters(@jakarta.annotation.Nullable Map parameters) { + this.parameters = JsonNullable.>of(parameters); + } + + + public TestResultResponse properties(@jakarta.annotation.Nullable Map properties) { + this.properties = JsonNullable.>of(properties); + return this; + } + + public TestResultResponse putPropertiesItem(String key, String propertiesItem) { + if (this.properties == null || !this.properties.isPresent()) { + this.properties = JsonNullable.>of(new HashMap<>()); + } + try { + this.properties.get().put(key, propertiesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get properties + * @return properties + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map getProperties() { + return properties.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getProperties_JsonNullable() { + return properties; + } + + @JsonProperty(JSON_PROPERTY_PROPERTIES) + public void setProperties_JsonNullable(JsonNullable> properties) { + this.properties = properties; + } + + public void setProperties(@jakarta.annotation.Nullable Map properties) { + this.properties = JsonNullable.>of(properties); + } + + + /** + * Return true if this TestResultResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestResultResponse testResultResponse = (TestResultResponse) o; + return Objects.equals(this.id, testResultResponse.id) && + Objects.equals(this.failureClassIds, testResultResponse.failureClassIds) && + Objects.equals(this.configurationId, testResultResponse.configurationId) && + Objects.equals(this.testRunId, testResultResponse.testRunId) && + equalsNullable(this.stepComments, testResultResponse.stepComments) && + equalsNullable(this.outcome, testResultResponse.outcome) && + equalsNullable(this.status, testResultResponse.status) && + equalsNullable(this.comment, testResultResponse.comment) && + equalsNullable(this.links, testResultResponse.links) && + equalsNullable(this.stepResults, testResultResponse.stepResults) && + equalsNullable(this.attachments, testResultResponse.attachments) && + equalsNullable(this.autoTestId, testResultResponse.autoTestId) && + equalsNullable(this.durationInMs, testResultResponse.durationInMs) && + equalsNullable(this.traces, testResultResponse.traces) && + equalsNullable(this.failureType, testResultResponse.failureType) && + equalsNullable(this.message, testResultResponse.message) && + equalsNullable(this.autoTest, testResultResponse.autoTest) && + equalsNullable(this.autoTestStepResults, testResultResponse.autoTestStepResults) && + equalsNullable(this.setupResults, testResultResponse.setupResults) && + equalsNullable(this.teardownResults, testResultResponse.teardownResults) && + equalsNullable(this.parameters, testResultResponse.parameters) && + equalsNullable(this.properties, testResultResponse.properties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, failureClassIds, configurationId, testRunId, hashCodeNullable(stepComments), hashCodeNullable(outcome), hashCodeNullable(status), hashCodeNullable(comment), hashCodeNullable(links), hashCodeNullable(stepResults), hashCodeNullable(attachments), hashCodeNullable(autoTestId), hashCodeNullable(durationInMs), hashCodeNullable(traces), hashCodeNullable(failureType), hashCodeNullable(message), hashCodeNullable(autoTest), hashCodeNullable(autoTestStepResults), hashCodeNullable(setupResults), hashCodeNullable(teardownResults), hashCodeNullable(parameters), hashCodeNullable(properties)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestResultResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" failureClassIds: ").append(toIndentedString(failureClassIds)).append("\n"); + sb.append(" configurationId: ").append(toIndentedString(configurationId)).append("\n"); + sb.append(" testRunId: ").append(toIndentedString(testRunId)).append("\n"); + sb.append(" stepComments: ").append(toIndentedString(stepComments)).append("\n"); + sb.append(" outcome: ").append(toIndentedString(outcome)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" stepResults: ").append(toIndentedString(stepResults)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" autoTestId: ").append(toIndentedString(autoTestId)).append("\n"); + sb.append(" durationInMs: ").append(toIndentedString(durationInMs)).append("\n"); + sb.append(" traces: ").append(toIndentedString(traces)).append("\n"); + sb.append(" failureType: ").append(toIndentedString(failureType)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" autoTest: ").append(toIndentedString(autoTest)).append("\n"); + sb.append(" autoTestStepResults: ").append(toIndentedString(autoTestStepResults)).append("\n"); + sb.append(" setupResults: ").append(toIndentedString(setupResults)).append("\n"); + sb.append(" teardownResults: ").append(toIndentedString(teardownResults)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultShortResponse.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultShortResponse.java new file mode 100644 index 0000000..4661d4a --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultShortResponse.java @@ -0,0 +1,645 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentApiResult; +import ru.testit.adaptersapi.model.AutoTestResultReasonShort; +import ru.testit.adaptersapi.model.TestResultLinkApiResult; +import ru.testit.adaptersapi.model.TestStatusApiResult; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * TestResultShortResponse + */ +@JsonPropertyOrder({ + TestResultShortResponse.JSON_PROPERTY_ID, + TestResultShortResponse.JSON_PROPERTY_NAME, + TestResultShortResponse.JSON_PROPERTY_AUTO_TEST_TAGS, + TestResultShortResponse.JSON_PROPERTY_TEST_RUN_ID, + TestResultShortResponse.JSON_PROPERTY_CONFIGURATION_ID, + TestResultShortResponse.JSON_PROPERTY_CONFIGURATION_NAME, + TestResultShortResponse.JSON_PROPERTY_STATUS, + TestResultShortResponse.JSON_PROPERTY_RESULT_REASONS, + TestResultShortResponse.JSON_PROPERTY_LINKS, + TestResultShortResponse.JSON_PROPERTY_ATTACHMENTS, + TestResultShortResponse.JSON_PROPERTY_RERUN_COMPLETED_COUNT, + TestResultShortResponse.JSON_PROPERTY_AUTOTEST_EXTERNAL_ID, + TestResultShortResponse.JSON_PROPERTY_OUTCOME, + TestResultShortResponse.JSON_PROPERTY_COMMENT, + TestResultShortResponse.JSON_PROPERTY_DURATION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestResultShortResponse { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_AUTO_TEST_TAGS = "autoTestTags"; + @jakarta.annotation.Nonnull + private List autoTestTags = new ArrayList<>(); + + public static final String JSON_PROPERTY_TEST_RUN_ID = "testRunId"; + @jakarta.annotation.Nonnull + private UUID testRunId; + + public static final String JSON_PROPERTY_CONFIGURATION_ID = "configurationId"; + @jakarta.annotation.Nonnull + private UUID configurationId; + + public static final String JSON_PROPERTY_CONFIGURATION_NAME = "configurationName"; + @jakarta.annotation.Nonnull + private String configurationName; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull + private TestStatusApiResult status; + + public static final String JSON_PROPERTY_RESULT_REASONS = "resultReasons"; + @jakarta.annotation.Nonnull + private List resultReasons = new ArrayList<>(); + + public static final String JSON_PROPERTY_LINKS = "links"; + @jakarta.annotation.Nonnull + private List links = new ArrayList<>(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nonnull + private List attachments = new ArrayList<>(); + + public static final String JSON_PROPERTY_RERUN_COMPLETED_COUNT = "rerunCompletedCount"; + @jakarta.annotation.Nonnull + private Integer rerunCompletedCount; + + public static final String JSON_PROPERTY_AUTOTEST_EXTERNAL_ID = "autotestExternalId"; + private JsonNullable autotestExternalId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTCOME = "outcome"; + @Deprecated + private JsonNullable outcome = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMMENT = "comment"; + private JsonNullable comment = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION = "duration"; + private JsonNullable duration = JsonNullable.undefined(); + + public TestResultShortResponse() { + } + + public TestResultShortResponse id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique ID of the test result + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public TestResultShortResponse name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of autotest represented by the test result + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public TestResultShortResponse autoTestTags(@jakarta.annotation.Nonnull List autoTestTags) { + this.autoTestTags = autoTestTags; + return this; + } + + public TestResultShortResponse addAutoTestTagsItem(String autoTestTagsItem) { + if (this.autoTestTags == null) { + this.autoTestTags = new ArrayList<>(); + } + this.autoTestTags.add(autoTestTagsItem); + return this; + } + + /** + * Tags of the autotest represented by the test result + * @return autoTestTags + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AUTO_TEST_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getAutoTestTags() { + return autoTestTags; + } + + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAutoTestTags(@jakarta.annotation.Nonnull List autoTestTags) { + this.autoTestTags = autoTestTags; + } + + + public TestResultShortResponse testRunId(@jakarta.annotation.Nonnull UUID testRunId) { + this.testRunId = testRunId; + return this; + } + + /** + * Unique ID of test run where the test result is located + * @return testRunId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEST_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getTestRunId() { + return testRunId; + } + + + @JsonProperty(JSON_PROPERTY_TEST_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTestRunId(@jakarta.annotation.Nonnull UUID testRunId) { + this.testRunId = testRunId; + } + + + public TestResultShortResponse configurationId(@jakarta.annotation.Nonnull UUID configurationId) { + this.configurationId = configurationId; + return this; + } + + /** + * Unique ID of configuration which the test result uses + * @return configurationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIGURATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getConfigurationId() { + return configurationId; + } + + + @JsonProperty(JSON_PROPERTY_CONFIGURATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfigurationId(@jakarta.annotation.Nonnull UUID configurationId) { + this.configurationId = configurationId; + } + + + public TestResultShortResponse configurationName(@jakarta.annotation.Nonnull String configurationName) { + this.configurationName = configurationName; + return this; + } + + /** + * Name of configuration which the test result uses + * @return configurationName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIGURATION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getConfigurationName() { + return configurationName; + } + + + @JsonProperty(JSON_PROPERTY_CONFIGURATION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfigurationName(@jakarta.annotation.Nonnull String configurationName) { + this.configurationName = configurationName; + } + + + public TestResultShortResponse status(@jakarta.annotation.Nonnull TestStatusApiResult status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TestStatusApiResult getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull TestStatusApiResult status) { + this.status = status; + } + + + public TestResultShortResponse resultReasons(@jakarta.annotation.Nonnull List resultReasons) { + this.resultReasons = resultReasons; + return this; + } + + public TestResultShortResponse addResultReasonsItem(AutoTestResultReasonShort resultReasonsItem) { + if (this.resultReasons == null) { + this.resultReasons = new ArrayList<>(); + } + this.resultReasons.add(resultReasonsItem); + return this; + } + + /** + * Collection of result reasons which the test result have + * @return resultReasons + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT_REASONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getResultReasons() { + return resultReasons; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_REASONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResultReasons(@jakarta.annotation.Nonnull List resultReasons) { + this.resultReasons = resultReasons; + } + + + public TestResultShortResponse links(@jakarta.annotation.Nonnull List links) { + this.links = links; + return this; + } + + public TestResultShortResponse addLinksItem(TestResultLinkApiResult linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Collection of links attached to the test result + * @return links + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getLinks() { + return links; + } + + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLinks(@jakarta.annotation.Nonnull List links) { + this.links = links; + } + + + public TestResultShortResponse attachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + return this; + } + + public TestResultShortResponse addAttachmentsItem(AttachmentApiResult attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * Collection of files attached to the test result + * @return attachments + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getAttachments() { + return attachments; + } + + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + } + + + public TestResultShortResponse rerunCompletedCount(@jakarta.annotation.Nonnull Integer rerunCompletedCount) { + this.rerunCompletedCount = rerunCompletedCount; + return this; + } + + /** + * Run count + * @return rerunCompletedCount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RERUN_COMPLETED_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getRerunCompletedCount() { + return rerunCompletedCount; + } + + + @JsonProperty(JSON_PROPERTY_RERUN_COMPLETED_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRerunCompletedCount(@jakarta.annotation.Nonnull Integer rerunCompletedCount) { + this.rerunCompletedCount = rerunCompletedCount; + } + + + public TestResultShortResponse autotestExternalId(@jakarta.annotation.Nullable String autotestExternalId) { + this.autotestExternalId = JsonNullable.of(autotestExternalId); + return this; + } + + /** + * External ID of autotest represented by the test result + * @return autotestExternalId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getAutotestExternalId() { + return autotestExternalId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTOTEST_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAutotestExternalId_JsonNullable() { + return autotestExternalId; + } + + @JsonProperty(JSON_PROPERTY_AUTOTEST_EXTERNAL_ID) + public void setAutotestExternalId_JsonNullable(JsonNullable autotestExternalId) { + this.autotestExternalId = autotestExternalId; + } + + public void setAutotestExternalId(@jakarta.annotation.Nullable String autotestExternalId) { + this.autotestExternalId = JsonNullable.of(autotestExternalId); + } + + + @Deprecated + public TestResultShortResponse outcome(@jakarta.annotation.Nullable String outcome) { + this.outcome = JsonNullable.of(outcome); + return this; + } + + /** + * Outcome of the test result + * @return outcome + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + + public String getOutcome() { + return outcome.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutcome_JsonNullable() { + return outcome; + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + public void setOutcome_JsonNullable(JsonNullable outcome) { + this.outcome = outcome; + } + + @Deprecated + public void setOutcome(@jakarta.annotation.Nullable String outcome) { + this.outcome = JsonNullable.of(outcome); + } + + + public TestResultShortResponse comment(@jakarta.annotation.Nullable String comment) { + this.comment = JsonNullable.of(comment); + return this; + } + + /** + * Comment to the test result + * @return comment + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getComment() { + return comment.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getComment_JsonNullable() { + return comment; + } + + @JsonProperty(JSON_PROPERTY_COMMENT) + public void setComment_JsonNullable(JsonNullable comment) { + this.comment = comment; + } + + public void setComment(@jakarta.annotation.Nullable String comment) { + this.comment = JsonNullable.of(comment); + } + + + public TestResultShortResponse duration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + return this; + } + + /** + * Time which it took to run the test + * @return duration + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Long getDuration() { + return duration.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDuration_JsonNullable() { + return duration; + } + + @JsonProperty(JSON_PROPERTY_DURATION) + public void setDuration_JsonNullable(JsonNullable duration) { + this.duration = duration; + } + + public void setDuration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + } + + + /** + * Return true if this TestResultShortResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestResultShortResponse testResultShortResponse = (TestResultShortResponse) o; + return Objects.equals(this.id, testResultShortResponse.id) && + Objects.equals(this.name, testResultShortResponse.name) && + Objects.equals(this.autoTestTags, testResultShortResponse.autoTestTags) && + Objects.equals(this.testRunId, testResultShortResponse.testRunId) && + Objects.equals(this.configurationId, testResultShortResponse.configurationId) && + Objects.equals(this.configurationName, testResultShortResponse.configurationName) && + Objects.equals(this.status, testResultShortResponse.status) && + Objects.equals(this.resultReasons, testResultShortResponse.resultReasons) && + Objects.equals(this.links, testResultShortResponse.links) && + Objects.equals(this.attachments, testResultShortResponse.attachments) && + Objects.equals(this.rerunCompletedCount, testResultShortResponse.rerunCompletedCount) && + equalsNullable(this.autotestExternalId, testResultShortResponse.autotestExternalId) && + equalsNullable(this.outcome, testResultShortResponse.outcome) && + equalsNullable(this.comment, testResultShortResponse.comment) && + equalsNullable(this.duration, testResultShortResponse.duration); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, autoTestTags, testRunId, configurationId, configurationName, status, resultReasons, links, attachments, rerunCompletedCount, hashCodeNullable(autotestExternalId), hashCodeNullable(outcome), hashCodeNullable(comment), hashCodeNullable(duration)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestResultShortResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" autoTestTags: ").append(toIndentedString(autoTestTags)).append("\n"); + sb.append(" testRunId: ").append(toIndentedString(testRunId)).append("\n"); + sb.append(" configurationId: ").append(toIndentedString(configurationId)).append("\n"); + sb.append(" configurationName: ").append(toIndentedString(configurationName)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" resultReasons: ").append(toIndentedString(resultReasons)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" rerunCompletedCount: ").append(toIndentedString(rerunCompletedCount)).append("\n"); + sb.append(" autotestExternalId: ").append(toIndentedString(autotestExternalId)).append("\n"); + sb.append(" outcome: ").append(toIndentedString(outcome)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultStepCommentUpdateRequest.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultStepCommentUpdateRequest.java new file mode 100644 index 0000000..e24e15a --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultStepCommentUpdateRequest.java @@ -0,0 +1,272 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentUpdateRequest; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * TestResultStepCommentUpdateRequest + */ +@JsonPropertyOrder({ + TestResultStepCommentUpdateRequest.JSON_PROPERTY_ID, + TestResultStepCommentUpdateRequest.JSON_PROPERTY_TEXT, + TestResultStepCommentUpdateRequest.JSON_PROPERTY_STEP_ID, + TestResultStepCommentUpdateRequest.JSON_PROPERTY_ATTACHMENTS, + TestResultStepCommentUpdateRequest.JSON_PROPERTY_PARENT_STEP_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestResultStepCommentUpdateRequest { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_TEXT = "text"; + @jakarta.annotation.Nonnull + private String text; + + public static final String JSON_PROPERTY_STEP_ID = "stepId"; + @jakarta.annotation.Nonnull + private UUID stepId; + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nonnull + private List attachments = new ArrayList<>(); + + public static final String JSON_PROPERTY_PARENT_STEP_ID = "parentStepId"; + private JsonNullable parentStepId = JsonNullable.undefined(); + + public TestResultStepCommentUpdateRequest() { + } + + public TestResultStepCommentUpdateRequest id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Entity unique identifier + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public TestResultStepCommentUpdateRequest text(@jakarta.annotation.Nonnull String text) { + this.text = text; + return this; + } + + /** + * Get text + * @return text + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getText() { + return text; + } + + + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setText(@jakarta.annotation.Nonnull String text) { + this.text = text; + } + + + public TestResultStepCommentUpdateRequest stepId(@jakarta.annotation.Nonnull UUID stepId) { + this.stepId = stepId; + return this; + } + + /** + * Get stepId + * @return stepId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STEP_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getStepId() { + return stepId; + } + + + @JsonProperty(JSON_PROPERTY_STEP_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStepId(@jakarta.annotation.Nonnull UUID stepId) { + this.stepId = stepId; + } + + + public TestResultStepCommentUpdateRequest attachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + return this; + } + + public TestResultStepCommentUpdateRequest addAttachmentsItem(AttachmentUpdateRequest attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * Get attachments + * @return attachments + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getAttachments() { + return attachments; + } + + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + } + + + public TestResultStepCommentUpdateRequest parentStepId(@jakarta.annotation.Nullable UUID parentStepId) { + this.parentStepId = JsonNullable.of(parentStepId); + return this; + } + + /** + * Get parentStepId + * @return parentStepId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getParentStepId() { + return parentStepId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARENT_STEP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getParentStepId_JsonNullable() { + return parentStepId; + } + + @JsonProperty(JSON_PROPERTY_PARENT_STEP_ID) + public void setParentStepId_JsonNullable(JsonNullable parentStepId) { + this.parentStepId = parentStepId; + } + + public void setParentStepId(@jakarta.annotation.Nullable UUID parentStepId) { + this.parentStepId = JsonNullable.of(parentStepId); + } + + + /** + * Return true if this TestResultStepCommentUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestResultStepCommentUpdateRequest testResultStepCommentUpdateRequest = (TestResultStepCommentUpdateRequest) o; + return Objects.equals(this.id, testResultStepCommentUpdateRequest.id) && + Objects.equals(this.text, testResultStepCommentUpdateRequest.text) && + Objects.equals(this.stepId, testResultStepCommentUpdateRequest.stepId) && + Objects.equals(this.attachments, testResultStepCommentUpdateRequest.attachments) && + equalsNullable(this.parentStepId, testResultStepCommentUpdateRequest.parentStepId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, text, stepId, attachments, hashCodeNullable(parentStepId)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestResultStepCommentUpdateRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" stepId: ").append(toIndentedString(stepId)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" parentStepId: ").append(toIndentedString(parentStepId)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultUpdateRequest.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultUpdateRequest.java new file mode 100644 index 0000000..746cf10 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultUpdateRequest.java @@ -0,0 +1,786 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentUpdateRequest; +import ru.testit.adaptersapi.model.AutoTestStepResultUpdateRequest; +import ru.testit.adaptersapi.model.CreateLinkApiModel; +import ru.testit.adaptersapi.model.StepResultApiModel; +import ru.testit.adaptersapi.model.TestResultOutcome; +import ru.testit.adaptersapi.model.TestResultStepCommentUpdateRequest; +import ru.testit.adaptersapi.model.TestStatusType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * TestResultUpdateRequest + */ +@JsonPropertyOrder({ + TestResultUpdateRequest.JSON_PROPERTY_FAILURE_CLASS_IDS, + TestResultUpdateRequest.JSON_PROPERTY_OUTCOME, + TestResultUpdateRequest.JSON_PROPERTY_STATUS_CODE, + TestResultUpdateRequest.JSON_PROPERTY_STATUS_TYPE, + TestResultUpdateRequest.JSON_PROPERTY_COMMENT, + TestResultUpdateRequest.JSON_PROPERTY_LINKS, + TestResultUpdateRequest.JSON_PROPERTY_STEP_RESULTS, + TestResultUpdateRequest.JSON_PROPERTY_ATTACHMENTS, + TestResultUpdateRequest.JSON_PROPERTY_DURATION_IN_MS, + TestResultUpdateRequest.JSON_PROPERTY_DURATION, + TestResultUpdateRequest.JSON_PROPERTY_STEP_COMMENTS, + TestResultUpdateRequest.JSON_PROPERTY_SETUP_RESULTS, + TestResultUpdateRequest.JSON_PROPERTY_TEARDOWN_RESULTS, + TestResultUpdateRequest.JSON_PROPERTY_MESSAGE, + TestResultUpdateRequest.JSON_PROPERTY_TRACE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestResultUpdateRequest { + public static final String JSON_PROPERTY_FAILURE_CLASS_IDS = "failureClassIds"; + private JsonNullable> failureClassIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OUTCOME = "outcome"; + @Deprecated + private JsonNullable outcome = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS_CODE = "statusCode"; + private JsonNullable statusCode = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS_TYPE = "statusType"; + private JsonNullable statusType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_COMMENT = "comment"; + private JsonNullable comment = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_STEP_RESULTS = "stepResults"; + private JsonNullable> stepResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private JsonNullable> attachments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_DURATION_IN_MS = "durationInMs"; + @Deprecated + private JsonNullable durationInMs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION = "duration"; + private JsonNullable duration = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STEP_COMMENTS = "stepComments"; + private JsonNullable> stepComments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_SETUP_RESULTS = "setupResults"; + private JsonNullable> setupResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TEARDOWN_RESULTS = "teardownResults"; + private JsonNullable> teardownResults = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private JsonNullable message = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TRACE = "trace"; + private JsonNullable trace = JsonNullable.undefined(); + + public TestResultUpdateRequest() { + } + + public TestResultUpdateRequest failureClassIds(@jakarta.annotation.Nullable List failureClassIds) { + this.failureClassIds = JsonNullable.>of(failureClassIds); + return this; + } + + public TestResultUpdateRequest addFailureClassIdsItem(UUID failureClassIdsItem) { + if (this.failureClassIds == null || !this.failureClassIds.isPresent()) { + this.failureClassIds = JsonNullable.>of(new ArrayList<>()); + } + try { + this.failureClassIds.get().add(failureClassIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get failureClassIds + * @return failureClassIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getFailureClassIds() { + return failureClassIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FAILURE_CLASS_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getFailureClassIds_JsonNullable() { + return failureClassIds; + } + + @JsonProperty(JSON_PROPERTY_FAILURE_CLASS_IDS) + public void setFailureClassIds_JsonNullable(JsonNullable> failureClassIds) { + this.failureClassIds = failureClassIds; + } + + public void setFailureClassIds(@jakarta.annotation.Nullable List failureClassIds) { + this.failureClassIds = JsonNullable.>of(failureClassIds); + } + + + @Deprecated + public TestResultUpdateRequest outcome(@jakarta.annotation.Nullable TestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + return this; + } + + /** + * Get outcome + * @return outcome + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + + public TestResultOutcome getOutcome() { + return outcome.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getOutcome_JsonNullable() { + return outcome; + } + + @JsonProperty(JSON_PROPERTY_OUTCOME) + public void setOutcome_JsonNullable(JsonNullable outcome) { + this.outcome = outcome; + } + + @Deprecated + public void setOutcome(@jakarta.annotation.Nullable TestResultOutcome outcome) { + this.outcome = JsonNullable.of(outcome); + } + + + public TestResultUpdateRequest statusCode(@jakarta.annotation.Nullable String statusCode) { + this.statusCode = JsonNullable.of(statusCode); + return this; + } + + /** + * Get statusCode + * @return statusCode + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getStatusCode() { + return statusCode.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStatusCode_JsonNullable() { + return statusCode; + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + public void setStatusCode_JsonNullable(JsonNullable statusCode) { + this.statusCode = statusCode; + } + + public void setStatusCode(@jakarta.annotation.Nullable String statusCode) { + this.statusCode = JsonNullable.of(statusCode); + } + + + public TestResultUpdateRequest statusType(@jakarta.annotation.Nullable TestStatusType statusType) { + this.statusType = JsonNullable.of(statusType); + return this; + } + + /** + * Get statusType + * @return statusType + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public TestStatusType getStatusType() { + return statusType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStatusType_JsonNullable() { + return statusType; + } + + @JsonProperty(JSON_PROPERTY_STATUS_TYPE) + public void setStatusType_JsonNullable(JsonNullable statusType) { + this.statusType = statusType; + } + + public void setStatusType(@jakarta.annotation.Nullable TestStatusType statusType) { + this.statusType = JsonNullable.of(statusType); + } + + + public TestResultUpdateRequest comment(@jakarta.annotation.Nullable String comment) { + this.comment = JsonNullable.of(comment); + return this; + } + + /** + * Get comment + * @return comment + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getComment() { + return comment.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getComment_JsonNullable() { + return comment; + } + + @JsonProperty(JSON_PROPERTY_COMMENT) + public void setComment_JsonNullable(JsonNullable comment) { + this.comment = comment; + } + + public void setComment(@jakarta.annotation.Nullable String comment) { + this.comment = JsonNullable.of(comment); + } + + + public TestResultUpdateRequest links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public TestResultUpdateRequest addLinksItem(CreateLinkApiModel linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get links + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public TestResultUpdateRequest stepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + return this; + } + + public TestResultUpdateRequest addStepResultsItem(StepResultApiModel stepResultsItem) { + if (this.stepResults == null || !this.stepResults.isPresent()) { + this.stepResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.stepResults.get().add(stepResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get stepResults + * @return stepResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getStepResults() { + return stepResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStepResults_JsonNullable() { + return stepResults; + } + + @JsonProperty(JSON_PROPERTY_STEP_RESULTS) + public void setStepResults_JsonNullable(JsonNullable> stepResults) { + this.stepResults = stepResults; + } + + public void setStepResults(@jakarta.annotation.Nullable List stepResults) { + this.stepResults = JsonNullable.>of(stepResults); + } + + + public TestResultUpdateRequest attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + return this; + } + + public TestResultUpdateRequest addAttachmentsItem(AttachmentUpdateRequest attachmentsItem) { + if (this.attachments == null || !this.attachments.isPresent()) { + this.attachments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attachments.get().add(attachmentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get attachments + * @return attachments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttachments() { + return attachments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttachments_JsonNullable() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + public void setAttachments_JsonNullable(JsonNullable> attachments) { + this.attachments = attachments; + } + + public void setAttachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + } + + + @Deprecated + public TestResultUpdateRequest durationInMs(@jakarta.annotation.Nullable Long durationInMs) { + this.durationInMs = JsonNullable.of(durationInMs); + return this; + } + + /** + * Get durationInMs + * minimum: 0 + * maximum: 86400000 + * @return durationInMs + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + + public Long getDurationInMs() { + return durationInMs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION_IN_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDurationInMs_JsonNullable() { + return durationInMs; + } + + @JsonProperty(JSON_PROPERTY_DURATION_IN_MS) + public void setDurationInMs_JsonNullable(JsonNullable durationInMs) { + this.durationInMs = durationInMs; + } + + @Deprecated + public void setDurationInMs(@jakarta.annotation.Nullable Long durationInMs) { + this.durationInMs = JsonNullable.of(durationInMs); + } + + + public TestResultUpdateRequest duration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + return this; + } + + /** + * Get duration + * minimum: 0 + * maximum: 86400000 + * @return duration + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Long getDuration() { + return duration.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDuration_JsonNullable() { + return duration; + } + + @JsonProperty(JSON_PROPERTY_DURATION) + public void setDuration_JsonNullable(JsonNullable duration) { + this.duration = duration; + } + + public void setDuration(@jakarta.annotation.Nullable Long duration) { + this.duration = JsonNullable.of(duration); + } + + + public TestResultUpdateRequest stepComments(@jakarta.annotation.Nullable List stepComments) { + this.stepComments = JsonNullable.>of(stepComments); + return this; + } + + public TestResultUpdateRequest addStepCommentsItem(TestResultStepCommentUpdateRequest stepCommentsItem) { + if (this.stepComments == null || !this.stepComments.isPresent()) { + this.stepComments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.stepComments.get().add(stepCommentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get stepComments + * @return stepComments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getStepComments() { + return stepComments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STEP_COMMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStepComments_JsonNullable() { + return stepComments; + } + + @JsonProperty(JSON_PROPERTY_STEP_COMMENTS) + public void setStepComments_JsonNullable(JsonNullable> stepComments) { + this.stepComments = stepComments; + } + + public void setStepComments(@jakarta.annotation.Nullable List stepComments) { + this.stepComments = JsonNullable.>of(stepComments); + } + + + public TestResultUpdateRequest setupResults(@jakarta.annotation.Nullable List setupResults) { + this.setupResults = JsonNullable.>of(setupResults); + return this; + } + + public TestResultUpdateRequest addSetupResultsItem(AutoTestStepResultUpdateRequest setupResultsItem) { + if (this.setupResults == null || !this.setupResults.isPresent()) { + this.setupResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.setupResults.get().add(setupResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get setupResults + * @return setupResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getSetupResults() { + return setupResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SETUP_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSetupResults_JsonNullable() { + return setupResults; + } + + @JsonProperty(JSON_PROPERTY_SETUP_RESULTS) + public void setSetupResults_JsonNullable(JsonNullable> setupResults) { + this.setupResults = setupResults; + } + + public void setSetupResults(@jakarta.annotation.Nullable List setupResults) { + this.setupResults = JsonNullable.>of(setupResults); + } + + + public TestResultUpdateRequest teardownResults(@jakarta.annotation.Nullable List teardownResults) { + this.teardownResults = JsonNullable.>of(teardownResults); + return this; + } + + public TestResultUpdateRequest addTeardownResultsItem(AutoTestStepResultUpdateRequest teardownResultsItem) { + if (this.teardownResults == null || !this.teardownResults.isPresent()) { + this.teardownResults = JsonNullable.>of(new ArrayList<>()); + } + try { + this.teardownResults.get().add(teardownResultsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get teardownResults + * @return teardownResults + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTeardownResults() { + return teardownResults.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTeardownResults_JsonNullable() { + return teardownResults; + } + + @JsonProperty(JSON_PROPERTY_TEARDOWN_RESULTS) + public void setTeardownResults_JsonNullable(JsonNullable> teardownResults) { + this.teardownResults = teardownResults; + } + + public void setTeardownResults(@jakarta.annotation.Nullable List teardownResults) { + this.teardownResults = JsonNullable.>of(teardownResults); + } + + + public TestResultUpdateRequest message(@jakarta.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + return this; + } + + /** + * Get message + * @return message + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getMessage() { + return message.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getMessage_JsonNullable() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + public void setMessage_JsonNullable(JsonNullable message) { + this.message = message; + } + + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = JsonNullable.of(message); + } + + + public TestResultUpdateRequest trace(@jakarta.annotation.Nullable String trace) { + this.trace = JsonNullable.of(trace); + return this; + } + + /** + * Get trace + * @return trace + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTrace() { + return trace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TRACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTrace_JsonNullable() { + return trace; + } + + @JsonProperty(JSON_PROPERTY_TRACE) + public void setTrace_JsonNullable(JsonNullable trace) { + this.trace = trace; + } + + public void setTrace(@jakarta.annotation.Nullable String trace) { + this.trace = JsonNullable.of(trace); + } + + + /** + * Return true if this TestResultUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestResultUpdateRequest testResultUpdateRequest = (TestResultUpdateRequest) o; + return equalsNullable(this.failureClassIds, testResultUpdateRequest.failureClassIds) && + equalsNullable(this.outcome, testResultUpdateRequest.outcome) && + equalsNullable(this.statusCode, testResultUpdateRequest.statusCode) && + equalsNullable(this.statusType, testResultUpdateRequest.statusType) && + equalsNullable(this.comment, testResultUpdateRequest.comment) && + equalsNullable(this.links, testResultUpdateRequest.links) && + equalsNullable(this.stepResults, testResultUpdateRequest.stepResults) && + equalsNullable(this.attachments, testResultUpdateRequest.attachments) && + equalsNullable(this.durationInMs, testResultUpdateRequest.durationInMs) && + equalsNullable(this.duration, testResultUpdateRequest.duration) && + equalsNullable(this.stepComments, testResultUpdateRequest.stepComments) && + equalsNullable(this.setupResults, testResultUpdateRequest.setupResults) && + equalsNullable(this.teardownResults, testResultUpdateRequest.teardownResults) && + equalsNullable(this.message, testResultUpdateRequest.message) && + equalsNullable(this.trace, testResultUpdateRequest.trace); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(failureClassIds), hashCodeNullable(outcome), hashCodeNullable(statusCode), hashCodeNullable(statusType), hashCodeNullable(comment), hashCodeNullable(links), hashCodeNullable(stepResults), hashCodeNullable(attachments), hashCodeNullable(durationInMs), hashCodeNullable(duration), hashCodeNullable(stepComments), hashCodeNullable(setupResults), hashCodeNullable(teardownResults), hashCodeNullable(message), hashCodeNullable(trace)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestResultUpdateRequest {\n"); + sb.append(" failureClassIds: ").append(toIndentedString(failureClassIds)).append("\n"); + sb.append(" outcome: ").append(toIndentedString(outcome)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" statusType: ").append(toIndentedString(statusType)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" stepResults: ").append(toIndentedString(stepResults)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" durationInMs: ").append(toIndentedString(durationInMs)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" stepComments: ").append(toIndentedString(stepComments)).append("\n"); + sb.append(" setupResults: ").append(toIndentedString(setupResults)).append("\n"); + sb.append(" teardownResults: ").append(toIndentedString(teardownResults)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" trace: ").append(toIndentedString(trace)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultsFilterApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultsFilterApiModel.java new file mode 100644 index 0000000..d245985 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestResultsFilterApiModel.java @@ -0,0 +1,668 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.Int64RangeSelectorModel; +import ru.testit.adaptersapi.model.TestResultOutcome; +import ru.testit.adaptersapi.model.TestStatusApiType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * TestResultsFilterApiModel + */ +@JsonPropertyOrder({ + TestResultsFilterApiModel.JSON_PROPERTY_CONFIGURATION_IDS, + TestResultsFilterApiModel.JSON_PROPERTY_OUTCOMES, + TestResultsFilterApiModel.JSON_PROPERTY_STATUS_CODES, + TestResultsFilterApiModel.JSON_PROPERTY_STATUS_TYPES, + TestResultsFilterApiModel.JSON_PROPERTY_NAMESPACE, + TestResultsFilterApiModel.JSON_PROPERTY_CLASS_NAME, + TestResultsFilterApiModel.JSON_PROPERTY_AUTO_TEST_GLOBAL_IDS, + TestResultsFilterApiModel.JSON_PROPERTY_AUTO_TEST_TAGS, + TestResultsFilterApiModel.JSON_PROPERTY_EXCLUDE_AUTO_TEST_TAGS, + TestResultsFilterApiModel.JSON_PROPERTY_NAME, + TestResultsFilterApiModel.JSON_PROPERTY_DURATION, + TestResultsFilterApiModel.JSON_PROPERTY_TEST_RUN_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestResultsFilterApiModel { + public static final String JSON_PROPERTY_CONFIGURATION_IDS = "configurationIds"; + private JsonNullable> configurationIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OUTCOMES = "outcomes"; + @Deprecated + private JsonNullable> outcomes = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_STATUS_CODES = "statusCodes"; + private JsonNullable> statusCodes = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_STATUS_TYPES = "statusTypes"; + private JsonNullable> statusTypes = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + private JsonNullable namespace = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CLASS_NAME = "className"; + private JsonNullable className = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AUTO_TEST_GLOBAL_IDS = "autoTestGlobalIds"; + private JsonNullable> autoTestGlobalIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_AUTO_TEST_TAGS = "autoTestTags"; + private JsonNullable> autoTestTags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_EXCLUDE_AUTO_TEST_TAGS = "excludeAutoTestTags"; + private JsonNullable> excludeAutoTestTags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DURATION = "duration"; + private JsonNullable duration = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEST_RUN_IDS = "testRunIds"; + private JsonNullable> testRunIds = JsonNullable.>undefined(); + + public TestResultsFilterApiModel() { + } + + public TestResultsFilterApiModel configurationIds(@jakarta.annotation.Nullable List configurationIds) { + this.configurationIds = JsonNullable.>of(configurationIds); + return this; + } + + public TestResultsFilterApiModel addConfigurationIdsItem(UUID configurationIdsItem) { + if (this.configurationIds == null || !this.configurationIds.isPresent()) { + this.configurationIds = JsonNullable.>of(new ArrayList<>()); + } + try { + this.configurationIds.get().add(configurationIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies a test result configuration IDs to search for + * @return configurationIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getConfigurationIds() { + return configurationIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONFIGURATION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getConfigurationIds_JsonNullable() { + return configurationIds; + } + + @JsonProperty(JSON_PROPERTY_CONFIGURATION_IDS) + public void setConfigurationIds_JsonNullable(JsonNullable> configurationIds) { + this.configurationIds = configurationIds; + } + + public void setConfigurationIds(@jakarta.annotation.Nullable List configurationIds) { + this.configurationIds = JsonNullable.>of(configurationIds); + } + + + @Deprecated + public TestResultsFilterApiModel outcomes(@jakarta.annotation.Nullable List outcomes) { + this.outcomes = JsonNullable.>of(outcomes); + return this; + } + + public TestResultsFilterApiModel addOutcomesItem(TestResultOutcome outcomesItem) { + if (this.outcomes == null || !this.outcomes.isPresent()) { + this.outcomes = JsonNullable.>of(new ArrayList<>()); + } + try { + this.outcomes.get().add(outcomesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies a test result outcomes to search for + * @return outcomes + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonIgnore + + public List getOutcomes() { + return outcomes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OUTCOMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getOutcomes_JsonNullable() { + return outcomes; + } + + @JsonProperty(JSON_PROPERTY_OUTCOMES) + public void setOutcomes_JsonNullable(JsonNullable> outcomes) { + this.outcomes = outcomes; + } + + @Deprecated + public void setOutcomes(@jakarta.annotation.Nullable List outcomes) { + this.outcomes = JsonNullable.>of(outcomes); + } + + + public TestResultsFilterApiModel statusCodes(@jakarta.annotation.Nullable List statusCodes) { + this.statusCodes = JsonNullable.>of(statusCodes); + return this; + } + + public TestResultsFilterApiModel addStatusCodesItem(String statusCodesItem) { + if (this.statusCodes == null || !this.statusCodes.isPresent()) { + this.statusCodes = JsonNullable.>of(new ArrayList<>()); + } + try { + this.statusCodes.get().add(statusCodesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies a test result status codes to search for + * @return statusCodes + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getStatusCodes() { + return statusCodes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStatusCodes_JsonNullable() { + return statusCodes; + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODES) + public void setStatusCodes_JsonNullable(JsonNullable> statusCodes) { + this.statusCodes = statusCodes; + } + + public void setStatusCodes(@jakarta.annotation.Nullable List statusCodes) { + this.statusCodes = JsonNullable.>of(statusCodes); + } + + + public TestResultsFilterApiModel statusTypes(@jakarta.annotation.Nullable List statusTypes) { + this.statusTypes = JsonNullable.>of(statusTypes); + return this; + } + + public TestResultsFilterApiModel addStatusTypesItem(TestStatusApiType statusTypesItem) { + if (this.statusTypes == null || !this.statusTypes.isPresent()) { + this.statusTypes = JsonNullable.>of(new ArrayList<>()); + } + try { + this.statusTypes.get().add(statusTypesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies a test result status types to search for + * @return statusTypes + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getStatusTypes() { + return statusTypes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStatusTypes_JsonNullable() { + return statusTypes; + } + + @JsonProperty(JSON_PROPERTY_STATUS_TYPES) + public void setStatusTypes_JsonNullable(JsonNullable> statusTypes) { + this.statusTypes = statusTypes; + } + + public void setStatusTypes(@jakarta.annotation.Nullable List statusTypes) { + this.statusTypes = JsonNullable.>of(statusTypes); + } + + + public TestResultsFilterApiModel namespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + return this; + } + + /** + * Specifies a test result namespace to search for + * @return namespace + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getNamespace() { + return namespace.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNamespace_JsonNullable() { + return namespace; + } + + @JsonProperty(JSON_PROPERTY_NAMESPACE) + public void setNamespace_JsonNullable(JsonNullable namespace) { + this.namespace = namespace; + } + + public void setNamespace(@jakarta.annotation.Nullable String namespace) { + this.namespace = JsonNullable.of(namespace); + } + + + public TestResultsFilterApiModel className(@jakarta.annotation.Nullable String className) { + this.className = JsonNullable.of(className); + return this; + } + + /** + * Specifies a test result class name to search for + * @return className + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getClassName() { + return className.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getClassName_JsonNullable() { + return className; + } + + @JsonProperty(JSON_PROPERTY_CLASS_NAME) + public void setClassName_JsonNullable(JsonNullable className) { + this.className = className; + } + + public void setClassName(@jakarta.annotation.Nullable String className) { + this.className = JsonNullable.of(className); + } + + + public TestResultsFilterApiModel autoTestGlobalIds(@jakarta.annotation.Nullable List autoTestGlobalIds) { + this.autoTestGlobalIds = JsonNullable.>of(autoTestGlobalIds); + return this; + } + + public TestResultsFilterApiModel addAutoTestGlobalIdsItem(Long autoTestGlobalIdsItem) { + if (this.autoTestGlobalIds == null || !this.autoTestGlobalIds.isPresent()) { + this.autoTestGlobalIds = JsonNullable.>of(new ArrayList<>()); + } + try { + this.autoTestGlobalIds.get().add(autoTestGlobalIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies an autotest global IDs to search results for + * @return autoTestGlobalIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAutoTestGlobalIds() { + return autoTestGlobalIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_GLOBAL_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAutoTestGlobalIds_JsonNullable() { + return autoTestGlobalIds; + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_GLOBAL_IDS) + public void setAutoTestGlobalIds_JsonNullable(JsonNullable> autoTestGlobalIds) { + this.autoTestGlobalIds = autoTestGlobalIds; + } + + public void setAutoTestGlobalIds(@jakarta.annotation.Nullable List autoTestGlobalIds) { + this.autoTestGlobalIds = JsonNullable.>of(autoTestGlobalIds); + } + + + public TestResultsFilterApiModel autoTestTags(@jakarta.annotation.Nullable List autoTestTags) { + this.autoTestTags = JsonNullable.>of(autoTestTags); + return this; + } + + public TestResultsFilterApiModel addAutoTestTagsItem(String autoTestTagsItem) { + if (this.autoTestTags == null || !this.autoTestTags.isPresent()) { + this.autoTestTags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.autoTestTags.get().add(autoTestTagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies autotest tags to include in the search. + * @return autoTestTags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAutoTestTags() { + return autoTestTags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAutoTestTags_JsonNullable() { + return autoTestTags; + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_TAGS) + public void setAutoTestTags_JsonNullable(JsonNullable> autoTestTags) { + this.autoTestTags = autoTestTags; + } + + public void setAutoTestTags(@jakarta.annotation.Nullable List autoTestTags) { + this.autoTestTags = JsonNullable.>of(autoTestTags); + } + + + public TestResultsFilterApiModel excludeAutoTestTags(@jakarta.annotation.Nullable List excludeAutoTestTags) { + this.excludeAutoTestTags = JsonNullable.>of(excludeAutoTestTags); + return this; + } + + public TestResultsFilterApiModel addExcludeAutoTestTagsItem(String excludeAutoTestTagsItem) { + if (this.excludeAutoTestTags == null || !this.excludeAutoTestTags.isPresent()) { + this.excludeAutoTestTags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.excludeAutoTestTags.get().add(excludeAutoTestTagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies autotest tags to exclude from the search. + * @return excludeAutoTestTags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getExcludeAutoTestTags() { + return excludeAutoTestTags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE_AUTO_TEST_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getExcludeAutoTestTags_JsonNullable() { + return excludeAutoTestTags; + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE_AUTO_TEST_TAGS) + public void setExcludeAutoTestTags_JsonNullable(JsonNullable> excludeAutoTestTags) { + this.excludeAutoTestTags = excludeAutoTestTags; + } + + public void setExcludeAutoTestTags(@jakarta.annotation.Nullable List excludeAutoTestTags) { + this.excludeAutoTestTags = JsonNullable.>of(excludeAutoTestTags); + } + + + public TestResultsFilterApiModel name(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Specifies an autotest name to search results for + * @return name + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public TestResultsFilterApiModel duration(@jakarta.annotation.Nullable Int64RangeSelectorModel duration) { + this.duration = JsonNullable.of(duration); + return this; + } + + /** + * Specifies a test result duration range to search for + * @return duration + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Int64RangeSelectorModel getDuration() { + return duration.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDuration_JsonNullable() { + return duration; + } + + @JsonProperty(JSON_PROPERTY_DURATION) + public void setDuration_JsonNullable(JsonNullable duration) { + this.duration = duration; + } + + public void setDuration(@jakarta.annotation.Nullable Int64RangeSelectorModel duration) { + this.duration = JsonNullable.of(duration); + } + + + public TestResultsFilterApiModel testRunIds(@jakarta.annotation.Nullable List testRunIds) { + this.testRunIds = JsonNullable.>of(testRunIds); + return this; + } + + public TestResultsFilterApiModel addTestRunIdsItem(UUID testRunIdsItem) { + if (this.testRunIds == null || !this.testRunIds.isPresent()) { + this.testRunIds = JsonNullable.>of(new ArrayList<>()); + } + try { + this.testRunIds.get().add(testRunIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies a test result test run IDs to search for + * @return testRunIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTestRunIds() { + return testRunIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEST_RUN_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTestRunIds_JsonNullable() { + return testRunIds; + } + + @JsonProperty(JSON_PROPERTY_TEST_RUN_IDS) + public void setTestRunIds_JsonNullable(JsonNullable> testRunIds) { + this.testRunIds = testRunIds; + } + + public void setTestRunIds(@jakarta.annotation.Nullable List testRunIds) { + this.testRunIds = JsonNullable.>of(testRunIds); + } + + + /** + * Return true if this TestResultsFilterApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestResultsFilterApiModel testResultsFilterApiModel = (TestResultsFilterApiModel) o; + return equalsNullable(this.configurationIds, testResultsFilterApiModel.configurationIds) && + equalsNullable(this.outcomes, testResultsFilterApiModel.outcomes) && + equalsNullable(this.statusCodes, testResultsFilterApiModel.statusCodes) && + equalsNullable(this.statusTypes, testResultsFilterApiModel.statusTypes) && + equalsNullable(this.namespace, testResultsFilterApiModel.namespace) && + equalsNullable(this.className, testResultsFilterApiModel.className) && + equalsNullable(this.autoTestGlobalIds, testResultsFilterApiModel.autoTestGlobalIds) && + equalsNullable(this.autoTestTags, testResultsFilterApiModel.autoTestTags) && + equalsNullable(this.excludeAutoTestTags, testResultsFilterApiModel.excludeAutoTestTags) && + equalsNullable(this.name, testResultsFilterApiModel.name) && + equalsNullable(this.duration, testResultsFilterApiModel.duration) && + equalsNullable(this.testRunIds, testResultsFilterApiModel.testRunIds); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(configurationIds), hashCodeNullable(outcomes), hashCodeNullable(statusCodes), hashCodeNullable(statusTypes), hashCodeNullable(namespace), hashCodeNullable(className), hashCodeNullable(autoTestGlobalIds), hashCodeNullable(autoTestTags), hashCodeNullable(excludeAutoTestTags), hashCodeNullable(name), hashCodeNullable(duration), hashCodeNullable(testRunIds)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestResultsFilterApiModel {\n"); + sb.append(" configurationIds: ").append(toIndentedString(configurationIds)).append("\n"); + sb.append(" outcomes: ").append(toIndentedString(outcomes)).append("\n"); + sb.append(" statusCodes: ").append(toIndentedString(statusCodes)).append("\n"); + sb.append(" statusTypes: ").append(toIndentedString(statusTypes)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" autoTestGlobalIds: ").append(toIndentedString(autoTestGlobalIds)).append("\n"); + sb.append(" autoTestTags: ").append(toIndentedString(autoTestTags)).append("\n"); + sb.append(" excludeAutoTestTags: ").append(toIndentedString(excludeAutoTestTags)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" testRunIds: ").append(toIndentedString(testRunIds)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestRunApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestRunApiResult.java new file mode 100644 index 0000000..b87aa46 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestRunApiResult.java @@ -0,0 +1,338 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import ru.testit.adaptersapi.model.AttachmentApiResult; +import ru.testit.adaptersapi.model.LinkApiResult; +import ru.testit.adaptersapi.model.TestRunState; +import ru.testit.adaptersapi.model.TestStatusApiResult; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * TestRunApiResult + */ +@JsonPropertyOrder({ + TestRunApiResult.JSON_PROPERTY_ID, + TestRunApiResult.JSON_PROPERTY_NAME, + TestRunApiResult.JSON_PROPERTY_STATE_NAME, + TestRunApiResult.JSON_PROPERTY_STATUS, + TestRunApiResult.JSON_PROPERTY_ATTACHMENTS, + TestRunApiResult.JSON_PROPERTY_LINKS, + TestRunApiResult.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestRunApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_STATE_NAME = "stateName"; + @Deprecated + @jakarta.annotation.Nonnull + private TestRunState stateName; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull + private TestStatusApiResult status; + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nonnull + private List attachments = new ArrayList<>(); + + public static final String JSON_PROPERTY_LINKS = "links"; + @jakarta.annotation.Nonnull + private List links = new ArrayList<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + @jakarta.annotation.Nonnull + private List tags = new ArrayList<>(); + + public TestRunApiResult() { + } + + public TestRunApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Test run unique identifier + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public TestRunApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Test run name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + @Deprecated + public TestRunApiResult stateName(@jakarta.annotation.Nonnull TestRunState stateName) { + this.stateName = stateName; + return this; + } + + /** + * Test run state + * @return stateName + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TestRunState getStateName() { + return stateName; + } + + + @Deprecated + @JsonProperty(JSON_PROPERTY_STATE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStateName(@jakarta.annotation.Nonnull TestRunState stateName) { + this.stateName = stateName; + } + + + public TestRunApiResult status(@jakarta.annotation.Nonnull TestStatusApiResult status) { + this.status = status; + return this; + } + + /** + * Test run status + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TestStatusApiResult getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull TestStatusApiResult status) { + this.status = status; + } + + + public TestRunApiResult attachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + return this; + } + + public TestRunApiResult addAttachmentsItem(AttachmentApiResult attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * Collection of attachments related to the test run + * @return attachments + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getAttachments() { + return attachments; + } + + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + } + + + public TestRunApiResult links(@jakarta.annotation.Nonnull List links) { + this.links = links; + return this; + } + + public TestRunApiResult addLinksItem(LinkApiResult linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Collection of links related to the test run + * @return links + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getLinks() { + return links; + } + + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLinks(@jakarta.annotation.Nonnull List links) { + this.links = links; + } + + + public TestRunApiResult tags(@jakarta.annotation.Nonnull List tags) { + this.tags = tags; + return this; + } + + public TestRunApiResult addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Collection of tags associated with the test run + * @return tags + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTags(@jakarta.annotation.Nonnull List tags) { + this.tags = tags; + } + + + /** + * Return true if this TestRunApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestRunApiResult testRunApiResult = (TestRunApiResult) o; + return Objects.equals(this.id, testRunApiResult.id) && + Objects.equals(this.name, testRunApiResult.name) && + Objects.equals(this.stateName, testRunApiResult.stateName) && + Objects.equals(this.status, testRunApiResult.status) && + Objects.equals(this.attachments, testRunApiResult.attachments) && + Objects.equals(this.links, testRunApiResult.links) && + Objects.equals(this.tags, testRunApiResult.tags); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, stateName, status, attachments, links, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestRunApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" stateName: ").append(toIndentedString(stateName)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestRunState.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestRunState.java new file mode 100644 index 0000000..60133c0 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestRunState.java @@ -0,0 +1,67 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets TestRunState + */ +public enum TestRunState { + + NOT_STARTED("NotStarted"), + + IN_PROGRESS("InProgress"), + + STOPPED("Stopped"), + + COMPLETED("Completed"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + TestRunState(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TestRunState fromValue(String value) { + for (TestRunState b : TestRunState.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusApiResult.java new file mode 100644 index 0000000..3e84e70 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusApiResult.java @@ -0,0 +1,176 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import ru.testit.adaptersapi.model.TestStatusApiType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * TestStatusApiResult + */ +@JsonPropertyOrder({ + TestStatusApiResult.JSON_PROPERTY_ID, + TestStatusApiResult.JSON_PROPERTY_TYPE, + TestStatusApiResult.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestStatusApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private TestStatusApiType type; + + public static final String JSON_PROPERTY_CODE = "code"; + @jakarta.annotation.Nonnull + private String code; + + public TestStatusApiResult() { + } + + public TestStatusApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public TestStatusApiResult type(@jakarta.annotation.Nonnull TestStatusApiType type) { + this.type = type; + return this; + } + + /** + * Collection of possible status types + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TestStatusApiType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TestStatusApiType type) { + this.type = type; + } + + + public TestStatusApiResult code(@jakarta.annotation.Nonnull String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(@jakarta.annotation.Nonnull String code) { + this.code = code; + } + + + /** + * Return true if this TestStatusApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestStatusApiResult testStatusApiResult = (TestStatusApiResult) o; + return Objects.equals(this.id, testStatusApiResult.id) && + Objects.equals(this.type, testStatusApiResult.type) && + Objects.equals(this.code, testStatusApiResult.code); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestStatusApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusApiType.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusApiType.java new file mode 100644 index 0000000..f5217f1 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusApiType.java @@ -0,0 +1,69 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Collection of possible status types + */ +public enum TestStatusApiType { + + PENDING("Pending"), + + IN_PROGRESS("InProgress"), + + SUCCEEDED("Succeeded"), + + FAILED("Failed"), + + INCOMPLETE("Incomplete"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + TestStatusApiType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TestStatusApiType fromValue(String value) { + for (TestStatusApiType b : TestStatusApiType.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusModel.java new file mode 100644 index 0000000..427b9f8 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusModel.java @@ -0,0 +1,294 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.TestStatusType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * TestStatusModel + */ +@JsonPropertyOrder({ + TestStatusModel.JSON_PROPERTY_ID, + TestStatusModel.JSON_PROPERTY_NAME, + TestStatusModel.JSON_PROPERTY_TYPE, + TestStatusModel.JSON_PROPERTY_IS_SYSTEM, + TestStatusModel.JSON_PROPERTY_CODE, + TestStatusModel.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class TestStatusModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private TestStatusType type; + + public static final String JSON_PROPERTY_IS_SYSTEM = "isSystem"; + @jakarta.annotation.Nonnull + private Boolean isSystem; + + public static final String JSON_PROPERTY_CODE = "code"; + @jakarta.annotation.Nonnull + private String code; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public TestStatusModel() { + } + + public TestStatusModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public TestStatusModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public TestStatusModel type(@jakarta.annotation.Nonnull TestStatusType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TestStatusType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TestStatusType type) { + this.type = type; + } + + + public TestStatusModel isSystem(@jakarta.annotation.Nonnull Boolean isSystem) { + this.isSystem = isSystem; + return this; + } + + /** + * Get isSystem + * @return isSystem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsSystem() { + return isSystem; + } + + + @JsonProperty(JSON_PROPERTY_IS_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsSystem(@jakarta.annotation.Nonnull Boolean isSystem) { + this.isSystem = isSystem; + } + + + public TestStatusModel code(@jakarta.annotation.Nonnull String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(@jakarta.annotation.Nonnull String code) { + this.code = code; + } + + + public TestStatusModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Get description + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this TestStatusModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestStatusModel testStatusModel = (TestStatusModel) o; + return Objects.equals(this.id, testStatusModel.id) && + Objects.equals(this.name, testStatusModel.name) && + Objects.equals(this.type, testStatusModel.type) && + Objects.equals(this.isSystem, testStatusModel.isSystem) && + Objects.equals(this.code, testStatusModel.code) && + equalsNullable(this.description, testStatusModel.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, type, isSystem, code, hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestStatusModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" isSystem: ").append(toIndentedString(isSystem)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusType.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusType.java new file mode 100644 index 0000000..f365cdb --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/TestStatusType.java @@ -0,0 +1,69 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets TestStatusType + */ +public enum TestStatusType { + + FAILED("Failed"), + + IN_PROGRESS("InProgress"), + + INCOMPLETE("Incomplete"), + + SUCCEEDED("Succeeded"), + + PENDING("Pending"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + TestStatusType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TestStatusType fromValue(String value) { + for (TestStatusType b : TestStatusType.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/UpdateEmptyTestRunApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/UpdateEmptyTestRunApiModel.java new file mode 100644 index 0000000..2e7993e --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/UpdateEmptyTestRunApiModel.java @@ -0,0 +1,393 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AssignAttachmentApiModel; +import ru.testit.adaptersapi.model.UpdateLinkApiModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * UpdateEmptyTestRunApiModel + */ +@JsonPropertyOrder({ + UpdateEmptyTestRunApiModel.JSON_PROPERTY_ID, + UpdateEmptyTestRunApiModel.JSON_PROPERTY_NAME, + UpdateEmptyTestRunApiModel.JSON_PROPERTY_DESCRIPTION, + UpdateEmptyTestRunApiModel.JSON_PROPERTY_LAUNCH_SOURCE, + UpdateEmptyTestRunApiModel.JSON_PROPERTY_ATTACHMENTS, + UpdateEmptyTestRunApiModel.JSON_PROPERTY_LINKS, + UpdateEmptyTestRunApiModel.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class UpdateEmptyTestRunApiModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LAUNCH_SOURCE = "launchSource"; + private JsonNullable launchSource = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private JsonNullable> attachments = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_LINKS = "links"; + private JsonNullable> links = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public UpdateEmptyTestRunApiModel() { + } + + public UpdateEmptyTestRunApiModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Test run unique identifier + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public UpdateEmptyTestRunApiModel name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Test run name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public UpdateEmptyTestRunApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Test run description + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + public UpdateEmptyTestRunApiModel launchSource(@jakarta.annotation.Nullable String launchSource) { + this.launchSource = JsonNullable.of(launchSource); + return this; + } + + /** + * Test run launch source Once launch source is specified it cannot be updated + * @return launchSource + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getLaunchSource() { + return launchSource.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAUNCH_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getLaunchSource_JsonNullable() { + return launchSource; + } + + @JsonProperty(JSON_PROPERTY_LAUNCH_SOURCE) + public void setLaunchSource_JsonNullable(JsonNullable launchSource) { + this.launchSource = launchSource; + } + + public void setLaunchSource(@jakarta.annotation.Nullable String launchSource) { + this.launchSource = JsonNullable.of(launchSource); + } + + + public UpdateEmptyTestRunApiModel attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + return this; + } + + public UpdateEmptyTestRunApiModel addAttachmentsItem(AssignAttachmentApiModel attachmentsItem) { + if (this.attachments == null || !this.attachments.isPresent()) { + this.attachments = JsonNullable.>of(new ArrayList<>()); + } + try { + this.attachments.get().add(attachmentsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of attachments related to the test run + * @return attachments + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getAttachments() { + return attachments.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttachments_JsonNullable() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + public void setAttachments_JsonNullable(JsonNullable> attachments) { + this.attachments = attachments; + } + + public void setAttachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = JsonNullable.>of(attachments); + } + + + public UpdateEmptyTestRunApiModel links(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + return this; + } + + public UpdateEmptyTestRunApiModel addLinksItem(UpdateLinkApiModel linksItem) { + if (this.links == null || !this.links.isPresent()) { + this.links = JsonNullable.>of(new ArrayList<>()); + } + try { + this.links.get().add(linksItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of links related to the test run + * @return links + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getLinks() { + return links.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getLinks_JsonNullable() { + return links; + } + + @JsonProperty(JSON_PROPERTY_LINKS) + public void setLinks_JsonNullable(JsonNullable> links) { + this.links = links; + } + + public void setLinks(@jakarta.annotation.Nullable List links) { + this.links = JsonNullable.>of(links); + } + + + public UpdateEmptyTestRunApiModel tags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public UpdateEmptyTestRunApiModel addTagsItem(String tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.tags.get().add(tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of tags to assign to the test run + * @return tags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(@jakarta.annotation.Nullable List tags) { + this.tags = JsonNullable.>of(tags); + } + + + /** + * Return true if this UpdateEmptyTestRunApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateEmptyTestRunApiModel updateEmptyTestRunApiModel = (UpdateEmptyTestRunApiModel) o; + return Objects.equals(this.id, updateEmptyTestRunApiModel.id) && + Objects.equals(this.name, updateEmptyTestRunApiModel.name) && + equalsNullable(this.description, updateEmptyTestRunApiModel.description) && + equalsNullable(this.launchSource, updateEmptyTestRunApiModel.launchSource) && + equalsNullable(this.attachments, updateEmptyTestRunApiModel.attachments) && + equalsNullable(this.links, updateEmptyTestRunApiModel.links) && + equalsNullable(this.tags, updateEmptyTestRunApiModel.tags); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, hashCodeNullable(description), hashCodeNullable(launchSource), hashCodeNullable(attachments), hashCodeNullable(links), hashCodeNullable(tags)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateEmptyTestRunApiModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" launchSource: ").append(toIndentedString(launchSource)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/UpdateLinkApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/UpdateLinkApiModel.java new file mode 100644 index 0000000..093f865 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/UpdateLinkApiModel.java @@ -0,0 +1,276 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.LinkType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * UpdateLinkApiModel + */ +@JsonPropertyOrder({ + UpdateLinkApiModel.JSON_PROPERTY_URL, + UpdateLinkApiModel.JSON_PROPERTY_TYPE, + UpdateLinkApiModel.JSON_PROPERTY_ID, + UpdateLinkApiModel.JSON_PROPERTY_TITLE, + UpdateLinkApiModel.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class UpdateLinkApiModel { + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull + private String url; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private LinkType type; + + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public UpdateLinkApiModel() { + } + + public UpdateLinkApiModel url(@jakarta.annotation.Nonnull String url) { + this.url = url; + return this; + } + + /** + * Address can be specified without protocol, but necessarily with the domain. + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUrl() { + return url; + } + + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull String url) { + this.url = url; + } + + + public UpdateLinkApiModel type(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + return this; + } + + /** + * Specifies the type of the link. + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public LinkType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull LinkType type) { + this.type = type; + } + + + public UpdateLinkApiModel id(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Link unique identifier + * @return id + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public UUID getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(@jakarta.annotation.Nullable UUID id) { + this.id = JsonNullable.of(id); + } + + + public UpdateLinkApiModel title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Link name. + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public UpdateLinkApiModel description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Link description. + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this UpdateLinkApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateLinkApiModel updateLinkApiModel = (UpdateLinkApiModel) o; + return Objects.equals(this.url, updateLinkApiModel.url) && + Objects.equals(this.type, updateLinkApiModel.type) && + equalsNullable(this.id, updateLinkApiModel.id) && + equalsNullable(this.title, updateLinkApiModel.title) && + equalsNullable(this.description, updateLinkApiModel.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(url, type, hashCodeNullable(id), hashCodeNullable(title), hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateLinkApiModel {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ValidationProblemDetails.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ValidationProblemDetails.java new file mode 100644 index 0000000..b4b6425 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/ValidationProblemDetails.java @@ -0,0 +1,374 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * ValidationProblemDetails + */ +@JsonPropertyOrder({ + ValidationProblemDetails.JSON_PROPERTY_ERRORS, + ValidationProblemDetails.JSON_PROPERTY_TYPE, + ValidationProblemDetails.JSON_PROPERTY_TITLE, + ValidationProblemDetails.JSON_PROPERTY_STATUS, + ValidationProblemDetails.JSON_PROPERTY_DETAIL, + ValidationProblemDetails.JSON_PROPERTY_INSTANCE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class ValidationProblemDetails { + public static final String JSON_PROPERTY_ERRORS = "errors"; + @jakarta.annotation.Nonnull + private Map> errors = new HashMap<>(); + + public static final String JSON_PROPERTY_TYPE = "type"; + private JsonNullable type = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TITLE = "title"; + private JsonNullable title = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private JsonNullable status = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private JsonNullable detail = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INSTANCE = "instance"; + private JsonNullable instance = JsonNullable.undefined(); + + public ValidationProblemDetails() { + } + + public ValidationProblemDetails errors(@jakarta.annotation.Nonnull Map> errors) { + this.errors = errors; + return this; + } + + public ValidationProblemDetails putErrorsItem(String key, List errorsItem) { + if (this.errors == null) { + this.errors = new HashMap<>(); + } + this.errors.put(key, errorsItem); + return this; + } + + /** + * Get errors + * @return errors + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Map> getErrors() { + return errors; + } + + + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrors(@jakarta.annotation.Nonnull Map> errors) { + this.errors = errors; + } + + + public ValidationProblemDetails type(@jakarta.annotation.Nullable String type) { + this.type = JsonNullable.of(type); + return this; + } + + /** + * Get type + * @return type + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getType() { + return type.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getType_JsonNullable() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + public void setType_JsonNullable(JsonNullable type) { + this.type = type; + } + + public void setType(@jakarta.annotation.Nullable String type) { + this.type = JsonNullable.of(type); + } + + + public ValidationProblemDetails title(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + return this; + } + + /** + * Get title + * @return title + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getTitle() { + return title.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getTitle_JsonNullable() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + public void setTitle_JsonNullable(JsonNullable title) { + this.title = title; + } + + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = JsonNullable.of(title); + } + + + public ValidationProblemDetails status(@jakarta.annotation.Nullable Integer status) { + this.status = JsonNullable.of(status); + return this; + } + + /** + * Get status + * @return status + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Integer getStatus() { + return status.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStatus_JsonNullable() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + public void setStatus_JsonNullable(JsonNullable status) { + this.status = status; + } + + public void setStatus(@jakarta.annotation.Nullable Integer status) { + this.status = JsonNullable.of(status); + } + + + public ValidationProblemDetails detail(@jakarta.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + return this; + } + + /** + * Get detail + * @return detail + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDetail() { + return detail.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDetail_JsonNullable() { + return detail; + } + + @JsonProperty(JSON_PROPERTY_DETAIL) + public void setDetail_JsonNullable(JsonNullable detail) { + this.detail = detail; + } + + public void setDetail(@jakarta.annotation.Nullable String detail) { + this.detail = JsonNullable.of(detail); + } + + + public ValidationProblemDetails instance(@jakarta.annotation.Nullable String instance) { + this.instance = JsonNullable.of(instance); + return this; + } + + /** + * Get instance + * @return instance + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getInstance() { + return instance.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INSTANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getInstance_JsonNullable() { + return instance; + } + + @JsonProperty(JSON_PROPERTY_INSTANCE) + public void setInstance_JsonNullable(JsonNullable instance) { + this.instance = instance; + } + + public void setInstance(@jakarta.annotation.Nullable String instance) { + this.instance = JsonNullable.of(instance); + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public ValidationProblemDetails putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap<>(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ValidationProblemDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidationProblemDetails validationProblemDetails = (ValidationProblemDetails) o; + return Objects.equals(this.errors, validationProblemDetails.errors) && + equalsNullable(this.type, validationProblemDetails.type) && + equalsNullable(this.title, validationProblemDetails.title) && + equalsNullable(this.status, validationProblemDetails.status) && + equalsNullable(this.detail, validationProblemDetails.detail) && + equalsNullable(this.instance, validationProblemDetails.instance)&& + Objects.equals(this.additionalProperties, validationProblemDetails.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(errors, hashCodeNullable(type), hashCodeNullable(title), hashCodeNullable(status), hashCodeNullable(detail), hashCodeNullable(instance), additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidationProblemDetails {\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemApiResult.java new file mode 100644 index 0000000..158f23f --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemApiResult.java @@ -0,0 +1,979 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.AttachmentModel; +import ru.testit.adaptersapi.model.AutoTestModel; +import ru.testit.adaptersapi.model.IterationModel; +import ru.testit.adaptersapi.model.LinkModel; +import ru.testit.adaptersapi.model.StepModel; +import ru.testit.adaptersapi.model.TagModel; +import ru.testit.adaptersapi.model.WorkItemEntityTypeApiModel; +import ru.testit.adaptersapi.model.WorkItemParameterKeyApiResult; +import ru.testit.adaptersapi.model.WorkItemPriorityApiModel; +import ru.testit.adaptersapi.model.WorkItemStateApiModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * WorkItemApiResult + */ +@JsonPropertyOrder({ + WorkItemApiResult.JSON_PROPERTY_ID, + WorkItemApiResult.JSON_PROPERTY_GLOBAL_ID, + WorkItemApiResult.JSON_PROPERTY_PROJECT_ID, + WorkItemApiResult.JSON_PROPERTY_SECTION_ID, + WorkItemApiResult.JSON_PROPERTY_NAME, + WorkItemApiResult.JSON_PROPERTY_ENTITY_TYPE_NAME, + WorkItemApiResult.JSON_PROPERTY_DURATION, + WorkItemApiResult.JSON_PROPERTY_STATE, + WorkItemApiResult.JSON_PROPERTY_PRIORITY, + WorkItemApiResult.JSON_PROPERTY_IS_AUTOMATED, + WorkItemApiResult.JSON_PROPERTY_ATTRIBUTES, + WorkItemApiResult.JSON_PROPERTY_TAGS, + WorkItemApiResult.JSON_PROPERTY_SECTION_PRECONDITION_STEPS, + WorkItemApiResult.JSON_PROPERTY_SECTION_POSTCONDITION_STEPS, + WorkItemApiResult.JSON_PROPERTY_PRECONDITION_STEPS, + WorkItemApiResult.JSON_PROPERTY_STEPS, + WorkItemApiResult.JSON_PROPERTY_POSTCONDITION_STEPS, + WorkItemApiResult.JSON_PROPERTY_ITERATIONS, + WorkItemApiResult.JSON_PROPERTY_AUTO_TESTS, + WorkItemApiResult.JSON_PROPERTY_ATTACHMENTS, + WorkItemApiResult.JSON_PROPERTY_LINKS, + WorkItemApiResult.JSON_PROPERTY_PARAMETERS, + WorkItemApiResult.JSON_PROPERTY_IS_DELETED, + WorkItemApiResult.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkItemApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_SECTION_ID = "sectionId"; + @jakarta.annotation.Nonnull + private UUID sectionId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ENTITY_TYPE_NAME = "entityTypeName"; + @jakarta.annotation.Nonnull + private WorkItemEntityTypeApiModel entityTypeName; + + public static final String JSON_PROPERTY_DURATION = "duration"; + @jakarta.annotation.Nonnull + private Integer duration; + + public static final String JSON_PROPERTY_STATE = "state"; + @jakarta.annotation.Nonnull + private WorkItemStateApiModel state; + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + @jakarta.annotation.Nonnull + private WorkItemPriorityApiModel priority; + + public static final String JSON_PROPERTY_IS_AUTOMATED = "isAutomated"; + @jakarta.annotation.Nonnull + private Boolean isAutomated; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + @jakarta.annotation.Nonnull + private Map attributes = new HashMap<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + @jakarta.annotation.Nonnull + private List tags = new ArrayList<>(); + + public static final String JSON_PROPERTY_SECTION_PRECONDITION_STEPS = "sectionPreconditionSteps"; + @jakarta.annotation.Nonnull + private List sectionPreconditionSteps = new ArrayList<>(); + + public static final String JSON_PROPERTY_SECTION_POSTCONDITION_STEPS = "sectionPostconditionSteps"; + @jakarta.annotation.Nonnull + private List sectionPostconditionSteps = new ArrayList<>(); + + public static final String JSON_PROPERTY_PRECONDITION_STEPS = "preconditionSteps"; + @jakarta.annotation.Nonnull + private List preconditionSteps = new ArrayList<>(); + + public static final String JSON_PROPERTY_STEPS = "steps"; + @jakarta.annotation.Nonnull + private List steps = new ArrayList<>(); + + public static final String JSON_PROPERTY_POSTCONDITION_STEPS = "postconditionSteps"; + @jakarta.annotation.Nonnull + private List postconditionSteps = new ArrayList<>(); + + public static final String JSON_PROPERTY_ITERATIONS = "iterations"; + @jakarta.annotation.Nonnull + private List iterations = new ArrayList<>(); + + public static final String JSON_PROPERTY_AUTO_TESTS = "autoTests"; + @jakarta.annotation.Nonnull + private List autoTests = new ArrayList<>(); + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nonnull + private List attachments = new ArrayList<>(); + + public static final String JSON_PROPERTY_LINKS = "links"; + @jakarta.annotation.Nonnull + private List links = new ArrayList<>(); + + public static final String JSON_PROPERTY_PARAMETERS = "parameters"; + @jakarta.annotation.Nonnull + private List parameters = new ArrayList<>(); + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public WorkItemApiResult() { + } + + public WorkItemApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the work item + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public WorkItemApiResult globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Global identifier of the work item + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + public WorkItemApiResult projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Unique identifier of the project + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public WorkItemApiResult sectionId(@jakarta.annotation.Nonnull UUID sectionId) { + this.sectionId = sectionId; + return this; + } + + /** + * Unique identifier of the section within a project + * @return sectionId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SECTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getSectionId() { + return sectionId; + } + + + @JsonProperty(JSON_PROPERTY_SECTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSectionId(@jakarta.annotation.Nonnull UUID sectionId) { + this.sectionId = sectionId; + } + + + public WorkItemApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the work item + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public WorkItemApiResult entityTypeName(@jakarta.annotation.Nonnull WorkItemEntityTypeApiModel entityTypeName) { + this.entityTypeName = entityTypeName; + return this; + } + + /** + * Type of entity associated with this work item + * @return entityTypeName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkItemEntityTypeApiModel getEntityTypeName() { + return entityTypeName; + } + + + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEntityTypeName(@jakarta.annotation.Nonnull WorkItemEntityTypeApiModel entityTypeName) { + this.entityTypeName = entityTypeName; + } + + + public WorkItemApiResult duration(@jakarta.annotation.Nonnull Integer duration) { + this.duration = duration; + return this; + } + + /** + * Duration of the work item in milliseconds + * @return duration + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@jakarta.annotation.Nonnull Integer duration) { + this.duration = duration; + } + + + public WorkItemApiResult state(@jakarta.annotation.Nonnull WorkItemStateApiModel state) { + this.state = state; + return this; + } + + /** + * State of the work item + * @return state + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkItemStateApiModel getState() { + return state; + } + + + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setState(@jakarta.annotation.Nonnull WorkItemStateApiModel state) { + this.state = state; + } + + + public WorkItemApiResult priority(@jakarta.annotation.Nonnull WorkItemPriorityApiModel priority) { + this.priority = priority; + return this; + } + + /** + * Priority level of the work item + * @return priority + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkItemPriorityApiModel getPriority() { + return priority; + } + + + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPriority(@jakarta.annotation.Nonnull WorkItemPriorityApiModel priority) { + this.priority = priority; + } + + + public WorkItemApiResult isAutomated(@jakarta.annotation.Nonnull Boolean isAutomated) { + this.isAutomated = isAutomated; + return this; + } + + /** + * Get isAutomated + * @return isAutomated + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_AUTOMATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsAutomated() { + return isAutomated; + } + + + @JsonProperty(JSON_PROPERTY_IS_AUTOMATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsAutomated(@jakarta.annotation.Nonnull Boolean isAutomated) { + this.isAutomated = isAutomated; + } + + + public WorkItemApiResult attributes(@jakarta.annotation.Nonnull Map attributes) { + this.attributes = attributes; + return this; + } + + public WorkItemApiResult putAttributesItem(String key, Object attributesItem) { + if (this.attributes == null) { + this.attributes = new HashMap<>(); + } + this.attributes.put(key, attributesItem); + return this; + } + + /** + * Set of custom attributes associated with the work item + * @return attributes + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + + public Map getAttributes() { + return attributes; + } + + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setAttributes(@jakarta.annotation.Nonnull Map attributes) { + this.attributes = attributes; + } + + + public WorkItemApiResult tags(@jakarta.annotation.Nonnull List tags) { + this.tags = tags; + return this; + } + + public WorkItemApiResult addTagsItem(TagModel tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Set of tags applied to the work item + * @return tags + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTags(@jakarta.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public WorkItemApiResult sectionPreconditionSteps(@jakarta.annotation.Nonnull List sectionPreconditionSteps) { + this.sectionPreconditionSteps = sectionPreconditionSteps; + return this; + } + + public WorkItemApiResult addSectionPreconditionStepsItem(StepModel sectionPreconditionStepsItem) { + if (this.sectionPreconditionSteps == null) { + this.sectionPreconditionSteps = new ArrayList<>(); + } + this.sectionPreconditionSteps.add(sectionPreconditionStepsItem); + return this; + } + + /** + * Set of section precondition steps that need to be executed before starting the work item steps + * @return sectionPreconditionSteps + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SECTION_PRECONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getSectionPreconditionSteps() { + return sectionPreconditionSteps; + } + + + @JsonProperty(JSON_PROPERTY_SECTION_PRECONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSectionPreconditionSteps(@jakarta.annotation.Nonnull List sectionPreconditionSteps) { + this.sectionPreconditionSteps = sectionPreconditionSteps; + } + + + public WorkItemApiResult sectionPostconditionSteps(@jakarta.annotation.Nonnull List sectionPostconditionSteps) { + this.sectionPostconditionSteps = sectionPostconditionSteps; + return this; + } + + public WorkItemApiResult addSectionPostconditionStepsItem(StepModel sectionPostconditionStepsItem) { + if (this.sectionPostconditionSteps == null) { + this.sectionPostconditionSteps = new ArrayList<>(); + } + this.sectionPostconditionSteps.add(sectionPostconditionStepsItem); + return this; + } + + /** + * Set of section postcondition steps that need to be executed after completing the work item steps + * @return sectionPostconditionSteps + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SECTION_POSTCONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getSectionPostconditionSteps() { + return sectionPostconditionSteps; + } + + + @JsonProperty(JSON_PROPERTY_SECTION_POSTCONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSectionPostconditionSteps(@jakarta.annotation.Nonnull List sectionPostconditionSteps) { + this.sectionPostconditionSteps = sectionPostconditionSteps; + } + + + public WorkItemApiResult preconditionSteps(@jakarta.annotation.Nonnull List preconditionSteps) { + this.preconditionSteps = preconditionSteps; + return this; + } + + public WorkItemApiResult addPreconditionStepsItem(StepModel preconditionStepsItem) { + if (this.preconditionSteps == null) { + this.preconditionSteps = new ArrayList<>(); + } + this.preconditionSteps.add(preconditionStepsItem); + return this; + } + + /** + * Set of precondition steps that need to be executed before starting the main steps + * @return preconditionSteps + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PRECONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getPreconditionSteps() { + return preconditionSteps; + } + + + @JsonProperty(JSON_PROPERTY_PRECONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPreconditionSteps(@jakarta.annotation.Nonnull List preconditionSteps) { + this.preconditionSteps = preconditionSteps; + } + + + public WorkItemApiResult steps(@jakarta.annotation.Nonnull List steps) { + this.steps = steps; + return this; + } + + public WorkItemApiResult addStepsItem(StepModel stepsItem) { + if (this.steps == null) { + this.steps = new ArrayList<>(); + } + this.steps.add(stepsItem); + return this; + } + + /** + * Main steps or actions defined for the work item + * @return steps + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getSteps() { + return steps; + } + + + @JsonProperty(JSON_PROPERTY_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSteps(@jakarta.annotation.Nonnull List steps) { + this.steps = steps; + } + + + public WorkItemApiResult postconditionSteps(@jakarta.annotation.Nonnull List postconditionSteps) { + this.postconditionSteps = postconditionSteps; + return this; + } + + public WorkItemApiResult addPostconditionStepsItem(StepModel postconditionStepsItem) { + if (this.postconditionSteps == null) { + this.postconditionSteps = new ArrayList<>(); + } + this.postconditionSteps.add(postconditionStepsItem); + return this; + } + + /** + * Set of postcondition steps that are executed after completing the main steps + * @return postconditionSteps + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_POSTCONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getPostconditionSteps() { + return postconditionSteps; + } + + + @JsonProperty(JSON_PROPERTY_POSTCONDITION_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPostconditionSteps(@jakarta.annotation.Nonnull List postconditionSteps) { + this.postconditionSteps = postconditionSteps; + } + + + public WorkItemApiResult iterations(@jakarta.annotation.Nonnull List iterations) { + this.iterations = iterations; + return this; + } + + public WorkItemApiResult addIterationsItem(IterationModel iterationsItem) { + if (this.iterations == null) { + this.iterations = new ArrayList<>(); + } + this.iterations.add(iterationsItem); + return this; + } + + /** + * Associated iterations linked to the work item + * @return iterations + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITERATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getIterations() { + return iterations; + } + + + @JsonProperty(JSON_PROPERTY_ITERATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIterations(@jakarta.annotation.Nonnull List iterations) { + this.iterations = iterations; + } + + + public WorkItemApiResult autoTests(@jakarta.annotation.Nonnull List autoTests) { + this.autoTests = autoTests; + return this; + } + + public WorkItemApiResult addAutoTestsItem(AutoTestModel autoTestsItem) { + if (this.autoTests == null) { + this.autoTests = new ArrayList<>(); + } + this.autoTests.add(autoTestsItem); + return this; + } + + /** + * Automated tests associated with the work item + * @return autoTests + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AUTO_TESTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getAutoTests() { + return autoTests; + } + + + @JsonProperty(JSON_PROPERTY_AUTO_TESTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAutoTests(@jakarta.annotation.Nonnull List autoTests) { + this.autoTests = autoTests; + } + + + public WorkItemApiResult attachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + return this; + } + + public WorkItemApiResult addAttachmentsItem(AttachmentModel attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * Files attached to the work item + * @return attachments + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getAttachments() { + return attachments; + } + + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttachments(@jakarta.annotation.Nonnull List attachments) { + this.attachments = attachments; + } + + + public WorkItemApiResult links(@jakarta.annotation.Nonnull List links) { + this.links = links; + return this; + } + + public WorkItemApiResult addLinksItem(LinkModel linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Set of links related to the work item + * @return links + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getLinks() { + return links; + } + + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLinks(@jakarta.annotation.Nonnull List links) { + this.links = links; + } + + + public WorkItemApiResult parameters(@jakarta.annotation.Nonnull List parameters) { + this.parameters = parameters; + return this; + } + + public WorkItemApiResult addParametersItem(WorkItemParameterKeyApiResult parametersItem) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); + } + this.parameters.add(parametersItem); + return this; + } + + /** + * Set of parameters related to the work item + * @return parameters + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getParameters() { + return parameters; + } + + + @JsonProperty(JSON_PROPERTY_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParameters(@jakarta.annotation.Nonnull List parameters) { + this.parameters = parameters; + } + + + public WorkItemApiResult isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Indicates whether the work item is marked as deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public WorkItemApiResult description(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * Description of the work item + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(@jakarta.annotation.Nullable String description) { + this.description = JsonNullable.of(description); + } + + + /** + * Return true if this WorkItemApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkItemApiResult workItemApiResult = (WorkItemApiResult) o; + return Objects.equals(this.id, workItemApiResult.id) && + Objects.equals(this.globalId, workItemApiResult.globalId) && + Objects.equals(this.projectId, workItemApiResult.projectId) && + Objects.equals(this.sectionId, workItemApiResult.sectionId) && + Objects.equals(this.name, workItemApiResult.name) && + Objects.equals(this.entityTypeName, workItemApiResult.entityTypeName) && + Objects.equals(this.duration, workItemApiResult.duration) && + Objects.equals(this.state, workItemApiResult.state) && + Objects.equals(this.priority, workItemApiResult.priority) && + Objects.equals(this.isAutomated, workItemApiResult.isAutomated) && + Objects.equals(this.attributes, workItemApiResult.attributes) && + Objects.equals(this.tags, workItemApiResult.tags) && + Objects.equals(this.sectionPreconditionSteps, workItemApiResult.sectionPreconditionSteps) && + Objects.equals(this.sectionPostconditionSteps, workItemApiResult.sectionPostconditionSteps) && + Objects.equals(this.preconditionSteps, workItemApiResult.preconditionSteps) && + Objects.equals(this.steps, workItemApiResult.steps) && + Objects.equals(this.postconditionSteps, workItemApiResult.postconditionSteps) && + Objects.equals(this.iterations, workItemApiResult.iterations) && + Objects.equals(this.autoTests, workItemApiResult.autoTests) && + Objects.equals(this.attachments, workItemApiResult.attachments) && + Objects.equals(this.links, workItemApiResult.links) && + Objects.equals(this.parameters, workItemApiResult.parameters) && + Objects.equals(this.isDeleted, workItemApiResult.isDeleted) && + equalsNullable(this.description, workItemApiResult.description); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, globalId, projectId, sectionId, name, entityTypeName, duration, state, priority, isAutomated, attributes, tags, sectionPreconditionSteps, sectionPostconditionSteps, preconditionSteps, steps, postconditionSteps, iterations, autoTests, attachments, links, parameters, isDeleted, hashCodeNullable(description)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkItemApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" sectionId: ").append(toIndentedString(sectionId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" entityTypeName: ").append(toIndentedString(entityTypeName)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" isAutomated: ").append(toIndentedString(isAutomated)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" sectionPreconditionSteps: ").append(toIndentedString(sectionPreconditionSteps)).append("\n"); + sb.append(" sectionPostconditionSteps: ").append(toIndentedString(sectionPostconditionSteps)).append("\n"); + sb.append(" preconditionSteps: ").append(toIndentedString(preconditionSteps)).append("\n"); + sb.append(" steps: ").append(toIndentedString(steps)).append("\n"); + sb.append(" postconditionSteps: ").append(toIndentedString(postconditionSteps)).append("\n"); + sb.append(" iterations: ").append(toIndentedString(iterations)).append("\n"); + sb.append(" autoTests: ").append(toIndentedString(autoTests)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemEntityTypeApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemEntityTypeApiModel.java new file mode 100644 index 0000000..9e8fed8 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemEntityTypeApiModel.java @@ -0,0 +1,65 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets WorkItemEntityTypeApiModel + */ +public enum WorkItemEntityTypeApiModel { + + TEST_CASES("TestCases"), + + CHECK_LISTS("CheckLists"), + + SHARED_STEPS("SharedSteps"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + WorkItemEntityTypeApiModel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WorkItemEntityTypeApiModel fromValue(String value) { + for (WorkItemEntityTypeApiModel b : WorkItemEntityTypeApiModel.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemFilterApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemFilterApiModel.java new file mode 100644 index 0000000..7e99bbf --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemFilterApiModel.java @@ -0,0 +1,1012 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.Int32RangeSelectorModel; +import ru.testit.adaptersapi.model.WorkItemPriorityModel; +import ru.testit.adaptersapi.model.WorkItemSourceTypeModel; +import ru.testit.adaptersapi.model.WorkItemStates; +import ru.testit.adaptersapi.model.WorkItemTypeModel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * WorkItemFilterApiModel + */ +@JsonPropertyOrder({ + WorkItemFilterApiModel.JSON_PROPERTY_NAME_OR_ID, + WorkItemFilterApiModel.JSON_PROPERTY_INCLUDE_IDS, + WorkItemFilterApiModel.JSON_PROPERTY_EXCLUDE_IDS, + WorkItemFilterApiModel.JSON_PROPERTY_PROJECT_IDS, + WorkItemFilterApiModel.JSON_PROPERTY_NAME, + WorkItemFilterApiModel.JSON_PROPERTY_IDS, + WorkItemFilterApiModel.JSON_PROPERTY_GLOBAL_IDS, + WorkItemFilterApiModel.JSON_PROPERTY_ATTRIBUTES, + WorkItemFilterApiModel.JSON_PROPERTY_IS_DELETED, + WorkItemFilterApiModel.JSON_PROPERTY_SECTION_IDS, + WorkItemFilterApiModel.JSON_PROPERTY_STATES, + WorkItemFilterApiModel.JSON_PROPERTY_PRIORITIES, + WorkItemFilterApiModel.JSON_PROPERTY_SOURCE_TYPES, + WorkItemFilterApiModel.JSON_PROPERTY_TYPES, + WorkItemFilterApiModel.JSON_PROPERTY_DURATION, + WorkItemFilterApiModel.JSON_PROPERTY_IS_AUTOMATED, + WorkItemFilterApiModel.JSON_PROPERTY_TAGS, + WorkItemFilterApiModel.JSON_PROPERTY_EXCLUDE_TAGS, + WorkItemFilterApiModel.JSON_PROPERTY_AUTO_TEST_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkItemFilterApiModel { + public static final String JSON_PROPERTY_NAME_OR_ID = "nameOrId"; + private JsonNullable nameOrId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INCLUDE_IDS = "includeIds"; + private JsonNullable> includeIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_EXCLUDE_IDS = "excludeIds"; + private JsonNullable> excludeIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PROJECT_IDS = "projectIds"; + private JsonNullable> projectIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private JsonNullable name = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IDS = "ids"; + private JsonNullable> ids = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_GLOBAL_IDS = "globalIds"; + private JsonNullable> globalIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private JsonNullable>> attributes = JsonNullable.>>undefined(); + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + private JsonNullable isDeleted = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SECTION_IDS = "sectionIds"; + private JsonNullable> sectionIds = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_STATES = "states"; + private JsonNullable> states = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_PRIORITIES = "priorities"; + private JsonNullable> priorities = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_SOURCE_TYPES = "sourceTypes"; + private JsonNullable> sourceTypes = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TYPES = "types"; + private JsonNullable> types = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_DURATION = "duration"; + private JsonNullable duration = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IS_AUTOMATED = "isAutomated"; + private JsonNullable isAutomated = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private JsonNullable> tags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_EXCLUDE_TAGS = "excludeTags"; + private JsonNullable> excludeTags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_AUTO_TEST_IDS = "autoTestIds"; + private JsonNullable> autoTestIds = JsonNullable.>undefined(); + + public WorkItemFilterApiModel() { + } + + public WorkItemFilterApiModel nameOrId(@jakarta.annotation.Nullable String nameOrId) { + this.nameOrId = JsonNullable.of(nameOrId); + return this; + } + + /** + * Name or identifier (UUID) of work item + * @return nameOrId + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getNameOrId() { + return nameOrId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME_OR_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNameOrId_JsonNullable() { + return nameOrId; + } + + @JsonProperty(JSON_PROPERTY_NAME_OR_ID) + public void setNameOrId_JsonNullable(JsonNullable nameOrId) { + this.nameOrId = nameOrId; + } + + public void setNameOrId(@jakarta.annotation.Nullable String nameOrId) { + this.nameOrId = JsonNullable.of(nameOrId); + } + + + public WorkItemFilterApiModel includeIds(@jakarta.annotation.Nullable Set includeIds) { + this.includeIds = JsonNullable.>of(includeIds); + return this; + } + + public WorkItemFilterApiModel addIncludeIdsItem(UUID includeIdsItem) { + if (this.includeIds == null || !this.includeIds.isPresent()) { + this.includeIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.includeIds.get().add(includeIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of identifiers of work items which need to be included in result regardless of filtering + * @return includeIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getIncludeIds() { + return includeIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getIncludeIds_JsonNullable() { + return includeIds; + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_IDS) + public void setIncludeIds_JsonNullable(JsonNullable> includeIds) { + this.includeIds = includeIds; + } + + public void setIncludeIds(@jakarta.annotation.Nullable Set includeIds) { + this.includeIds = JsonNullable.>of(includeIds); + } + + + public WorkItemFilterApiModel excludeIds(@jakarta.annotation.Nullable Set excludeIds) { + this.excludeIds = JsonNullable.>of(excludeIds); + return this; + } + + public WorkItemFilterApiModel addExcludeIdsItem(UUID excludeIdsItem) { + if (this.excludeIds == null || !this.excludeIds.isPresent()) { + this.excludeIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.excludeIds.get().add(excludeIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of identifiers of work items which need to be excluded from result regardless of filtering + * @return excludeIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getExcludeIds() { + return excludeIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getExcludeIds_JsonNullable() { + return excludeIds; + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE_IDS) + public void setExcludeIds_JsonNullable(JsonNullable> excludeIds) { + this.excludeIds = excludeIds; + } + + public void setExcludeIds(@jakarta.annotation.Nullable Set excludeIds) { + this.excludeIds = JsonNullable.>of(excludeIds); + } + + + public WorkItemFilterApiModel projectIds(@jakarta.annotation.Nullable Set projectIds) { + this.projectIds = JsonNullable.>of(projectIds); + return this; + } + + public WorkItemFilterApiModel addProjectIdsItem(UUID projectIdsItem) { + if (this.projectIds == null || !this.projectIds.isPresent()) { + this.projectIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.projectIds.get().add(projectIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of project identifiers + * @return projectIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getProjectIds() { + return projectIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getProjectIds_JsonNullable() { + return projectIds; + } + + @JsonProperty(JSON_PROPERTY_PROJECT_IDS) + public void setProjectIds_JsonNullable(JsonNullable> projectIds) { + this.projectIds = projectIds; + } + + public void setProjectIds(@jakarta.annotation.Nullable Set projectIds) { + this.projectIds = JsonNullable.>of(projectIds); + } + + + public WorkItemFilterApiModel name(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * Name of work item + * @return name + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getName() { + return name.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getName_JsonNullable() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable(JsonNullable name) { + this.name = name; + } + + public void setName(@jakarta.annotation.Nullable String name) { + this.name = JsonNullable.of(name); + } + + + public WorkItemFilterApiModel ids(@jakarta.annotation.Nullable Set ids) { + this.ids = JsonNullable.>of(ids); + return this; + } + + public WorkItemFilterApiModel addIdsItem(UUID idsItem) { + if (this.ids == null || !this.ids.isPresent()) { + this.ids = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.ids.get().add(idsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Specifies a work item unique IDs to search for + * @return ids + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getIds() { + return ids.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getIds_JsonNullable() { + return ids; + } + + @JsonProperty(JSON_PROPERTY_IDS) + public void setIds_JsonNullable(JsonNullable> ids) { + this.ids = ids; + } + + public void setIds(@jakarta.annotation.Nullable Set ids) { + this.ids = JsonNullable.>of(ids); + } + + + public WorkItemFilterApiModel globalIds(@jakarta.annotation.Nullable Set globalIds) { + this.globalIds = JsonNullable.>of(globalIds); + return this; + } + + public WorkItemFilterApiModel addGlobalIdsItem(Long globalIdsItem) { + if (this.globalIds == null || !this.globalIds.isPresent()) { + this.globalIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.globalIds.get().add(globalIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of global (integer) identifiers + * @return globalIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getGlobalIds() { + return globalIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_GLOBAL_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getGlobalIds_JsonNullable() { + return globalIds; + } + + @JsonProperty(JSON_PROPERTY_GLOBAL_IDS) + public void setGlobalIds_JsonNullable(JsonNullable> globalIds) { + this.globalIds = globalIds; + } + + public void setGlobalIds(@jakarta.annotation.Nullable Set globalIds) { + this.globalIds = JsonNullable.>of(globalIds); + } + + + public WorkItemFilterApiModel attributes(@jakarta.annotation.Nullable Map> attributes) { + this.attributes = JsonNullable.>>of(attributes); + return this; + } + + public WorkItemFilterApiModel putAttributesItem(String key, Set attributesItem) { + if (this.attributes == null || !this.attributes.isPresent()) { + this.attributes = JsonNullable.>>of(new HashMap<>()); + } + try { + this.attributes.get().put(key, attributesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Custom attributes of work item + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map> getAttributes() { + return attributes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable>> getAttributes_JsonNullable() { + return attributes; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + public void setAttributes_JsonNullable(JsonNullable>> attributes) { + this.attributes = attributes; + } + + public void setAttributes(@jakarta.annotation.Nullable Map> attributes) { + this.attributes = JsonNullable.>>of(attributes); + } + + + public WorkItemFilterApiModel isDeleted(@jakarta.annotation.Nullable Boolean isDeleted) { + this.isDeleted = JsonNullable.of(isDeleted); + return this; + } + + /** + * Is result must consist of only actual/deleted work items + * @return isDeleted + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsDeleted() { + return isDeleted.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsDeleted_JsonNullable() { + return isDeleted; + } + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + public void setIsDeleted_JsonNullable(JsonNullable isDeleted) { + this.isDeleted = isDeleted; + } + + public void setIsDeleted(@jakarta.annotation.Nullable Boolean isDeleted) { + this.isDeleted = JsonNullable.of(isDeleted); + } + + + public WorkItemFilterApiModel sectionIds(@jakarta.annotation.Nullable Set sectionIds) { + this.sectionIds = JsonNullable.>of(sectionIds); + return this; + } + + public WorkItemFilterApiModel addSectionIdsItem(UUID sectionIdsItem) { + if (this.sectionIds == null || !this.sectionIds.isPresent()) { + this.sectionIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.sectionIds.get().add(sectionIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of section identifiers + * @return sectionIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getSectionIds() { + return sectionIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SECTION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSectionIds_JsonNullable() { + return sectionIds; + } + + @JsonProperty(JSON_PROPERTY_SECTION_IDS) + public void setSectionIds_JsonNullable(JsonNullable> sectionIds) { + this.sectionIds = sectionIds; + } + + public void setSectionIds(@jakarta.annotation.Nullable Set sectionIds) { + this.sectionIds = JsonNullable.>of(sectionIds); + } + + + public WorkItemFilterApiModel states(@jakarta.annotation.Nullable Set states) { + this.states = JsonNullable.>of(states); + return this; + } + + public WorkItemFilterApiModel addStatesItem(WorkItemStates statesItem) { + if (this.states == null || !this.states.isPresent()) { + this.states = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.states.get().add(statesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of states of work item + * @return states + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getStates() { + return states.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getStates_JsonNullable() { + return states; + } + + @JsonProperty(JSON_PROPERTY_STATES) + public void setStates_JsonNullable(JsonNullable> states) { + this.states = states; + } + + public void setStates(@jakarta.annotation.Nullable Set states) { + this.states = JsonNullable.>of(states); + } + + + public WorkItemFilterApiModel priorities(@jakarta.annotation.Nullable Set priorities) { + this.priorities = JsonNullable.>of(priorities); + return this; + } + + public WorkItemFilterApiModel addPrioritiesItem(WorkItemPriorityModel prioritiesItem) { + if (this.priorities == null || !this.priorities.isPresent()) { + this.priorities = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.priorities.get().add(prioritiesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of priorities of work item + * @return priorities + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getPriorities() { + return priorities.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PRIORITIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getPriorities_JsonNullable() { + return priorities; + } + + @JsonProperty(JSON_PROPERTY_PRIORITIES) + public void setPriorities_JsonNullable(JsonNullable> priorities) { + this.priorities = priorities; + } + + public void setPriorities(@jakarta.annotation.Nullable Set priorities) { + this.priorities = JsonNullable.>of(priorities); + } + + + public WorkItemFilterApiModel sourceTypes(@jakarta.annotation.Nullable Set sourceTypes) { + this.sourceTypes = JsonNullable.>of(sourceTypes); + return this; + } + + public WorkItemFilterApiModel addSourceTypesItem(WorkItemSourceTypeModel sourceTypesItem) { + if (this.sourceTypes == null || !this.sourceTypes.isPresent()) { + this.sourceTypes = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.sourceTypes.get().add(sourceTypesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Source type of work item (manual creation or AI generated) + * @return sourceTypes + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getSourceTypes() { + return sourceTypes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getSourceTypes_JsonNullable() { + return sourceTypes; + } + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPES) + public void setSourceTypes_JsonNullable(JsonNullable> sourceTypes) { + this.sourceTypes = sourceTypes; + } + + public void setSourceTypes(@jakarta.annotation.Nullable Set sourceTypes) { + this.sourceTypes = JsonNullable.>of(sourceTypes); + } + + + public WorkItemFilterApiModel types(@jakarta.annotation.Nullable Set types) { + this.types = JsonNullable.>of(types); + return this; + } + + public WorkItemFilterApiModel addTypesItem(WorkItemTypeModel typesItem) { + if (this.types == null || !this.types.isPresent()) { + this.types = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.types.get().add(typesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of types of work item + * @return types + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getTypes() { + return types.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTypes_JsonNullable() { + return types; + } + + @JsonProperty(JSON_PROPERTY_TYPES) + public void setTypes_JsonNullable(JsonNullable> types) { + this.types = types; + } + + public void setTypes(@jakarta.annotation.Nullable Set types) { + this.types = JsonNullable.>of(types); + } + + + public WorkItemFilterApiModel duration(@jakarta.annotation.Nullable Int32RangeSelectorModel duration) { + this.duration = JsonNullable.of(duration); + return this; + } + + /** + * Specifies a work item duration range to search for + * @return duration + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Int32RangeSelectorModel getDuration() { + return duration.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDuration_JsonNullable() { + return duration; + } + + @JsonProperty(JSON_PROPERTY_DURATION) + public void setDuration_JsonNullable(JsonNullable duration) { + this.duration = duration; + } + + public void setDuration(@jakarta.annotation.Nullable Int32RangeSelectorModel duration) { + this.duration = JsonNullable.of(duration); + } + + + public WorkItemFilterApiModel isAutomated(@jakarta.annotation.Nullable Boolean isAutomated) { + this.isAutomated = JsonNullable.of(isAutomated); + return this; + } + + /** + * Is result must consist of only manual/automated work items + * @return isAutomated + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Boolean getIsAutomated() { + return isAutomated.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_IS_AUTOMATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIsAutomated_JsonNullable() { + return isAutomated; + } + + @JsonProperty(JSON_PROPERTY_IS_AUTOMATED) + public void setIsAutomated_JsonNullable(JsonNullable isAutomated) { + this.isAutomated = isAutomated; + } + + public void setIsAutomated(@jakarta.annotation.Nullable Boolean isAutomated) { + this.isAutomated = JsonNullable.of(isAutomated); + } + + + public WorkItemFilterApiModel tags(@jakarta.annotation.Nullable Set tags) { + this.tags = JsonNullable.>of(tags); + return this; + } + + public WorkItemFilterApiModel addTagsItem(String tagsItem) { + if (this.tags == null || !this.tags.isPresent()) { + this.tags = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.tags.get().add(tagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of tags + * @return tags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getTags() { + return tags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTags_JsonNullable() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + public void setTags_JsonNullable(JsonNullable> tags) { + this.tags = tags; + } + + public void setTags(@jakarta.annotation.Nullable Set tags) { + this.tags = JsonNullable.>of(tags); + } + + + public WorkItemFilterApiModel excludeTags(@jakarta.annotation.Nullable Set excludeTags) { + this.excludeTags = JsonNullable.>of(excludeTags); + return this; + } + + public WorkItemFilterApiModel addExcludeTagsItem(String excludeTagsItem) { + if (this.excludeTags == null || !this.excludeTags.isPresent()) { + this.excludeTags = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.excludeTags.get().add(excludeTagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of tags to exclude + * @return excludeTags + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getExcludeTags() { + return excludeTags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getExcludeTags_JsonNullable() { + return excludeTags; + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE_TAGS) + public void setExcludeTags_JsonNullable(JsonNullable> excludeTags) { + this.excludeTags = excludeTags; + } + + public void setExcludeTags(@jakarta.annotation.Nullable Set excludeTags) { + this.excludeTags = JsonNullable.>of(excludeTags); + } + + + public WorkItemFilterApiModel autoTestIds(@jakarta.annotation.Nullable Set autoTestIds) { + this.autoTestIds = JsonNullable.>of(autoTestIds); + return this; + } + + public WorkItemFilterApiModel addAutoTestIdsItem(UUID autoTestIdsItem) { + if (this.autoTestIds == null || !this.autoTestIds.isPresent()) { + this.autoTestIds = JsonNullable.>of(new LinkedHashSet<>()); + } + try { + this.autoTestIds.get().add(autoTestIdsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Collection of identifiers of linked autotests + * @return autoTestIds + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Set getAutoTestIds() { + return autoTestIds.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAutoTestIds_JsonNullable() { + return autoTestIds; + } + + @JsonProperty(JSON_PROPERTY_AUTO_TEST_IDS) + public void setAutoTestIds_JsonNullable(JsonNullable> autoTestIds) { + this.autoTestIds = autoTestIds; + } + + public void setAutoTestIds(@jakarta.annotation.Nullable Set autoTestIds) { + this.autoTestIds = JsonNullable.>of(autoTestIds); + } + + + /** + * Return true if this WorkItemFilterApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkItemFilterApiModel workItemFilterApiModel = (WorkItemFilterApiModel) o; + return equalsNullable(this.nameOrId, workItemFilterApiModel.nameOrId) && + equalsNullable(this.includeIds, workItemFilterApiModel.includeIds) && + equalsNullable(this.excludeIds, workItemFilterApiModel.excludeIds) && + equalsNullable(this.projectIds, workItemFilterApiModel.projectIds) && + equalsNullable(this.name, workItemFilterApiModel.name) && + equalsNullable(this.ids, workItemFilterApiModel.ids) && + equalsNullable(this.globalIds, workItemFilterApiModel.globalIds) && + equalsNullable(this.attributes, workItemFilterApiModel.attributes) && + equalsNullable(this.isDeleted, workItemFilterApiModel.isDeleted) && + equalsNullable(this.sectionIds, workItemFilterApiModel.sectionIds) && + equalsNullable(this.states, workItemFilterApiModel.states) && + equalsNullable(this.priorities, workItemFilterApiModel.priorities) && + equalsNullable(this.sourceTypes, workItemFilterApiModel.sourceTypes) && + equalsNullable(this.types, workItemFilterApiModel.types) && + equalsNullable(this.duration, workItemFilterApiModel.duration) && + equalsNullable(this.isAutomated, workItemFilterApiModel.isAutomated) && + equalsNullable(this.tags, workItemFilterApiModel.tags) && + equalsNullable(this.excludeTags, workItemFilterApiModel.excludeTags) && + equalsNullable(this.autoTestIds, workItemFilterApiModel.autoTestIds); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nameOrId), hashCodeNullable(includeIds), hashCodeNullable(excludeIds), hashCodeNullable(projectIds), hashCodeNullable(name), hashCodeNullable(ids), hashCodeNullable(globalIds), hashCodeNullable(attributes), hashCodeNullable(isDeleted), hashCodeNullable(sectionIds), hashCodeNullable(states), hashCodeNullable(priorities), hashCodeNullable(sourceTypes), hashCodeNullable(types), hashCodeNullable(duration), hashCodeNullable(isAutomated), hashCodeNullable(tags), hashCodeNullable(excludeTags), hashCodeNullable(autoTestIds)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkItemFilterApiModel {\n"); + sb.append(" nameOrId: ").append(toIndentedString(nameOrId)).append("\n"); + sb.append(" includeIds: ").append(toIndentedString(includeIds)).append("\n"); + sb.append(" excludeIds: ").append(toIndentedString(excludeIds)).append("\n"); + sb.append(" projectIds: ").append(toIndentedString(projectIds)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" ids: ").append(toIndentedString(ids)).append("\n"); + sb.append(" globalIds: ").append(toIndentedString(globalIds)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" sectionIds: ").append(toIndentedString(sectionIds)).append("\n"); + sb.append(" states: ").append(toIndentedString(states)).append("\n"); + sb.append(" priorities: ").append(toIndentedString(priorities)).append("\n"); + sb.append(" sourceTypes: ").append(toIndentedString(sourceTypes)).append("\n"); + sb.append(" types: ").append(toIndentedString(types)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" isAutomated: ").append(toIndentedString(isAutomated)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" excludeTags: ").append(toIndentedString(excludeTags)).append("\n"); + sb.append(" autoTestIds: ").append(toIndentedString(autoTestIds)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemIdApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemIdApiModel.java new file mode 100644 index 0000000..c7237ed --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemIdApiModel.java @@ -0,0 +1,110 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * WorkItemIdApiModel + */ +@JsonPropertyOrder({ + WorkItemIdApiModel.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkItemIdApiModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private String id; + + public WorkItemIdApiModel() { + } + + public WorkItemIdApiModel id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Work Item ID or Global ID + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull String id) { + this.id = id; + } + + + /** + * Return true if this WorkItemIdApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkItemIdApiModel workItemIdApiModel = (WorkItemIdApiModel) o; + return Objects.equals(this.id, workItemIdApiModel.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkItemIdApiModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemParameterKeyApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemParameterKeyApiModel.java new file mode 100644 index 0000000..ae31c68 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemParameterKeyApiModel.java @@ -0,0 +1,111 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * WorkItemParameterKeyApiModel + */ +@JsonPropertyOrder({ + WorkItemParameterKeyApiModel.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkItemParameterKeyApiModel { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public WorkItemParameterKeyApiModel() { + } + + public WorkItemParameterKeyApiModel id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * ID of the parameter key to assign + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this WorkItemParameterKeyApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkItemParameterKeyApiModel workItemParameterKeyApiModel = (WorkItemParameterKeyApiModel) o; + return Objects.equals(this.id, workItemParameterKeyApiModel.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkItemParameterKeyApiModel {\n"); + sb.append(" id: ").append(toIndentedString(id)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemParameterKeyApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemParameterKeyApiResult.java new file mode 100644 index 0000000..cf33a76 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemParameterKeyApiResult.java @@ -0,0 +1,111 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * WorkItemParameterKeyApiResult + */ +@JsonPropertyOrder({ + WorkItemParameterKeyApiResult.JSON_PROPERTY_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkItemParameterKeyApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public WorkItemParameterKeyApiResult() { + } + + public WorkItemParameterKeyApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + /** + * Return true if this WorkItemParameterKeyApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkItemParameterKeyApiResult workItemParameterKeyApiResult = (WorkItemParameterKeyApiResult) o; + return Objects.equals(this.id, workItemParameterKeyApiResult.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkItemParameterKeyApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemPriorityApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemPriorityApiModel.java new file mode 100644 index 0000000..ead2aed --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemPriorityApiModel.java @@ -0,0 +1,69 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets WorkItemPriorityApiModel + */ +public enum WorkItemPriorityApiModel { + + LOWEST("Lowest"), + + LOW("Low"), + + MEDIUM("Medium"), + + HIGH("High"), + + HIGHEST("Highest"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + WorkItemPriorityApiModel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WorkItemPriorityApiModel fromValue(String value) { + for (WorkItemPriorityApiModel b : WorkItemPriorityApiModel.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemPriorityModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemPriorityModel.java new file mode 100644 index 0000000..47f10c7 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemPriorityModel.java @@ -0,0 +1,69 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets WorkItemPriorityModel + */ +public enum WorkItemPriorityModel { + + LOWEST("Lowest"), + + LOW("Low"), + + MEDIUM("Medium"), + + HIGH("High"), + + HIGHEST("Highest"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + WorkItemPriorityModel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WorkItemPriorityModel fromValue(String value) { + for (WorkItemPriorityModel b : WorkItemPriorityModel.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemSelectApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemSelectApiModel.java new file mode 100644 index 0000000..7f7162d --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemSelectApiModel.java @@ -0,0 +1,111 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import ru.testit.adaptersapi.model.WorkItemFilterApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * WorkItemSelectApiModel + */ +@JsonPropertyOrder({ + WorkItemSelectApiModel.JSON_PROPERTY_FILTER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkItemSelectApiModel { + public static final String JSON_PROPERTY_FILTER = "filter"; + @jakarta.annotation.Nonnull + private WorkItemFilterApiModel filter; + + public WorkItemSelectApiModel() { + } + + public WorkItemSelectApiModel filter(@jakarta.annotation.Nonnull WorkItemFilterApiModel filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkItemFilterApiModel getFilter() { + return filter; + } + + + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFilter(@jakarta.annotation.Nonnull WorkItemFilterApiModel filter) { + this.filter = filter; + } + + + /** + * Return true if this WorkItemSelectApiModel object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkItemSelectApiModel workItemSelectApiModel = (WorkItemSelectApiModel) o; + return Objects.equals(this.filter, workItemSelectApiModel.filter); + } + + @Override + public int hashCode() { + return Objects.hash(filter); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkItemSelectApiModel {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemShortApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemShortApiResult.java new file mode 100644 index 0000000..7b7d1b7 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemShortApiResult.java @@ -0,0 +1,701 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import ru.testit.adaptersapi.model.IterationApiResult; +import ru.testit.adaptersapi.model.LinkShortApiResult; +import ru.testit.adaptersapi.model.WorkItemPriorityModel; +import ru.testit.adaptersapi.model.WorkItemSourceTypeModel; +import ru.testit.adaptersapi.model.WorkItemStates; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * WorkItemShortApiResult + */ +@JsonPropertyOrder({ + WorkItemShortApiResult.JSON_PROPERTY_ID, + WorkItemShortApiResult.JSON_PROPERTY_NAME, + WorkItemShortApiResult.JSON_PROPERTY_ENTITY_TYPE_NAME, + WorkItemShortApiResult.JSON_PROPERTY_PROJECT_ID, + WorkItemShortApiResult.JSON_PROPERTY_SECTION_ID, + WorkItemShortApiResult.JSON_PROPERTY_SECTION_NAME, + WorkItemShortApiResult.JSON_PROPERTY_IS_AUTOMATED, + WorkItemShortApiResult.JSON_PROPERTY_GLOBAL_ID, + WorkItemShortApiResult.JSON_PROPERTY_DURATION, + WorkItemShortApiResult.JSON_PROPERTY_STATE, + WorkItemShortApiResult.JSON_PROPERTY_PRIORITY, + WorkItemShortApiResult.JSON_PROPERTY_SOURCE_TYPE, + WorkItemShortApiResult.JSON_PROPERTY_IS_DELETED, + WorkItemShortApiResult.JSON_PROPERTY_ITERATIONS, + WorkItemShortApiResult.JSON_PROPERTY_LINKS, + WorkItemShortApiResult.JSON_PROPERTY_ATTRIBUTES, + WorkItemShortApiResult.JSON_PROPERTY_TAG_NAMES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkItemShortApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_ENTITY_TYPE_NAME = "entityTypeName"; + @jakarta.annotation.Nonnull + private String entityTypeName; + + public static final String JSON_PROPERTY_PROJECT_ID = "projectId"; + @jakarta.annotation.Nonnull + private UUID projectId; + + public static final String JSON_PROPERTY_SECTION_ID = "sectionId"; + @jakarta.annotation.Nonnull + private UUID sectionId; + + public static final String JSON_PROPERTY_SECTION_NAME = "sectionName"; + @jakarta.annotation.Nonnull + private String sectionName; + + public static final String JSON_PROPERTY_IS_AUTOMATED = "isAutomated"; + @jakarta.annotation.Nonnull + private Boolean isAutomated; + + public static final String JSON_PROPERTY_GLOBAL_ID = "globalId"; + @jakarta.annotation.Nonnull + private Long globalId; + + public static final String JSON_PROPERTY_DURATION = "duration"; + @jakarta.annotation.Nonnull + private Long duration; + + public static final String JSON_PROPERTY_STATE = "state"; + @jakarta.annotation.Nonnull + private WorkItemStates state; + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + @jakarta.annotation.Nonnull + private WorkItemPriorityModel priority; + + public static final String JSON_PROPERTY_SOURCE_TYPE = "sourceType"; + @jakarta.annotation.Nonnull + private WorkItemSourceTypeModel sourceType; + + public static final String JSON_PROPERTY_IS_DELETED = "isDeleted"; + @jakarta.annotation.Nonnull + private Boolean isDeleted; + + public static final String JSON_PROPERTY_ITERATIONS = "iterations"; + @jakarta.annotation.Nonnull + private List iterations = new ArrayList<>(); + + public static final String JSON_PROPERTY_LINKS = "links"; + @jakarta.annotation.Nonnull + private List links = new ArrayList<>(); + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private JsonNullable> attributes = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_TAG_NAMES = "tagNames"; + private JsonNullable> tagNames = JsonNullable.>undefined(); + + public WorkItemShortApiResult() { + } + + public WorkItemShortApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Work Item internal unique identifier + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public WorkItemShortApiResult name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Work Item name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + + public WorkItemShortApiResult entityTypeName(@jakarta.annotation.Nonnull String entityTypeName) { + this.entityTypeName = entityTypeName; + return this; + } + + /** + * Work Item type. Possible values: CheckLists, SharedSteps, TestCases + * @return entityTypeName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEntityTypeName() { + return entityTypeName; + } + + + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEntityTypeName(@jakarta.annotation.Nonnull String entityTypeName) { + this.entityTypeName = entityTypeName; + } + + + public WorkItemShortApiResult projectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Project unique identifier + * @return projectId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getProjectId() { + return projectId; + } + + + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProjectId(@jakarta.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + + public WorkItemShortApiResult sectionId(@jakarta.annotation.Nonnull UUID sectionId) { + this.sectionId = sectionId; + return this; + } + + /** + * Identifier of Section where Work Item is located + * @return sectionId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SECTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getSectionId() { + return sectionId; + } + + + @JsonProperty(JSON_PROPERTY_SECTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSectionId(@jakarta.annotation.Nonnull UUID sectionId) { + this.sectionId = sectionId; + } + + + public WorkItemShortApiResult sectionName(@jakarta.annotation.Nonnull String sectionName) { + this.sectionName = sectionName; + return this; + } + + /** + * Section name of Work Item + * @return sectionName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SECTION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSectionName() { + return sectionName; + } + + + @JsonProperty(JSON_PROPERTY_SECTION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSectionName(@jakarta.annotation.Nonnull String sectionName) { + this.sectionName = sectionName; + } + + + public WorkItemShortApiResult isAutomated(@jakarta.annotation.Nonnull Boolean isAutomated) { + this.isAutomated = isAutomated; + return this; + } + + /** + * Boolean flag determining whether Work Item is automated + * @return isAutomated + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_AUTOMATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsAutomated() { + return isAutomated; + } + + + @JsonProperty(JSON_PROPERTY_IS_AUTOMATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsAutomated(@jakarta.annotation.Nonnull Boolean isAutomated) { + this.isAutomated = isAutomated; + } + + + public WorkItemShortApiResult globalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + return this; + } + + /** + * Work Item global identifier + * @return globalId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getGlobalId() { + return globalId; + } + + + @JsonProperty(JSON_PROPERTY_GLOBAL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGlobalId(@jakarta.annotation.Nonnull Long globalId) { + this.globalId = globalId; + } + + + public WorkItemShortApiResult duration(@jakarta.annotation.Nonnull Long duration) { + this.duration = duration; + return this; + } + + /** + * Work Item duration + * @return duration + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getDuration() { + return duration; + } + + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDuration(@jakarta.annotation.Nonnull Long duration) { + this.duration = duration; + } + + + public WorkItemShortApiResult state(@jakarta.annotation.Nonnull WorkItemStates state) { + this.state = state; + return this; + } + + /** + * The current state of Work Item + * @return state + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkItemStates getState() { + return state; + } + + + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setState(@jakarta.annotation.Nonnull WorkItemStates state) { + this.state = state; + } + + + public WorkItemShortApiResult priority(@jakarta.annotation.Nonnull WorkItemPriorityModel priority) { + this.priority = priority; + return this; + } + + /** + * Work Item priority level + * @return priority + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkItemPriorityModel getPriority() { + return priority; + } + + + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPriority(@jakarta.annotation.Nonnull WorkItemPriorityModel priority) { + this.priority = priority; + } + + + public WorkItemShortApiResult sourceType(@jakarta.annotation.Nonnull WorkItemSourceTypeModel sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Work Item priority level + * @return sourceType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public WorkItemSourceTypeModel getSourceType() { + return sourceType; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceType(@jakarta.annotation.Nonnull WorkItemSourceTypeModel sourceType) { + this.sourceType = sourceType; + } + + + public WorkItemShortApiResult isDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * Flag determining whether Work Item is deleted + * @return isDeleted + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsDeleted() { + return isDeleted; + } + + + @JsonProperty(JSON_PROPERTY_IS_DELETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsDeleted(@jakarta.annotation.Nonnull Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public WorkItemShortApiResult iterations(@jakarta.annotation.Nonnull List iterations) { + this.iterations = iterations; + return this; + } + + public WorkItemShortApiResult addIterationsItem(IterationApiResult iterationsItem) { + if (this.iterations == null) { + this.iterations = new ArrayList<>(); + } + this.iterations.add(iterationsItem); + return this; + } + + /** + * Set of iterations related to Work Item + * @return iterations + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ITERATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getIterations() { + return iterations; + } + + + @JsonProperty(JSON_PROPERTY_ITERATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIterations(@jakarta.annotation.Nonnull List iterations) { + this.iterations = iterations; + } + + + public WorkItemShortApiResult links(@jakarta.annotation.Nonnull List links) { + this.links = links; + return this; + } + + public WorkItemShortApiResult addLinksItem(LinkShortApiResult linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Set of links related to Work Item + * @return links + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getLinks() { + return links; + } + + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLinks(@jakarta.annotation.Nonnull List links) { + this.links = links; + } + + + public WorkItemShortApiResult attributes(@jakarta.annotation.Nullable Map attributes) { + this.attributes = JsonNullable.>of(attributes); + return this; + } + + public WorkItemShortApiResult putAttributesItem(String key, Object attributesItem) { + if (this.attributes == null || !this.attributes.isPresent()) { + this.attributes = JsonNullable.>of(new HashMap<>()); + } + try { + this.attributes.get().put(key, attributesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Work Item attributes + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Map getAttributes() { + return attributes.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getAttributes_JsonNullable() { + return attributes; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + public void setAttributes_JsonNullable(JsonNullable> attributes) { + this.attributes = attributes; + } + + public void setAttributes(@jakarta.annotation.Nullable Map attributes) { + this.attributes = JsonNullable.>of(attributes); + } + + + public WorkItemShortApiResult tagNames(@jakarta.annotation.Nullable List tagNames) { + this.tagNames = JsonNullable.>of(tagNames); + return this; + } + + public WorkItemShortApiResult addTagNamesItem(String tagNamesItem) { + if (this.tagNames == null || !this.tagNames.isPresent()) { + this.tagNames = JsonNullable.>of(new ArrayList<>()); + } + try { + this.tagNames.get().add(tagNamesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Array of tag names of Work Item + * @return tagNames + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public List getTagNames() { + return tagNames.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TAG_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getTagNames_JsonNullable() { + return tagNames; + } + + @JsonProperty(JSON_PROPERTY_TAG_NAMES) + public void setTagNames_JsonNullable(JsonNullable> tagNames) { + this.tagNames = tagNames; + } + + public void setTagNames(@jakarta.annotation.Nullable List tagNames) { + this.tagNames = JsonNullable.>of(tagNames); + } + + + /** + * Return true if this WorkItemShortApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkItemShortApiResult workItemShortApiResult = (WorkItemShortApiResult) o; + return Objects.equals(this.id, workItemShortApiResult.id) && + Objects.equals(this.name, workItemShortApiResult.name) && + Objects.equals(this.entityTypeName, workItemShortApiResult.entityTypeName) && + Objects.equals(this.projectId, workItemShortApiResult.projectId) && + Objects.equals(this.sectionId, workItemShortApiResult.sectionId) && + Objects.equals(this.sectionName, workItemShortApiResult.sectionName) && + Objects.equals(this.isAutomated, workItemShortApiResult.isAutomated) && + Objects.equals(this.globalId, workItemShortApiResult.globalId) && + Objects.equals(this.duration, workItemShortApiResult.duration) && + Objects.equals(this.state, workItemShortApiResult.state) && + Objects.equals(this.priority, workItemShortApiResult.priority) && + Objects.equals(this.sourceType, workItemShortApiResult.sourceType) && + Objects.equals(this.isDeleted, workItemShortApiResult.isDeleted) && + Objects.equals(this.iterations, workItemShortApiResult.iterations) && + Objects.equals(this.links, workItemShortApiResult.links) && + equalsNullable(this.attributes, workItemShortApiResult.attributes) && + equalsNullable(this.tagNames, workItemShortApiResult.tagNames); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, entityTypeName, projectId, sectionId, sectionName, isAutomated, globalId, duration, state, priority, sourceType, isDeleted, iterations, links, hashCodeNullable(attributes), hashCodeNullable(tagNames)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkItemShortApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" entityTypeName: ").append(toIndentedString(entityTypeName)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" sectionId: ").append(toIndentedString(sectionId)).append("\n"); + sb.append(" sectionName: ").append(toIndentedString(sectionName)).append("\n"); + sb.append(" isAutomated: ").append(toIndentedString(isAutomated)).append("\n"); + sb.append(" globalId: ").append(toIndentedString(globalId)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" iterations: ").append(toIndentedString(iterations)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" tagNames: ").append(toIndentedString(tagNames)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemSourceTypeModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemSourceTypeModel.java new file mode 100644 index 0000000..b217985 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemSourceTypeModel.java @@ -0,0 +1,63 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets WorkItemSourceTypeModel + */ +public enum WorkItemSourceTypeModel { + + MANUAL("Manual"), + + AI("AI"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + WorkItemSourceTypeModel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WorkItemSourceTypeModel fromValue(String value) { + for (WorkItemSourceTypeModel b : WorkItemSourceTypeModel.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemStateApiModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemStateApiModel.java new file mode 100644 index 0000000..62d4651 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemStateApiModel.java @@ -0,0 +1,65 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets WorkItemStateApiModel + */ +public enum WorkItemStateApiModel { + + NEEDS_WORK("NeedsWork"), + + NOT_READY("NotReady"), + + READY("Ready"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + WorkItemStateApiModel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WorkItemStateApiModel fromValue(String value) { + for (WorkItemStateApiModel b : WorkItemStateApiModel.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemStates.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemStates.java new file mode 100644 index 0000000..be19499 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemStates.java @@ -0,0 +1,65 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets WorkItemStates + */ +public enum WorkItemStates { + + NEEDS_WORK("NeedsWork"), + + NOT_READY("NotReady"), + + READY("Ready"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + WorkItemStates(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WorkItemStates fromValue(String value) { + for (WorkItemStates b : WorkItemStates.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemTypeModel.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemTypeModel.java new file mode 100644 index 0000000..3a0a47e --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkItemTypeModel.java @@ -0,0 +1,65 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets WorkItemTypeModel + */ +public enum WorkItemTypeModel { + + TEST_CASES("TestCases"), + + CHECK_LISTS("CheckLists"), + + SHARED_STEPS("SharedSteps"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + WorkItemTypeModel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WorkItemTypeModel fromValue(String value) { + for (WorkItemTypeModel b : WorkItemTypeModel.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkflowApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkflowApiResult.java new file mode 100644 index 0000000..8d2ad24 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkflowApiResult.java @@ -0,0 +1,154 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import ru.testit.adaptersapi.model.WorkflowStatusApiResult; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * WorkflowApiResult + */ +@JsonPropertyOrder({ + WorkflowApiResult.JSON_PROPERTY_ID, + WorkflowApiResult.JSON_PROPERTY_STATUSES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkflowApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_STATUSES = "statuses"; + @jakarta.annotation.Nonnull + private List statuses = new ArrayList<>(); + + public WorkflowApiResult() { + } + + public WorkflowApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public WorkflowApiResult statuses(@jakarta.annotation.Nonnull List statuses) { + this.statuses = statuses; + return this; + } + + public WorkflowApiResult addStatusesItem(WorkflowStatusApiResult statusesItem) { + if (this.statuses == null) { + this.statuses = new ArrayList<>(); + } + this.statuses.add(statusesItem); + return this; + } + + /** + * Get statuses + * @return statuses + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getStatuses() { + return statuses; + } + + + @JsonProperty(JSON_PROPERTY_STATUSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatuses(@jakarta.annotation.Nonnull List statuses) { + this.statuses = statuses; + } + + + /** + * Return true if this WorkflowApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkflowApiResult workflowApiResult = (WorkflowApiResult) o; + return Objects.equals(this.id, workflowApiResult.id) && + Objects.equals(this.statuses, workflowApiResult.statuses); + } + + @Override + public int hashCode() { + return Objects.hash(id, statuses); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkflowApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" statuses: ").append(toIndentedString(statuses)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkflowStatusApiResult.java b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkflowStatusApiResult.java new file mode 100644 index 0000000..e7e7a48 --- /dev/null +++ b/testit-java-commons/src/main/java/ru/testit/adaptersapi/model/WorkflowStatusApiResult.java @@ -0,0 +1,176 @@ +/* + * API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: adapters + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ru.testit.adaptersapi.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +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 java.util.Arrays; +import java.util.UUID; +import ru.testit.adaptersapi.model.TestStatusApiType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import ru.testit.adaptersapi.invoker.JSON; + + +/** + * WorkflowStatusApiResult + */ +@JsonPropertyOrder({ + WorkflowStatusApiResult.JSON_PROPERTY_ID, + WorkflowStatusApiResult.JSON_PROPERTY_CODE, + WorkflowStatusApiResult.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") +public class WorkflowStatusApiResult { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull + private UUID id; + + public static final String JSON_PROPERTY_CODE = "code"; + @jakarta.annotation.Nonnull + private String code; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private TestStatusApiType type; + + public WorkflowStatusApiResult() { + } + + public WorkflowStatusApiResult id(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public UUID getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull UUID id) { + this.id = id; + } + + + public WorkflowStatusApiResult code(@jakarta.annotation.Nonnull String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(@jakarta.annotation.Nonnull String code) { + this.code = code; + } + + + public WorkflowStatusApiResult type(@jakarta.annotation.Nonnull TestStatusApiType type) { + this.type = type; + return this; + } + + /** + * Collection of possible status types + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TestStatusApiType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TestStatusApiType type) { + this.type = type; + } + + + /** + * Return true if this WorkflowStatusApiResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkflowStatusApiResult workflowStatusApiResult = (WorkflowStatusApiResult) o; + return Objects.equals(this.id, workflowStatusApiResult.id) && + Objects.equals(this.code, workflowStatusApiResult.code) && + Objects.equals(this.type, workflowStatusApiResult.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, code, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkflowStatusApiResult {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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 "); + } + +} + diff --git a/testit-java-commons/src/main/java/ru/testit/clients/Converter.java b/testit-java-commons/src/main/java/ru/testit/clients/Converter.java index 67311c6..b1ac1e1 100644 --- a/testit-java-commons/src/main/java/ru/testit/clients/Converter.java +++ b/testit-java-commons/src/main/java/ru/testit/clients/Converter.java @@ -3,9 +3,9 @@ import org.apache.commons.lang3.exception.ExceptionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import ru.testit.client.invoker.ApiException; -import ru.testit.client.model.LinkType; -import ru.testit.client.model.*; +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.model.LinkType; +import ru.testit.adaptersapi.model.*; import ru.testit.models.*; import ru.testit.models.StepResult; import ru.testit.models.Label; @@ -150,13 +150,13 @@ public static List convertResultFixt ).collect(Collectors.toList()); } - public static TestResultUpdateV2Request testResultToTestResultUpdateModel(TestResultResponse result) { - TestResultUpdateV2Request model = new TestResultUpdateV2Request(); + public static TestResultUpdateRequest testResultToTestResultUpdateModel(TestResultResponse result) { + TestResultUpdateRequest model = new TestResultUpdateRequest(); model.setDuration(result.getDurationInMs()); // здесь корректное использование code из ответа с сервера model.setStatusCode(result.getStatus().getCode()); - model.setLinks(result.getLinks()); + model.setLinks(convertLinkApiResultsToCreateLinks(result.getLinks())); model.setStepResults(result.getStepResults()); model.setFailureClassIds(result.getFailureClassIds()); model.setComment(result.getComment()); @@ -234,7 +234,24 @@ private static List convertCreateLinks(List links) model.setDescription(link.getDescription()); model.setUrl(link.getUrl()); model.setType(LinkType.fromValue(link.getType() != null ? link.getType().getValue() : LinkType.RELATED.getValue())); - model.setHasInfo(false); + + return model; + } + ).collect(Collectors.toList()); + } + + private static List convertLinkApiResultsToCreateLinks(List links) { + if (links == null) { + return null; + } + return links.stream().map( + link -> { + CreateLinkApiModel model = new CreateLinkApiModel(); + + model.setTitle(link.getTitle()); + model.setDescription(link.getDescription()); + model.setUrl(link.getUrl()); + model.setType(LinkType.fromValue(link.getType() != null ? link.getType().getValue() : LinkType.RELATED.getValue())); return model; } @@ -250,7 +267,6 @@ public static List convertPutLinks(List links) { model.setDescription(link.getDescription()); model.setUrl(link.getUrl()); model.setType(LinkType.fromValue(link.getType() != null ? link.getType().getValue() : LinkType.RELATED.getValue())); - model.setHasInfo(false); return model; } @@ -475,15 +491,14 @@ public static TestResultsFilterApiModel buildTestResultsFilterApiModelWithInProg return model; } - public static UpdateEmptyTestRunApiModel buildUpdateEmptyTestRunApiModel(TestRunV2ApiResult testRun) { + public static UpdateEmptyTestRunApiModel buildUpdateEmptyTestRunApiModel(TestRunApiResult testRun) { UpdateEmptyTestRunApiModel model = new UpdateEmptyTestRunApiModel(); model.setId(testRun.getId()); model.setName(testRun.getName()); - model.setDescription(testRun.getDescription()); model.setAttachments(Converter.buildAssignAttachmentApiModels(testRun.getAttachments())); model.setLinks(Converter.buildUpdateLinkApiModels(testRun.getLinks())); - model.setLaunchSource(testRun.getLaunchSource()); + model.setTags(testRun.getTags()); return model; } @@ -510,7 +525,6 @@ public static List buildUpdateLinkApiModels(List buildLinkUpdateApiModel(List getTestFromTestRun(String testRunUuid, String configurationId) throws ApiException; List getAutotestExternalIdsFromTestRun() throws ApiException; TestResultResponse getTestResult(UUID uuid) throws ApiException; - void updateTestResult(UUID uuid, TestResultUpdateV2Request model) throws ApiException; + void updateTestResult(UUID uuid, TestResultUpdateRequest model) throws ApiException; } diff --git a/testit-java-commons/src/main/java/ru/testit/clients/TmsApiClient.java b/testit-java-commons/src/main/java/ru/testit/clients/TmsApiClient.java index 7da1ce0..7a5333c 100644 --- a/testit-java-commons/src/main/java/ru/testit/clients/TmsApiClient.java +++ b/testit-java-commons/src/main/java/ru/testit/clients/TmsApiClient.java @@ -2,10 +2,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import ru.testit.client.api.*; -import ru.testit.client.invoker.ApiClient; -import ru.testit.client.invoker.ApiException; -import ru.testit.client.model.*; +import ru.testit.adaptersapi.api.*; +import ru.testit.adaptersapi.invoker.ApiClient; +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.model.*; import ru.testit.services.HtmlEscapeUtils; import java.io.File; @@ -48,7 +48,7 @@ public TmsApiClient(ClientConfiguration config) { } @Override - public TestRunV2ApiResult createTestRun() throws ApiException { + public TestRunApiResult createTestRun() throws ApiException { CreateEmptyTestRunApiModel model = new CreateEmptyTestRunApiModel(); model.setProjectId(UUID.fromString(clientConfiguration.getProjectId())); @@ -60,8 +60,8 @@ public TestRunV2ApiResult createTestRun() throws ApiException { LOGGER.debug("Create new test run: {}", model); } - TestRunV2ApiResult response = testRunsApi.createEmpty(model); - testRunsApi.startTestRun(response.getId()); + TestRunApiResult response = testRunsApi.adaptersTestRunsPost(model); + testRunsApi.adaptersTestRunsIdStartPost(response.getId()); if (LOGGER.isDebugEnabled()) { LOGGER.debug("The test run created: {}", response); @@ -71,42 +71,42 @@ public TestRunV2ApiResult createTestRun() throws ApiException { } @Override - public TestRunV2ApiResult getTestRun(String uuid) throws ApiException { - return testRunsApi.getTestRunById(UUID.fromString(uuid)); + public TestRunApiResult getTestRun(String uuid) throws ApiException { + return testRunsApi.adaptersTestRunsIdGet(UUID.fromString(uuid)); } @Override public void updateTestRun(UpdateEmptyTestRunApiModel testRun) throws ApiException { - testRunsApi.updateEmpty(testRun); + testRunsApi.adaptersTestRunsPut(testRun); } @Override public void completeTestRun(String uuid) throws ApiException { - testRunsApi.completeTestRun(UUID.fromString(uuid)); + testRunsApi.adaptersTestRunsIdCompletePost(UUID.fromString(uuid)); } @Override public void updateAutoTest(AutoTestUpdateApiModel model) throws ApiException { // Escape HTML tags in model before sending - autoTestsApi.updateAutoTest(model); + autoTestsApi.adaptersAutoTestsPut(model); } @Override public String createAutoTest(AutoTestCreateApiModel model) throws ApiException { // Escape HTML tags in model before sending - return Objects.requireNonNull(autoTestsApi.createAutoTest(model).getId()).toString(); + return Objects.requireNonNull(autoTestsApi.adaptersAutoTestsPost(model).getId()).toString(); } @Override public void updateAutoTests(List models) throws ApiException { // Escape HTML tags in models before sending - autoTestsApi.updateMultiple(models); + autoTestsApi.adaptersAutoTestsBulkPut(models); } @Override public List createAutoTests(List models) throws ApiException { // Escape HTML tags in models before sending - return autoTestsApi.createMultiple(models); + return autoTestsApi.adaptersAutoTestsBulkPost(models); } @Override @@ -116,7 +116,7 @@ public List getWorkItemUuidsByIds(Iterable workItemIds) { for (String workItemId : workItemIds) { try { - WorkItemApiResult workItem = workItemsApi.getWorkItemById(workItemId, null, null); + WorkItemApiResult workItem = workItemsApi.adaptersWorkItemsIdGet(workItemId, null, null); workItemUuids.add(workItem.getId()); } catch (ApiException e) { @@ -149,7 +149,7 @@ public AutoTestApiResult getAutoTestByExternalId(String externalId) throws ApiEx model.setFilter(filter); model.setIncludes(includes); - List tests = autoTestsApi.apiV2AutoTestsSearchPost(null, + List tests = autoTestsApi.adaptersAutoTestsSearchPost(null, null, null, null, @@ -175,7 +175,7 @@ public void linkAutoTestToWorkItem(String id, String workItemId) { for (int attempts = 0; attempts < MAX_TRIES; attempts++) { try { - autoTestsApi.linkAutoTestToWorkItem(id, new WorkItemIdApiModel().id(workItemId)); + autoTestsApi.adaptersAutoTestsIdWorkItemsPost(id, new WorkItemIdApiModel().id(workItemId)); LOGGER.debug("Link autotest {} to workitem {} is successfully", id, workItemId); return; @@ -198,7 +198,7 @@ public void unlinkAutoTestToWorkItem(String id, String workItemId) { for (int attempts = 0; attempts < MAX_TRIES; attempts++) { try { - autoTestsApi.deleteAutoTestLinkFromWorkItem(id, workItemId); + autoTestsApi.adaptersAutoTestsIdWorkItemsDelete(id, workItemId); LOGGER.debug("Unlink autotest {} from workitem {} is successfully", id, workItemId); return; @@ -217,37 +217,56 @@ public void unlinkAutoTestToWorkItem(String id, String workItemId) { @Override public List getWorkItemsLinkedToTest(String id) throws ApiException { - return autoTestsApi.getWorkItemsLinkedToAutoTest(id, false, false); + return autoTestsApi.adaptersAutoTestsIdWorkItemsGet(id, false, false); } @Override public List sendTestResults(String testRunUuid, List models) throws ApiException { // Escape HTML tags in models before sending - return testRunsApi.setAutoTestResultsForTestRun(UUID.fromString(testRunUuid), models); + return testRunsApi.adaptersTestRunsIdTestResultsPost(UUID.fromString(testRunUuid), models); } @Override public String addAttachment(String path) throws ApiException { File file = new File(path); - AttachmentModel model = attachmentsApi.apiV2AttachmentsPost(file); + AttachmentModel model = attachmentsApi.adaptersAttachmentsPost(file); return model.getId().toString(); } + @Override public List getTestFromTestRun(String testRunUuid, String configurationId) throws ApiException { - TestRunV2ApiResult model = testRunsApi.getTestRunById(UUID.fromString(testRunUuid)); - UUID configUUID = UUID.fromString(configurationId); + List allTestResults = new ArrayList<>(); + TestResultsFilterApiModel model = new TestResultsFilterApiModel(); + model.setTestRunIds(Collections.singletonList(UUID.fromString(testRunUuid))); + model.setConfigurationIds(Collections.singletonList(UUID.fromString(configurationId))); + int skip = 0; - if (Objects.requireNonNull(model.getTestResults()).isEmpty()) { - return new ArrayList<>(); - } + do { + List testResults = testResultsApi.adaptersTestResultsSearchPost( + skip, + TESTS_LIMIT, + null, + null, + null, + model + ); - return model.getTestResults().stream() - .filter(result -> Objects.equals(result.getConfigurationId(), configUUID)) - .map(result -> Objects.requireNonNull(result.getAutoTest()).getExternalId()).collect(Collectors.toList()); + allTestResults.addAll(testResults); + skip += TESTS_LIMIT; + + if (testResults.isEmpty()) { + skip = -1; + } + } while (skip >= 0); + + return allTestResults.stream() + .map(result -> Objects.requireNonNull(result).getAutotestExternalId()) + .collect(Collectors.toList()); } - public List getAutotestExternalIdsFromTestRun() throws ApiException { + @Override + public List getAutotestExternalIdsFromTestRun() throws ApiException { List allTestResults = new ArrayList<>(); TestResultsFilterApiModel model = Converter.buildTestResultsFilterApiModelWithInProgressOutcome( UUID.fromString(clientConfiguration.getTestRunId()), @@ -257,7 +276,7 @@ public List getAutotestExternalIdsFromTestRun() throws ApiException { do { - List testResults = testResultsApi.apiV2TestResultsSearchPost( + List testResults = testResultsApi.adaptersTestResultsSearchPost( skip, TESTS_LIMIT, null, @@ -281,12 +300,12 @@ public List getAutotestExternalIdsFromTestRun() throws ApiException { @Override public TestResultResponse getTestResult(UUID uuid) throws ApiException { - return testResultsApi.apiV2TestResultsIdGet(uuid); + return testResultsApi.adaptersTestResultsIdGet(uuid); } @Override - public void updateTestResult(UUID uuid, TestResultUpdateV2Request model) throws ApiException { + public void updateTestResult(UUID uuid, TestResultUpdateRequest model) throws ApiException { // Escape HTML tags in model before sending - testResultsApi.apiV2TestResultsIdPut(uuid, model); + testResultsApi.adaptersTestResultsIdPut(uuid, model); } } diff --git a/testit-java-commons/src/main/java/ru/testit/services/core/AdapterStartupHelper.java b/testit-java-commons/src/main/java/ru/testit/services/core/AdapterStartupHelper.java index 741f7b9..d0c7e94 100644 --- a/testit-java-commons/src/main/java/ru/testit/services/core/AdapterStartupHelper.java +++ b/testit-java-commons/src/main/java/ru/testit/services/core/AdapterStartupHelper.java @@ -1,8 +1,8 @@ package ru.testit.services.core; import org.slf4j.Logger; -import ru.testit.client.invoker.ApiException; -import ru.testit.client.model.TestRunV2ApiResult; +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.model.TestRunApiResult; import ru.testit.clients.ClientConfiguration; import ru.testit.clients.Converter; import ru.testit.clients.ITmsApiClient; @@ -80,7 +80,7 @@ private void updateTestRunName() throws ApiException { return; } - TestRunV2ApiResult testRun = this.client.getTestRun(this.clientConfiguration.getTestRunId()); + TestRunApiResult testRun = this.client.getTestRun(this.clientConfiguration.getTestRunId()); if (testRun.getName().equals(testRunName)) { return; diff --git a/testit-java-commons/src/main/java/ru/testit/syncstorage/SyncStorageService.java b/testit-java-commons/src/main/java/ru/testit/syncstorage/SyncStorageService.java index 5b61a2a..1a81236 100644 --- a/testit-java-commons/src/main/java/ru/testit/syncstorage/SyncStorageService.java +++ b/testit-java-commons/src/main/java/ru/testit/syncstorage/SyncStorageService.java @@ -2,7 +2,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import ru.testit.client.model.TestRunV2ApiResult; +import ru.testit.adaptersapi.model.TestRunApiResult; import ru.testit.clients.ClientConfiguration; import ru.testit.clients.ITmsApiClient; import ru.testit.models.TestResult; @@ -143,7 +143,7 @@ private SyncStorageRunner initializeSyncStorage() { String port = adapterConfig.getSyncStoragePort(); String testRunId = clientConfiguration.getTestRunId(); if (testRunId == null || "null".equals(testRunId)) { - TestRunV2ApiResult response = this.client.createTestRun(); + TestRunApiResult response = this.client.createTestRun(); this.clientConfiguration.setTestRunId(response.getId().toString()); testRunId = response.getId().toString(); } diff --git a/testit-java-commons/src/main/java/ru/testit/writers/HttpWriter.java b/testit-java-commons/src/main/java/ru/testit/writers/HttpWriter.java index 1468d76..e14d3c8 100644 --- a/testit-java-commons/src/main/java/ru/testit/writers/HttpWriter.java +++ b/testit-java-commons/src/main/java/ru/testit/writers/HttpWriter.java @@ -2,8 +2,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import ru.testit.client.invoker.ApiException; -import ru.testit.client.model.*; +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.model.*; import ru.testit.clients.ITmsApiClient; import ru.testit.clients.ClientConfiguration; import ru.testit.clients.Converter; @@ -247,7 +247,7 @@ private void updateTestResults(MainContainer container) { } TestResultResponse resultModel = apiClient.getTestResult(testResultId); - TestResultUpdateV2Request model = Converter.testResultToTestResultUpdateModel(resultModel); + TestResultUpdateRequest model = Converter.testResultToTestResultUpdateModel(resultModel); model.setSetupResults(Converter.stepResultsToRequests(beforeResultFinish)); model.setTeardownResults(Converter.stepResultsToRequests(afterResultFinish)); diff --git a/testit-java-commons/src/main/java/ru/testit/writers/helpers/BulkAutotestHelper.java b/testit-java-commons/src/main/java/ru/testit/writers/helpers/BulkAutotestHelper.java index 3287899..e191546 100644 --- a/testit-java-commons/src/main/java/ru/testit/writers/helpers/BulkAutotestHelper.java +++ b/testit-java-commons/src/main/java/ru/testit/writers/helpers/BulkAutotestHelper.java @@ -2,8 +2,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import ru.testit.client.invoker.ApiException; -import ru.testit.client.model.*; +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.model.*; import ru.testit.clients.ITmsApiClient; import ru.testit.clients.ClientConfiguration; diff --git a/testit-java-commons/src/test/java/ru/testit/Helper.java b/testit-java-commons/src/test/java/ru/testit/Helper.java index 5d8dd84..84864e8 100644 --- a/testit-java-commons/src/test/java/ru/testit/Helper.java +++ b/testit-java-commons/src/test/java/ru/testit/Helper.java @@ -1,6 +1,6 @@ package ru.testit; -import ru.testit.client.model.*; +import ru.testit.adaptersapi.model.*; import ru.testit.models.Label; import ru.testit.models.LinkType; import ru.testit.models.*; @@ -346,7 +346,7 @@ private static List generatePutLinks() { link.setTitle(LINK_TITLE); link.setDescription(LINK_DESCRIPTION); link.setUrl(LINK_URL); - link.setType(ru.testit.client.model.LinkType.fromValue(LINK_TYPE.getValue())); + link.setType(ru.testit.adaptersapi.model.LinkType.fromValue(LINK_TYPE.getValue())); links.add(link); @@ -360,7 +360,7 @@ private static List generateUpdateApiLinks() { link.setTitle(LINK_TITLE); link.setDescription(LINK_DESCRIPTION); link.setUrl(LINK_URL); - link.setType(ru.testit.client.model.LinkType.fromValue(LINK_TYPE.getValue())); + link.setType(ru.testit.adaptersapi.model.LinkType.fromValue(LINK_TYPE.getValue())); links.add(link); @@ -374,7 +374,7 @@ private static List generatePostLinks() { link.setTitle(LINK_TITLE); link.setDescription(LINK_DESCRIPTION); link.setUrl(LINK_URL); - link.setType(ru.testit.client.model.LinkType.fromValue(LINK_TYPE.getValue())); + link.setType(ru.testit.adaptersapi.model.LinkType.fromValue(LINK_TYPE.getValue())); links.add(link); diff --git a/testit-java-commons/src/test/java/ru/testit/services/AdapterManagerTest.java b/testit-java-commons/src/test/java/ru/testit/services/AdapterManagerTest.java index cdeecf0..9d7a60b 100644 --- a/testit-java-commons/src/test/java/ru/testit/services/AdapterManagerTest.java +++ b/testit-java-commons/src/test/java/ru/testit/services/AdapterManagerTest.java @@ -5,10 +5,8 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import ru.testit.Helper; -import ru.testit.client.invoker.ApiException; -import ru.testit.client.model.TestRunV2ApiResult; -import ru.testit.client.model.TestStatusApiResult; -import ru.testit.client.model.TestStatusApiType; +import ru.testit.adaptersapi.invoker.ApiException; +import ru.testit.adaptersapi.model.TestRunApiResult; import ru.testit.clients.ITmsApiClient; import ru.testit.clients.ClientConfiguration; import ru.testit.listener.ListenerManager; @@ -73,7 +71,7 @@ void startTests_WithoutTestRunIdAndWithoutTestRunName_InvokeCreateHandler() thro when(clientConfiguration.getTestRunId()).thenReturn("null"); when(clientConfiguration.getTestRunName()).thenReturn("null"); - TestRunV2ApiResult response = new TestRunV2ApiResult(); + TestRunApiResult response = new TestRunApiResult(); response.setId(UUID.fromString(TEST_RUN_ID)); when(client.createTestRun()).thenReturn(response); @@ -94,7 +92,7 @@ void startTests_WithoutTestRunIdAndWithTestRunName_InvokeCreateHandler() throws when(clientConfiguration.getTestRunId()).thenReturn("null"); when(clientConfiguration.getTestRunName()).thenReturn("Test run name"); - TestRunV2ApiResult response = new TestRunV2ApiResult(); + TestRunApiResult response = new TestRunApiResult(); response.setId(UUID.fromString(TEST_RUN_ID)); response.setName("Test run name");