diff --git a/api/openapi.yaml b/api/openapi.yaml index ddf22b0..2781cac 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -8,6 +8,7 @@ servers: tags: - name: Project - name: Branch +- name: Tag - name: Commit - name: Element - name: Relationship @@ -117,6 +118,54 @@ paths: x-contentType: application/json x-accepts: application/json /projects/{projectId}: + delete: + operationId: deleteProjectById + parameters: + - description: ID of the project + in: path + name: projectId + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + application/ld+json: + schema: + $ref: '#/components/schemas/Project' + description: Ok + "404": + content: {} + description: Not found. + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: The requested content type is not acceptable. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error. + default: + content: {} + description: Unexpected response. + summary: Delete project by ID + tags: + - Project + x-accepts: application/json get: operationId: getProjectById parameters: @@ -165,6 +214,59 @@ paths: tags: - Project x-accepts: application/json + put: + operationId: putProjectById + parameters: + - description: ID of the project + in: path + name: projectId + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + required: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + application/ld+json: + schema: + $ref: '#/components/schemas/Project' + description: Ok + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: The requested content type is not acceptable. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error. + default: + content: {} + description: Unexpected response. + summary: Update project by ID + tags: + - Project + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json /projects/{projectId}/branches: get: operationId: getBranchesByProject @@ -287,6 +389,61 @@ paths: x-contentType: application/json x-accepts: application/json /projects/{projectId}/branches/{branchId}: + delete: + operationId: deleteBranchByProjectAndId + parameters: + - description: ID of the project + in: path + name: projectId + required: true + schema: + format: uuid + type: string + - description: ID of the branch + in: path + name: branchId + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Branch' + application/ld+json: + schema: + $ref: '#/components/schemas/Branch' + description: Ok + "404": + content: {} + description: Not found. + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: The requested content type is not acceptable. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error. + default: + content: {} + description: Unexpected response. + summary: Delete branch by project and ID + tags: + - Branch + x-accepts: application/json get: operationId: getBranchesByProjectAndId parameters: @@ -342,6 +499,238 @@ paths: tags: - Branch x-accepts: application/json + /projects/{projectId}/tags: + get: + operationId: getTagsByProject + parameters: + - description: ID of the project + in: path + name: projectId + required: true + 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/json: + schema: + items: + $ref: '#/components/schemas/Tag' + type: array + application/ld+json: + schema: + items: + $ref: '#/components/schemas/Tag' + type: array + description: Ok + "404": + content: {} + description: Not found. + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: The requested content type is not acceptable. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error. + default: + content: {} + description: Unexpected response. + summary: Get tags by project + tags: + - Tag + x-accepts: application/json + post: + operationId: postTagByProject + parameters: + - description: ID of the project + in: path + name: projectId + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Branch' + application/ld+json: + schema: + $ref: '#/components/schemas/Branch' + description: Created + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: The requested content type is not acceptable. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error. + default: + content: {} + description: Unexpected response. + summary: Create tag by project + tags: + - Tag + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /projects/{projectId}/tags/{tagId}: + delete: + operationId: deleteTagByProjectAndId + parameters: + - description: ID of the project + in: path + name: projectId + required: true + schema: + format: uuid + type: string + - description: ID of the tag + in: path + name: tagId + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + application/ld+json: + schema: + $ref: '#/components/schemas/Tag' + description: Ok + "404": + content: {} + description: Not found. + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: The requested content type is not acceptable. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error. + default: + content: {} + description: Unexpected response. + summary: Delete tag by project and ID + tags: + - Tag + x-accepts: application/json + get: + operationId: getTagByProjectAndId + parameters: + - description: ID of the project + in: path + name: projectId + required: true + schema: + format: uuid + type: string + - description: ID of the tag + in: path + name: tagId + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + application/ld+json: + schema: + $ref: '#/components/schemas/Tag' + description: Ok + "404": + content: {} + description: Not found. + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: The requested content type is not acceptable. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + application/ld+json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error. + default: + content: {} + description: Unexpected response. + summary: Get tag by project and ID + tags: + - Tag + x-accepts: application/json /projects/{projectId}/commits: get: operationId: getCommitsByProject @@ -930,6 +1319,52 @@ paths: x-contentType: application/json x-accepts: application/json /projects/{projectId}/queries/{queryId}: + delete: + operationId: deleteQueryByProjectAndId + parameters: + - description: ID of the project + in: path + name: projectId + required: true + schema: + format: uuid + type: string + - description: ID of the query + in: path + name: queryId + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Query' + description: Ok + "404": + content: {} + description: Not found. + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: The requested content type is not acceptable. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Internal server error. + default: + content: {} + description: Unexpected response. + summary: Delete query by project and ID + tags: + - Query + x-accepts: application/json get: operationId: getQueryByProjectAndId parameters: @@ -1234,8 +1669,11 @@ components: '@type': Branch name: name '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + referencedCommit: + '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 owningProject: '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + timestamp: 2000-01-23T04:56:07.000+00:00 properties: '@id': format: uuid @@ -1246,31 +1684,66 @@ components: type: string head: $ref: '#/components/schemas/Branch_head' + name: + type: string owningProject: $ref: '#/components/schemas/Branch_owningProject' + referencedCommit: + $ref: '#/components/schemas/Branch_head' + timestamp: + format: date-time + type: string + type: object + Tag: + example: + '@type': Tag + taggedCommit: + '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + referencedCommit: + '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + owningProject: + '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + timestamp: 2000-01-23T04:56:07.000+00:00 + properties: + '@id': + format: uuid + type: string + '@type': + enum: + - Tag + type: string name: type: string + owningProject: + $ref: '#/components/schemas/Branch_owningProject' + referencedCommit: + $ref: '#/components/schemas/Branch_head' + taggedCommit: + $ref: '#/components/schemas/Branch_head' + timestamp: + format: date-time + type: string type: object Commit: example: '@type': Commit change: - - data: - identifier: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - payload: '@type': '@type' '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - '@type': ElementVersion + '@type': DataVersion identity: - '@type': ElementIdentity + '@type': DataIdentity '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - data: - identifier: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - payload: '@type': '@type' '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - '@type': ElementVersion + '@type': DataVersion identity: - '@type': ElementIdentity + '@type': DataIdentity '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 previousCommit: @@ -1288,22 +1761,21 @@ components: type: string change: items: - $ref: '#/components/schemas/ElementVersion' + $ref: '#/components/schemas/DataVersion' type: array owningProject: $ref: '#/components/schemas/Branch_owningProject' previousCommit: $ref: '#/components/schemas/Branch_head' type: object - ElementVersion: + DataVersion: example: - data: - identifier: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + payload: '@type': '@type' '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - '@type': ElementVersion + '@type': DataVersion identity: - '@type': ElementIdentity + '@type': DataIdentity '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 properties: @@ -1312,16 +1784,16 @@ components: type: string '@type': enum: - - ElementVersion + - DataVersion type: string - data: - $ref: '#/components/schemas/Element' + payload: + $ref: '#/components/schemas/Data' identity: - $ref: '#/components/schemas/ElementIdentity' + $ref: '#/components/schemas/DataIdentity' type: object - ElementIdentity: + DataIdentity: example: - '@type': ElementIdentity + '@type': DataIdentity '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 properties: '@id': @@ -1329,9 +1801,27 @@ components: type: string '@type': enum: - - ElementIdentity + - DataIdentity type: string type: object + Data: + additionalProperties: + properties: {} + type: object + discriminator: + propertyName: '@type' + example: + '@type': '@type' + '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + '@id': + format: uuid + type: string + '@type': + type: string + required: + - '@type' + type: object Identified: example: '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 @@ -1394,9 +1884,9 @@ components: - select '@type': Query scope: - - '@type': ElementIdentity + - '@type': DataIdentity '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - '@type': ElementIdentity + - '@type': DataIdentity '@id': 046b6c7f-0b8a-43b9-b35d-6489e6daee91 where: '@type': PrimitiveConstraint @@ -1415,7 +1905,7 @@ components: $ref: '#/components/schemas/Branch_owningProject' scope: items: - $ref: '#/components/schemas/ElementIdentity' + $ref: '#/components/schemas/DataIdentity' type: array select: items: diff --git a/build.gradle b/build.gradle index 52ca2df..d44280a 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'java' group = 'org.omg.sysml' -version = '2021-06' +version = '2021-09' buildscript { repositories { diff --git a/build.sbt b/build.sbt index 2e1da31..b128d46 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 := "2021-06", + version := "2021-09", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/docs/Branch.md b/docs/Branch.md index f7f4fe3..442dfb7 100644 --- a/docs/Branch.md +++ b/docs/Branch.md @@ -9,8 +9,10 @@ Name | Type | Description | Notes **atId** | [**UUID**](UUID.md) | | [optional] **atType** | [**AtTypeEnum**](#AtTypeEnum) | | [optional] **head** | [**BranchHead**](BranchHead.md) | | [optional] -**owningProject** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional] **name** | **String** | | [optional] +**owningProject** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional] +**referencedCommit** | [**BranchHead**](BranchHead.md) | | [optional] +**timestamp** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] diff --git a/docs/BranchApi.md b/docs/BranchApi.md index acfa326..3d0e9de 100644 --- a/docs/BranchApi.md +++ b/docs/BranchApi.md @@ -4,11 +4,78 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**deleteBranchByProjectAndId**](BranchApi.md#deleteBranchByProjectAndId) | **DELETE** /projects/{projectId}/branches/{branchId} | Delete branch by project and ID [**getBranchesByProject**](BranchApi.md#getBranchesByProject) | **GET** /projects/{projectId}/branches | Get branches by project [**getBranchesByProjectAndId**](BranchApi.md#getBranchesByProjectAndId) | **GET** /projects/{projectId}/branches/{branchId} | Get branch by project and ID [**postBranchByProject**](BranchApi.md#postBranchByProject) | **POST** /projects/{projectId}/branches | Create branch by project + +# **deleteBranchByProjectAndId** +> Branch deleteBranchByProjectAndId(projectId, branchId) + +Delete branch by project and ID + +### Example +```java +// Import classes: +import org.omg.sysml.ApiClient; +import org.omg.sysml.ApiException; +import org.omg.sysml.Configuration; +import org.omg.sysml.models.*; +import org.omg.sysml.api.BranchApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + BranchApi apiInstance = new BranchApi(defaultClient); + UUID projectId = new UUID(); // UUID | ID of the project + UUID branchId = new UUID(); // UUID | ID of the branch + try { + Branch result = apiInstance.deleteBranchByProjectAndId(projectId, branchId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BranchApi#deleteBranchByProjectAndId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | [**UUID**](.md)| ID of the project | + **branchId** | [**UUID**](.md)| ID of the branch | + +### Return type + +[**Branch**](Branch.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/ld+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not found. | - | +**415** | The requested content type is not acceptable. | - | +**500** | Internal server error. | - | +**0** | Unexpected response. | - | + # **getBranchesByProject** > List<Branch> getBranchesByProject(projectId, pageAfter, pageBefore, pageSize) diff --git a/docs/Commit.md b/docs/Commit.md index 4417f05..33f1d9a 100644 --- a/docs/Commit.md +++ b/docs/Commit.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **atId** | [**UUID**](UUID.md) | | [optional] **atType** | [**AtTypeEnum**](#AtTypeEnum) | | [optional] -**change** | [**List<ElementVersion>**](ElementVersion.md) | | [optional] +**change** | [**List<DataVersion>**](DataVersion.md) | | [optional] **owningProject** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional] **previousCommit** | [**BranchHead**](BranchHead.md) | | [optional] diff --git a/docs/Data.md b/docs/Data.md new file mode 100644 index 0000000..906b3e6 --- /dev/null +++ b/docs/Data.md @@ -0,0 +1,13 @@ + + +# Data + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**atId** | [**UUID**](UUID.md) | | [optional] +**atType** | **String** | | + + + diff --git a/docs/ElementIdentity.md b/docs/DataIdentity.md similarity index 81% rename from docs/ElementIdentity.md rename to docs/DataIdentity.md index ccb7be1..c150149 100644 --- a/docs/ElementIdentity.md +++ b/docs/DataIdentity.md @@ -1,6 +1,6 @@ -# ElementIdentity +# DataIdentity ## Properties @@ -15,7 +15,7 @@ Name | Type | Description | Notes Name | Value ---- | ----- -ELEMENTIDENTITY | "ElementIdentity" +DATAIDENTITY | "DataIdentity" diff --git a/docs/ElementVersion.md b/docs/DataVersion.md similarity index 59% rename from docs/ElementVersion.md rename to docs/DataVersion.md index ca3d1e5..b8fa219 100644 --- a/docs/ElementVersion.md +++ b/docs/DataVersion.md @@ -1,6 +1,6 @@ -# ElementVersion +# DataVersion ## Properties @@ -8,8 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **atId** | [**UUID**](UUID.md) | | [optional] **atType** | [**AtTypeEnum**](#AtTypeEnum) | | [optional] -**data** | [**Element**](Element.md) | | [optional] -**identity** | [**ElementIdentity**](ElementIdentity.md) | | [optional] +**payload** | [**Data**](Data.md) | | [optional] +**identity** | [**DataIdentity**](DataIdentity.md) | | [optional] @@ -17,7 +17,7 @@ Name | Type | Description | Notes Name | Value ---- | ----- -ELEMENTVERSION | "ElementVersion" +DATAVERSION | "DataVersion" diff --git a/docs/ProjectApi.md b/docs/ProjectApi.md index 25e20d8..ffe0113 100644 --- a/docs/ProjectApi.md +++ b/docs/ProjectApi.md @@ -4,11 +4,77 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**deleteProjectById**](ProjectApi.md#deleteProjectById) | **DELETE** /projects/{projectId} | Delete project by ID [**getProjectById**](ProjectApi.md#getProjectById) | **GET** /projects/{projectId} | Get project by ID [**getProjects**](ProjectApi.md#getProjects) | **GET** /projects | Get projects [**postProject**](ProjectApi.md#postProject) | **POST** /projects | Create project +[**putProjectById**](ProjectApi.md#putProjectById) | **PUT** /projects/{projectId} | Update project by ID + +# **deleteProjectById** +> Project deleteProjectById(projectId) + +Delete project by ID + +### Example +```java +// Import classes: +import org.omg.sysml.ApiClient; +import org.omg.sysml.ApiException; +import org.omg.sysml.Configuration; +import org.omg.sysml.models.*; +import org.omg.sysml.api.ProjectApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + ProjectApi apiInstance = new ProjectApi(defaultClient); + UUID projectId = new UUID(); // UUID | ID of the project + try { + Project result = apiInstance.deleteProjectById(projectId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProjectApi#deleteProjectById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | [**UUID**](.md)| ID of the project | + +### Return type + +[**Project**](Project.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/ld+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not found. | - | +**415** | The requested content type is not acceptable. | - | +**500** | Internal server error. | - | +**0** | Unexpected response. | - | + # **getProjectById** > Project getProjectById(projectId) @@ -203,3 +269,68 @@ No authorization required **500** | Internal server error. | - | **0** | Unexpected response. | - | + +# **putProjectById** +> Project putProjectById(projectId, body) + +Update project by ID + +### Example +```java +// Import classes: +import org.omg.sysml.ApiClient; +import org.omg.sysml.ApiException; +import org.omg.sysml.Configuration; +import org.omg.sysml.models.*; +import org.omg.sysml.api.ProjectApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + ProjectApi apiInstance = new ProjectApi(defaultClient); + UUID projectId = new UUID(); // UUID | ID of the project + Project body = new Project(); // Project | + try { + Project result = apiInstance.putProjectById(projectId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProjectApi#putProjectById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | [**UUID**](.md)| ID of the project | + **body** | [**Project**](Project.md)| | [optional] + +### Return type + +[**Project**](Project.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/ld+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**415** | The requested content type is not acceptable. | - | +**500** | Internal server error. | - | +**0** | Unexpected response. | - | + diff --git a/docs/Query.md b/docs/Query.md index 19ad4ff..a19b102 100644 --- a/docs/Query.md +++ b/docs/Query.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **atId** | [**UUID**](UUID.md) | | [optional] **atType** | [**AtTypeEnum**](#AtTypeEnum) | | [optional] **owningProject** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional] -**scope** | [**List<ElementIdentity>**](ElementIdentity.md) | | [optional] +**scope** | [**List<DataIdentity>**](DataIdentity.md) | | [optional] **select** | **List<String>** | | [optional] **where** | [**Constraint**](Constraint.md) | | [optional] diff --git a/docs/QueryApi.md b/docs/QueryApi.md index 26c252f..e40d410 100644 --- a/docs/QueryApi.md +++ b/docs/QueryApi.md @@ -4,6 +4,7 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**deleteQueryByProjectAndId**](QueryApi.md#deleteQueryByProjectAndId) | **DELETE** /projects/{projectId}/queries/{queryId} | Delete query by project and ID [**getQueriesByProject**](QueryApi.md#getQueriesByProject) | **GET** /projects/{projectId}/queries | Get queries by project [**getQueryByProjectAndId**](QueryApi.md#getQueryByProjectAndId) | **GET** /projects/{projectId}/queries/{queryId} | Get query by project and ID [**getQueryResultsByProjectIdQuery**](QueryApi.md#getQueryResultsByProjectIdQuery) | **GET** /projects/{projectId}/query-results | Get query results by project and query definition @@ -12,6 +13,72 @@ Method | HTTP request | Description [**postQueryByProject**](QueryApi.md#postQueryByProject) | **POST** /projects/{projectId}/queries | Create query by project + +# **deleteQueryByProjectAndId** +> Query deleteQueryByProjectAndId(projectId, queryId) + +Delete query by project and ID + +### Example +```java +// Import classes: +import org.omg.sysml.ApiClient; +import org.omg.sysml.ApiException; +import org.omg.sysml.Configuration; +import org.omg.sysml.models.*; +import org.omg.sysml.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + QueryApi apiInstance = new QueryApi(defaultClient); + UUID projectId = new UUID(); // UUID | ID of the project + UUID queryId = new UUID(); // UUID | ID of the query + try { + Query result = apiInstance.deleteQueryByProjectAndId(projectId, queryId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#deleteQueryByProjectAndId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | [**UUID**](.md)| ID of the project | + **queryId** | [**UUID**](.md)| ID of the query | + +### Return type + +[**Query**](Query.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not found. | - | +**415** | The requested content type is not acceptable. | - | +**500** | Internal server error. | - | +**0** | Unexpected response. | - | + # **getQueriesByProject** > List<Query> getQueriesByProject(projectId, pageAfter, pageBefore, pageSize) diff --git a/docs/Tag.md b/docs/Tag.md new file mode 100644 index 0000000..e015082 --- /dev/null +++ b/docs/Tag.md @@ -0,0 +1,26 @@ + + +# Tag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**atId** | [**UUID**](UUID.md) | | [optional] +**atType** | [**AtTypeEnum**](#AtTypeEnum) | | [optional] +**name** | **String** | | [optional] +**owningProject** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional] +**referencedCommit** | [**BranchHead**](BranchHead.md) | | [optional] +**taggedCommit** | [**BranchHead**](BranchHead.md) | | [optional] +**timestamp** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] + + + +## Enum: AtTypeEnum + +Name | Value +---- | ----- +TAG | "Tag" + + + diff --git a/docs/TagApi.md b/docs/TagApi.md new file mode 100644 index 0000000..738b0b5 --- /dev/null +++ b/docs/TagApi.md @@ -0,0 +1,279 @@ +# TagApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteTagByProjectAndId**](TagApi.md#deleteTagByProjectAndId) | **DELETE** /projects/{projectId}/tags/{tagId} | Delete tag by project and ID +[**getTagByProjectAndId**](TagApi.md#getTagByProjectAndId) | **GET** /projects/{projectId}/tags/{tagId} | Get tag by project and ID +[**getTagsByProject**](TagApi.md#getTagsByProject) | **GET** /projects/{projectId}/tags | Get tags by project +[**postTagByProject**](TagApi.md#postTagByProject) | **POST** /projects/{projectId}/tags | Create tag by project + + + +# **deleteTagByProjectAndId** +> Tag deleteTagByProjectAndId(projectId, tagId) + +Delete tag by project and ID + +### Example +```java +// Import classes: +import org.omg.sysml.ApiClient; +import org.omg.sysml.ApiException; +import org.omg.sysml.Configuration; +import org.omg.sysml.models.*; +import org.omg.sysml.api.TagApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + TagApi apiInstance = new TagApi(defaultClient); + UUID projectId = new UUID(); // UUID | ID of the project + UUID tagId = new UUID(); // UUID | ID of the tag + try { + Tag result = apiInstance.deleteTagByProjectAndId(projectId, tagId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagApi#deleteTagByProjectAndId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | [**UUID**](.md)| ID of the project | + **tagId** | [**UUID**](.md)| ID of the tag | + +### Return type + +[**Tag**](Tag.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/ld+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not found. | - | +**415** | The requested content type is not acceptable. | - | +**500** | Internal server error. | - | +**0** | Unexpected response. | - | + + +# **getTagByProjectAndId** +> Tag getTagByProjectAndId(projectId, tagId) + +Get tag by project and ID + +### Example +```java +// Import classes: +import org.omg.sysml.ApiClient; +import org.omg.sysml.ApiException; +import org.omg.sysml.Configuration; +import org.omg.sysml.models.*; +import org.omg.sysml.api.TagApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + TagApi apiInstance = new TagApi(defaultClient); + UUID projectId = new UUID(); // UUID | ID of the project + UUID tagId = new UUID(); // UUID | ID of the tag + try { + Tag result = apiInstance.getTagByProjectAndId(projectId, tagId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagApi#getTagByProjectAndId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | [**UUID**](.md)| ID of the project | + **tagId** | [**UUID**](.md)| ID of the tag | + +### Return type + +[**Tag**](Tag.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/ld+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not found. | - | +**415** | The requested content type is not acceptable. | - | +**500** | Internal server error. | - | +**0** | Unexpected response. | - | + + +# **getTagsByProject** +> List<Tag> getTagsByProject(projectId, pageAfter, pageBefore, pageSize) + +Get tags by project + +### Example +```java +// Import classes: +import org.omg.sysml.ApiClient; +import org.omg.sysml.ApiException; +import org.omg.sysml.Configuration; +import org.omg.sysml.models.*; +import org.omg.sysml.api.TagApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + TagApi apiInstance = new TagApi(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.getTagsByProject(projectId, pageAfter, pageBefore, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagApi#getTagsByProject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +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 + +[**List<Tag>**](Tag.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/ld+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not found. | - | +**415** | The requested content type is not acceptable. | - | +**500** | Internal server error. | - | +**0** | Unexpected response. | - | + + +# **postTagByProject** +> Branch postTagByProject(projectId, body) + +Create tag by project + +### Example +```java +// Import classes: +import org.omg.sysml.ApiClient; +import org.omg.sysml.ApiException; +import org.omg.sysml.Configuration; +import org.omg.sysml.models.*; +import org.omg.sysml.api.TagApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + TagApi apiInstance = new TagApi(defaultClient); + UUID projectId = new UUID(); // UUID | ID of the project + Tag body = new Tag(); // Tag | + try { + Branch result = apiInstance.postTagByProject(projectId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagApi#postTagByProject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectId** | [**UUID**](.md)| ID of the project | + **body** | [**Tag**](Tag.md)| | + +### Return type + +[**Branch**](Branch.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/ld+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**415** | The requested content type is not acceptable. | - | +**500** | Internal server error. | - | +**0** | Unexpected response. | - | + diff --git a/pom.xml b/pom.xml index cb9009b..b62e2ec 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sysml-v2-api-client jar sysml-v2-api-client - 2021-06 + 2021-09 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 eb5b6da..ac18355 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/2021-06/java"); + setUserAgent("OpenAPI-Generator/2021-09/java"); authentications = new HashMap(); } diff --git a/src/main/java/org/omg/sysml/JSON.java b/src/main/java/org/omg/sysml/JSON.java index 5d8894a..75dd951 100644 --- a/src/main/java/org/omg/sysml/JSON.java +++ b/src/main/java/org/omg/sysml/JSON.java @@ -60,6 +60,15 @@ public Class getClassForElement(JsonElement readElement) { return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "@type")); } + }) + .registerTypeSelector(Data.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("Data", Data.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "@type")); + } }) ; GsonBuilder builder = fireBuilder.createGsonBuilder(); diff --git a/src/main/java/org/omg/sysml/api/BranchApi.java b/src/main/java/org/omg/sysml/api/BranchApi.java index c7e678a..c2eca09 100644 --- a/src/main/java/org/omg/sysml/api/BranchApi.java +++ b/src/main/java/org/omg/sysml/api/BranchApi.java @@ -56,6 +56,143 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + /** + * Build call for deleteBranchByProjectAndId + * @param projectId ID of the project (required) + * @param branchId ID of the branch (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call deleteBranchByProjectAndIdCall(UUID projectId, UUID branchId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/projects/{projectId}/branches/{branchId}" + .replaceAll("\\{" + "projectId" + "\\}", localVarApiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "branchId" + "\\}", localVarApiClient.escapeString(branchId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/ld+json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteBranchByProjectAndIdValidateBeforeCall(UUID projectId, UUID branchId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException("Missing the required parameter 'projectId' when calling deleteBranchByProjectAndId(Async)"); + } + + // verify the required parameter 'branchId' is set + if (branchId == null) { + throw new ApiException("Missing the required parameter 'branchId' when calling deleteBranchByProjectAndId(Async)"); + } + + + okhttp3.Call localVarCall = deleteBranchByProjectAndIdCall(projectId, branchId, _callback); + return localVarCall; + + } + + /** + * Delete branch by project and ID + * + * @param projectId ID of the project (required) + * @param branchId ID of the branch (required) + * @return Branch + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public Branch deleteBranchByProjectAndId(UUID projectId, UUID branchId) throws ApiException { + ApiResponse localVarResp = deleteBranchByProjectAndIdWithHttpInfo(projectId, branchId); + return localVarResp.getData(); + } + + /** + * Delete branch by project and ID + * + * @param projectId ID of the project (required) + * @param branchId ID of the branch (required) + * @return ApiResponse<Branch> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public ApiResponse deleteBranchByProjectAndIdWithHttpInfo(UUID projectId, UUID branchId) throws ApiException { + okhttp3.Call localVarCall = deleteBranchByProjectAndIdValidateBeforeCall(projectId, branchId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete branch by project and ID (asynchronously) + * + * @param projectId ID of the project (required) + * @param branchId ID of the branch (required) + * @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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call deleteBranchByProjectAndIdAsync(UUID projectId, UUID branchId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteBranchByProjectAndIdValidateBeforeCall(projectId, branchId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getBranchesByProject * @param projectId ID of the project (required) diff --git a/src/main/java/org/omg/sysml/api/ProjectApi.java b/src/main/java/org/omg/sysml/api/ProjectApi.java index 2a061bb..9c04a30 100644 --- a/src/main/java/org/omg/sysml/api/ProjectApi.java +++ b/src/main/java/org/omg/sysml/api/ProjectApi.java @@ -56,6 +56,133 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + /** + * Build call for deleteProjectById + * @param projectId ID of the project (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call deleteProjectByIdCall(UUID projectId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/projects/{projectId}" + .replaceAll("\\{" + "projectId" + "\\}", localVarApiClient.escapeString(projectId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/ld+json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteProjectByIdValidateBeforeCall(UUID projectId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException("Missing the required parameter 'projectId' when calling deleteProjectById(Async)"); + } + + + okhttp3.Call localVarCall = deleteProjectByIdCall(projectId, _callback); + return localVarCall; + + } + + /** + * Delete project by ID + * + * @param projectId ID of the project (required) + * @return Project + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public Project deleteProjectById(UUID projectId) throws ApiException { + ApiResponse localVarResp = deleteProjectByIdWithHttpInfo(projectId); + return localVarResp.getData(); + } + + /** + * Delete project by ID + * + * @param projectId ID of the project (required) + * @return ApiResponse<Project> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public ApiResponse deleteProjectByIdWithHttpInfo(UUID projectId) throws ApiException { + okhttp3.Call localVarCall = deleteProjectByIdValidateBeforeCall(projectId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete project by ID (asynchronously) + * + * @param projectId ID of the project (required) + * @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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call deleteProjectByIdAsync(UUID projectId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteProjectByIdValidateBeforeCall(projectId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getProjectById * @param projectId ID of the project (required) @@ -437,4 +564,131 @@ public okhttp3.Call postProjectAsync(Project body, final ApiCallback _c localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for putProjectById + * @param projectId ID of the project (required) + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Ok -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call putProjectByIdCall(UUID projectId, Project body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/projects/{projectId}" + .replaceAll("\\{" + "projectId" + "\\}", localVarApiClient.escapeString(projectId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/ld+json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call putProjectByIdValidateBeforeCall(UUID projectId, Project body, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException("Missing the required parameter 'projectId' when calling putProjectById(Async)"); + } + + + okhttp3.Call localVarCall = putProjectByIdCall(projectId, body, _callback); + return localVarCall; + + } + + /** + * Update project by ID + * + * @param projectId ID of the project (required) + * @param body (optional) + * @return Project + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Ok -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public Project putProjectById(UUID projectId, Project body) throws ApiException { + ApiResponse localVarResp = putProjectByIdWithHttpInfo(projectId, body); + return localVarResp.getData(); + } + + /** + * Update project by ID + * + * @param projectId ID of the project (required) + * @param body (optional) + * @return ApiResponse<Project> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Ok -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public ApiResponse putProjectByIdWithHttpInfo(UUID projectId, Project body) throws ApiException { + okhttp3.Call localVarCall = putProjectByIdValidateBeforeCall(projectId, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update project by ID (asynchronously) + * + * @param projectId ID of the project (required) + * @param body (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 + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Ok -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call putProjectByIdAsync(UUID projectId, Project body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = putProjectByIdValidateBeforeCall(projectId, body, _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 c76ad59..eb4175d 100644 --- a/src/main/java/org/omg/sysml/api/QueryApi.java +++ b/src/main/java/org/omg/sysml/api/QueryApi.java @@ -57,6 +57,143 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + /** + * Build call for deleteQueryByProjectAndId + * @param projectId ID of the project (required) + * @param queryId ID of the query (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call deleteQueryByProjectAndIdCall(UUID projectId, UUID queryId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/projects/{projectId}/queries/{queryId}" + .replaceAll("\\{" + "projectId" + "\\}", localVarApiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "queryId" + "\\}", localVarApiClient.escapeString(queryId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteQueryByProjectAndIdValidateBeforeCall(UUID projectId, UUID queryId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException("Missing the required parameter 'projectId' when calling deleteQueryByProjectAndId(Async)"); + } + + // verify the required parameter 'queryId' is set + if (queryId == null) { + throw new ApiException("Missing the required parameter 'queryId' when calling deleteQueryByProjectAndId(Async)"); + } + + + okhttp3.Call localVarCall = deleteQueryByProjectAndIdCall(projectId, queryId, _callback); + return localVarCall; + + } + + /** + * Delete query by project and ID + * + * @param projectId ID of the project (required) + * @param queryId ID of the query (required) + * @return Query + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public Query deleteQueryByProjectAndId(UUID projectId, UUID queryId) throws ApiException { + ApiResponse localVarResp = deleteQueryByProjectAndIdWithHttpInfo(projectId, queryId); + return localVarResp.getData(); + } + + /** + * Delete query by project and ID + * + * @param projectId ID of the project (required) + * @param queryId ID of the query (required) + * @return ApiResponse<Query> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public ApiResponse deleteQueryByProjectAndIdWithHttpInfo(UUID projectId, UUID queryId) throws ApiException { + okhttp3.Call localVarCall = deleteQueryByProjectAndIdValidateBeforeCall(projectId, queryId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete query by project and ID (asynchronously) + * + * @param projectId ID of the project (required) + * @param queryId ID of the query (required) + * @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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call deleteQueryByProjectAndIdAsync(UUID projectId, UUID queryId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteQueryByProjectAndIdValidateBeforeCall(projectId, queryId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getQueriesByProject * @param projectId ID of the project (required) diff --git a/src/main/java/org/omg/sysml/api/TagApi.java b/src/main/java/org/omg/sysml/api/TagApi.java new file mode 100644 index 0000000..a48cfbe --- /dev/null +++ b/src/main/java/org/omg/sysml/api/TagApi.java @@ -0,0 +1,617 @@ +/* + * SysML v2 API and Services + * REST/HTTP binding (PSM) for the SysML v2 standard API. + * + * The version of the OpenAPI document: 1.0.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 org.omg.sysml.api; + +import org.omg.sysml.ApiCallback; +import org.omg.sysml.ApiClient; +import org.omg.sysml.ApiException; +import org.omg.sysml.ApiResponse; +import org.omg.sysml.Configuration; +import org.omg.sysml.Pair; +import org.omg.sysml.ProgressRequestBody; +import org.omg.sysml.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import org.omg.sysml.model.Branch; +import org.omg.sysml.model.Error; +import org.omg.sysml.model.Tag; +import java.util.UUID; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class TagApi { + private ApiClient localVarApiClient; + + public TagApi() { + this(Configuration.getDefaultApiClient()); + } + + public TagApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for deleteTagByProjectAndId + * @param projectId ID of the project (required) + * @param tagId ID of the tag (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call deleteTagByProjectAndIdCall(UUID projectId, UUID tagId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/projects/{projectId}/tags/{tagId}" + .replaceAll("\\{" + "projectId" + "\\}", localVarApiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "tagId" + "\\}", localVarApiClient.escapeString(tagId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/ld+json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteTagByProjectAndIdValidateBeforeCall(UUID projectId, UUID tagId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException("Missing the required parameter 'projectId' when calling deleteTagByProjectAndId(Async)"); + } + + // verify the required parameter 'tagId' is set + if (tagId == null) { + throw new ApiException("Missing the required parameter 'tagId' when calling deleteTagByProjectAndId(Async)"); + } + + + okhttp3.Call localVarCall = deleteTagByProjectAndIdCall(projectId, tagId, _callback); + return localVarCall; + + } + + /** + * Delete tag by project and ID + * + * @param projectId ID of the project (required) + * @param tagId ID of the tag (required) + * @return Tag + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public Tag deleteTagByProjectAndId(UUID projectId, UUID tagId) throws ApiException { + ApiResponse localVarResp = deleteTagByProjectAndIdWithHttpInfo(projectId, tagId); + return localVarResp.getData(); + } + + /** + * Delete tag by project and ID + * + * @param projectId ID of the project (required) + * @param tagId ID of the tag (required) + * @return ApiResponse<Tag> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public ApiResponse deleteTagByProjectAndIdWithHttpInfo(UUID projectId, UUID tagId) throws ApiException { + okhttp3.Call localVarCall = deleteTagByProjectAndIdValidateBeforeCall(projectId, tagId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete tag by project and ID (asynchronously) + * + * @param projectId ID of the project (required) + * @param tagId ID of the tag (required) + * @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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call deleteTagByProjectAndIdAsync(UUID projectId, UUID tagId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteTagByProjectAndIdValidateBeforeCall(projectId, tagId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getTagByProjectAndId + * @param projectId ID of the project (required) + * @param tagId ID of the tag (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call getTagByProjectAndIdCall(UUID projectId, UUID tagId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/projects/{projectId}/tags/{tagId}" + .replaceAll("\\{" + "projectId" + "\\}", localVarApiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "tagId" + "\\}", localVarApiClient.escapeString(tagId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/ld+json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getTagByProjectAndIdValidateBeforeCall(UUID projectId, UUID tagId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException("Missing the required parameter 'projectId' when calling getTagByProjectAndId(Async)"); + } + + // verify the required parameter 'tagId' is set + if (tagId == null) { + throw new ApiException("Missing the required parameter 'tagId' when calling getTagByProjectAndId(Async)"); + } + + + okhttp3.Call localVarCall = getTagByProjectAndIdCall(projectId, tagId, _callback); + return localVarCall; + + } + + /** + * Get tag by project and ID + * + * @param projectId ID of the project (required) + * @param tagId ID of the tag (required) + * @return Tag + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public Tag getTagByProjectAndId(UUID projectId, UUID tagId) throws ApiException { + ApiResponse localVarResp = getTagByProjectAndIdWithHttpInfo(projectId, tagId); + return localVarResp.getData(); + } + + /** + * Get tag by project and ID + * + * @param projectId ID of the project (required) + * @param tagId ID of the tag (required) + * @return ApiResponse<Tag> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public ApiResponse getTagByProjectAndIdWithHttpInfo(UUID projectId, UUID tagId) throws ApiException { + okhttp3.Call localVarCall = getTagByProjectAndIdValidateBeforeCall(projectId, tagId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get tag by project and ID (asynchronously) + * + * @param projectId ID of the project (required) + * @param tagId ID of the tag (required) + * @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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call getTagByProjectAndIdAsync(UUID projectId, UUID tagId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getTagByProjectAndIdValidateBeforeCall(projectId, tagId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getTagsByProject + * @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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call getTagsByProjectCall(UUID projectId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/projects/{projectId}/tags" + .replaceAll("\\{" + "projectId" + "\\}", localVarApiClient.escapeString(projectId.toString())); + + 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/json", "application/ld+json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getTagsByProjectValidateBeforeCall(UUID projectId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException("Missing the required parameter 'projectId' when calling getTagsByProject(Async)"); + } + + + okhttp3.Call localVarCall = getTagsByProjectCall(projectId, pageAfter, pageBefore, pageSize, _callback); + return localVarCall; + + } + + /** + * Get tags 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<Tag> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public List getTagsByProject(UUID projectId, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + ApiResponse> localVarResp = getTagsByProjectWithHttpInfo(projectId, pageAfter, pageBefore, pageSize); + return localVarResp.getData(); + } + + /** + * Get tags 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<Tag>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public ApiResponse> getTagsByProjectWithHttpInfo(UUID projectId, String pageAfter, String pageBefore, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getTagsByProjectValidateBeforeCall(projectId, pageAfter, pageBefore, pageSize, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get tags 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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call getTagsByProjectAsync(UUID projectId, String pageAfter, String pageBefore, Integer pageSize, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getTagsByProjectValidateBeforeCall(projectId, pageAfter, pageBefore, pageSize, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postTagByProject + * @param projectId ID of the project (required) + * @param body (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Created -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call postTagByProjectCall(UUID projectId, Tag body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/projects/{projectId}/tags" + .replaceAll("\\{" + "projectId" + "\\}", localVarApiClient.escapeString(projectId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/ld+json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postTagByProjectValidateBeforeCall(UUID projectId, Tag body, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException("Missing the required parameter 'projectId' when calling postTagByProject(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling postTagByProject(Async)"); + } + + + okhttp3.Call localVarCall = postTagByProjectCall(projectId, body, _callback); + return localVarCall; + + } + + /** + * Create tag by project + * + * @param projectId ID of the project (required) + * @param body (required) + * @return Branch + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Created -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public Branch postTagByProject(UUID projectId, Tag body) throws ApiException { + ApiResponse localVarResp = postTagByProjectWithHttpInfo(projectId, body); + return localVarResp.getData(); + } + + /** + * Create tag by project + * + * @param projectId ID of the project (required) + * @param body (required) + * @return ApiResponse<Branch> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Created -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public ApiResponse postTagByProjectWithHttpInfo(UUID projectId, Tag body) throws ApiException { + okhttp3.Call localVarCall = postTagByProjectValidateBeforeCall(projectId, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create tag by project (asynchronously) + * + * @param projectId ID of the project (required) + * @param body (required) + * @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 + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Created -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -
+ */ + public okhttp3.Call postTagByProjectAsync(UUID projectId, Tag body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postTagByProjectValidateBeforeCall(projectId, body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/org/omg/sysml/model/Branch.java b/src/main/java/org/omg/sysml/model/Branch.java index 7bd782a..fe05447 100644 --- a/src/main/java/org/omg/sysml/model/Branch.java +++ b/src/main/java/org/omg/sysml/model/Branch.java @@ -26,6 +26,7 @@ import java.util.UUID; import org.omg.sysml.model.BranchHead; import org.omg.sysml.model.BranchOwningProject; +import org.threeten.bp.OffsetDateTime; /** * Branch @@ -89,13 +90,21 @@ public AtTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_HEAD) private BranchHead head; + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + public static final String SERIALIZED_NAME_OWNING_PROJECT = "owningProject"; @SerializedName(SERIALIZED_NAME_OWNING_PROJECT) private BranchOwningProject owningProject; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; + public static final String SERIALIZED_NAME_REFERENCED_COMMIT = "referencedCommit"; + @SerializedName(SERIALIZED_NAME_REFERENCED_COMMIT) + private BranchHead referencedCommit; + + public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; + @SerializedName(SERIALIZED_NAME_TIMESTAMP) + private OffsetDateTime timestamp; public Branch atId(UUID atId) { @@ -167,6 +176,29 @@ public void setHead(BranchHead head) { } + public Branch name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + public Branch owningProject(BranchOwningProject owningProject) { this.owningProject = owningProject; @@ -190,26 +222,49 @@ public void setOwningProject(BranchOwningProject owningProject) { } - public Branch name(String name) { + public Branch referencedCommit(BranchHead referencedCommit) { - this.name = name; + this.referencedCommit = referencedCommit; return this; } /** - * Get name - * @return name + * Get referencedCommit + * @return referencedCommit **/ @javax.annotation.Nullable @ApiModelProperty(value = "") - public String getName() { - return name; + public BranchHead getReferencedCommit() { + return referencedCommit; } - public void setName(String name) { - this.name = name; + public void setReferencedCommit(BranchHead referencedCommit) { + this.referencedCommit = referencedCommit; + } + + + public Branch timestamp(OffsetDateTime timestamp) { + + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * @return timestamp + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public OffsetDateTime getTimestamp() { + return timestamp; + } + + + public void setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; } @@ -225,13 +280,15 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.atId, branch.atId) && Objects.equals(this.atType, branch.atType) && Objects.equals(this.head, branch.head) && + Objects.equals(this.name, branch.name) && Objects.equals(this.owningProject, branch.owningProject) && - Objects.equals(this.name, branch.name); + Objects.equals(this.referencedCommit, branch.referencedCommit) && + Objects.equals(this.timestamp, branch.timestamp); } @Override public int hashCode() { - return Objects.hash(atId, atType, head, owningProject, name); + return Objects.hash(atId, atType, head, name, owningProject, referencedCommit, timestamp); } @@ -242,8 +299,10 @@ public String toString() { sb.append(" atId: ").append(toIndentedString(atId)).append("\n"); sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); sb.append(" head: ").append(toIndentedString(head)).append("\n"); - sb.append(" owningProject: ").append(toIndentedString(owningProject)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" owningProject: ").append(toIndentedString(owningProject)).append("\n"); + sb.append(" referencedCommit: ").append(toIndentedString(referencedCommit)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/omg/sysml/model/Commit.java b/src/main/java/org/omg/sysml/model/Commit.java index e688eb6..f3aa3f0 100644 --- a/src/main/java/org/omg/sysml/model/Commit.java +++ b/src/main/java/org/omg/sysml/model/Commit.java @@ -28,7 +28,7 @@ import java.util.UUID; import org.omg.sysml.model.BranchHead; import org.omg.sysml.model.BranchOwningProject; -import org.omg.sysml.model.ElementVersion; +import org.omg.sysml.model.DataVersion; /** * Commit @@ -90,7 +90,7 @@ public AtTypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CHANGE = "change"; @SerializedName(SERIALIZED_NAME_CHANGE) - private List change = null; + private List change = null; public static final String SERIALIZED_NAME_OWNING_PROJECT = "owningProject"; @SerializedName(SERIALIZED_NAME_OWNING_PROJECT) @@ -147,15 +147,15 @@ public void setAtType(AtTypeEnum atType) { } - public Commit change(List change) { + public Commit change(List change) { this.change = change; return this; } - public Commit addChangeItem(ElementVersion changeItem) { + public Commit addChangeItem(DataVersion changeItem) { if (this.change == null) { - this.change = new ArrayList(); + this.change = new ArrayList(); } this.change.add(changeItem); return this; @@ -168,12 +168,12 @@ public Commit addChangeItem(ElementVersion changeItem) { @javax.annotation.Nullable @ApiModelProperty(value = "") - public List getChange() { + public List getChange() { return change; } - public void setChange(List change) { + public void setChange(List change) { this.change = change; } diff --git a/src/main/java/org/omg/sysml/model/Data.java b/src/main/java/org/omg/sysml/model/Data.java new file mode 100644 index 0000000..66d1748 --- /dev/null +++ b/src/main/java/org/omg/sysml/model/Data.java @@ -0,0 +1,136 @@ +/* + * SysML v2 API and Services + * REST/HTTP binding (PSM) for the SysML v2 standard API. + * + * The version of the OpenAPI document: 1.0.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 org.omg.sysml.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +/** + * Data + */ + + +public class Data extends HashMap { + public static final String SERIALIZED_NAME_AT_ID = "@id"; + @SerializedName(SERIALIZED_NAME_AT_ID) + private UUID atId; + + public static final String SERIALIZED_NAME_AT_TYPE = "@type"; + @SerializedName(SERIALIZED_NAME_AT_TYPE) + protected String atType; + + public Data() { + this.atType = this.getClass().getSimpleName(); + } + + public Data atId(UUID atId) { + + this.atId = atId; + return this; + } + + /** + * Get atId + * @return atId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public UUID getAtId() { + return atId; + } + + + public void setAtId(UUID atId) { + this.atId = atId; + } + + + public Data atType(String atType) { + + this.atType = atType; + return this; + } + + /** + * Get atType + * @return atType + **/ + @ApiModelProperty(required = true, value = "") + + public String getAtType() { + return atType; + } + + + public void setAtType(String atType) { + this.atType = atType; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Data data = (Data) o; + return Objects.equals(this.atId, data.atId) && + Objects.equals(this.atType, data.atType) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(atId, atType, super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Data {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" atId: ").append(toIndentedString(atId)).append("\n"); + sb.append(" atType: ").append(toIndentedString(atType)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/org/omg/sysml/model/ElementIdentity.java b/src/main/java/org/omg/sysml/model/DataIdentity.java similarity index 89% rename from src/main/java/org/omg/sysml/model/ElementIdentity.java rename to src/main/java/org/omg/sysml/model/DataIdentity.java index 90e5d53..291c911 100644 --- a/src/main/java/org/omg/sysml/model/ElementIdentity.java +++ b/src/main/java/org/omg/sysml/model/DataIdentity.java @@ -26,10 +26,10 @@ import java.util.UUID; /** - * ElementIdentity + * DataIdentity */ -public class ElementIdentity { +public class DataIdentity { public static final String SERIALIZED_NAME_AT_ID = "@id"; @SerializedName(SERIALIZED_NAME_AT_ID) private UUID atId; @@ -39,7 +39,7 @@ public class ElementIdentity { */ @JsonAdapter(AtTypeEnum.Adapter.class) public enum AtTypeEnum { - ELEMENTIDENTITY("ElementIdentity"); + DATAIDENTITY("DataIdentity"); private String value; @@ -84,7 +84,7 @@ public AtTypeEnum read(final JsonReader jsonReader) throws IOException { private AtTypeEnum atType; - public ElementIdentity atId(UUID atId) { + public DataIdentity atId(UUID atId) { this.atId = atId; return this; @@ -107,7 +107,7 @@ public void setAtId(UUID atId) { } - public ElementIdentity atType(AtTypeEnum atType) { + public DataIdentity atType(AtTypeEnum atType) { this.atType = atType; return this; @@ -138,9 +138,9 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ElementIdentity elementIdentity = (ElementIdentity) o; - return Objects.equals(this.atId, elementIdentity.atId) && - Objects.equals(this.atType, elementIdentity.atType); + DataIdentity dataIdentity = (DataIdentity) o; + return Objects.equals(this.atId, dataIdentity.atId) && + Objects.equals(this.atType, dataIdentity.atType); } @Override @@ -152,7 +152,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ElementIdentity {\n"); + sb.append("class DataIdentity {\n"); sb.append(" atId: ").append(toIndentedString(atId)).append("\n"); sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); sb.append("}"); diff --git a/src/main/java/org/omg/sysml/model/ElementVersion.java b/src/main/java/org/omg/sysml/model/DataVersion.java similarity index 76% rename from src/main/java/org/omg/sysml/model/ElementVersion.java rename to src/main/java/org/omg/sysml/model/DataVersion.java index d84fa12..584ee3b 100644 --- a/src/main/java/org/omg/sysml/model/ElementVersion.java +++ b/src/main/java/org/omg/sysml/model/DataVersion.java @@ -24,14 +24,14 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.omg.sysml.model.Element; -import org.omg.sysml.model.ElementIdentity; +import org.omg.sysml.model.Data; +import org.omg.sysml.model.DataIdentity; /** - * ElementVersion + * DataVersion */ -public class ElementVersion { +public class DataVersion { public static final String SERIALIZED_NAME_AT_ID = "@id"; @SerializedName(SERIALIZED_NAME_AT_ID) private UUID atId; @@ -41,7 +41,7 @@ public class ElementVersion { */ @JsonAdapter(AtTypeEnum.Adapter.class) public enum AtTypeEnum { - ELEMENTVERSION("ElementVersion"); + DATAVERSION("DataVersion"); private String value; @@ -85,16 +85,16 @@ public AtTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_AT_TYPE) private AtTypeEnum atType; - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Element data; + public static final String SERIALIZED_NAME_PAYLOAD = "payload"; + @SerializedName(SERIALIZED_NAME_PAYLOAD) + private Data payload; public static final String SERIALIZED_NAME_IDENTITY = "identity"; @SerializedName(SERIALIZED_NAME_IDENTITY) - private ElementIdentity identity; + private DataIdentity identity; - public ElementVersion atId(UUID atId) { + public DataVersion atId(UUID atId) { this.atId = atId; return this; @@ -117,7 +117,7 @@ public void setAtId(UUID atId) { } - public ElementVersion atType(AtTypeEnum atType) { + public DataVersion atType(AtTypeEnum atType) { this.atType = atType; return this; @@ -140,30 +140,30 @@ public void setAtType(AtTypeEnum atType) { } - public ElementVersion data(Element data) { + public DataVersion payload(Data payload) { - this.data = data; + this.payload = payload; return this; } /** - * Get data - * @return data + * Get payload + * @return payload **/ @javax.annotation.Nullable @ApiModelProperty(value = "") - public Element getData() { - return data; + public Data getPayload() { + return payload; } - public void setData(Element data) { - this.data = data; + public void setPayload(Data payload) { + this.payload = payload; } - public ElementVersion identity(ElementIdentity identity) { + public DataVersion identity(DataIdentity identity) { this.identity = identity; return this; @@ -176,12 +176,12 @@ public ElementVersion identity(ElementIdentity identity) { @javax.annotation.Nullable @ApiModelProperty(value = "") - public ElementIdentity getIdentity() { + public DataIdentity getIdentity() { return identity; } - public void setIdentity(ElementIdentity identity) { + public void setIdentity(DataIdentity identity) { this.identity = identity; } @@ -194,26 +194,26 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ElementVersion elementVersion = (ElementVersion) o; - return Objects.equals(this.atId, elementVersion.atId) && - Objects.equals(this.atType, elementVersion.atType) && - Objects.equals(this.data, elementVersion.data) && - Objects.equals(this.identity, elementVersion.identity); + DataVersion dataVersion = (DataVersion) o; + return Objects.equals(this.atId, dataVersion.atId) && + Objects.equals(this.atType, dataVersion.atType) && + Objects.equals(this.payload, dataVersion.payload) && + Objects.equals(this.identity, dataVersion.identity); } @Override public int hashCode() { - return Objects.hash(atId, atType, data, identity); + return Objects.hash(atId, atType, payload, identity); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ElementVersion {\n"); + sb.append("class DataVersion {\n"); sb.append(" atId: ").append(toIndentedString(atId)).append("\n"); sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); sb.append(" identity: ").append(toIndentedString(identity)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/org/omg/sysml/model/Query.java b/src/main/java/org/omg/sysml/model/Query.java index a1754c0..5e7b0a0 100644 --- a/src/main/java/org/omg/sysml/model/Query.java +++ b/src/main/java/org/omg/sysml/model/Query.java @@ -28,7 +28,7 @@ import java.util.UUID; import org.omg.sysml.model.BranchOwningProject; import org.omg.sysml.model.Constraint; -import org.omg.sysml.model.ElementIdentity; +import org.omg.sysml.model.DataIdentity; /** * Query @@ -94,7 +94,7 @@ public AtTypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) - private List scope = null; + private List scope = null; public static final String SERIALIZED_NAME_SELECT = "select"; @SerializedName(SERIALIZED_NAME_SELECT) @@ -174,15 +174,15 @@ public void setOwningProject(BranchOwningProject owningProject) { } - public Query scope(List scope) { + public Query scope(List scope) { this.scope = scope; return this; } - public Query addScopeItem(ElementIdentity scopeItem) { + public Query addScopeItem(DataIdentity scopeItem) { if (this.scope == null) { - this.scope = new ArrayList(); + this.scope = new ArrayList(); } this.scope.add(scopeItem); return this; @@ -195,12 +195,12 @@ public Query addScopeItem(ElementIdentity scopeItem) { @javax.annotation.Nullable @ApiModelProperty(value = "") - public List getScope() { + public List getScope() { return scope; } - public void setScope(List scope) { + public void setScope(List scope) { this.scope = scope; } diff --git a/src/main/java/org/omg/sysml/model/Tag.java b/src/main/java/org/omg/sysml/model/Tag.java new file mode 100644 index 0000000..98d1e7d --- /dev/null +++ b/src/main/java/org/omg/sysml/model/Tag.java @@ -0,0 +1,322 @@ +/* + * SysML v2 API and Services + * REST/HTTP binding (PSM) for the SysML v2 standard API. + * + * The version of the OpenAPI document: 1.0.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 org.omg.sysml.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.UUID; +import org.omg.sysml.model.BranchHead; +import org.omg.sysml.model.BranchOwningProject; +import org.threeten.bp.OffsetDateTime; + +/** + * Tag + */ + +public class Tag { + public static final String SERIALIZED_NAME_AT_ID = "@id"; + @SerializedName(SERIALIZED_NAME_AT_ID) + private UUID atId; + + /** + * Gets or Sets atType + */ + @JsonAdapter(AtTypeEnum.Adapter.class) + public enum AtTypeEnum { + TAG("Tag"); + + private String value; + + AtTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AtTypeEnum fromValue(String value) { + for (AtTypeEnum b : AtTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AtTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AtTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AtTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_AT_TYPE = "@type"; + @SerializedName(SERIALIZED_NAME_AT_TYPE) + private AtTypeEnum atType; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_OWNING_PROJECT = "owningProject"; + @SerializedName(SERIALIZED_NAME_OWNING_PROJECT) + private BranchOwningProject owningProject; + + public static final String SERIALIZED_NAME_REFERENCED_COMMIT = "referencedCommit"; + @SerializedName(SERIALIZED_NAME_REFERENCED_COMMIT) + private BranchHead referencedCommit; + + public static final String SERIALIZED_NAME_TAGGED_COMMIT = "taggedCommit"; + @SerializedName(SERIALIZED_NAME_TAGGED_COMMIT) + private BranchHead taggedCommit; + + public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; + @SerializedName(SERIALIZED_NAME_TIMESTAMP) + private OffsetDateTime timestamp; + + + public Tag atId(UUID atId) { + + this.atId = atId; + return this; + } + + /** + * Get atId + * @return atId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public UUID getAtId() { + return atId; + } + + + public void setAtId(UUID atId) { + this.atId = atId; + } + + + public Tag atType(AtTypeEnum atType) { + + this.atType = atType; + return this; + } + + /** + * Get atType + * @return atType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public AtTypeEnum getAtType() { + return atType; + } + + + public void setAtType(AtTypeEnum atType) { + this.atType = atType; + } + + + public Tag name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public Tag owningProject(BranchOwningProject owningProject) { + + this.owningProject = owningProject; + return this; + } + + /** + * Get owningProject + * @return owningProject + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public BranchOwningProject getOwningProject() { + return owningProject; + } + + + public void setOwningProject(BranchOwningProject owningProject) { + this.owningProject = owningProject; + } + + + public Tag referencedCommit(BranchHead referencedCommit) { + + this.referencedCommit = referencedCommit; + return this; + } + + /** + * Get referencedCommit + * @return referencedCommit + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public BranchHead getReferencedCommit() { + return referencedCommit; + } + + + public void setReferencedCommit(BranchHead referencedCommit) { + this.referencedCommit = referencedCommit; + } + + + public Tag taggedCommit(BranchHead taggedCommit) { + + this.taggedCommit = taggedCommit; + return this; + } + + /** + * Get taggedCommit + * @return taggedCommit + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public BranchHead getTaggedCommit() { + return taggedCommit; + } + + + public void setTaggedCommit(BranchHead taggedCommit) { + this.taggedCommit = taggedCommit; + } + + + public Tag timestamp(OffsetDateTime timestamp) { + + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * @return timestamp + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public OffsetDateTime getTimestamp() { + return timestamp; + } + + + public void setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.atId, tag.atId) && + Objects.equals(this.atType, tag.atType) && + Objects.equals(this.name, tag.name) && + Objects.equals(this.owningProject, tag.owningProject) && + Objects.equals(this.referencedCommit, tag.referencedCommit) && + Objects.equals(this.taggedCommit, tag.taggedCommit) && + Objects.equals(this.timestamp, tag.timestamp); + } + + @Override + public int hashCode() { + return Objects.hash(atId, atType, name, owningProject, referencedCommit, taggedCommit, timestamp); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" atId: ").append(toIndentedString(atId)).append("\n"); + sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" owningProject: ").append(toIndentedString(owningProject)).append("\n"); + sb.append(" referencedCommit: ").append(toIndentedString(referencedCommit)).append("\n"); + sb.append(" taggedCommit: ").append(toIndentedString(taggedCommit)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/test/java/org/omg/sysml/api/BranchApiTest.java b/src/test/java/org/omg/sysml/api/BranchApiTest.java index ded4f12..1fd548b 100644 --- a/src/test/java/org/omg/sysml/api/BranchApiTest.java +++ b/src/test/java/org/omg/sysml/api/BranchApiTest.java @@ -34,6 +34,23 @@ public class BranchApiTest { private final BranchApi api = new BranchApi(); + /** + * Delete branch by project and ID + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteBranchByProjectAndIdTest() throws ApiException { + UUID projectId = null; + UUID branchId = null; + Branch response = api.deleteBranchByProjectAndId(projectId, branchId); + + // TODO: test validations + } + /** * Get branches by project * diff --git a/src/test/java/org/omg/sysml/api/ProjectApiTest.java b/src/test/java/org/omg/sysml/api/ProjectApiTest.java index dd66df2..753af64 100644 --- a/src/test/java/org/omg/sysml/api/ProjectApiTest.java +++ b/src/test/java/org/omg/sysml/api/ProjectApiTest.java @@ -34,6 +34,22 @@ public class ProjectApiTest { private final ProjectApi api = new ProjectApi(); + /** + * Delete project by ID + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteProjectByIdTest() throws ApiException { + UUID projectId = null; + Project response = api.deleteProjectById(projectId); + + // TODO: test validations + } + /** * Get project by ID * @@ -84,4 +100,21 @@ public void postProjectTest() throws ApiException { // TODO: test validations } + /** + * Update project by ID + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void putProjectByIdTest() throws ApiException { + UUID projectId = null; + Project body = null; + Project response = api.putProjectById(projectId, body); + + // 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 0c633c5..343fc1a 100644 --- a/src/test/java/org/omg/sysml/api/QueryApiTest.java +++ b/src/test/java/org/omg/sysml/api/QueryApiTest.java @@ -35,6 +35,23 @@ public class QueryApiTest { private final QueryApi api = new QueryApi(); + /** + * Delete query by project and ID + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteQueryByProjectAndIdTest() throws ApiException { + UUID projectId = null; + UUID queryId = null; + Query response = api.deleteQueryByProjectAndId(projectId, queryId); + + // TODO: test validations + } + /** * Get queries by project * diff --git a/src/test/java/org/omg/sysml/api/TagApiTest.java b/src/test/java/org/omg/sysml/api/TagApiTest.java new file mode 100644 index 0000000..d2e7f96 --- /dev/null +++ b/src/test/java/org/omg/sysml/api/TagApiTest.java @@ -0,0 +1,108 @@ +/* + * SysML v2 API and Services + * REST/HTTP binding (PSM) for the SysML v2 standard API. + * + * The version of the OpenAPI document: 1.0.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 org.omg.sysml.api; + +import org.omg.sysml.ApiException; +import org.omg.sysml.model.Branch; +import org.omg.sysml.model.Error; +import org.omg.sysml.model.Tag; +import java.util.UUID; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for TagApi + */ +@Ignore +public class TagApiTest { + + private final TagApi api = new TagApi(); + + + /** + * Delete tag by project and ID + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteTagByProjectAndIdTest() throws ApiException { + UUID projectId = null; + UUID tagId = null; + Tag response = api.deleteTagByProjectAndId(projectId, tagId); + + // TODO: test validations + } + + /** + * Get tag by project and ID + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getTagByProjectAndIdTest() throws ApiException { + UUID projectId = null; + UUID tagId = null; + Tag response = api.getTagByProjectAndId(projectId, tagId); + + // TODO: test validations + } + + /** + * Get tags by project + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getTagsByProjectTest() throws ApiException { + UUID projectId = null; + String pageAfter = null; + String pageBefore = null; + Integer pageSize = null; + List response = api.getTagsByProject(projectId, pageAfter, pageBefore, pageSize); + + // TODO: test validations + } + + /** + * Create tag by project + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void postTagByProjectTest() throws ApiException { + UUID projectId = null; + Tag body = null; + Branch response = api.postTagByProject(projectId, body); + + // TODO: test validations + } + +} diff --git a/src/test/java/org/omg/sysml/model/BranchTest.java b/src/test/java/org/omg/sysml/model/BranchTest.java index 035d194..390aa53 100644 --- a/src/test/java/org/omg/sysml/model/BranchTest.java +++ b/src/test/java/org/omg/sysml/model/BranchTest.java @@ -24,6 +24,7 @@ import java.util.UUID; import org.omg.sysml.model.BranchHead; import org.omg.sysml.model.BranchOwningProject; +import org.threeten.bp.OffsetDateTime; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; @@ -67,6 +68,14 @@ public void headTest() { // TODO: test head } + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + /** * Test the property 'owningProject' */ @@ -76,11 +85,19 @@ public void owningProjectTest() { } /** - * Test the property 'name' + * Test the property 'referencedCommit' */ @Test - public void nameTest() { - // TODO: test name + public void referencedCommitTest() { + // TODO: test referencedCommit + } + + /** + * Test the property 'timestamp' + */ + @Test + public void timestampTest() { + // TODO: test timestamp } } diff --git a/src/test/java/org/omg/sysml/model/CommitTest.java b/src/test/java/org/omg/sysml/model/CommitTest.java index 2e243bd..c17298f 100644 --- a/src/test/java/org/omg/sysml/model/CommitTest.java +++ b/src/test/java/org/omg/sysml/model/CommitTest.java @@ -26,7 +26,7 @@ import java.util.UUID; import org.omg.sysml.model.BranchHead; import org.omg.sysml.model.BranchOwningProject; -import org.omg.sysml.model.ElementVersion; +import org.omg.sysml.model.DataVersion; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/src/test/java/org/omg/sysml/model/ElementIdentityTest.java b/src/test/java/org/omg/sysml/model/DataIdentityTest.java similarity index 80% rename from src/test/java/org/omg/sysml/model/ElementIdentityTest.java rename to src/test/java/org/omg/sysml/model/DataIdentityTest.java index 6553801..f8297d8 100644 --- a/src/test/java/org/omg/sysml/model/ElementIdentityTest.java +++ b/src/test/java/org/omg/sysml/model/DataIdentityTest.java @@ -28,17 +28,17 @@ /** - * Model tests for ElementIdentity + * Model tests for DataIdentity */ -public class ElementIdentityTest { - private final ElementIdentity model = new ElementIdentity(); +public class DataIdentityTest { + private final DataIdentity model = new DataIdentity(); /** - * Model tests for ElementIdentity + * Model tests for DataIdentity */ @Test - public void testElementIdentity() { - // TODO: test ElementIdentity + public void testDataIdentity() { + // TODO: test DataIdentity } /** diff --git a/src/test/java/org/omg/sysml/model/DataTest.java b/src/test/java/org/omg/sysml/model/DataTest.java new file mode 100644 index 0000000..309797b --- /dev/null +++ b/src/test/java/org/omg/sysml/model/DataTest.java @@ -0,0 +1,62 @@ +/* + * SysML v2 API and Services + * REST/HTTP binding (PSM) for the SysML v2 standard API. + * + * The version of the OpenAPI document: 1.0.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 org.omg.sysml.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Data + */ +public class DataTest { + private final Data model = new Data(); + + /** + * Model tests for Data + */ + @Test + public void testData() { + // TODO: test Data + } + + /** + * Test the property 'atId' + */ + @Test + public void atIdTest() { + // TODO: test atId + } + + /** + * Test the property 'atType' + */ + @Test + public void atTypeTest() { + // TODO: test atType + } + +} diff --git a/src/test/java/org/omg/sysml/model/ElementVersionTest.java b/src/test/java/org/omg/sysml/model/DataVersionTest.java similarity index 74% rename from src/test/java/org/omg/sysml/model/ElementVersionTest.java rename to src/test/java/org/omg/sysml/model/DataVersionTest.java index 1662ab1..57a18ca 100644 --- a/src/test/java/org/omg/sysml/model/ElementVersionTest.java +++ b/src/test/java/org/omg/sysml/model/DataVersionTest.java @@ -22,25 +22,25 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.omg.sysml.model.Element; -import org.omg.sysml.model.ElementIdentity; +import org.omg.sysml.model.Data; +import org.omg.sysml.model.DataIdentity; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for ElementVersion + * Model tests for DataVersion */ -public class ElementVersionTest { - private final ElementVersion model = new ElementVersion(); +public class DataVersionTest { + private final DataVersion model = new DataVersion(); /** - * Model tests for ElementVersion + * Model tests for DataVersion */ @Test - public void testElementVersion() { - // TODO: test ElementVersion + public void testDataVersion() { + // TODO: test DataVersion } /** @@ -60,11 +60,11 @@ public void atTypeTest() { } /** - * Test the property 'data' + * Test the property 'payload' */ @Test - public void dataTest() { - // TODO: test data + public void payloadTest() { + // TODO: test payload } /** diff --git a/src/test/java/org/omg/sysml/model/QueryTest.java b/src/test/java/org/omg/sysml/model/QueryTest.java index 0b9207c..d8ad879 100644 --- a/src/test/java/org/omg/sysml/model/QueryTest.java +++ b/src/test/java/org/omg/sysml/model/QueryTest.java @@ -26,7 +26,7 @@ import java.util.UUID; import org.omg.sysml.model.BranchOwningProject; import org.omg.sysml.model.Constraint; -import org.omg.sysml.model.ElementIdentity; +import org.omg.sysml.model.DataIdentity; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/src/test/java/org/omg/sysml/model/TagTest.java b/src/test/java/org/omg/sysml/model/TagTest.java new file mode 100644 index 0000000..1d0cba1 --- /dev/null +++ b/src/test/java/org/omg/sysml/model/TagTest.java @@ -0,0 +1,103 @@ +/* + * SysML v2 API and Services + * REST/HTTP binding (PSM) for the SysML v2 standard API. + * + * The version of the OpenAPI document: 1.0.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 org.omg.sysml.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.UUID; +import org.omg.sysml.model.BranchHead; +import org.omg.sysml.model.BranchOwningProject; +import org.threeten.bp.OffsetDateTime; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Tag + */ +public class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + public void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'atId' + */ + @Test + public void atIdTest() { + // TODO: test atId + } + + /** + * Test the property 'atType' + */ + @Test + public void atTypeTest() { + // TODO: test atType + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'owningProject' + */ + @Test + public void owningProjectTest() { + // TODO: test owningProject + } + + /** + * Test the property 'referencedCommit' + */ + @Test + public void referencedCommitTest() { + // TODO: test referencedCommit + } + + /** + * Test the property 'taggedCommit' + */ + @Test + public void taggedCommitTest() { + // TODO: test taggedCommit + } + + /** + * Test the property 'timestamp' + */ + @Test + public void timestampTest() { + // TODO: test timestamp + } + +}