From c9e1e9d9c93dff09646532405a9476726ee270d8 Mon Sep 17 00:00:00 2001 From: ivan-gomes Date: Fri, 9 Apr 2021 12:14:40 -0700 Subject: [PATCH] ST5AS-125 feat: Regenerate for 2021-03 --- api/openapi.yaml | 178 +++++++++++++----- build.gradle | 2 +- build.sbt | 2 +- docs/CommitApi.md | 10 +- docs/ElementApi.md | 26 ++- docs/Project.md | 1 + docs/ProjectApi.md | 14 +- docs/QueryApi.md | 16 +- docs/RelationshipApi.md | 12 +- pom.xml | 2 +- src/main/java/org/omg/sysml/ApiClient.java | 2 +- .../java/org/omg/sysml/api/CommitApi.java | 42 ++++- .../java/org/omg/sysml/api/ElementApi.java | 90 ++++++--- .../java/org/omg/sysml/api/ProjectApi.java | 42 ++++- src/main/java/org/omg/sysml/api/QueryApi.java | 48 +++-- .../org/omg/sysml/api/RelationshipApi.java | 44 ++++- .../java/org/omg/sysml/model/Project.java | 31 ++- .../java/org/omg/sysml/api/CommitApiTest.java | 5 +- .../org/omg/sysml/api/ElementApiTest.java | 10 +- .../org/omg/sysml/api/ProjectApiTest.java | 5 +- .../java/org/omg/sysml/api/QueryApiTest.java | 5 +- .../omg/sysml/api/RelationshipApiTest.java | 5 +- .../java/org/omg/sysml/model/ProjectTest.java | 8 + 23 files changed, 466 insertions(+), 134 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index 1010a8b..7dfb37f 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -15,6 +15,22 @@ paths: /projects: get: operationId: getProjects + parameters: + - description: Page after + in: query + name: page[after] + schema: + type: string + - description: Page before + in: query + name: page[before] + schema: + type: string + - description: Page size + in: query + name: page[size] + schema: + type: integer responses: "200": content: @@ -130,6 +146,21 @@ paths: schema: format: uuid type: string + - description: Page after + in: query + name: page[after] + schema: + type: string + - description: Page before + in: query + name: page[before] + schema: + type: string + - description: Page size + in: query + name: page[size] + schema: + type: integer responses: "200": content: @@ -310,15 +341,30 @@ paths: schema: format: uuid type: string + - description: Page after + in: query + name: page[after] + schema: + type: string + - description: Page before + in: query + name: page[before] + schema: + type: string + - description: Page size + in: query + name: page[size] + schema: + type: integer responses: "200": content: - application/ld+json: + application/json: schema: items: $ref: '#/components/schemas/Element' type: array - application/json: + application/ld+json: schema: items: $ref: '#/components/schemas/Element' @@ -329,19 +375,19 @@ paths: description: Not found. "415": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: The requested content type is not acceptable. "500": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: Internal server error. @@ -380,10 +426,10 @@ paths: responses: "200": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Element' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Element' description: Ok @@ -392,19 +438,19 @@ paths: description: Not found. "415": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: The requested content type is not acceptable. "500": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: Internal server error. @@ -433,15 +479,30 @@ paths: schema: format: uuid type: string + - description: Page after + in: query + name: page[after] + schema: + type: string + - description: Page before + in: query + name: page[before] + schema: + type: string + - description: Page size + in: query + name: page[size] + schema: + type: integer responses: "200": content: - application/ld+json: + application/json: schema: items: $ref: '#/components/schemas/Element' type: array - application/json: + application/ld+json: schema: items: $ref: '#/components/schemas/Element' @@ -452,19 +513,19 @@ paths: description: Not found. "415": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: The requested content type is not acceptable. "500": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: Internal server error. @@ -511,15 +572,30 @@ paths: - out - both type: string + - description: Page after + in: query + name: page[after] + schema: + type: string + - description: Page before + in: query + name: page[before] + schema: + type: string + - description: Page size + in: query + name: page[size] + schema: + type: integer responses: "200": content: - application/ld+json: + application/json: schema: items: $ref: '#/components/schemas/Relationship' type: array - application/json: + application/ld+json: schema: items: $ref: '#/components/schemas/Relationship' @@ -527,19 +603,19 @@ paths: description: Ok "415": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: The requested content type is not acceptable. "500": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: Internal server error. @@ -561,6 +637,21 @@ paths: schema: format: uuid type: string + - description: Page after + in: query + name: page[after] + schema: + type: string + - description: Page before + in: query + name: page[before] + schema: + type: string + - description: Page size + in: query + name: page[size] + schema: + type: integer responses: "200": content: @@ -710,12 +801,12 @@ paths: responses: "200": content: - application/ld+json: + application/json: schema: items: $ref: '#/components/schemas/Element' type: array - application/json: + application/ld+json: schema: items: $ref: '#/components/schemas/Element' @@ -726,19 +817,19 @@ paths: description: Not found. "415": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: The requested content type is not acceptable. "500": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: Internal server error. @@ -775,12 +866,12 @@ paths: responses: "200": content: - application/ld+json: + application/json: schema: items: $ref: '#/components/schemas/Element' type: array - application/json: + application/ld+json: schema: items: $ref: '#/components/schemas/Element' @@ -791,19 +882,19 @@ paths: description: Not found. "415": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: The requested content type is not acceptable. "500": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: Internal server error. @@ -843,12 +934,12 @@ paths: responses: "200": content: - application/ld+json: + application/json: schema: items: $ref: '#/components/schemas/Element' type: array - application/json: + application/ld+json: schema: items: $ref: '#/components/schemas/Element' @@ -859,19 +950,19 @@ paths: description: Not found. "415": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: The requested content type is not acceptable. "500": content: - application/ld+json: + application/json: schema: $ref: '#/components/schemas/Error' - application/json: + application/ld+json: schema: $ref: '#/components/schemas/Error' description: Internal server error. @@ -923,12 +1014,15 @@ components: example: '@type': Project name: name + description: description id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 properties: '@type': enum: - Project type: string + description: + type: string id: format: uuid type: string diff --git a/build.gradle b/build.gradle index da4ad46..af56114 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'java' group = 'org.omg.sysml' -version = '2020-09' +version = '2021-03' buildscript { repositories { diff --git a/build.sbt b/build.sbt index 66a3f75..1de781f 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "org.omg.sysml", name := "sysml-v2-api-client", - version := "2020-09", + version := "2021-03", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/docs/CommitApi.md b/docs/CommitApi.md index 98945bb..7cb8d73 100644 --- a/docs/CommitApi.md +++ b/docs/CommitApi.md @@ -78,7 +78,7 @@ No authorization required # **getCommitsByProject** -> List<Commit> getCommitsByProject(projectId) +> List<Commit> getCommitsByProject(projectId, pageAfter, pageBefore, pageSize) Get commits by project @@ -98,8 +98,11 @@ public class Example { CommitApi apiInstance = new CommitApi(defaultClient); UUID projectId = new UUID(); // UUID | ID of the project + String pageAfter = "pageAfter_example"; // String | Page after + String pageBefore = "pageBefore_example"; // String | Page before + Integer pageSize = 56; // Integer | Page size try { - List result = apiInstance.getCommitsByProject(projectId); + List result = apiInstance.getCommitsByProject(projectId, pageAfter, pageBefore, pageSize); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CommitApi#getCommitsByProject"); @@ -117,6 +120,9 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **projectId** | [**UUID**](.md)| ID of the project | + **pageAfter** | **String**| Page after | [optional] + **pageBefore** | **String**| Page before | [optional] + **pageSize** | **Integer**| Page size | [optional] ### Return type diff --git a/docs/ElementApi.md b/docs/ElementApi.md index ce843c0..0581c3a 100644 --- a/docs/ElementApi.md +++ b/docs/ElementApi.md @@ -66,7 +66,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/ld+json, application/json + - **Accept**: application/json, application/ld+json ### HTTP response details | Status code | Description | Response headers | @@ -79,7 +79,7 @@ No authorization required # **getElementsByProjectCommit** -> List<Element> getElementsByProjectCommit(projectId, commitId) +> List<Element> getElementsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize) Get elements by project and commit @@ -100,8 +100,11 @@ public class Example { ElementApi apiInstance = new ElementApi(defaultClient); UUID projectId = new UUID(); // UUID | ID of the project UUID commitId = new UUID(); // UUID | ID of the commit + String pageAfter = "pageAfter_example"; // String | Page after + String pageBefore = "pageBefore_example"; // String | Page before + Integer pageSize = 56; // Integer | Page size try { - List result = apiInstance.getElementsByProjectCommit(projectId, commitId); + List result = apiInstance.getElementsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ElementApi#getElementsByProjectCommit"); @@ -120,6 +123,9 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **projectId** | [**UUID**](.md)| ID of the project | **commitId** | [**UUID**](.md)| ID of the commit | + **pageAfter** | **String**| Page after | [optional] + **pageBefore** | **String**| Page before | [optional] + **pageSize** | **Integer**| Page size | [optional] ### Return type @@ -132,7 +138,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/ld+json, application/json + - **Accept**: application/json, application/ld+json ### HTTP response details | Status code | Description | Response headers | @@ -145,7 +151,7 @@ No authorization required # **getRootsByProjectCommit** -> List<Element> getRootsByProjectCommit(projectId, commitId) +> List<Element> getRootsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize) Get root elements by project and commit @@ -166,8 +172,11 @@ public class Example { ElementApi apiInstance = new ElementApi(defaultClient); UUID projectId = new UUID(); // UUID | ID of the project UUID commitId = new UUID(); // UUID | ID of the commit + String pageAfter = "pageAfter_example"; // String | Page after + String pageBefore = "pageBefore_example"; // String | Page before + Integer pageSize = 56; // Integer | Page size try { - List result = apiInstance.getRootsByProjectCommit(projectId, commitId); + List result = apiInstance.getRootsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ElementApi#getRootsByProjectCommit"); @@ -186,6 +195,9 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **projectId** | [**UUID**](.md)| ID of the project | **commitId** | [**UUID**](.md)| ID of the commit | + **pageAfter** | **String**| Page after | [optional] + **pageBefore** | **String**| Page before | [optional] + **pageSize** | **Integer**| Page size | [optional] ### Return type @@ -198,7 +210,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/ld+json, application/json + - **Accept**: application/json, application/ld+json ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/Project.md b/docs/Project.md index 3b9d732..112d1f9 100644 --- a/docs/Project.md +++ b/docs/Project.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **atType** | [**AtTypeEnum**](#AtTypeEnum) | | [optional] +**description** | **String** | | [optional] **id** | [**UUID**](UUID.md) | | [optional] **name** | **String** | | [optional] diff --git a/docs/ProjectApi.md b/docs/ProjectApi.md index 3a81f68..6188b3c 100644 --- a/docs/ProjectApi.md +++ b/docs/ProjectApi.md @@ -75,7 +75,7 @@ No authorization required # **getProjects** -> List<Project> getProjects() +> List<Project> getProjects(pageAfter, pageBefore, pageSize) Get projects @@ -94,8 +94,11 @@ public class Example { defaultClient.setBasePath("http://localhost"); ProjectApi apiInstance = new ProjectApi(defaultClient); + String pageAfter = "pageAfter_example"; // String | Page after + String pageBefore = "pageBefore_example"; // String | Page before + Integer pageSize = 56; // Integer | Page size try { - List result = apiInstance.getProjects(); + List result = apiInstance.getProjects(pageAfter, pageBefore, pageSize); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ProjectApi#getProjects"); @@ -109,7 +112,12 @@ public class Example { ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageAfter** | **String**| Page after | [optional] + **pageBefore** | **String**| Page before | [optional] + **pageSize** | **Integer**| Page size | [optional] ### Return type diff --git a/docs/QueryApi.md b/docs/QueryApi.md index d24ce61..26c252f 100644 --- a/docs/QueryApi.md +++ b/docs/QueryApi.md @@ -14,7 +14,7 @@ Method | HTTP request | Description # **getQueriesByProject** -> List<Query> getQueriesByProject(projectId) +> List<Query> getQueriesByProject(projectId, pageAfter, pageBefore, pageSize) Get queries by project @@ -34,8 +34,11 @@ public class Example { QueryApi apiInstance = new QueryApi(defaultClient); UUID projectId = new UUID(); // UUID | ID of the project + String pageAfter = "pageAfter_example"; // String | Page after + String pageBefore = "pageBefore_example"; // String | Page before + Integer pageSize = 56; // Integer | Page size try { - List result = apiInstance.getQueriesByProject(projectId); + List result = apiInstance.getQueriesByProject(projectId, pageAfter, pageBefore, pageSize); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling QueryApi#getQueriesByProject"); @@ -53,6 +56,9 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **projectId** | [**UUID**](.md)| ID of the project | + **pageAfter** | **String**| Page after | [optional] + **pageBefore** | **String**| Page before | [optional] + **pageSize** | **Integer**| Page size | [optional] ### Return type @@ -199,7 +205,7 @@ No authorization required ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/ld+json, application/json + - **Accept**: application/json, application/ld+json ### HTTP response details | Status code | Description | Response headers | @@ -267,7 +273,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/ld+json, application/json + - **Accept**: application/json, application/ld+json ### HTTP response details | Status code | Description | Response headers | @@ -337,7 +343,7 @@ No authorization required ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/ld+json, application/json + - **Accept**: application/json, application/ld+json ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/RelationshipApi.md b/docs/RelationshipApi.md index f20462f..e067242 100644 --- a/docs/RelationshipApi.md +++ b/docs/RelationshipApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **getRelationshipsByProjectCommitRelatedElement** -> List<Relationship> getRelationshipsByProjectCommitRelatedElement(projectId, commitId, relatedElementId, direction) +> List<Relationship> getRelationshipsByProjectCommitRelatedElement(projectId, commitId, relatedElementId, direction, pageAfter, pageBefore, pageSize) Get relationships by project, commit, and related element @@ -32,8 +32,11 @@ public class Example { UUID commitId = new UUID(); // UUID | ID of the commit UUID relatedElementId = new UUID(); // UUID | ID of the related element String direction = "both"; // String | Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element + String pageAfter = "pageAfter_example"; // String | Page after + String pageBefore = "pageBefore_example"; // String | Page before + Integer pageSize = 56; // Integer | Page size try { - List result = apiInstance.getRelationshipsByProjectCommitRelatedElement(projectId, commitId, relatedElementId, direction); + List result = apiInstance.getRelationshipsByProjectCommitRelatedElement(projectId, commitId, relatedElementId, direction, pageAfter, pageBefore, pageSize); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RelationshipApi#getRelationshipsByProjectCommitRelatedElement"); @@ -54,6 +57,9 @@ Name | Type | Description | Notes **commitId** | [**UUID**](.md)| ID of the commit | **relatedElementId** | [**UUID**](.md)| ID of the related element | **direction** | **String**| Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element | [optional] [default to both] [enum: in, out, both] + **pageAfter** | **String**| Page after | [optional] + **pageBefore** | **String**| Page before | [optional] + **pageSize** | **Integer**| Page size | [optional] ### Return type @@ -66,7 +72,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/ld+json, application/json + - **Accept**: application/json, application/ld+json ### HTTP response details | Status code | Description | Response headers | diff --git a/pom.xml b/pom.xml index 0cb1003..0193ce2 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sysml-v2-api-client jar sysml-v2-api-client - 2020-09 + 2021-03 https://github.com/openapitools/openapi-generator OpenAPI Java diff --git a/src/main/java/org/omg/sysml/ApiClient.java b/src/main/java/org/omg/sysml/ApiClient.java index cc5fdbb..bac9d1c 100644 --- a/src/main/java/org/omg/sysml/ApiClient.java +++ b/src/main/java/org/omg/sysml/ApiClient.java @@ -108,7 +108,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2020-09/java"); + setUserAgent("OpenAPI-Generator/2021-03/java"); authentications = new HashMap(); } diff --git a/src/main/java/org/omg/sysml/api/CommitApi.java b/src/main/java/org/omg/sysml/api/CommitApi.java index 74b6d8d..31b9b11 100644 --- a/src/main/java/org/omg/sysml/api/CommitApi.java +++ b/src/main/java/org/omg/sysml/api/CommitApi.java @@ -196,6 +196,9 @@ public okhttp3.Call getCommitByProjectAndIdAsync(UUID projectId, UUID commitId, /** * Build call for getCommitsByProject * @param projectId ID of the project (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -209,7 +212,7 @@ public okhttp3.Call getCommitByProjectAndIdAsync(UUID projectId, UUID commitId, 0 Unexpected response. - */ - public okhttp3.Call getCommitsByProjectCall(UUID projectId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCommitsByProjectCall(UUID projectId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -218,6 +221,18 @@ public okhttp3.Call getCommitsByProjectCall(UUID projectId, final ApiCallback _c List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (pageAfter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[after]", pageAfter)); + } + + if (pageBefore != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[before]", pageBefore)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[size]", pageSize)); + } + Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); @@ -240,7 +255,7 @@ public okhttp3.Call getCommitsByProjectCall(UUID projectId, final ApiCallback _c } @SuppressWarnings("rawtypes") - private okhttp3.Call getCommitsByProjectValidateBeforeCall(UUID projectId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCommitsByProjectValidateBeforeCall(UUID projectId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { @@ -248,7 +263,7 @@ private okhttp3.Call getCommitsByProjectValidateBeforeCall(UUID projectId, final } - okhttp3.Call localVarCall = getCommitsByProjectCall(projectId, _callback); + okhttp3.Call localVarCall = getCommitsByProjectCall(projectId, pageAfter, pageBefore, pageSize, _callback); return localVarCall; } @@ -257,6 +272,9 @@ private okhttp3.Call getCommitsByProjectValidateBeforeCall(UUID projectId, final * Get commits by project * * @param projectId ID of the project (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return List<Commit> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -269,8 +287,8 @@ private okhttp3.Call getCommitsByProjectValidateBeforeCall(UUID projectId, final 0 Unexpected response. - */ - public List getCommitsByProject(UUID projectId) throws ApiException { - ApiResponse> localVarResp = getCommitsByProjectWithHttpInfo(projectId); + public List getCommitsByProject(UUID projectId, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + ApiResponse> localVarResp = getCommitsByProjectWithHttpInfo(projectId, pageAfter, pageBefore, pageSize); return localVarResp.getData(); } @@ -278,6 +296,9 @@ public List getCommitsByProject(UUID projectId) throws ApiException { * Get commits by project * * @param projectId ID of the project (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return ApiResponse<List<Commit>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -290,8 +311,8 @@ public List getCommitsByProject(UUID projectId) throws ApiException { 0 Unexpected response. - */ - public ApiResponse> getCommitsByProjectWithHttpInfo(UUID projectId) throws ApiException { - okhttp3.Call localVarCall = getCommitsByProjectValidateBeforeCall(projectId, null); + public ApiResponse> getCommitsByProjectWithHttpInfo(UUID projectId, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getCommitsByProjectValidateBeforeCall(projectId, pageAfter, pageBefore, pageSize, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -300,6 +321,9 @@ public ApiResponse> getCommitsByProjectWithHttpInfo(UUID projectId) * Get commits by project (asynchronously) * * @param projectId ID of the project (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -313,9 +337,9 @@ public ApiResponse> getCommitsByProjectWithHttpInfo(UUID projectId) 0 Unexpected response. - */ - public okhttp3.Call getCommitsByProjectAsync(UUID projectId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getCommitsByProjectAsync(UUID projectId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getCommitsByProjectValidateBeforeCall(projectId, _callback); + okhttp3.Call localVarCall = getCommitsByProjectValidateBeforeCall(projectId, pageAfter, pageBefore, pageSize, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/omg/sysml/api/ElementApi.java b/src/main/java/org/omg/sysml/api/ElementApi.java index 8a6ecac..cf48a7f 100644 --- a/src/main/java/org/omg/sysml/api/ElementApi.java +++ b/src/main/java/org/omg/sysml/api/ElementApi.java @@ -89,7 +89,7 @@ public okhttp3.Call getElementByProjectCommitIdCall(UUID projectId, UUID commitI Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/ld+json", "application/json" + "application/json", "application/ld+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -207,6 +207,9 @@ public okhttp3.Call getElementByProjectCommitIdAsync(UUID projectId, UUID commit * Build call for getElementsByProjectCommit * @param projectId ID of the project (required) * @param commitId ID of the commit (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -220,7 +223,7 @@ public okhttp3.Call getElementByProjectCommitIdAsync(UUID projectId, UUID commit 0 Unexpected response. - */ - public okhttp3.Call getElementsByProjectCommitCall(UUID projectId, UUID commitId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getElementsByProjectCommitCall(UUID projectId, UUID commitId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -230,11 +233,23 @@ public okhttp3.Call getElementsByProjectCommitCall(UUID projectId, UUID commitId List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (pageAfter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[after]", pageAfter)); + } + + if (pageBefore != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[before]", pageBefore)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[size]", pageSize)); + } + Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/ld+json", "application/json" + "application/json", "application/ld+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -252,7 +267,7 @@ public okhttp3.Call getElementsByProjectCommitCall(UUID projectId, UUID commitId } @SuppressWarnings("rawtypes") - private okhttp3.Call getElementsByProjectCommitValidateBeforeCall(UUID projectId, UUID commitId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getElementsByProjectCommitValidateBeforeCall(UUID projectId, UUID commitId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { @@ -265,7 +280,7 @@ private okhttp3.Call getElementsByProjectCommitValidateBeforeCall(UUID projectId } - okhttp3.Call localVarCall = getElementsByProjectCommitCall(projectId, commitId, _callback); + okhttp3.Call localVarCall = getElementsByProjectCommitCall(projectId, commitId, pageAfter, pageBefore, pageSize, _callback); return localVarCall; } @@ -275,6 +290,9 @@ private okhttp3.Call getElementsByProjectCommitValidateBeforeCall(UUID projectId * * @param projectId ID of the project (required) * @param commitId ID of the commit (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return List<Element> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -287,8 +305,8 @@ private okhttp3.Call getElementsByProjectCommitValidateBeforeCall(UUID projectId 0 Unexpected response. - */ - public List getElementsByProjectCommit(UUID projectId, UUID commitId) throws ApiException { - ApiResponse> localVarResp = getElementsByProjectCommitWithHttpInfo(projectId, commitId); + public List getElementsByProjectCommit(UUID projectId, UUID commitId, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + ApiResponse> localVarResp = getElementsByProjectCommitWithHttpInfo(projectId, commitId, pageAfter, pageBefore, pageSize); return localVarResp.getData(); } @@ -297,6 +315,9 @@ public List getElementsByProjectCommit(UUID projectId, UUID commitId) t * * @param projectId ID of the project (required) * @param commitId ID of the commit (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return ApiResponse<List<Element>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -309,8 +330,8 @@ public List getElementsByProjectCommit(UUID projectId, UUID commitId) t 0 Unexpected response. - */ - public ApiResponse> getElementsByProjectCommitWithHttpInfo(UUID projectId, UUID commitId) throws ApiException { - okhttp3.Call localVarCall = getElementsByProjectCommitValidateBeforeCall(projectId, commitId, null); + public ApiResponse> getElementsByProjectCommitWithHttpInfo(UUID projectId, UUID commitId, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getElementsByProjectCommitValidateBeforeCall(projectId, commitId, pageAfter, pageBefore, pageSize, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -320,6 +341,9 @@ public ApiResponse> getElementsByProjectCommitWithHttpInfo(UUID pr * * @param projectId ID of the project (required) * @param commitId ID of the commit (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -333,9 +357,9 @@ public ApiResponse> getElementsByProjectCommitWithHttpInfo(UUID pr 0 Unexpected response. - */ - public okhttp3.Call getElementsByProjectCommitAsync(UUID projectId, UUID commitId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getElementsByProjectCommitAsync(UUID projectId, UUID commitId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getElementsByProjectCommitValidateBeforeCall(projectId, commitId, _callback); + okhttp3.Call localVarCall = getElementsByProjectCommitValidateBeforeCall(projectId, commitId, pageAfter, pageBefore, pageSize, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -344,6 +368,9 @@ public okhttp3.Call getElementsByProjectCommitAsync(UUID projectId, UUID commitI * Build call for getRootsByProjectCommit * @param projectId ID of the project (required) * @param commitId ID of the commit (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -357,7 +384,7 @@ public okhttp3.Call getElementsByProjectCommitAsync(UUID projectId, UUID commitI 0 Unexpected response. - */ - public okhttp3.Call getRootsByProjectCommitCall(UUID projectId, UUID commitId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRootsByProjectCommitCall(UUID projectId, UUID commitId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -367,11 +394,23 @@ public okhttp3.Call getRootsByProjectCommitCall(UUID projectId, UUID commitId, f List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (pageAfter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[after]", pageAfter)); + } + + if (pageBefore != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[before]", pageBefore)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[size]", pageSize)); + } + Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/ld+json", "application/json" + "application/json", "application/ld+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -389,7 +428,7 @@ public okhttp3.Call getRootsByProjectCommitCall(UUID projectId, UUID commitId, f } @SuppressWarnings("rawtypes") - private okhttp3.Call getRootsByProjectCommitValidateBeforeCall(UUID projectId, UUID commitId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getRootsByProjectCommitValidateBeforeCall(UUID projectId, UUID commitId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { @@ -402,7 +441,7 @@ private okhttp3.Call getRootsByProjectCommitValidateBeforeCall(UUID projectId, U } - okhttp3.Call localVarCall = getRootsByProjectCommitCall(projectId, commitId, _callback); + okhttp3.Call localVarCall = getRootsByProjectCommitCall(projectId, commitId, pageAfter, pageBefore, pageSize, _callback); return localVarCall; } @@ -412,6 +451,9 @@ private okhttp3.Call getRootsByProjectCommitValidateBeforeCall(UUID projectId, U * * @param projectId ID of the project (required) * @param commitId ID of the commit (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return List<Element> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -424,8 +466,8 @@ private okhttp3.Call getRootsByProjectCommitValidateBeforeCall(UUID projectId, U 0 Unexpected response. - */ - public List getRootsByProjectCommit(UUID projectId, UUID commitId) throws ApiException { - ApiResponse> localVarResp = getRootsByProjectCommitWithHttpInfo(projectId, commitId); + public List getRootsByProjectCommit(UUID projectId, UUID commitId, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + ApiResponse> localVarResp = getRootsByProjectCommitWithHttpInfo(projectId, commitId, pageAfter, pageBefore, pageSize); return localVarResp.getData(); } @@ -434,6 +476,9 @@ public List getRootsByProjectCommit(UUID projectId, UUID commitId) thro * * @param projectId ID of the project (required) * @param commitId ID of the commit (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return ApiResponse<List<Element>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -446,8 +491,8 @@ public List getRootsByProjectCommit(UUID projectId, UUID commitId) thro 0 Unexpected response. - */ - public ApiResponse> getRootsByProjectCommitWithHttpInfo(UUID projectId, UUID commitId) throws ApiException { - okhttp3.Call localVarCall = getRootsByProjectCommitValidateBeforeCall(projectId, commitId, null); + public ApiResponse> getRootsByProjectCommitWithHttpInfo(UUID projectId, UUID commitId, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getRootsByProjectCommitValidateBeforeCall(projectId, commitId, pageAfter, pageBefore, pageSize, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -457,6 +502,9 @@ public ApiResponse> getRootsByProjectCommitWithHttpInfo(UUID proje * * @param projectId ID of the project (required) * @param commitId ID of the commit (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -470,9 +518,9 @@ public ApiResponse> getRootsByProjectCommitWithHttpInfo(UUID proje 0 Unexpected response. - */ - public okhttp3.Call getRootsByProjectCommitAsync(UUID projectId, UUID commitId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getRootsByProjectCommitAsync(UUID projectId, UUID commitId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getRootsByProjectCommitValidateBeforeCall(projectId, commitId, _callback); + okhttp3.Call localVarCall = getRootsByProjectCommitValidateBeforeCall(projectId, commitId, pageAfter, pageBefore, pageSize, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/omg/sysml/api/ProjectApi.java b/src/main/java/org/omg/sysml/api/ProjectApi.java index 8e03302..a931761 100644 --- a/src/main/java/org/omg/sysml/api/ProjectApi.java +++ b/src/main/java/org/omg/sysml/api/ProjectApi.java @@ -185,6 +185,9 @@ public okhttp3.Call getProjectByIdAsync(UUID projectId, final ApiCallback 0 Unexpected response. - */ - public okhttp3.Call getProjectsCall(final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProjectsCall(String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -205,6 +208,18 @@ public okhttp3.Call getProjectsCall(final ApiCallback _callback) throws ApiExcep List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (pageAfter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[after]", pageAfter)); + } + + if (pageBefore != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[before]", pageBefore)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[size]", pageSize)); + } + Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); @@ -227,10 +242,10 @@ public okhttp3.Call getProjectsCall(final ApiCallback _callback) throws ApiExcep } @SuppressWarnings("rawtypes") - private okhttp3.Call getProjectsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + private okhttp3.Call getProjectsValidateBeforeCall(String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getProjectsCall(_callback); + okhttp3.Call localVarCall = getProjectsCall(pageAfter, pageBefore, pageSize, _callback); return localVarCall; } @@ -238,6 +253,9 @@ private okhttp3.Call getProjectsValidateBeforeCall(final ApiCallback _callback) /** * Get projects * + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return List<Project> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -249,14 +267,17 @@ private okhttp3.Call getProjectsValidateBeforeCall(final ApiCallback _callback) 0 Unexpected response. - */ - public List getProjects() throws ApiException { - ApiResponse> localVarResp = getProjectsWithHttpInfo(); + public List getProjects(String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + ApiResponse> localVarResp = getProjectsWithHttpInfo(pageAfter, pageBefore, pageSize); return localVarResp.getData(); } /** * Get projects * + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return ApiResponse<List<Project>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -268,8 +289,8 @@ public List getProjects() throws ApiException { 0 Unexpected response. - */ - public ApiResponse> getProjectsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getProjectsValidateBeforeCall(null); + public ApiResponse> getProjectsWithHttpInfo(String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getProjectsValidateBeforeCall(pageAfter, pageBefore, pageSize, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -277,6 +298,9 @@ public ApiResponse> getProjectsWithHttpInfo() throws ApiException /** * Get projects (asynchronously) * + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -289,9 +313,9 @@ public ApiResponse> getProjectsWithHttpInfo() throws ApiException 0 Unexpected response. - */ - public okhttp3.Call getProjectsAsync(final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getProjectsAsync(String pageAfter, String pageBefore, Integer pageSize, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getProjectsValidateBeforeCall(_callback); + okhttp3.Call localVarCall = getProjectsValidateBeforeCall(pageAfter, pageBefore, pageSize, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/omg/sysml/api/QueryApi.java b/src/main/java/org/omg/sysml/api/QueryApi.java index e8949fe..c76ad59 100644 --- a/src/main/java/org/omg/sysml/api/QueryApi.java +++ b/src/main/java/org/omg/sysml/api/QueryApi.java @@ -60,6 +60,9 @@ public void setApiClient(ApiClient apiClient) { /** * Build call for getQueriesByProject * @param projectId ID of the project (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -73,7 +76,7 @@ public void setApiClient(ApiClient apiClient) { 0 Unexpected response. - */ - public okhttp3.Call getQueriesByProjectCall(UUID projectId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getQueriesByProjectCall(UUID projectId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -82,6 +85,18 @@ public okhttp3.Call getQueriesByProjectCall(UUID projectId, final ApiCallback _c List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (pageAfter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[after]", pageAfter)); + } + + if (pageBefore != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[before]", pageBefore)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[size]", pageSize)); + } + Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); @@ -104,7 +119,7 @@ public okhttp3.Call getQueriesByProjectCall(UUID projectId, final ApiCallback _c } @SuppressWarnings("rawtypes") - private okhttp3.Call getQueriesByProjectValidateBeforeCall(UUID projectId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getQueriesByProjectValidateBeforeCall(UUID projectId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { @@ -112,7 +127,7 @@ private okhttp3.Call getQueriesByProjectValidateBeforeCall(UUID projectId, final } - okhttp3.Call localVarCall = getQueriesByProjectCall(projectId, _callback); + okhttp3.Call localVarCall = getQueriesByProjectCall(projectId, pageAfter, pageBefore, pageSize, _callback); return localVarCall; } @@ -121,6 +136,9 @@ private okhttp3.Call getQueriesByProjectValidateBeforeCall(UUID projectId, final * Get queries by project * * @param projectId ID of the project (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return List<Query> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -133,8 +151,8 @@ private okhttp3.Call getQueriesByProjectValidateBeforeCall(UUID projectId, final 0 Unexpected response. - */ - public List getQueriesByProject(UUID projectId) throws ApiException { - ApiResponse> localVarResp = getQueriesByProjectWithHttpInfo(projectId); + public List getQueriesByProject(UUID projectId, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + ApiResponse> localVarResp = getQueriesByProjectWithHttpInfo(projectId, pageAfter, pageBefore, pageSize); return localVarResp.getData(); } @@ -142,6 +160,9 @@ public List getQueriesByProject(UUID projectId) throws ApiException { * Get queries by project * * @param projectId ID of the project (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return ApiResponse<List<Query>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -154,8 +175,8 @@ public List getQueriesByProject(UUID projectId) throws ApiException { 0 Unexpected response. - */ - public ApiResponse> getQueriesByProjectWithHttpInfo(UUID projectId) throws ApiException { - okhttp3.Call localVarCall = getQueriesByProjectValidateBeforeCall(projectId, null); + public ApiResponse> getQueriesByProjectWithHttpInfo(UUID projectId, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getQueriesByProjectValidateBeforeCall(projectId, pageAfter, pageBefore, pageSize, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -164,6 +185,9 @@ public ApiResponse> getQueriesByProjectWithHttpInfo(UUID projectId) * Get queries by project (asynchronously) * * @param projectId ID of the project (required) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -177,9 +201,9 @@ public ApiResponse> getQueriesByProjectWithHttpInfo(UUID projectId) 0 Unexpected response. - */ - public okhttp3.Call getQueriesByProjectAsync(UUID projectId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getQueriesByProjectAsync(UUID projectId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getQueriesByProjectValidateBeforeCall(projectId, _callback); + okhttp3.Call localVarCall = getQueriesByProjectValidateBeforeCall(projectId, pageAfter, pageBefore, pageSize, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -356,7 +380,7 @@ public okhttp3.Call getQueryResultsByProjectIdQueryCall(UUID projectId, Query bo Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/ld+json", "application/json" + "application/json", "application/ld+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -501,7 +525,7 @@ public okhttp3.Call getQueryResultsByProjectIdQueryIdCall(UUID projectId, UUID q Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/ld+json", "application/json" + "application/json", "application/ld+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -645,7 +669,7 @@ public okhttp3.Call getQueryResultsByProjectIdQueryPostCall(UUID projectId, Quer Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/ld+json", "application/json" + "application/json", "application/ld+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { diff --git a/src/main/java/org/omg/sysml/api/RelationshipApi.java b/src/main/java/org/omg/sysml/api/RelationshipApi.java index 8081ae8..970d7ab 100644 --- a/src/main/java/org/omg/sysml/api/RelationshipApi.java +++ b/src/main/java/org/omg/sysml/api/RelationshipApi.java @@ -62,6 +62,9 @@ public void setApiClient(ApiClient apiClient) { * @param commitId ID of the commit (required) * @param relatedElementId ID of the related element (required) * @param direction Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element (optional, default to both) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -74,7 +77,7 @@ public void setApiClient(ApiClient apiClient) { 0 Unexpected response. - */ - public okhttp3.Call getRelationshipsByProjectCommitRelatedElementCall(UUID projectId, UUID commitId, UUID relatedElementId, String direction, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRelationshipsByProjectCommitRelatedElementCall(UUID projectId, UUID commitId, UUID relatedElementId, String direction, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -89,11 +92,23 @@ public okhttp3.Call getRelationshipsByProjectCommitRelatedElementCall(UUID proje localVarQueryParams.addAll(localVarApiClient.parameterToPair("direction", direction)); } + if (pageAfter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[after]", pageAfter)); + } + + if (pageBefore != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[before]", pageBefore)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[size]", pageSize)); + } + Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/ld+json", "application/json" + "application/json", "application/ld+json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -111,7 +126,7 @@ public okhttp3.Call getRelationshipsByProjectCommitRelatedElementCall(UUID proje } @SuppressWarnings("rawtypes") - private okhttp3.Call getRelationshipsByProjectCommitRelatedElementValidateBeforeCall(UUID projectId, UUID commitId, UUID relatedElementId, String direction, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getRelationshipsByProjectCommitRelatedElementValidateBeforeCall(UUID projectId, UUID commitId, UUID relatedElementId, String direction, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { @@ -129,7 +144,7 @@ private okhttp3.Call getRelationshipsByProjectCommitRelatedElementValidateBefore } - okhttp3.Call localVarCall = getRelationshipsByProjectCommitRelatedElementCall(projectId, commitId, relatedElementId, direction, _callback); + okhttp3.Call localVarCall = getRelationshipsByProjectCommitRelatedElementCall(projectId, commitId, relatedElementId, direction, pageAfter, pageBefore, pageSize, _callback); return localVarCall; } @@ -141,6 +156,9 @@ private okhttp3.Call getRelationshipsByProjectCommitRelatedElementValidateBefore * @param commitId ID of the commit (required) * @param relatedElementId ID of the related element (required) * @param direction Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element (optional, default to both) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return List<Relationship> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -152,8 +170,8 @@ private okhttp3.Call getRelationshipsByProjectCommitRelatedElementValidateBefore 0 Unexpected response. - */ - public List getRelationshipsByProjectCommitRelatedElement(UUID projectId, UUID commitId, UUID relatedElementId, String direction) throws ApiException { - ApiResponse> localVarResp = getRelationshipsByProjectCommitRelatedElementWithHttpInfo(projectId, commitId, relatedElementId, direction); + public List getRelationshipsByProjectCommitRelatedElement(UUID projectId, UUID commitId, UUID relatedElementId, String direction, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + ApiResponse> localVarResp = getRelationshipsByProjectCommitRelatedElementWithHttpInfo(projectId, commitId, relatedElementId, direction, pageAfter, pageBefore, pageSize); return localVarResp.getData(); } @@ -164,6 +182,9 @@ public List getRelationshipsByProjectCommitRelatedElement(UUID pro * @param commitId ID of the commit (required) * @param relatedElementId ID of the related element (required) * @param direction Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element (optional, default to both) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @return ApiResponse<List<Relationship>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -175,8 +196,8 @@ public List getRelationshipsByProjectCommitRelatedElement(UUID pro 0 Unexpected response. - */ - public ApiResponse> getRelationshipsByProjectCommitRelatedElementWithHttpInfo(UUID projectId, UUID commitId, UUID relatedElementId, String direction) throws ApiException { - okhttp3.Call localVarCall = getRelationshipsByProjectCommitRelatedElementValidateBeforeCall(projectId, commitId, relatedElementId, direction, null); + public ApiResponse> getRelationshipsByProjectCommitRelatedElementWithHttpInfo(UUID projectId, UUID commitId, UUID relatedElementId, String direction, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getRelationshipsByProjectCommitRelatedElementValidateBeforeCall(projectId, commitId, relatedElementId, direction, pageAfter, pageBefore, pageSize, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -188,6 +209,9 @@ public ApiResponse> getRelationshipsByProjectCommitRelatedEle * @param commitId ID of the commit (required) * @param relatedElementId ID of the related element (required) * @param direction Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element (optional, default to both) + * @param pageAfter Page after (optional) + * @param pageBefore Page before (optional) + * @param pageSize Page size (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -200,9 +224,9 @@ public ApiResponse> getRelationshipsByProjectCommitRelatedEle 0 Unexpected response. - */ - public okhttp3.Call getRelationshipsByProjectCommitRelatedElementAsync(UUID projectId, UUID commitId, UUID relatedElementId, String direction, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getRelationshipsByProjectCommitRelatedElementAsync(UUID projectId, UUID commitId, UUID relatedElementId, String direction, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getRelationshipsByProjectCommitRelatedElementValidateBeforeCall(projectId, commitId, relatedElementId, direction, _callback); + okhttp3.Call localVarCall = getRelationshipsByProjectCommitRelatedElementValidateBeforeCall(projectId, commitId, relatedElementId, direction, pageAfter, pageBefore, pageSize, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/org/omg/sysml/model/Project.java b/src/main/java/org/omg/sysml/model/Project.java index cca46ab..164b209 100644 --- a/src/main/java/org/omg/sysml/model/Project.java +++ b/src/main/java/org/omg/sysml/model/Project.java @@ -79,6 +79,10 @@ public AtTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_AT_TYPE) private AtTypeEnum atType; + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) private UUID id; @@ -111,6 +115,29 @@ public void setAtType(AtTypeEnum atType) { } + public Project description(String description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + public Project id(UUID id) { this.id = id; @@ -167,13 +194,14 @@ public boolean equals(java.lang.Object o) { } Project project = (Project) o; return Objects.equals(this.atType, project.atType) && + Objects.equals(this.description, project.description) && Objects.equals(this.id, project.id) && Objects.equals(this.name, project.name); } @Override public int hashCode() { - return Objects.hash(atType, id, name); + return Objects.hash(atType, description, id, name); } @@ -182,6 +210,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Project {\n"); sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/src/test/java/org/omg/sysml/api/CommitApiTest.java b/src/test/java/org/omg/sysml/api/CommitApiTest.java index ccee30b..921ab6b 100644 --- a/src/test/java/org/omg/sysml/api/CommitApiTest.java +++ b/src/test/java/org/omg/sysml/api/CommitApiTest.java @@ -62,7 +62,10 @@ public void getCommitByProjectAndIdTest() throws ApiException { @Test public void getCommitsByProjectTest() throws ApiException { UUID projectId = null; - List response = api.getCommitsByProject(projectId); + String pageAfter = null; + String pageBefore = null; + Integer pageSize = null; + List response = api.getCommitsByProject(projectId, pageAfter, pageBefore, pageSize); // TODO: test validations } diff --git a/src/test/java/org/omg/sysml/api/ElementApiTest.java b/src/test/java/org/omg/sysml/api/ElementApiTest.java index 8d06371..915c0cf 100644 --- a/src/test/java/org/omg/sysml/api/ElementApiTest.java +++ b/src/test/java/org/omg/sysml/api/ElementApiTest.java @@ -64,7 +64,10 @@ public void getElementByProjectCommitIdTest() throws ApiException { public void getElementsByProjectCommitTest() throws ApiException { UUID projectId = null; UUID commitId = null; - List response = api.getElementsByProjectCommit(projectId, commitId); + String pageAfter = null; + String pageBefore = null; + Integer pageSize = null; + List response = api.getElementsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize); // TODO: test validations } @@ -81,7 +84,10 @@ public void getElementsByProjectCommitTest() throws ApiException { public void getRootsByProjectCommitTest() throws ApiException { UUID projectId = null; UUID commitId = null; - List response = api.getRootsByProjectCommit(projectId, commitId); + String pageAfter = null; + String pageBefore = null; + Integer pageSize = null; + List response = api.getRootsByProjectCommit(projectId, commitId, pageAfter, pageBefore, pageSize); // TODO: test validations } diff --git a/src/test/java/org/omg/sysml/api/ProjectApiTest.java b/src/test/java/org/omg/sysml/api/ProjectApiTest.java index 3960784..dd66df2 100644 --- a/src/test/java/org/omg/sysml/api/ProjectApiTest.java +++ b/src/test/java/org/omg/sysml/api/ProjectApiTest.java @@ -60,7 +60,10 @@ public void getProjectByIdTest() throws ApiException { */ @Test public void getProjectsTest() throws ApiException { - List response = api.getProjects(); + String pageAfter = null; + String pageBefore = null; + Integer pageSize = null; + List response = api.getProjects(pageAfter, pageBefore, pageSize); // TODO: test validations } diff --git a/src/test/java/org/omg/sysml/api/QueryApiTest.java b/src/test/java/org/omg/sysml/api/QueryApiTest.java index c31d290..0c633c5 100644 --- a/src/test/java/org/omg/sysml/api/QueryApiTest.java +++ b/src/test/java/org/omg/sysml/api/QueryApiTest.java @@ -46,7 +46,10 @@ public class QueryApiTest { @Test public void getQueriesByProjectTest() throws ApiException { UUID projectId = null; - List response = api.getQueriesByProject(projectId); + String pageAfter = null; + String pageBefore = null; + Integer pageSize = null; + List response = api.getQueriesByProject(projectId, pageAfter, pageBefore, pageSize); // TODO: test validations } diff --git a/src/test/java/org/omg/sysml/api/RelationshipApiTest.java b/src/test/java/org/omg/sysml/api/RelationshipApiTest.java index 8f0a8ed..bf3747f 100644 --- a/src/test/java/org/omg/sysml/api/RelationshipApiTest.java +++ b/src/test/java/org/omg/sysml/api/RelationshipApiTest.java @@ -48,7 +48,10 @@ public void getRelationshipsByProjectCommitRelatedElementTest() throws ApiExcept UUID commitId = null; UUID relatedElementId = null; String direction = null; - List response = api.getRelationshipsByProjectCommitRelatedElement(projectId, commitId, relatedElementId, direction); + String pageAfter = null; + String pageBefore = null; + Integer pageSize = null; + List response = api.getRelationshipsByProjectCommitRelatedElement(projectId, commitId, relatedElementId, direction, pageAfter, pageBefore, pageSize); // TODO: test validations } diff --git a/src/test/java/org/omg/sysml/model/ProjectTest.java b/src/test/java/org/omg/sysml/model/ProjectTest.java index 6eb994e..196cd99 100644 --- a/src/test/java/org/omg/sysml/model/ProjectTest.java +++ b/src/test/java/org/omg/sysml/model/ProjectTest.java @@ -49,6 +49,14 @@ public void atTypeTest() { // TODO: test atType } + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + /** * Test the property 'id' */