queryParams, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams);
final String url = buildUrl(path, queryParams, collectionQueryParams);
@@ -1020,10 +1033,14 @@ public Request buildRequest(String path, String method, List queryParams,
reqBody = serialize(body, contentType);
}
+ // Associate callback with request (if not null) so interceptor can
+ // access it when creating ProgressResponseBody
+ reqBuilder.tag(callback);
+
Request request = null;
- if(progressRequestListener != null && reqBody != null) {
- ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, progressRequestListener);
+ if (callback != null && reqBody != null) {
+ ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback);
request = reqBuilder.method(method, progressRequestBody).build();
} else {
request = reqBuilder.method(method, reqBody).build();
@@ -1122,7 +1139,7 @@ public void updateParamsForAuth(String[] authNames, List queryParams, Map<
* @return RequestBody
*/
public RequestBody buildRequestBodyFormEncoding(Map formParams) {
- FormEncodingBuilder formBuilder = new FormEncodingBuilder();
+ okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder();
for (Entry param : formParams.entrySet()) {
formBuilder.add(param.getKey(), parameterToString(param.getValue()));
}
@@ -1137,7 +1154,7 @@ public RequestBody buildRequestBodyFormEncoding(Map formParams)
* @return RequestBody
*/
public RequestBody buildRequestBodyMultipart(Map formParams) {
- MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM);
+ MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM);
for (Entry param : formParams.entrySet()) {
if (param.getValue() instanceof File) {
File file = (File) param.getValue();
@@ -1167,6 +1184,27 @@ public String guessContentTypeFromFile(File file) {
}
}
+ /**
+ * Get network interceptor to add it to the httpClient to track download progress for
+ * async requests.
+ */
+ private Interceptor getProgressInterceptor() {
+ return new Interceptor() {
+ @Override
+ public Response intercept(Interceptor.Chain chain) throws IOException {
+ final Request request = chain.request();
+ final Response originalResponse = chain.proceed(request);
+ if (request.tag() instanceof ApiCallback) {
+ final ApiCallback callback = (ApiCallback) request.tag();
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), callback))
+ .build();
+ }
+ return originalResponse;
+ }
+ };
+ }
+
/**
* Apply SSL related settings to httpClient according to the current values of
* verifyingSsl and sslCaCert.
@@ -1176,16 +1214,23 @@ private void applySslSettings() {
TrustManager[] trustManagers = null;
HostnameVerifier hostnameVerifier = null;
if (!verifyingSsl) {
- TrustManager trustAll = new X509TrustManager() {
- @Override
- public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {}
- @Override
- public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {}
- @Override
- public X509Certificate[] getAcceptedIssuers() { return null; }
+ trustManagers = new TrustManager[]{
+ new X509TrustManager() {
+ @Override
+ public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
+ }
+
+ @Override
+ public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
+ }
+
+ @Override
+ public java.security.cert.X509Certificate[] getAcceptedIssuers() {
+ return new java.security.cert.X509Certificate[]{};
+ }
+ }
};
SSLContext sslContext = SSLContext.getInstance("TLS");
- trustManagers = new TrustManager[] {trustAll};
hostnameVerifier = new HostnameVerifier() {
@Override
public boolean verify(String hostname, SSLSession session) {
@@ -1213,11 +1258,12 @@ public boolean verify(String hostname, SSLSession session) {
if (keyManagers != null || trustManagers != null) {
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(keyManagers, trustManagers, new SecureRandom());
- httpClient.setSslSocketFactory(sslContext.getSocketFactory());
+ httpClient = httpClient.newBuilder().sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]).build();
} else {
- httpClient.setSslSocketFactory(null);
+ httpClient = httpClient.newBuilder().sslSocketFactory(null, (X509TrustManager) trustManagers[0]).build();
}
- httpClient.setHostnameVerifier(hostnameVerifier);
+
+ httpClient = httpClient.newBuilder().hostnameVerifier(hostnameVerifier).build();
} catch (GeneralSecurityException e) {
throw new RuntimeException(e);
}
diff --git a/src/main/java/org/omg/sysml/ApiException.java b/src/main/java/org/omg/sysml/ApiException.java
index 8438680..706c3cd 100644
--- a/src/main/java/org/omg/sysml/ApiException.java
+++ b/src/main/java/org/omg/sysml/ApiException.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
diff --git a/src/main/java/org/omg/sysml/ApiResponse.java b/src/main/java/org/omg/sysml/ApiResponse.java
index 2435fb4..368c123 100644
--- a/src/main/java/org/omg/sysml/ApiResponse.java
+++ b/src/main/java/org/omg/sysml/ApiResponse.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
diff --git a/src/main/java/org/omg/sysml/Configuration.java b/src/main/java/org/omg/sysml/Configuration.java
index 7027b32..122a7ba 100644
--- a/src/main/java/org/omg/sysml/Configuration.java
+++ b/src/main/java/org/omg/sysml/Configuration.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
diff --git a/src/main/java/org/omg/sysml/GzipRequestInterceptor.java b/src/main/java/org/omg/sysml/GzipRequestInterceptor.java
index 1d98989..ba51a22 100644
--- a/src/main/java/org/omg/sysml/GzipRequestInterceptor.java
+++ b/src/main/java/org/omg/sysml/GzipRequestInterceptor.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,7 +13,7 @@
package org.omg.sysml;
-import com.squareup.okhttp.*;
+import okhttp3.*;
import okio.Buffer;
import okio.BufferedSink;
import okio.GzipSink;
diff --git a/src/main/java/org/omg/sysml/JSON.java b/src/main/java/org/omg/sysml/JSON.java
index 7c4cfa7..4d892c3 100644
--- a/src/main/java/org/omg/sysml/JSON.java
+++ b/src/main/java/org/omg/sysml/JSON.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
diff --git a/src/main/java/org/omg/sysml/Pair.java b/src/main/java/org/omg/sysml/Pair.java
index 2892122..dc0528d 100644
--- a/src/main/java/org/omg/sysml/Pair.java
+++ b/src/main/java/org/omg/sysml/Pair.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
diff --git a/src/main/java/org/omg/sysml/ProgressRequestBody.java b/src/main/java/org/omg/sysml/ProgressRequestBody.java
index 77790b2..7da170d 100644
--- a/src/main/java/org/omg/sysml/ProgressRequestBody.java
+++ b/src/main/java/org/omg/sysml/ProgressRequestBody.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,8 +13,8 @@
package org.omg.sysml;
-import com.squareup.okhttp.MediaType;
-import com.squareup.okhttp.RequestBody;
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
import java.io.IOException;
@@ -26,17 +26,13 @@
public class ProgressRequestBody extends RequestBody {
- public interface ProgressRequestListener {
- void onRequestProgress(long bytesWritten, long contentLength, boolean done);
- }
-
private final RequestBody requestBody;
- private final ProgressRequestListener progressListener;
+ private final ApiCallback callback;
- public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) {
+ public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) {
this.requestBody = requestBody;
- this.progressListener = progressListener;
+ this.callback = callback;
}
@Override
@@ -70,7 +66,7 @@ public void write(Buffer source, long byteCount) throws IOException {
}
bytesWritten += byteCount;
- progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength);
+ callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength);
}
};
}
diff --git a/src/main/java/org/omg/sysml/ProgressResponseBody.java b/src/main/java/org/omg/sysml/ProgressResponseBody.java
index 1fcca37..441a9ab 100644
--- a/src/main/java/org/omg/sysml/ProgressResponseBody.java
+++ b/src/main/java/org/omg/sysml/ProgressResponseBody.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,8 +13,8 @@
package org.omg.sysml;
-import com.squareup.okhttp.MediaType;
-import com.squareup.okhttp.ResponseBody;
+import okhttp3.MediaType;
+import okhttp3.ResponseBody;
import java.io.IOException;
@@ -26,17 +26,13 @@
public class ProgressResponseBody extends ResponseBody {
- public interface ProgressListener {
- void update(long bytesRead, long contentLength, boolean done);
- }
-
private final ResponseBody responseBody;
- private final ProgressListener progressListener;
+ private final ApiCallback callback;
private BufferedSource bufferedSource;
- public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) {
+ public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) {
this.responseBody = responseBody;
- this.progressListener = progressListener;
+ this.callback = callback;
}
@Override
@@ -45,12 +41,12 @@ public MediaType contentType() {
}
@Override
- public long contentLength() throws IOException {
+ public long contentLength() {
return responseBody.contentLength();
}
@Override
- public BufferedSource source() throws IOException {
+ public BufferedSource source() {
if (bufferedSource == null) {
bufferedSource = Okio.buffer(source(responseBody.source()));
}
@@ -66,7 +62,7 @@ public long read(Buffer sink, long byteCount) throws IOException {
long bytesRead = super.read(sink, byteCount);
// read() returns the number of bytes read, or -1 if this source is exhausted.
totalBytesRead += bytesRead != -1 ? bytesRead : 0;
- progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
+ callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
return bytesRead;
}
};
diff --git a/src/main/java/org/omg/sysml/StringUtil.java b/src/main/java/org/omg/sysml/StringUtil.java
index 591f790..10b38be 100644
--- a/src/main/java/org/omg/sysml/StringUtil.java
+++ b/src/main/java/org/omg/sysml/StringUtil.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
diff --git a/src/main/java/org/omg/sysml/api/ElementApi.java b/src/main/java/org/omg/sysml/api/ElementApi.java
index 9a50a87..10114e8 100644
--- a/src/main/java/org/omg/sysml/api/ElementApi.java
+++ b/src/main/java/org/omg/sysml/api/ElementApi.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -37,34 +37,41 @@
import java.util.Map;
public class ElementApi {
- private ApiClient apiClient;
+ private ApiClient localVarApiClient;
public ElementApi() {
this(Configuration.getDefaultApiClient());
}
public ElementApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
- return apiClient;
+ return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ this.localVarApiClient = apiClient;
}
/**
* Build call for createElement
- * @param requestBody (required)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call createElementCall(Map requestBody, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = requestBody;
+ public okhttp3.Call createElementCall(Map body, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/elements";
@@ -76,7 +83,7 @@ public com.squareup.okhttp.Call createElementCall(Map requestBod
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -84,112 +91,113 @@ public com.squareup.okhttp.Call createElementCall(Map requestBod
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call createElementValidateBeforeCall(Map requestBody, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call createElementValidateBeforeCall(Map body, final ApiCallback _callback) throws ApiException {
- // verify the required parameter 'requestBody' is set
- if (requestBody == null) {
- throw new ApiException("Missing the required parameter 'requestBody' when calling createElement(Async)");
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException("Missing the required parameter 'body' when calling createElement(Async)");
}
- com.squareup.okhttp.Call call = createElementCall(requestBody, progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = createElementCall(body, _callback);
+ return localVarCall;
}
/**
* Add a new element
*
- * @param requestBody (required)
+ * @param body (required)
* @return Element
* @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 Element createElement(Map requestBody) throws ApiException {
- ApiResponse resp = createElementWithHttpInfo(requestBody);
- return resp.getData();
+ public Element createElement(Map body) throws ApiException {
+ ApiResponse localVarResp = createElementWithHttpInfo(body);
+ return localVarResp.getData();
}
/**
* Add a new element
*
- * @param requestBody (required)
+ * @param body (required)
* @return ApiResponse<Element>
* @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 createElementWithHttpInfo(Map requestBody) throws ApiException {
- com.squareup.okhttp.Call call = createElementValidateBeforeCall(requestBody, null, null);
+ public ApiResponse createElementWithHttpInfo(Map body) throws ApiException {
+ okhttp3.Call localVarCall = createElementValidateBeforeCall(body, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Add a new element (asynchronously)
*
- * @param requestBody (required)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call createElementAsync(Map requestBody, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call createElementAsync(Map body, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = createElementValidateBeforeCall(requestBody, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = createElementValidateBeforeCall(body, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for getElement
* @param identifier ID of the element (required)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call getElementCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = new Object();
+ public okhttp3.Call getElementCall(String identifier, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/elements/{identifier}"
- .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString()));
+ .replaceAll("\\{" + "identifier" + "\\}", localVarApiClient.escapeString(identifier.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -198,7 +206,7 @@ public com.squareup.okhttp.Call getElementCall(String identifier, final Progress
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -206,27 +214,15 @@ public com.squareup.okhttp.Call getElementCall(String identifier, final Progress
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getElementValidateBeforeCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getElementValidateBeforeCall(String identifier, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'identifier' is set
if (identifier == null) {
@@ -234,8 +230,8 @@ private com.squareup.okhttp.Call getElementValidateBeforeCall(String identifier,
}
- com.squareup.okhttp.Call call = getElementCall(identifier, progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = getElementCall(identifier, _callback);
+ return localVarCall;
}
@@ -245,10 +241,19 @@ private com.squareup.okhttp.Call getElementValidateBeforeCall(String identifier,
* @param identifier ID of the element (required)
* @return Element
* @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 Element getElement(String identifier) throws ApiException {
- ApiResponse resp = getElementWithHttpInfo(identifier);
- return resp.getData();
+ ApiResponse localVarResp = getElementWithHttpInfo(identifier);
+ return localVarResp.getData();
}
/**
@@ -257,63 +262,70 @@ public Element getElement(String identifier) throws ApiException {
* @param identifier ID of the element (required)
* @return ApiResponse<Element>
* @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 getElementWithHttpInfo(String identifier) throws ApiException {
- com.squareup.okhttp.Call call = getElementValidateBeforeCall(identifier, null, null);
+ okhttp3.Call localVarCall = getElementValidateBeforeCall(identifier, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get element by its ID (asynchronously)
*
* @param identifier ID of the element (required)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getElementAsync(String identifier, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call getElementAsync(String identifier, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = getElementValidateBeforeCall(identifier, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getElementValidateBeforeCall(identifier, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for getElementByProjectAndId
* @param projectIdentifier ID of the project (required)
* @param elementIdentifier ID of the element (required)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call getElementByProjectAndIdCall(String projectIdentifier, String elementIdentifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = new Object();
+ public okhttp3.Call getElementByProjectAndIdCall(String projectIdentifier, String elementIdentifier, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/projects/{project_identifier}/elements/{element_identifier}"
- .replaceAll("\\{" + "project_identifier" + "\\}", apiClient.escapeString(projectIdentifier.toString()))
- .replaceAll("\\{" + "element_identifier" + "\\}", apiClient.escapeString(elementIdentifier.toString()));
+ .replaceAll("\\{" + "project_identifier" + "\\}", localVarApiClient.escapeString(projectIdentifier.toString()))
+ .replaceAll("\\{" + "element_identifier" + "\\}", localVarApiClient.escapeString(elementIdentifier.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -322,7 +334,7 @@ public com.squareup.okhttp.Call getElementByProjectAndIdCall(String projectIdent
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -330,27 +342,15 @@ public com.squareup.okhttp.Call getElementByProjectAndIdCall(String projectIdent
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getElementByProjectAndIdValidateBeforeCall(String projectIdentifier, String elementIdentifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getElementByProjectAndIdValidateBeforeCall(String projectIdentifier, String elementIdentifier, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectIdentifier' is set
if (projectIdentifier == null) {
@@ -363,8 +363,8 @@ private com.squareup.okhttp.Call getElementByProjectAndIdValidateBeforeCall(Stri
}
- com.squareup.okhttp.Call call = getElementByProjectAndIdCall(projectIdentifier, elementIdentifier, progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = getElementByProjectAndIdCall(projectIdentifier, elementIdentifier, _callback);
+ return localVarCall;
}
@@ -375,10 +375,19 @@ private com.squareup.okhttp.Call getElementByProjectAndIdValidateBeforeCall(Stri
* @param elementIdentifier ID of the element (required)
* @return Element
* @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 Element getElementByProjectAndId(String projectIdentifier, String elementIdentifier) throws ApiException {
- ApiResponse resp = getElementByProjectAndIdWithHttpInfo(projectIdentifier, elementIdentifier);
- return resp.getData();
+ ApiResponse localVarResp = getElementByProjectAndIdWithHttpInfo(projectIdentifier, elementIdentifier);
+ return localVarResp.getData();
}
/**
@@ -388,11 +397,20 @@ public Element getElementByProjectAndId(String projectIdentifier, String element
* @param elementIdentifier ID of the element (required)
* @return ApiResponse<Element>
* @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 getElementByProjectAndIdWithHttpInfo(String projectIdentifier, String elementIdentifier) throws ApiException {
- com.squareup.okhttp.Call call = getElementByProjectAndIdValidateBeforeCall(projectIdentifier, elementIdentifier, null, null);
+ okhttp3.Call localVarCall = getElementByProjectAndIdValidateBeforeCall(projectIdentifier, elementIdentifier, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
@@ -400,45 +418,42 @@ public ApiResponse getElementByProjectAndIdWithHttpInfo(String projectI
*
* @param projectIdentifier ID of the project (required)
* @param elementIdentifier ID of the element (required)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getElementByProjectAndIdAsync(String projectIdentifier, String elementIdentifier, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call getElementByProjectAndIdAsync(String projectIdentifier, String elementIdentifier, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = getElementByProjectAndIdValidateBeforeCall(projectIdentifier, elementIdentifier, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getElementByProjectAndIdValidateBeforeCall(projectIdentifier, elementIdentifier, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for getElements
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call getElementsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = new Object();
+ public okhttp3.Call getElementsCall(final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/elements";
@@ -450,7 +465,7 @@ public com.squareup.okhttp.Call getElementsCall(final ProgressResponseBody.Progr
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -458,31 +473,19 @@ public com.squareup.okhttp.Call getElementsCall(final ProgressResponseBody.Progr
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getElementsValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getElementsValidateBeforeCall(final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = getElementsCall(progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = getElementsCall(_callback);
+ return localVarCall;
}
@@ -491,10 +494,18 @@ private com.squareup.okhttp.Call getElementsValidateBeforeCall(final ProgressRes
*
* @return List<Element>
* @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 List getElements() throws ApiException {
- ApiResponse> resp = getElementsWithHttpInfo();
- return resp.getData();
+ ApiResponse> localVarResp = getElementsWithHttpInfo();
+ return localVarResp.getData();
}
/**
@@ -502,60 +513,65 @@ public List getElements() throws ApiException {
*
* @return ApiResponse<List<Element>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Ok | - |
+ 415 | The requested content type is not acceptable. | - |
+ 500 | Internal server error. | - |
+ 0 | Unexpected response. | - |
+
*/
public ApiResponse> getElementsWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = getElementsValidateBeforeCall(null, null);
+ okhttp3.Call localVarCall = getElementsValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all elements (asynchronously)
*
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getElementsAsync(final ApiCallback> callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call getElementsAsync(final ApiCallback> _callback) throws ApiException {
- com.squareup.okhttp.Call call = getElementsValidateBeforeCall(progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getElementsValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for getElementsInProject
* @param projectIdentifier ID of the project (required)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call getElementsInProjectCall(String projectIdentifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = new Object();
+ public okhttp3.Call getElementsInProjectCall(String projectIdentifier, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/projects/{project_identifier}/elements"
- .replaceAll("\\{" + "project_identifier" + "\\}", apiClient.escapeString(projectIdentifier.toString()));
+ .replaceAll("\\{" + "project_identifier" + "\\}", localVarApiClient.escapeString(projectIdentifier.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -564,7 +580,7 @@ public com.squareup.okhttp.Call getElementsInProjectCall(String projectIdentifie
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -572,27 +588,15 @@ public com.squareup.okhttp.Call getElementsInProjectCall(String projectIdentifie
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getElementsInProjectValidateBeforeCall(String projectIdentifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getElementsInProjectValidateBeforeCall(String projectIdentifier, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectIdentifier' is set
if (projectIdentifier == null) {
@@ -600,8 +604,8 @@ private com.squareup.okhttp.Call getElementsInProjectValidateBeforeCall(String p
}
- com.squareup.okhttp.Call call = getElementsInProjectCall(projectIdentifier, progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = getElementsInProjectCall(projectIdentifier, _callback);
+ return localVarCall;
}
@@ -611,10 +615,19 @@ private com.squareup.okhttp.Call getElementsInProjectValidateBeforeCall(String p
* @param projectIdentifier ID of the project (required)
* @return Element
* @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 Element getElementsInProject(String projectIdentifier) throws ApiException {
- ApiResponse resp = getElementsInProjectWithHttpInfo(projectIdentifier);
- return resp.getData();
+ ApiResponse localVarResp = getElementsInProjectWithHttpInfo(projectIdentifier);
+ return localVarResp.getData();
}
/**
@@ -623,45 +636,44 @@ public Element getElementsInProject(String projectIdentifier) throws ApiExceptio
* @param projectIdentifier ID of the project (required)
* @return ApiResponse<Element>
* @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 getElementsInProjectWithHttpInfo(String projectIdentifier) throws ApiException {
- com.squareup.okhttp.Call call = getElementsInProjectValidateBeforeCall(projectIdentifier, null, null);
+ okhttp3.Call localVarCall = getElementsInProjectValidateBeforeCall(projectIdentifier, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all elements in the project (asynchronously)
*
* @param projectIdentifier ID of the project (required)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getElementsInProjectAsync(String projectIdentifier, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call getElementsInProjectAsync(String projectIdentifier, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = getElementsInProjectValidateBeforeCall(projectIdentifier, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getElementsInProjectValidateBeforeCall(projectIdentifier, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
}
diff --git a/src/main/java/org/omg/sysml/api/ProjectApi.java b/src/main/java/org/omg/sysml/api/ProjectApi.java
index 3024839..c118bc3 100644
--- a/src/main/java/org/omg/sysml/api/ProjectApi.java
+++ b/src/main/java/org/omg/sysml/api/ProjectApi.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -37,34 +37,41 @@
import java.util.Map;
public class ProjectApi {
- private ApiClient apiClient;
+ private ApiClient localVarApiClient;
public ProjectApi() {
this(Configuration.getDefaultApiClient());
}
public ProjectApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
- return apiClient;
+ return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ this.localVarApiClient = apiClient;
}
/**
* Build call for createProject
- * @param project (optional)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 |
+ 201 | Created | - |
+ 415 | The requested content type is not acceptable. | - |
+ 500 | Internal server error. | - |
+ 0 | Unexpected response. | - |
+
*/
- public com.squareup.okhttp.Call createProjectCall(Project project, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = project;
+ public okhttp3.Call createProjectCall(Project body, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/projects";
@@ -76,7 +83,7 @@ public com.squareup.okhttp.Call createProjectCall(Project project, final Progres
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -84,107 +91,108 @@ public com.squareup.okhttp.Call createProjectCall(Project project, final Progres
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call createProjectValidateBeforeCall(Project project, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call createProjectValidateBeforeCall(Project body, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = createProjectCall(project, progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = createProjectCall(body, _callback);
+ return localVarCall;
}
/**
* Add a new project
*
- * @param project (optional)
+ * @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 |
+ 201 | Created | - |
+ 415 | The requested content type is not acceptable. | - |
+ 500 | Internal server error. | - |
+ 0 | Unexpected response. | - |
+
*/
- public Project createProject(Project project) throws ApiException {
- ApiResponse resp = createProjectWithHttpInfo(project);
- return resp.getData();
+ public Project createProject(Project body) throws ApiException {
+ ApiResponse localVarResp = createProjectWithHttpInfo(body);
+ return localVarResp.getData();
}
/**
* Add a new project
*
- * @param project (optional)
+ * @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 |
+ 201 | Created | - |
+ 415 | The requested content type is not acceptable. | - |
+ 500 | Internal server error. | - |
+ 0 | Unexpected response. | - |
+
*/
- public ApiResponse createProjectWithHttpInfo(Project project) throws ApiException {
- com.squareup.okhttp.Call call = createProjectValidateBeforeCall(project, null, null);
+ public ApiResponse createProjectWithHttpInfo(Project body) throws ApiException {
+ okhttp3.Call localVarCall = createProjectValidateBeforeCall(body, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Add a new project (asynchronously)
*
- * @param project (optional)
- * @param callback The callback to be executed when the API call finishes
+ * @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 |
+ 201 | Created | - |
+ 415 | The requested content type is not acceptable. | - |
+ 500 | Internal server error. | - |
+ 0 | Unexpected response. | - |
+
*/
- public com.squareup.okhttp.Call createProjectAsync(Project project, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call createProjectAsync(Project body, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = createProjectValidateBeforeCall(project, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = createProjectValidateBeforeCall(body, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for getProject
* @param identifier ID of the project (required)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call getProjectCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = new Object();
+ public okhttp3.Call getProjectCall(String identifier, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/projects/{identifier}"
- .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString()));
+ .replaceAll("\\{" + "identifier" + "\\}", localVarApiClient.escapeString(identifier.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -193,7 +201,7 @@ public com.squareup.okhttp.Call getProjectCall(String identifier, final Progress
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -201,27 +209,15 @@ public com.squareup.okhttp.Call getProjectCall(String identifier, final Progress
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getProjectValidateBeforeCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getProjectValidateBeforeCall(String identifier, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'identifier' is set
if (identifier == null) {
@@ -229,8 +225,8 @@ private com.squareup.okhttp.Call getProjectValidateBeforeCall(String identifier,
}
- com.squareup.okhttp.Call call = getProjectCall(identifier, progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = getProjectCall(identifier, _callback);
+ return localVarCall;
}
@@ -240,10 +236,19 @@ private com.squareup.okhttp.Call getProjectValidateBeforeCall(String identifier,
* @param identifier 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 getProject(String identifier) throws ApiException {
- ApiResponse resp = getProjectWithHttpInfo(identifier);
- return resp.getData();
+ ApiResponse localVarResp = getProjectWithHttpInfo(identifier);
+ return localVarResp.getData();
}
/**
@@ -252,56 +257,62 @@ public Project getProject(String identifier) throws ApiException {
* @param identifier 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 getProjectWithHttpInfo(String identifier) throws ApiException {
- com.squareup.okhttp.Call call = getProjectValidateBeforeCall(identifier, null, null);
+ okhttp3.Call localVarCall = getProjectValidateBeforeCall(identifier, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get project by its ID (asynchronously)
*
* @param identifier ID of the project (required)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getProjectAsync(String identifier, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call getProjectAsync(String identifier, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = getProjectValidateBeforeCall(identifier, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getProjectValidateBeforeCall(identifier, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for getProjects
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call getProjectsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = new Object();
+ public okhttp3.Call getProjectsCall(final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/projects";
@@ -313,7 +324,7 @@ public com.squareup.okhttp.Call getProjectsCall(final ProgressResponseBody.Progr
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -321,31 +332,19 @@ public com.squareup.okhttp.Call getProjectsCall(final ProgressResponseBody.Progr
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getProjectsValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getProjectsValidateBeforeCall(final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = getProjectsCall(progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = getProjectsCall(_callback);
+ return localVarCall;
}
@@ -354,10 +353,18 @@ private com.squareup.okhttp.Call getProjectsValidateBeforeCall(final ProgressRes
*
* @return List<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 List getProjects() throws ApiException {
- ApiResponse> resp = getProjectsWithHttpInfo();
- return resp.getData();
+ ApiResponse> localVarResp = getProjectsWithHttpInfo();
+ return localVarResp.getData();
}
/**
@@ -365,44 +372,41 @@ public List getProjects() throws ApiException {
*
* @return ApiResponse<List<Project>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Ok | - |
+ 415 | The requested content type is not acceptable. | - |
+ 500 | Internal server error. | - |
+ 0 | Unexpected response. | - |
+
*/
public ApiResponse> getProjectsWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = getProjectsValidateBeforeCall(null, null);
+ okhttp3.Call localVarCall = getProjectsValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all projects (asynchronously)
*
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getProjectsAsync(final ApiCallback> callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call getProjectsAsync(final ApiCallback> _callback) throws ApiException {
- com.squareup.okhttp.Call call = getProjectsValidateBeforeCall(progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getProjectsValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
}
diff --git a/src/main/java/org/omg/sysml/api/RelationshipApi.java b/src/main/java/org/omg/sysml/api/RelationshipApi.java
index 85d1698..077674b 100644
--- a/src/main/java/org/omg/sysml/api/RelationshipApi.java
+++ b/src/main/java/org/omg/sysml/api/RelationshipApi.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -37,34 +37,41 @@
import java.util.Map;
public class RelationshipApi {
- private ApiClient apiClient;
+ private ApiClient localVarApiClient;
public RelationshipApi() {
this(Configuration.getDefaultApiClient());
}
public RelationshipApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
- return apiClient;
+ return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ this.localVarApiClient = apiClient;
}
/**
* Build call for createRelationship
- * @param relationship (required)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call createRelationshipCall(Relationship relationship, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = relationship;
+ public okhttp3.Call createRelationshipCall(Relationship body, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/relationships";
@@ -76,7 +83,7 @@ public com.squareup.okhttp.Call createRelationshipCall(Relationship relationship
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -84,112 +91,113 @@ public com.squareup.okhttp.Call createRelationshipCall(Relationship relationship
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call createRelationshipValidateBeforeCall(Relationship relationship, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call createRelationshipValidateBeforeCall(Relationship body, final ApiCallback _callback) throws ApiException {
- // verify the required parameter 'relationship' is set
- if (relationship == null) {
- throw new ApiException("Missing the required parameter 'relationship' when calling createRelationship(Async)");
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException("Missing the required parameter 'body' when calling createRelationship(Async)");
}
- com.squareup.okhttp.Call call = createRelationshipCall(relationship, progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = createRelationshipCall(body, _callback);
+ return localVarCall;
}
/**
* Add a new relationship
*
- * @param relationship (required)
+ * @param body (required)
* @return Relationship
* @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 Relationship createRelationship(Relationship relationship) throws ApiException {
- ApiResponse resp = createRelationshipWithHttpInfo(relationship);
- return resp.getData();
+ public Relationship createRelationship(Relationship body) throws ApiException {
+ ApiResponse localVarResp = createRelationshipWithHttpInfo(body);
+ return localVarResp.getData();
}
/**
* Add a new relationship
*
- * @param relationship (required)
+ * @param body (required)
* @return ApiResponse<Relationship>
* @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 createRelationshipWithHttpInfo(Relationship relationship) throws ApiException {
- com.squareup.okhttp.Call call = createRelationshipValidateBeforeCall(relationship, null, null);
+ public ApiResponse createRelationshipWithHttpInfo(Relationship body) throws ApiException {
+ okhttp3.Call localVarCall = createRelationshipValidateBeforeCall(body, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Add a new relationship (asynchronously)
*
- * @param relationship (required)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call createRelationshipAsync(Relationship relationship, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call createRelationshipAsync(Relationship body, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = createRelationshipValidateBeforeCall(relationship, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = createRelationshipValidateBeforeCall(body, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for getRelationship
* @param identifier ID of the relationship (required)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call getRelationshipCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = new Object();
+ public okhttp3.Call getRelationshipCall(String identifier, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/relationships/{identifier}"
- .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString()));
+ .replaceAll("\\{" + "identifier" + "\\}", localVarApiClient.escapeString(identifier.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -198,7 +206,7 @@ public com.squareup.okhttp.Call getRelationshipCall(String identifier, final Pro
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -206,27 +214,15 @@ public com.squareup.okhttp.Call getRelationshipCall(String identifier, final Pro
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getRelationshipValidateBeforeCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getRelationshipValidateBeforeCall(String identifier, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'identifier' is set
if (identifier == null) {
@@ -234,8 +230,8 @@ private com.squareup.okhttp.Call getRelationshipValidateBeforeCall(String identi
}
- com.squareup.okhttp.Call call = getRelationshipCall(identifier, progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = getRelationshipCall(identifier, _callback);
+ return localVarCall;
}
@@ -245,10 +241,19 @@ private com.squareup.okhttp.Call getRelationshipValidateBeforeCall(String identi
* @param identifier ID of the relationship (required)
* @return Relationship
* @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 Relationship getRelationship(String identifier) throws ApiException {
- ApiResponse resp = getRelationshipWithHttpInfo(identifier);
- return resp.getData();
+ ApiResponse localVarResp = getRelationshipWithHttpInfo(identifier);
+ return localVarResp.getData();
}
/**
@@ -257,56 +262,62 @@ public Relationship getRelationship(String identifier) throws ApiException {
* @param identifier ID of the relationship (required)
* @return ApiResponse<Relationship>
* @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 getRelationshipWithHttpInfo(String identifier) throws ApiException {
- com.squareup.okhttp.Call call = getRelationshipValidateBeforeCall(identifier, null, null);
+ okhttp3.Call localVarCall = getRelationshipValidateBeforeCall(identifier, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get relationship by its ID (asynchronously)
*
* @param identifier ID of the relationship (required)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getRelationshipAsync(String identifier, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call getRelationshipAsync(String identifier, final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = getRelationshipValidateBeforeCall(identifier, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getRelationshipValidateBeforeCall(identifier, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for getRelationships
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call getRelationshipsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = new Object();
+ public okhttp3.Call getRelationshipsCall(final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/relationships";
@@ -318,7 +329,7 @@ public com.squareup.okhttp.Call getRelationshipsCall(final ProgressResponseBody.
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -326,31 +337,19 @@ public com.squareup.okhttp.Call getRelationshipsCall(final ProgressResponseBody.
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getRelationshipsValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getRelationshipsValidateBeforeCall(final ApiCallback _callback) throws ApiException {
- com.squareup.okhttp.Call call = getRelationshipsCall(progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = getRelationshipsCall(_callback);
+ return localVarCall;
}
@@ -359,10 +358,18 @@ private com.squareup.okhttp.Call getRelationshipsValidateBeforeCall(final Progre
*
* @return List<Relationship>
* @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 List getRelationships() throws ApiException {
- ApiResponse> resp = getRelationshipsWithHttpInfo();
- return resp.getData();
+ ApiResponse> localVarResp = getRelationshipsWithHttpInfo();
+ return localVarResp.getData();
}
/**
@@ -370,60 +377,64 @@ public List getRelationships() throws ApiException {
*
* @return ApiResponse<List<Relationship>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Ok | - |
+ 415 | The requested content type is not acceptable. | - |
+ 500 | Internal server error. | - |
+ 0 | Unexpected response. | - |
+
*/
public ApiResponse> getRelationshipsWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = getRelationshipsValidateBeforeCall(null, null);
+ okhttp3.Call localVarCall = getRelationshipsValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all relationships (asynchronously)
*
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getRelationshipsAsync(final ApiCallback> callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call getRelationshipsAsync(final ApiCallback> _callback) throws ApiException {
- com.squareup.okhttp.Call call = getRelationshipsValidateBeforeCall(progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getRelationshipsValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
/**
* Build call for getRelationshipsByProject
* @param projectIdentifier ID of the project (required)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
+ * @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 com.squareup.okhttp.Call getRelationshipsByProjectCall(String projectIdentifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = new Object();
+ public okhttp3.Call getRelationshipsByProjectCall(String projectIdentifier, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/projects/{project_identifier}/relationships"
- .replaceAll("\\{" + "project_identifier" + "\\}", apiClient.escapeString(projectIdentifier.toString()));
+ .replaceAll("\\{" + "project_identifier" + "\\}", localVarApiClient.escapeString(projectIdentifier.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -432,7 +443,7 @@ public com.squareup.okhttp.Call getRelationshipsByProjectCall(String projectIden
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -440,27 +451,15 @@ public com.squareup.okhttp.Call getRelationshipsByProjectCall(String projectIden
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
- if (progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getRelationshipsByProjectValidateBeforeCall(String projectIdentifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getRelationshipsByProjectValidateBeforeCall(String projectIdentifier, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'projectIdentifier' is set
if (projectIdentifier == null) {
@@ -468,8 +467,8 @@ private com.squareup.okhttp.Call getRelationshipsByProjectValidateBeforeCall(Str
}
- com.squareup.okhttp.Call call = getRelationshipsByProjectCall(projectIdentifier, progressListener, progressRequestListener);
- return call;
+ okhttp3.Call localVarCall = getRelationshipsByProjectCall(projectIdentifier, _callback);
+ return localVarCall;
}
@@ -479,10 +478,18 @@ private com.squareup.okhttp.Call getRelationshipsByProjectValidateBeforeCall(Str
* @param projectIdentifier ID of the project (required)
* @return List<Relationship>
* @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 List getRelationshipsByProject(String projectIdentifier) throws ApiException {
- ApiResponse> resp = getRelationshipsByProjectWithHttpInfo(projectIdentifier);
- return resp.getData();
+ ApiResponse> localVarResp = getRelationshipsByProjectWithHttpInfo(projectIdentifier);
+ return localVarResp.getData();
}
/**
@@ -491,45 +498,42 @@ public List getRelationshipsByProject(String projectIdentifier) th
* @param projectIdentifier ID of the project (required)
* @return ApiResponse<List<Relationship>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Ok | - |
+ 415 | The requested content type is not acceptable. | - |
+ 500 | Internal server error. | - |
+ 0 | Unexpected response. | - |
+
*/
public ApiResponse> getRelationshipsByProjectWithHttpInfo(String projectIdentifier) throws ApiException {
- com.squareup.okhttp.Call call = getRelationshipsByProjectValidateBeforeCall(projectIdentifier, null, null);
+ okhttp3.Call localVarCall = getRelationshipsByProjectValidateBeforeCall(projectIdentifier, null);
Type localVarReturnType = new TypeToken>(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all relationships in the project (asynchronously)
*
* @param projectIdentifier ID of the project (required)
- * @param callback The callback to be executed when the API call finishes
+ * @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 com.squareup.okhttp.Call getRelationshipsByProjectAsync(String projectIdentifier, final ApiCallback> callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
+ public okhttp3.Call getRelationshipsByProjectAsync(String projectIdentifier, final ApiCallback> _callback) throws ApiException {
- com.squareup.okhttp.Call call = getRelationshipsByProjectValidateBeforeCall(projectIdentifier, progressListener, progressRequestListener);
+ okhttp3.Call localVarCall = getRelationshipsByProjectValidateBeforeCall(projectIdentifier, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
}
}
diff --git a/src/main/java/org/omg/sysml/auth/ApiKeyAuth.java b/src/main/java/org/omg/sysml/auth/ApiKeyAuth.java
index 408ecc3..8396764 100644
--- a/src/main/java/org/omg/sysml/auth/ApiKeyAuth.java
+++ b/src/main/java/org/omg/sysml/auth/ApiKeyAuth.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
diff --git a/src/main/java/org/omg/sysml/auth/Authentication.java b/src/main/java/org/omg/sysml/auth/Authentication.java
index bb99f4b..7648ffc 100644
--- a/src/main/java/org/omg/sysml/auth/Authentication.java
+++ b/src/main/java/org/omg/sysml/auth/Authentication.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
diff --git a/src/main/java/org/omg/sysml/auth/HttpBasicAuth.java b/src/main/java/org/omg/sysml/auth/HttpBasicAuth.java
index ae732f6..eb2ad08 100644
--- a/src/main/java/org/omg/sysml/auth/HttpBasicAuth.java
+++ b/src/main/java/org/omg/sysml/auth/HttpBasicAuth.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -15,7 +15,7 @@
import org.omg.sysml.Pair;
-import com.squareup.okhttp.Credentials;
+import okhttp3.Credentials;
import java.util.Map;
import java.util.List;
diff --git a/src/main/java/org/omg/sysml/auth/HttpBearerAuth.java b/src/main/java/org/omg/sysml/auth/HttpBearerAuth.java
new file mode 100644
index 0000000..ccfda10
--- /dev/null
+++ b/src/main/java/org/omg/sysml/auth/HttpBearerAuth.java
@@ -0,0 +1,60 @@
+/*
+ * 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.auth;
+
+import org.omg.sysml.Pair;
+
+import java.util.Map;
+import java.util.List;
+
+
+public class HttpBearerAuth implements Authentication {
+ private final String scheme;
+ private String bearerToken;
+
+ public HttpBearerAuth(String scheme) {
+ this.scheme = scheme;
+ }
+
+ /**
+ * Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @return The bearer token
+ */
+ public String getBearerToken() {
+ return bearerToken;
+ }
+
+ /**
+ * Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @param bearerToken The bearer token to send in the Authorization header
+ */
+ public void setBearerToken(String bearerToken) {
+ this.bearerToken = bearerToken;
+ }
+
+ @Override
+ public void applyToParams(List queryParams, Map headerParams) {
+ if(bearerToken == null) {
+ return;
+ }
+
+ headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
+ }
+
+ private static String upperCaseBearer(String scheme) {
+ return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
+ }
+}
diff --git a/src/main/java/org/omg/sysml/auth/OAuth.java b/src/main/java/org/omg/sysml/auth/OAuth.java
deleted file mode 100644
index e9a728e..0000000
--- a/src/main/java/org/omg/sysml/auth/OAuth.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * SysML v2 API and Services
- * REST/HTTP binding (PSM) for the SysML v2 standard API.
- *
- * OpenAPI spec version: 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.auth;
-
-import org.omg.sysml.Pair;
-
-import java.util.Map;
-import java.util.List;
-
-
-public class OAuth implements Authentication {
- private String accessToken;
-
- public String getAccessToken() {
- return accessToken;
- }
-
- public void setAccessToken(String accessToken) {
- this.accessToken = accessToken;
- }
-
- @Override
- public void applyToParams(List queryParams, Map headerParams) {
- if (accessToken != null) {
- headerParams.put("Authorization", "Bearer " + accessToken);
- }
- }
-}
diff --git a/src/main/java/org/omg/sysml/auth/OAuthFlow.java b/src/main/java/org/omg/sysml/auth/OAuthFlow.java
deleted file mode 100644
index 6cade48..0000000
--- a/src/main/java/org/omg/sysml/auth/OAuthFlow.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * SysML v2 API and Services
- * REST/HTTP binding (PSM) for the SysML v2 standard API.
- *
- * OpenAPI spec version: 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.auth;
-
-public enum OAuthFlow {
- accessCode, implicit, password, application
-}
diff --git a/src/main/java/org/omg/sysml/auth/OAuthOkHttpClient.java b/src/main/java/org/omg/sysml/auth/OAuthOkHttpClient.java
deleted file mode 100644
index 3270a54..0000000
--- a/src/main/java/org/omg/sysml/auth/OAuthOkHttpClient.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.omg.sysml.auth;
-
-import com.squareup.okhttp.OkHttpClient;
-import com.squareup.okhttp.MediaType;
-import com.squareup.okhttp.Request;
-import com.squareup.okhttp.RequestBody;
-import com.squareup.okhttp.Response;
-
-import org.apache.oltu.oauth2.client.HttpClient;
-import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
-import org.apache.oltu.oauth2.client.response.OAuthClientResponse;
-import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory;
-import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
-import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.Map.Entry;
-
-public class OAuthOkHttpClient implements HttpClient {
- private OkHttpClient client;
-
- public OAuthOkHttpClient() {
- this.client = new OkHttpClient();
- }
-
- public OAuthOkHttpClient(OkHttpClient client) {
- this.client = client;
- }
-
- @Override
- public T execute(OAuthClientRequest request, Map headers,
- String requestMethod, Class responseClass)
- throws OAuthSystemException, OAuthProblemException {
-
- MediaType mediaType = MediaType.parse("application/json");
- Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri());
-
- if(headers != null) {
- for (Entry entry : headers.entrySet()) {
- if (entry.getKey().equalsIgnoreCase("Content-Type")) {
- mediaType = MediaType.parse(entry.getValue());
- } else {
- requestBuilder.addHeader(entry.getKey(), entry.getValue());
- }
- }
- }
-
- RequestBody body = request.getBody() != null ? RequestBody.create(mediaType, request.getBody()) : null;
- requestBuilder.method(requestMethod, body);
-
- try {
- Response response = client.newCall(requestBuilder.build()).execute();
- return OAuthClientResponseFactory.createCustomResponse(
- response.body().string(),
- response.body().contentType().toString(),
- response.code(),
- responseClass);
- } catch (IOException e) {
- throw new OAuthSystemException(e);
- }
- }
-
- @Override
- public void shutdown() {
- // Nothing to do here
- }
-}
diff --git a/src/main/java/org/omg/sysml/auth/RetryingOAuth.java b/src/main/java/org/omg/sysml/auth/RetryingOAuth.java
deleted file mode 100644
index 05bdb71..0000000
--- a/src/main/java/org/omg/sysml/auth/RetryingOAuth.java
+++ /dev/null
@@ -1,165 +0,0 @@
-package org.omg.sysml.auth;
-
-import com.squareup.okhttp.Interceptor;
-import com.squareup.okhttp.OkHttpClient;
-import com.squareup.okhttp.Request;
-import com.squareup.okhttp.Response;
-
-import org.apache.oltu.oauth2.client.OAuthClient;
-import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest;
-import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
-import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
-import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse;
-import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
-import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
-import org.apache.oltu.oauth2.common.message.types.GrantType;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.util.Map;
-
-public class RetryingOAuth extends OAuth implements Interceptor {
- private OAuthClient oAuthClient;
-
- private TokenRequestBuilder tokenRequestBuilder;
-
- public RetryingOAuth(OkHttpClient client, TokenRequestBuilder tokenRequestBuilder) {
- this.oAuthClient = new OAuthClient(new OAuthOkHttpClient(client));
- this.tokenRequestBuilder = tokenRequestBuilder;
- }
-
- public RetryingOAuth(TokenRequestBuilder tokenRequestBuilder) {
- this(new OkHttpClient(), tokenRequestBuilder);
- }
-
- public RetryingOAuth(
- String tokenUrl,
- String clientId,
- OAuthFlow flow,
- String clientSecret,
- Map parameters
- ) {
- this(OAuthClientRequest.tokenLocation(tokenUrl)
- .setClientId(clientId)
- .setClientSecret(clientSecret));
- setFlow(flow);
- if (parameters != null) {
- for (String paramName : parameters.keySet()) {
- tokenRequestBuilder.setParameter(paramName, parameters.get(paramName));
- }
- }
- }
-
- public void setFlow(OAuthFlow flow) {
- switch(flow) {
- case accessCode:
- tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE);
- break;
- case implicit:
- tokenRequestBuilder.setGrantType(GrantType.IMPLICIT);
- break;
- case password:
- tokenRequestBuilder.setGrantType(GrantType.PASSWORD);
- break;
- case application:
- tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS);
- break;
- default:
- break;
- }
- }
-
- @Override
- public Response intercept(Chain chain) throws IOException {
- return retryingIntercept(chain, true);
- }
-
- private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAuthorizationFailure) throws IOException {
- Request request = chain.request();
-
- // If the request already has an authorization (e.g. Basic auth), proceed with the request as is
- if (request.header("Authorization") != null) {
- return chain.proceed(request);
- }
-
- // Get the token if it has not yet been acquired
- if (getAccessToken() == null) {
- updateAccessToken(null);
- }
-
- OAuthClientRequest oAuthRequest;
- if (getAccessToken() != null) {
- // Build the request
- Request.Builder requestBuilder = request.newBuilder();
-
- String requestAccessToken = getAccessToken();
- try {
- oAuthRequest =
- new OAuthBearerClientRequest(request.urlString()).
- setAccessToken(requestAccessToken).
- buildHeaderMessage();
- } catch (OAuthSystemException e) {
- throw new IOException(e);
- }
-
- Map headers = oAuthRequest.getHeaders();
- for (String headerName : headers.keySet()) {
- requestBuilder.addHeader(headerName, headers.get(headerName));
- }
- requestBuilder.url(oAuthRequest.getLocationUri());
-
- // Execute the request
- Response response = chain.proceed(requestBuilder.build());
-
- // 401/403 response codes most likely indicate an expired access token, unless it happens two times in a row
- if (
- response != null &&
- ( response.code() == HttpURLConnection.HTTP_UNAUTHORIZED ||
- response.code() == HttpURLConnection.HTTP_FORBIDDEN ) &&
- updateTokenAndRetryOnAuthorizationFailure
- ) {
- try {
- if (updateAccessToken(requestAccessToken)) {
- response.body().close();
- return retryingIntercept(chain, false);
- }
- } catch (Exception e) {
- response.body().close();
- throw e;
- }
- }
- return response;
- }
- else {
- return chain.proceed(chain.request());
- }
- }
-
- /*
- * Returns true if the access token has been updated
- */
- public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException {
- if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) {
- try {
- OAuthJSONAccessTokenResponse accessTokenResponse =
- oAuthClient.accessToken(tokenRequestBuilder.buildBodyMessage());
- if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) {
- setAccessToken(accessTokenResponse.getAccessToken());
- return !getAccessToken().equals(requestAccessToken);
- }
- } catch (OAuthSystemException | OAuthProblemException e) {
- throw new IOException(e);
- }
- }
-
- return false;
- }
-
- public TokenRequestBuilder getTokenRequestBuilder() {
- return tokenRequestBuilder;
- }
-
- public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) {
- this.tokenRequestBuilder = tokenRequestBuilder;
- }
-}
diff --git a/src/main/java/org/omg/sysml/model/Element.java b/src/main/java/org/omg/sysml/model/Element.java
index 5677244..259f544 100644
--- a/src/main/java/org/omg/sysml/model/Element.java
+++ b/src/main/java/org/omg/sysml/model/Element.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -39,13 +39,15 @@ public class Element extends HashMap {
public static final String SERIALIZED_NAME_CONTAINING_PROJECT = "containingProject";
@SerializedName(SERIALIZED_NAME_CONTAINING_PROJECT)
- private Identified containingProject = null;
+ private Identified containingProject;
public static final String SERIALIZED_NAME_IDENTIFIER = "identifier";
@SerializedName(SERIALIZED_NAME_IDENTIFIER)
private UUID identifier;
+
public Element atType(String atType) {
+
this.atType = atType;
return this;
}
@@ -54,16 +56,22 @@ public Element atType(String atType) {
* Get atType
* @return atType
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
+
public String getAtType() {
return atType;
}
+
+
public void setAtType(String atType) {
this.atType = atType;
}
+
public Element containingProject(Identified containingProject) {
+
this.containingProject = containingProject;
return this;
}
@@ -72,16 +80,22 @@ public Element containingProject(Identified containingProject) {
* Get containingProject
* @return containingProject
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
+
public Identified getContainingProject() {
return containingProject;
}
+
+
public void setContainingProject(Identified containingProject) {
this.containingProject = containingProject;
}
+
public Element identifier(UUID identifier) {
+
this.identifier = identifier;
return this;
}
@@ -90,11 +104,15 @@ public Element identifier(UUID identifier) {
* Get identifier
* @return identifier
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
+
public UUID getIdentifier() {
return identifier;
}
+
+
public void setIdentifier(UUID identifier) {
this.identifier = identifier;
}
diff --git a/src/main/java/org/omg/sysml/model/Error.java b/src/main/java/org/omg/sysml/model/Error.java
index 0abe015..ce7173d 100644
--- a/src/main/java/org/omg/sysml/model/Error.java
+++ b/src/main/java/org/omg/sysml/model/Error.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -33,7 +33,9 @@ public class Error {
@SerializedName(SERIALIZED_NAME_ERROR)
private String error;
+
public Error error(String error) {
+
this.error = error;
return this;
}
@@ -42,11 +44,15 @@ public Error error(String error) {
* Get error
* @return error
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
+
public String getError() {
return error;
}
+
+
public void setError(String error) {
this.error = error;
}
@@ -74,7 +80,6 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Error {\n");
-
sb.append(" error: ").append(toIndentedString(error)).append("\n");
sb.append("}");
return sb.toString();
diff --git a/src/main/java/org/omg/sysml/model/Identified.java b/src/main/java/org/omg/sysml/model/Identified.java
index 585cddf..c1fb054 100644
--- a/src/main/java/org/omg/sysml/model/Identified.java
+++ b/src/main/java/org/omg/sysml/model/Identified.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -34,7 +34,9 @@ public class Identified {
@SerializedName(SERIALIZED_NAME_IDENTIFIER)
private UUID identifier;
+
public Identified identifier(UUID identifier) {
+
this.identifier = identifier;
return this;
}
@@ -43,11 +45,15 @@ public Identified identifier(UUID identifier) {
* Get identifier
* @return identifier
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
+
public UUID getIdentifier() {
return identifier;
}
+
+
public void setIdentifier(UUID identifier) {
this.identifier = identifier;
}
@@ -75,7 +81,6 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Identified {\n");
-
sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
sb.append("}");
return sb.toString();
diff --git a/src/main/java/org/omg/sysml/model/Project.java b/src/main/java/org/omg/sysml/model/Project.java
index 9d614c4..f43e538 100644
--- a/src/main/java/org/omg/sysml/model/Project.java
+++ b/src/main/java/org/omg/sysml/model/Project.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -42,7 +42,9 @@ public class Project {
@SerializedName(SERIALIZED_NAME_IDENTIFIER)
private UUID identifier;
+
public Project atType(String atType) {
+
this.atType = atType;
return this;
}
@@ -51,16 +53,22 @@ public Project atType(String atType) {
* Get atType
* @return atType
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
+
public String getAtType() {
return atType;
}
+
+
public void setAtType(String atType) {
this.atType = atType;
}
+
public Project name(String name) {
+
this.name = name;
return this;
}
@@ -69,16 +77,22 @@ public Project name(String name) {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
+
public String getName() {
return name;
}
+
+
public void setName(String name) {
this.name = name;
}
+
public Project identifier(UUID identifier) {
+
this.identifier = identifier;
return this;
}
@@ -87,11 +101,15 @@ public Project identifier(UUID identifier) {
* Get identifier
* @return identifier
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
+
public UUID getIdentifier() {
return identifier;
}
+
+
public void setIdentifier(UUID identifier) {
this.identifier = identifier;
}
@@ -121,7 +139,6 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Project {\n");
-
sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
diff --git a/src/main/java/org/omg/sysml/model/Relationship.java b/src/main/java/org/omg/sysml/model/Relationship.java
index 0b06326..0836cc9 100644
--- a/src/main/java/org/omg/sysml/model/Relationship.java
+++ b/src/main/java/org/omg/sysml/model/Relationship.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -28,12 +28,25 @@
import java.util.UUID;
import org.omg.sysml.model.Element;
import org.omg.sysml.model.Identified;
+import org.omg.sysml.model.RelationshipAllOf;
/**
* Relationship
*/
-public class Relationship extends Element {
+public class Relationship {
+ public static final String SERIALIZED_NAME_AT_TYPE = "@type";
+ @SerializedName(SERIALIZED_NAME_AT_TYPE)
+ private String atType;
+
+ public static final String SERIALIZED_NAME_CONTAINING_PROJECT = "containingProject";
+ @SerializedName(SERIALIZED_NAME_CONTAINING_PROJECT)
+ private Identified containingProject;
+
+ public static final String SERIALIZED_NAME_IDENTIFIER = "identifier";
+ @SerializedName(SERIALIZED_NAME_IDENTIFIER)
+ private UUID identifier;
+
public static final String SERIALIZED_NAME_SOURCE = "source";
@SerializedName(SERIALIZED_NAME_SOURCE)
private List source = null;
@@ -42,7 +55,81 @@ public class Relationship extends Element {
@SerializedName(SERIALIZED_NAME_TARGET)
private List target = null;
+
+ public Relationship atType(String atType) {
+
+ this.atType = atType;
+ return this;
+ }
+
+ /**
+ * Get atType
+ * @return atType
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+
+ public String getAtType() {
+ return atType;
+ }
+
+
+
+ public void setAtType(String atType) {
+ this.atType = atType;
+ }
+
+
+ public Relationship containingProject(Identified containingProject) {
+
+ this.containingProject = containingProject;
+ return this;
+ }
+
+ /**
+ * Get containingProject
+ * @return containingProject
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+
+ public Identified getContainingProject() {
+ return containingProject;
+ }
+
+
+
+ public void setContainingProject(Identified containingProject) {
+ this.containingProject = containingProject;
+ }
+
+
+ public Relationship identifier(UUID identifier) {
+
+ this.identifier = identifier;
+ return this;
+ }
+
+ /**
+ * Get identifier
+ * @return identifier
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+
+ public UUID getIdentifier() {
+ return identifier;
+ }
+
+
+
+ public void setIdentifier(UUID identifier) {
+ this.identifier = identifier;
+ }
+
+
public Relationship source(List source) {
+
this.source = source;
return this;
}
@@ -59,16 +146,22 @@ public Relationship addSourceItem(Identified sourceItem) {
* Get source
* @return source
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
+
public List getSource() {
return source;
}
+
+
public void setSource(List source) {
this.source = source;
}
+
public Relationship target(List target) {
+
this.target = target;
return this;
}
@@ -85,11 +178,15 @@ public Relationship addTargetItem(Identified targetItem) {
* Get target
* @return target
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
+
public List getTarget() {
return target;
}
+
+
public void setTarget(List target) {
this.target = target;
}
@@ -104,14 +201,16 @@ public boolean equals(java.lang.Object o) {
return false;
}
Relationship relationship = (Relationship) o;
- return Objects.equals(this.source, relationship.source) &&
- Objects.equals(this.target, relationship.target) &&
- super.equals(o);
+ return Objects.equals(this.atType, relationship.atType) &&
+ Objects.equals(this.containingProject, relationship.containingProject) &&
+ Objects.equals(this.identifier, relationship.identifier) &&
+ Objects.equals(this.source, relationship.source) &&
+ Objects.equals(this.target, relationship.target);
}
@Override
public int hashCode() {
- return Objects.hash(source, target, super.hashCode());
+ return Objects.hash(atType, containingProject, identifier, source, target);
}
@@ -119,7 +218,9 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Relationship {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
+ sb.append(" containingProject: ").append(toIndentedString(containingProject)).append("\n");
+ sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
sb.append(" source: ").append(toIndentedString(source)).append("\n");
sb.append(" target: ").append(toIndentedString(target)).append("\n");
sb.append("}");
diff --git a/src/main/java/org/omg/sysml/model/RelationshipAllOf.java b/src/main/java/org/omg/sysml/model/RelationshipAllOf.java
new file mode 100644
index 0000000..312bade
--- /dev/null
+++ b/src/main/java/org/omg/sysml/model/RelationshipAllOf.java
@@ -0,0 +1,149 @@
+/*
+ * 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.ArrayList;
+import java.util.List;
+import org.omg.sysml.model.Identified;
+
+/**
+ * RelationshipAllOf
+ */
+
+public class RelationshipAllOf {
+ public static final String SERIALIZED_NAME_SOURCE = "source";
+ @SerializedName(SERIALIZED_NAME_SOURCE)
+ private List source = null;
+
+ public static final String SERIALIZED_NAME_TARGET = "target";
+ @SerializedName(SERIALIZED_NAME_TARGET)
+ private List target = null;
+
+
+ public RelationshipAllOf source(List source) {
+
+ this.source = source;
+ return this;
+ }
+
+ public RelationshipAllOf addSourceItem(Identified sourceItem) {
+ if (this.source == null) {
+ this.source = new ArrayList();
+ }
+ this.source.add(sourceItem);
+ return this;
+ }
+
+ /**
+ * Get source
+ * @return source
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+
+ public List getSource() {
+ return source;
+ }
+
+
+
+ public void setSource(List source) {
+ this.source = source;
+ }
+
+
+ public RelationshipAllOf target(List target) {
+
+ this.target = target;
+ return this;
+ }
+
+ public RelationshipAllOf addTargetItem(Identified targetItem) {
+ if (this.target == null) {
+ this.target = new ArrayList();
+ }
+ this.target.add(targetItem);
+ return this;
+ }
+
+ /**
+ * Get target
+ * @return target
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+
+ public List getTarget() {
+ return target;
+ }
+
+
+
+ public void setTarget(List target) {
+ this.target = target;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RelationshipAllOf relationshipAllOf = (RelationshipAllOf) o;
+ return Objects.equals(this.source, relationshipAllOf.source) &&
+ Objects.equals(this.target, relationshipAllOf.target);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(source, target);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RelationshipAllOf {\n");
+ sb.append(" source: ").append(toIndentedString(source)).append("\n");
+ sb.append(" target: ").append(toIndentedString(target)).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/ElementApiTest.java b/src/test/java/org/omg/sysml/api/ElementApiTest.java
index 1b2a980..30cca16 100644
--- a/src/test/java/org/omg/sysml/api/ElementApiTest.java
+++ b/src/test/java/org/omg/sysml/api/ElementApiTest.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -43,8 +43,8 @@ public class ElementApiTest {
*/
@Test
public void createElementTest() throws ApiException {
- Map requestBody = null;
- Element response = api.createElement(requestBody);
+ Map body = null;
+ Element response = api.createElement(body);
// TODO: test validations
}
diff --git a/src/test/java/org/omg/sysml/api/ProjectApiTest.java b/src/test/java/org/omg/sysml/api/ProjectApiTest.java
index 1bf2f77..d042716 100644
--- a/src/test/java/org/omg/sysml/api/ProjectApiTest.java
+++ b/src/test/java/org/omg/sysml/api/ProjectApiTest.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -43,8 +43,8 @@ public class ProjectApiTest {
*/
@Test
public void createProjectTest() throws ApiException {
- Project project = null;
- Project response = api.createProject(project);
+ Project body = null;
+ Project response = api.createProject(body);
// TODO: test validations
}
diff --git a/src/test/java/org/omg/sysml/api/RelationshipApiTest.java b/src/test/java/org/omg/sysml/api/RelationshipApiTest.java
index e04d5e9..7d39346 100644
--- a/src/test/java/org/omg/sysml/api/RelationshipApiTest.java
+++ b/src/test/java/org/omg/sysml/api/RelationshipApiTest.java
@@ -2,7 +2,7 @@
* SysML v2 API and Services
* REST/HTTP binding (PSM) for the SysML v2 standard API.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -43,8 +43,8 @@ public class RelationshipApiTest {
*/
@Test
public void createRelationshipTest() throws ApiException {
- Relationship relationship = null;
- Relationship response = api.createRelationship(relationship);
+ Relationship body = null;
+ Relationship response = api.createRelationship(body);
// TODO: test validations
}
diff --git a/src/test/java/org/omg/sysml/model/ElementTest.java b/src/test/java/org/omg/sysml/model/ElementTest.java
new file mode 100644
index 0000000..9251eea
--- /dev/null
+++ b/src/test/java/org/omg/sysml/model/ElementTest.java
@@ -0,0 +1,71 @@
+/*
+ * 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.omg.sysml.model.Identified;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Model tests for Element
+ */
+public class ElementTest {
+ private final Element model = new Element();
+
+ /**
+ * Model tests for Element
+ */
+ @Test
+ public void testElement() {
+ // TODO: test Element
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ public void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'containingProject'
+ */
+ @Test
+ public void containingProjectTest() {
+ // TODO: test containingProject
+ }
+
+ /**
+ * Test the property 'identifier'
+ */
+ @Test
+ public void identifierTest() {
+ // TODO: test identifier
+ }
+
+}
diff --git a/src/test/java/org/omg/sysml/model/ErrorTest.java b/src/test/java/org/omg/sysml/model/ErrorTest.java
new file mode 100644
index 0000000..57c0d26
--- /dev/null
+++ b/src/test/java/org/omg/sysml/model/ErrorTest.java
@@ -0,0 +1,51 @@
+/*
+ * 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 org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Model tests for Error
+ */
+public class ErrorTest {
+ private final Error model = new Error();
+
+ /**
+ * Model tests for Error
+ */
+ @Test
+ public void testError() {
+ // TODO: test Error
+ }
+
+ /**
+ * Test the property 'error'
+ */
+ @Test
+ public void errorTest() {
+ // TODO: test error
+ }
+
+}
diff --git a/src/test/java/org/omg/sysml/model/IdentifiedTest.java b/src/test/java/org/omg/sysml/model/IdentifiedTest.java
new file mode 100644
index 0000000..5f00d10
--- /dev/null
+++ b/src/test/java/org/omg/sysml/model/IdentifiedTest.java
@@ -0,0 +1,52 @@
+/*
+ * 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.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Model tests for Identified
+ */
+public class IdentifiedTest {
+ private final Identified model = new Identified();
+
+ /**
+ * Model tests for Identified
+ */
+ @Test
+ public void testIdentified() {
+ // TODO: test Identified
+ }
+
+ /**
+ * Test the property 'identifier'
+ */
+ @Test
+ public void identifierTest() {
+ // TODO: test identifier
+ }
+
+}
diff --git a/src/test/java/org/omg/sysml/model/ProjectTest.java b/src/test/java/org/omg/sysml/model/ProjectTest.java
new file mode 100644
index 0000000..9814656
--- /dev/null
+++ b/src/test/java/org/omg/sysml/model/ProjectTest.java
@@ -0,0 +1,68 @@
+/*
+ * 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.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Model tests for Project
+ */
+public class ProjectTest {
+ private final Project model = new Project();
+
+ /**
+ * Model tests for Project
+ */
+ @Test
+ public void testProject() {
+ // TODO: test Project
+ }
+
+ /**
+ * 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 'identifier'
+ */
+ @Test
+ public void identifierTest() {
+ // TODO: test identifier
+ }
+
+}
diff --git a/src/test/java/org/omg/sysml/model/RelationshipAllOfTest.java b/src/test/java/org/omg/sysml/model/RelationshipAllOfTest.java
new file mode 100644
index 0000000..3bbb089
--- /dev/null
+++ b/src/test/java/org/omg/sysml/model/RelationshipAllOfTest.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.ArrayList;
+import java.util.List;
+import org.omg.sysml.model.Identified;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Model tests for RelationshipAllOf
+ */
+public class RelationshipAllOfTest {
+ private final RelationshipAllOf model = new RelationshipAllOf();
+
+ /**
+ * Model tests for RelationshipAllOf
+ */
+ @Test
+ public void testRelationshipAllOf() {
+ // TODO: test RelationshipAllOf
+ }
+
+ /**
+ * Test the property 'source'
+ */
+ @Test
+ public void sourceTest() {
+ // TODO: test source
+ }
+
+ /**
+ * Test the property 'target'
+ */
+ @Test
+ public void targetTest() {
+ // TODO: test target
+ }
+
+}
diff --git a/src/test/java/org/omg/sysml/model/RelationshipTest.java b/src/test/java/org/omg/sysml/model/RelationshipTest.java
new file mode 100644
index 0000000..b35bb34
--- /dev/null
+++ b/src/test/java/org/omg/sysml/model/RelationshipTest.java
@@ -0,0 +1,89 @@
+/*
+ * 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.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import org.omg.sysml.model.Element;
+import org.omg.sysml.model.Identified;
+import org.omg.sysml.model.RelationshipAllOf;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Model tests for Relationship
+ */
+public class RelationshipTest {
+ private final Relationship model = new Relationship();
+
+ /**
+ * Model tests for Relationship
+ */
+ @Test
+ public void testRelationship() {
+ // TODO: test Relationship
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ public void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'containingProject'
+ */
+ @Test
+ public void containingProjectTest() {
+ // TODO: test containingProject
+ }
+
+ /**
+ * Test the property 'identifier'
+ */
+ @Test
+ public void identifierTest() {
+ // TODO: test identifier
+ }
+
+ /**
+ * Test the property 'source'
+ */
+ @Test
+ public void sourceTest() {
+ // TODO: test source
+ }
+
+ /**
+ * Test the property 'target'
+ */
+ @Test
+ public void targetTest() {
+ // TODO: test target
+ }
+
+}