ApiException class.
+ */
+@SuppressWarnings("serial")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0")
+public class ApiException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ private int code = 0;
+ private Map> responseHeaders = null;
+ private String responseBody = null;
+
+ /**
+ * Constructor for ApiException.
+ */
+ public ApiException() {}
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param throwable a {@link java.lang.Throwable} object
+ */
+ public ApiException(Throwable throwable) {
+ super(throwable);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ */
+ public ApiException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param throwable a {@link java.lang.Throwable} object
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) {
+ super(message, throwable);
+ this.code = code;
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(String message, int code, Map> responseHeaders, String responseBody) {
+ this(message, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param throwable a {@link java.lang.Throwable} object
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ */
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) {
+ this(message, throwable, code, responseHeaders, null);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(int code, Map> responseHeaders, String responseBody) {
+ this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param message a {@link java.lang.String} object
+ */
+ public ApiException(int code, String message) {
+ super(message);
+ this.code = code;
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param message the error message
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(int code, String message, Map> responseHeaders, String responseBody) {
+ this(code, message);
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ /**
+ * Get the HTTP status code.
+ *
+ * @return HTTP status code
+ */
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Get the HTTP response headers.
+ *
+ * @return A map of list of string
+ */
+ public Map> getResponseHeaders() {
+ return responseHeaders;
+ }
+
+ /**
+ * Get the HTTP response body.
+ *
+ * @return Response body in the form of string
+ */
+ public String getResponseBody() {
+ return responseBody;
+ }
+
+ /**
+ * Get the exception message including HTTP response data.
+ *
+ * @return The exception message
+ */
+ public String getMessage() {
+ return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s",
+ super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders());
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/ApiResponse.java b/src/main/java/io/tiledb/cloud/rest_api/v4/ApiResponse.java
new file mode 100644
index 0000000..d5428e0
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/ApiResponse.java
@@ -0,0 +1,76 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * API response returned by API call.
+ */
+public class ApiResponse {
+ final private int statusCode;
+ final private Map> headers;
+ final private T data;
+
+ /**
+ * Constructor for ApiResponse.
+ *
+ * @param statusCode The status code of HTTP response
+ * @param headers The headers of HTTP response
+ */
+ public ApiResponse(int statusCode, Map> headers) {
+ this(statusCode, headers, null);
+ }
+
+ /**
+ * Constructor for ApiResponse.
+ *
+ * @param statusCode The status code of HTTP response
+ * @param headers The headers of HTTP response
+ * @param data The object deserialized from response bod
+ */
+ public ApiResponse(int statusCode, Map> headers, T data) {
+ this.statusCode = statusCode;
+ this.headers = headers;
+ this.data = data;
+ }
+
+ /**
+ * Get the status code.
+ *
+ * @return the status code
+ */
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ /**
+ * Get the headers.
+ *
+ * @return a {@link java.util.Map} of headers
+ */
+ public Map> getHeaders() {
+ return headers;
+ }
+
+ /**
+ * Get the data.
+ *
+ * @return the data
+ */
+ public T getData() {
+ return data;
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/Configuration.java b/src/main/java/io/tiledb/cloud/rest_api/v4/Configuration.java
new file mode 100644
index 0000000..9a630a4
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/Configuration.java
@@ -0,0 +1,63 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4;
+
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Supplier;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0")
+public class Configuration {
+ public static final String VERSION = "0.0.1";
+
+ private static final AtomicReference defaultApiClient = new AtomicReference<>();
+ private static volatile Supplier apiClientFactory = ApiClient::new;
+
+ /**
+ * Get the default API client, which would be used when creating API instances without providing an API client.
+ *
+ * @return Default API client
+ */
+ public static ApiClient getDefaultApiClient() {
+ ApiClient client = defaultApiClient.get();
+ if (client == null) {
+ client = defaultApiClient.updateAndGet(val -> {
+ if (val != null) { // changed by another thread
+ return val;
+ }
+ return apiClientFactory.get();
+ });
+ }
+ return client;
+ }
+
+ /**
+ * Set the default API client, which would be used when creating API instances without providing an API client.
+ *
+ * @param apiClient API client
+ */
+ public static void setDefaultApiClient(ApiClient apiClient) {
+ defaultApiClient.set(apiClient);
+ }
+
+ /**
+ * set the callback used to create new ApiClient objects
+ */
+ public static void setApiClientFactory(Supplier factory) {
+ apiClientFactory = Objects.requireNonNull(factory);
+ }
+
+ private Configuration() {
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/GzipRequestInterceptor.java b/src/main/java/io/tiledb/cloud/rest_api/v4/GzipRequestInterceptor.java
new file mode 100644
index 0000000..78467d2
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/GzipRequestInterceptor.java
@@ -0,0 +1,85 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4;
+
+import okhttp3.*;
+import okio.Buffer;
+import okio.BufferedSink;
+import okio.GzipSink;
+import okio.Okio;
+
+import java.io.IOException;
+
+/**
+ * Encodes request bodies using gzip.
+ *
+ * Taken from https://github.com/square/okhttp/issues/350
+ */
+class GzipRequestInterceptor implements Interceptor {
+ @Override
+ public Response intercept(Chain chain) throws IOException {
+ Request originalRequest = chain.request();
+ if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) {
+ return chain.proceed(originalRequest);
+ }
+
+ Request compressedRequest = originalRequest.newBuilder()
+ .header("Content-Encoding", "gzip")
+ .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body())))
+ .build();
+ return chain.proceed(compressedRequest);
+ }
+
+ private RequestBody forceContentLength(final RequestBody requestBody) throws IOException {
+ final Buffer buffer = new Buffer();
+ requestBody.writeTo(buffer);
+ return new RequestBody() {
+ @Override
+ public MediaType contentType() {
+ return requestBody.contentType();
+ }
+
+ @Override
+ public long contentLength() {
+ return buffer.size();
+ }
+
+ @Override
+ public void writeTo(BufferedSink sink) throws IOException {
+ sink.write(buffer.snapshot());
+ }
+ };
+ }
+
+ private RequestBody gzip(final RequestBody body) {
+ return new RequestBody() {
+ @Override
+ public MediaType contentType() {
+ return body.contentType();
+ }
+
+ @Override
+ public long contentLength() {
+ return -1; // We don't know the compressed length in advance!
+ }
+
+ @Override
+ public void writeTo(BufferedSink sink) throws IOException {
+ BufferedSink gzipSink = Okio.buffer(new GzipSink(sink));
+ body.writeTo(gzipSink);
+ gzipSink.close();
+ }
+ };
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/JSON.java b/src/main/java/io/tiledb/cloud/rest_api/v4/JSON.java
new file mode 100644
index 0000000..bcc7099
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/JSON.java
@@ -0,0 +1,574 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapter;
+import com.google.gson.internal.bind.util.ISO8601Utils;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import com.google.gson.JsonElement;
+import io.gsonfire.GsonFireBuilder;
+import io.gsonfire.TypeSelector;
+
+import okio.ByteString;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.lang.reflect.Type;
+import java.nio.charset.StandardCharsets;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.ParsePosition;
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
+import java.util.Locale;
+import java.util.Map;
+import java.util.HashMap;
+
+/*
+ * A JSON utility class
+ *
+ * NOTE: in the future, this class may be converted to static, which may break
+ * backward-compatibility
+ */
+public class JSON {
+ private static Gson gson;
+ private static boolean isLenientOnJson = false;
+ private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
+ private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
+ private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
+ private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
+ private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
+
+ @SuppressWarnings("unchecked")
+ public static GsonBuilder createGson() {
+ GsonFireBuilder fireBuilder = new GsonFireBuilder()
+ ;
+ GsonBuilder builder = fireBuilder.createGsonBuilder();
+ return builder;
+ }
+
+ private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
+ JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
+ if (null == element) {
+ throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">");
+ }
+ return element.getAsString();
+ }
+
+ /**
+ * Returns the Java class that implements the OpenAPI schema for the specified discriminator value.
+ *
+ * @param classByDiscriminatorValue The map of discriminator values to Java classes.
+ * @param discriminatorValue The value of the OpenAPI discriminator in the input data.
+ * @return The Java class that implements the OpenAPI schema
+ */
+ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
+ Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue);
+ if (null == clazz) {
+ throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">");
+ }
+ return clazz;
+ }
+
+ static {
+ GsonBuilder gsonBuilder = createGson();
+ gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter);
+ gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.APIToken.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AWSCredential.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AWSRole.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AcademyLesson.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AcademyLessonsListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AcademyQuestionnaire.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AcademyQuestionnaireListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AcademyQuestionnairePutRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AccessCredential.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AccessCredentialRole.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ArrayInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Asset.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AssetGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AssetListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AssetMetadata.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AssetMetadataListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AssetMetadataSaveRequestInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AssetMetadataSaveResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AssetPathResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AssetRegisterRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AssetUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AssetsMoveRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AzureCredential.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.AzureToken.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ChangePasswordRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.CommonPrefix.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Credential.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.CredentialCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.CredentialGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.CredentialUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.CredentialsListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.CredentialsVerifyRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.DataChangeFile.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.DataChangeFileAdd.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.DataChangeFileRemove.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Error.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ErrorResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ErrorXML.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.FileInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.FileListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Folder.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.FolderContentsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.FolderCreateRequestInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.FolderCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.FolderGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.FolderInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.FolderUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.FoldersContentsModifyInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Format.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.GCPInteroperabilityCredential.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.GCPServiceAccountKey.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Generalspace.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.GeneralspaceGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.GeneralspaceUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.GroupInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Invitation.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.InvitationRespondRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.InvitationRetrieveRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.InvitationRetrieveResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.InvitationWorkspace.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.InvitationsCreateRequestInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.InvitationsCreateRequestWorkspace.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.InvitationsListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.InvitingUser.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ListShareSchemaTablesResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ListShareSchemasResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ListSharesResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ListTablesResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Metadata.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ModelFile.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ModelObject.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.OnboardingGetItemsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.OnboardingGetItemsResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.OnboardingSetItemsRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.PaginationMetadata.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Protocol.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.QueryTableChangeResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.QueryTableRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.QueryTableResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.RequestEmailConfirmationRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.RequestPasswordResetRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ResetPasswordRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.RestCapabilities.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Schema.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.SchemaField.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.SchemaFieldArray.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.SchemaFieldArrayElementType.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.SchemaFieldMap.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.SchemaFieldType.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.SchemaItem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ShareItem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ShareResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.StorageSetting.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.StorageSettingGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.StorageSettingUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.StorageSettingsCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.StorageSettingsCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.StorageSettingsForTeamspaceCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.StorageSettingsListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TableItem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TableMetadataResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Teamspace.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceDefaultCredential.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceUser.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceUserGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceUserUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceUsersBulkUpdateRequestInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceUsersCreateRequestInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceUsersCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceUsersJoinResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspaceUsersListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspacesCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspacesCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TeamspacesListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TileDBVersion.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Token.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TokenCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TokenCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.TokenListResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.User.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.UserAnswer.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.UserCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.UserCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.UserGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.UserSelfResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.UserSelfResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.UserSelfWorkspace.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.UserUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Userspace.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.UserspaceGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.UserspaceUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ValidationError.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.ValidationErrorField.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Versions.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.VersionsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.Workspace.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceUser.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceUserGetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceUserUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceUsersBulkUpdateRequestInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceUsersCreateRequestInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceUsersCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.tiledb.cloud.rest_api.v4.model.WorkspaceUsersListResponse.CustomTypeAdapterFactory());
+ gson = gsonBuilder.create();
+ }
+
+ /**
+ * Get Gson.
+ *
+ * @return Gson
+ */
+ public static Gson getGson() {
+ return gson;
+ }
+
+ /**
+ * Set Gson.
+ *
+ * @param gson Gson
+ */
+ public static void setGson(Gson gson) {
+ JSON.gson = gson;
+ }
+
+ public static void setLenientOnJson(boolean lenientOnJson) {
+ isLenientOnJson = lenientOnJson;
+ }
+
+ /**
+ * Serialize the given Java object into JSON string.
+ *
+ * @param obj Object
+ * @return String representation of the JSON
+ */
+ public static String serialize(Object obj) {
+ return gson.toJson(obj);
+ }
+
+ /**
+ * Deserialize the given JSON string to Java object.
+ *
+ * @param Type
+ * @param body The JSON string
+ * @param returnType The type to deserialize into
+ * @return The deserialized Java object
+ */
+ @SuppressWarnings("unchecked")
+ public static T deserialize(String body, Type returnType) {
+ try {
+ if (isLenientOnJson) {
+ JsonReader jsonReader = new JsonReader(new StringReader(body));
+ // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
+ jsonReader.setLenient(true);
+ return gson.fromJson(jsonReader, returnType);
+ } else {
+ return gson.fromJson(body, returnType);
+ }
+ } catch (JsonParseException e) {
+ // Fallback processing when failed to parse JSON form response body:
+ // return the response body string directly for the String return type;
+ if (returnType.equals(String.class)) {
+ return (T) body;
+ } else {
+ throw (e);
+ }
+ }
+ }
+
+ /**
+ * Deserialize the given JSON InputStream to a Java object.
+ *
+ * @param Type
+ * @param inputStream The JSON InputStream
+ * @param returnType The type to deserialize into
+ * @return The deserialized Java object
+ */
+ @SuppressWarnings("unchecked")
+ public static T deserialize(InputStream inputStream, Type returnType) throws IOException {
+ try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) {
+ if (isLenientOnJson) {
+ // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
+ JsonReader jsonReader = new JsonReader(reader);
+ jsonReader.setLenient(true);
+ return gson.fromJson(jsonReader, returnType);
+ } else {
+ return gson.fromJson(reader, returnType);
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for Byte Array type
+ */
+ public static class ByteArrayAdapter extends TypeAdapter {
+
+ @Override
+ public void write(JsonWriter out, byte[] value) throws IOException {
+ if (value == null) {
+ out.nullValue();
+ } else {
+ out.value(ByteString.of(value).base64());
+ }
+ }
+
+ @Override
+ public byte[] read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String bytesAsBase64 = in.nextString();
+ ByteString byteString = ByteString.decodeBase64(bytesAsBase64);
+ return byteString.toByteArray();
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for JSR310 OffsetDateTime type
+ */
+ public static class OffsetDateTimeTypeAdapter extends TypeAdapter {
+
+ private DateTimeFormatter formatter;
+
+ public OffsetDateTimeTypeAdapter() {
+ this(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
+ }
+
+ public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) {
+ this.formatter = formatter;
+ }
+
+ public void setFormat(DateTimeFormatter dateFormat) {
+ this.formatter = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, OffsetDateTime date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ out.value(formatter.format(date));
+ }
+ }
+
+ @Override
+ public OffsetDateTime read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ if (date.endsWith("+0000")) {
+ date = date.substring(0, date.length()-5) + "Z";
+ }
+ return OffsetDateTime.parse(date, formatter);
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for JSR310 LocalDate type
+ */
+ public static class LocalDateTypeAdapter extends TypeAdapter {
+
+ private DateTimeFormatter formatter;
+
+ public LocalDateTypeAdapter() {
+ this(DateTimeFormatter.ISO_LOCAL_DATE);
+ }
+
+ public LocalDateTypeAdapter(DateTimeFormatter formatter) {
+ this.formatter = formatter;
+ }
+
+ public void setFormat(DateTimeFormatter dateFormat) {
+ this.formatter = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, LocalDate date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ out.value(formatter.format(date));
+ }
+ }
+
+ @Override
+ public LocalDate read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ return LocalDate.parse(date, formatter);
+ }
+ }
+ }
+
+ public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
+ offsetDateTimeTypeAdapter.setFormat(dateFormat);
+ }
+
+ public static void setLocalDateFormat(DateTimeFormatter dateFormat) {
+ localDateTypeAdapter.setFormat(dateFormat);
+ }
+
+ /**
+ * Gson TypeAdapter for java.sql.Date type
+ * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used
+ * (more efficient than SimpleDateFormat).
+ */
+ public static class SqlDateTypeAdapter extends TypeAdapter {
+
+ private DateFormat dateFormat;
+
+ public SqlDateTypeAdapter() {}
+
+ public SqlDateTypeAdapter(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ public void setFormat(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, java.sql.Date date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ String value;
+ if (dateFormat != null) {
+ value = dateFormat.format(date);
+ } else {
+ value = date.toString();
+ }
+ out.value(value);
+ }
+ }
+
+ @Override
+ public java.sql.Date read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ try {
+ if (dateFormat != null) {
+ return new java.sql.Date(dateFormat.parse(date).getTime());
+ }
+ return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for java.util.Date type
+ * If the dateFormat is null, ISO8601Utils will be used.
+ */
+ public static class DateTypeAdapter extends TypeAdapter {
+
+ private DateFormat dateFormat;
+
+ public DateTypeAdapter() {}
+
+ public DateTypeAdapter(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ public void setFormat(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, Date date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ String value;
+ if (dateFormat != null) {
+ value = dateFormat.format(date);
+ } else {
+ value = ISO8601Utils.format(date, true);
+ }
+ out.value(value);
+ }
+ }
+
+ @Override
+ public Date read(JsonReader in) throws IOException {
+ try {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ try {
+ if (dateFormat != null) {
+ return dateFormat.parse(date);
+ }
+ return ISO8601Utils.parse(date, new ParsePosition(0));
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ } catch (IllegalArgumentException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ }
+
+ public static void setDateFormat(DateFormat dateFormat) {
+ dateTypeAdapter.setFormat(dateFormat);
+ }
+
+ public static void setSqlDateFormat(DateFormat dateFormat) {
+ sqlDateTypeAdapter.setFormat(dateFormat);
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/Pair.java b/src/main/java/io/tiledb/cloud/rest_api/v4/Pair.java
new file mode 100644
index 0000000..979eb20
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/Pair.java
@@ -0,0 +1,37 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0")
+public class Pair {
+ private final String name;
+ private final String value;
+
+ public Pair(String name, String value) {
+ this.name = isValidString(name) ? name : "";
+ this.value = isValidString(value) ? value : "";
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ private static boolean isValidString(String arg) {
+ return arg != null;
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/ProgressRequestBody.java b/src/main/java/io/tiledb/cloud/rest_api/v4/ProgressRequestBody.java
new file mode 100644
index 0000000..14a9039
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/ProgressRequestBody.java
@@ -0,0 +1,73 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4;
+
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
+
+import java.io.IOException;
+
+import okio.Buffer;
+import okio.BufferedSink;
+import okio.ForwardingSink;
+import okio.Okio;
+import okio.Sink;
+
+public class ProgressRequestBody extends RequestBody {
+
+ private final RequestBody requestBody;
+
+ private final ApiCallback callback;
+
+ public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) {
+ this.requestBody = requestBody;
+ this.callback = callback;
+ }
+
+ @Override
+ public MediaType contentType() {
+ return requestBody.contentType();
+ }
+
+ @Override
+ public long contentLength() throws IOException {
+ return requestBody.contentLength();
+ }
+
+ @Override
+ public void writeTo(BufferedSink sink) throws IOException {
+ BufferedSink bufferedSink = Okio.buffer(sink(sink));
+ requestBody.writeTo(bufferedSink);
+ bufferedSink.flush();
+ }
+
+ private Sink sink(Sink sink) {
+ return new ForwardingSink(sink) {
+
+ long bytesWritten = 0L;
+ long contentLength = 0L;
+
+ @Override
+ public void write(Buffer source, long byteCount) throws IOException {
+ super.write(source, byteCount);
+ if (contentLength == 0) {
+ contentLength = contentLength();
+ }
+
+ bytesWritten += byteCount;
+ callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength);
+ }
+ };
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/ProgressResponseBody.java b/src/main/java/io/tiledb/cloud/rest_api/v4/ProgressResponseBody.java
new file mode 100644
index 0000000..58ecbed
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/ProgressResponseBody.java
@@ -0,0 +1,70 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4;
+
+import okhttp3.MediaType;
+import okhttp3.ResponseBody;
+
+import java.io.IOException;
+
+import okio.Buffer;
+import okio.BufferedSource;
+import okio.ForwardingSource;
+import okio.Okio;
+import okio.Source;
+
+public class ProgressResponseBody extends ResponseBody {
+
+ private final ResponseBody responseBody;
+ private final ApiCallback callback;
+ private BufferedSource bufferedSource;
+
+ public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) {
+ this.responseBody = responseBody;
+ this.callback = callback;
+ }
+
+ @Override
+ public MediaType contentType() {
+ return responseBody.contentType();
+ }
+
+ @Override
+ public long contentLength() {
+ return responseBody.contentLength();
+ }
+
+ @Override
+ public BufferedSource source() {
+ if (bufferedSource == null) {
+ bufferedSource = Okio.buffer(source(responseBody.source()));
+ }
+ return bufferedSource;
+ }
+
+ private Source source(Source source) {
+ return new ForwardingSource(source) {
+ long totalBytesRead = 0L;
+
+ @Override
+ 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;
+ callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
+ return bytesRead;
+ }
+ };
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/ServerConfiguration.java b/src/main/java/io/tiledb/cloud/rest_api/v4/ServerConfiguration.java
new file mode 100644
index 0000000..0c86c1c
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/ServerConfiguration.java
@@ -0,0 +1,72 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4;
+
+import java.util.Map;
+
+/**
+ * Representing a Server configuration.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0")
+public class ServerConfiguration {
+ public String URL;
+ public String description;
+ public Map variables;
+
+ /**
+ * @param URL A URL to the target host.
+ * @param description A description of the host designated by the URL.
+ * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
+ */
+ public ServerConfiguration(String URL, String description, Map variables) {
+ this.URL = URL;
+ this.description = description;
+ this.variables = variables;
+ }
+
+ /**
+ * Format URL template using given variables.
+ *
+ * @param variables A map between a variable name and its value.
+ * @return Formatted URL.
+ */
+ public String URL(Map variables) {
+ String url = this.URL;
+
+ // go through variables and replace placeholders
+ for (Map.Entry variable: this.variables.entrySet()) {
+ String name = variable.getKey();
+ ServerVariable serverVariable = variable.getValue();
+ String value = serverVariable.defaultValue;
+
+ if (variables != null && variables.containsKey(name)) {
+ value = variables.get(name);
+ if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
+ throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
+ }
+ }
+ url = url.replace("{" + name + "}", value);
+ }
+ return url;
+ }
+
+ /**
+ * Format URL template using default server variables.
+ *
+ * @return Formatted URL.
+ */
+ public String URL() {
+ return URL(null);
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/ServerVariable.java b/src/main/java/io/tiledb/cloud/rest_api/v4/ServerVariable.java
new file mode 100644
index 0000000..808434b
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/ServerVariable.java
@@ -0,0 +1,37 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4;
+
+import java.util.HashSet;
+
+/**
+ * Representing a Server Variable for server URL template substitution.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0")
+public class ServerVariable {
+ public String description;
+ public String defaultValue;
+ public HashSet enumValues = null;
+
+ /**
+ * @param description A description for the server variable.
+ * @param defaultValue The default value to use for substitution.
+ * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set.
+ */
+ public ServerVariable(String description, String defaultValue, HashSet enumValues) {
+ this.description = description;
+ this.defaultValue = defaultValue;
+ this.enumValues = enumValues;
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/StringUtil.java b/src/main/java/io/tiledb/cloud/rest_api/v4/StringUtil.java
new file mode 100644
index 0000000..4c923dd
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/StringUtil.java
@@ -0,0 +1,83 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0")
+public class StringUtil {
+ /**
+ * Check if the given array contains the given value (with case-insensitive comparison).
+ *
+ * @param array The array
+ * @param value The value to search
+ * @return true if the array contains the value
+ */
+ public static boolean containsIgnoreCase(String[] array, String value) {
+ for (String str : array) {
+ if (value == null && str == null) {
+ return true;
+ }
+ if (value != null && value.equalsIgnoreCase(str)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Join an array of strings with the given separator.
+ *
+ * Note: This might be replaced by utility method from commons-lang or guava someday
+ * if one of those libraries is added as dependency.
+ *
+ *
+ * @param array The array of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(String[] array, String separator) {
+ int len = array.length;
+ if (len == 0) {
+ return "";
+ }
+
+ StringBuilder out = new StringBuilder();
+ out.append(array[0]);
+ for (int i = 1; i < len; i++) {
+ out.append(separator).append(array[i]);
+ }
+ return out.toString();
+ }
+
+ /**
+ * Join a list of strings with the given separator.
+ *
+ * @param list The list of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(Collection list, String separator) {
+ Iterator iterator = list.iterator();
+ StringBuilder out = new StringBuilder();
+ if (iterator.hasNext()) {
+ out.append(iterator.next());
+ }
+ while (iterator.hasNext()) {
+ out.append(separator).append(iterator.next());
+ }
+ return out.toString();
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/api/AcademyApi.java b/src/main/java/io/tiledb/cloud/rest_api/v4/api/AcademyApi.java
new file mode 100644
index 0000000..b2f3862
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/api/AcademyApi.java
@@ -0,0 +1,599 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4.api;
+
+import io.tiledb.cloud.rest_api.v4.ApiCallback;
+import io.tiledb.cloud.rest_api.v4.ApiClient;
+import io.tiledb.cloud.rest_api.v4.ApiException;
+import io.tiledb.cloud.rest_api.v4.ApiResponse;
+import io.tiledb.cloud.rest_api.v4.Configuration;
+import io.tiledb.cloud.rest_api.v4.Pair;
+import io.tiledb.cloud.rest_api.v4.ProgressRequestBody;
+import io.tiledb.cloud.rest_api.v4.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import io.tiledb.cloud.rest_api.v4.model.AcademyLesson;
+import io.tiledb.cloud.rest_api.v4.model.AcademyLessonsListResponse;
+import io.tiledb.cloud.rest_api.v4.model.AcademyQuestionnaireListResponse;
+import io.tiledb.cloud.rest_api.v4.model.AcademyQuestionnairePutRequest;
+import io.tiledb.cloud.rest_api.v4.model.Error;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AcademyApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public AcademyApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public AcademyApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for getAcademyLessons
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Academy lessons | - |
+ | 0 | error response | - |
+
+ */
+ public okhttp3.Call getAcademyLessonsCall(final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/academy/lessons";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "OAuth2", "BasicAuth", "ApiKeyAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAcademyLessonsValidateBeforeCall(final ApiCallback _callback) throws ApiException {
+ return getAcademyLessonsCall(_callback);
+
+ }
+
+ /**
+ * Get information about user lessons
+ * Get a list of user lessons with details about each of them
+ * @return AcademyLessonsListResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Academy lessons | - |
+ | 0 | error response | - |
+
+ */
+ public AcademyLessonsListResponse getAcademyLessons() throws ApiException {
+ ApiResponse localVarResp = getAcademyLessonsWithHttpInfo();
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get information about user lessons
+ * Get a list of user lessons with details about each of them
+ * @return ApiResponse<AcademyLessonsListResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Academy lessons | - |
+ | 0 | error response | - |
+
+ */
+ public ApiResponse getAcademyLessonsWithHttpInfo() throws ApiException {
+ okhttp3.Call localVarCall = getAcademyLessonsValidateBeforeCall(null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get information about user lessons (asynchronously)
+ * Get a list of user lessons with details about each of them
+ * @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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Academy lessons | - |
+ | 0 | error response | - |
+
+ */
+ public okhttp3.Call getAcademyLessonsAsync(final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAcademyLessonsValidateBeforeCall(_callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAcademyQuestionnaire
+ * @param questionnaireId questionnaire's id (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Successful academy questionnaire response | - |
+ | 404 | answers not found | - |
+ | 0 | error response | - |
+
+ */
+ public okhttp3.Call getAcademyQuestionnaireCall(@javax.annotation.Nonnull String questionnaireId, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/academy/questionnaires/{questionnaire_id}"
+ .replace("{" + "questionnaire_id" + "}", localVarApiClient.escapeString(questionnaireId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "OAuth2", "BasicAuth", "ApiKeyAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAcademyQuestionnaireValidateBeforeCall(@javax.annotation.Nonnull String questionnaireId, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'questionnaireId' is set
+ if (questionnaireId == null) {
+ throw new ApiException("Missing the required parameter 'questionnaireId' when calling getAcademyQuestionnaire(Async)");
+ }
+
+ return getAcademyQuestionnaireCall(questionnaireId, _callback);
+
+ }
+
+ /**
+ * Get academy questionnaire information for user
+ * Get academy questionnaire information for user. For example, questionnaire version, completion status and user answers
+ * @param questionnaireId questionnaire's id (required)
+ * @return AcademyQuestionnaireListResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Successful academy questionnaire response | - |
+ | 404 | answers not found | - |
+ | 0 | error response | - |
+
+ */
+ public AcademyQuestionnaireListResponse getAcademyQuestionnaire(@javax.annotation.Nonnull String questionnaireId) throws ApiException {
+ ApiResponse localVarResp = getAcademyQuestionnaireWithHttpInfo(questionnaireId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get academy questionnaire information for user
+ * Get academy questionnaire information for user. For example, questionnaire version, completion status and user answers
+ * @param questionnaireId questionnaire's id (required)
+ * @return ApiResponse<AcademyQuestionnaireListResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Successful academy questionnaire response | - |
+ | 404 | answers not found | - |
+ | 0 | error response | - |
+
+ */
+ public ApiResponse getAcademyQuestionnaireWithHttpInfo(@javax.annotation.Nonnull String questionnaireId) throws ApiException {
+ okhttp3.Call localVarCall = getAcademyQuestionnaireValidateBeforeCall(questionnaireId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get academy questionnaire information for user (asynchronously)
+ * Get academy questionnaire information for user. For example, questionnaire version, completion status and user answers
+ * @param questionnaireId questionnaire's id (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Successful academy questionnaire response | - |
+ | 404 | answers not found | - |
+ | 0 | error response | - |
+
+ */
+ public okhttp3.Call getAcademyQuestionnaireAsync(@javax.annotation.Nonnull String questionnaireId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAcademyQuestionnaireValidateBeforeCall(questionnaireId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for putAcademyLessons
+ * @param academyLesson Academy lesson to create (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | create or update success | - |
+ | 0 | error response | - |
+
+ */
+ public okhttp3.Call putAcademyLessonsCall(@javax.annotation.Nonnull List academyLesson, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = academyLesson;
+
+ // create path and map variables
+ String localVarPath = "/academy/lessons";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "OAuth2", "BasicAuth", "ApiKeyAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call putAcademyLessonsValidateBeforeCall(@javax.annotation.Nonnull List academyLesson, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'academyLesson' is set
+ if (academyLesson == null) {
+ throw new ApiException("Missing the required parameter 'academyLesson' when calling putAcademyLessons(Async)");
+ }
+
+ return putAcademyLessonsCall(academyLesson, _callback);
+
+ }
+
+ /**
+ * Academy lessons to create
+ * Create one or more user lessons
+ * @param academyLesson Academy lesson to create (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | create or update success | - |
+ | 0 | error response | - |
+
+ */
+ public void putAcademyLessons(@javax.annotation.Nonnull List academyLesson) throws ApiException {
+ putAcademyLessonsWithHttpInfo(academyLesson);
+ }
+
+ /**
+ * Academy lessons to create
+ * Create one or more user lessons
+ * @param academyLesson Academy lesson to create (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | create or update success | - |
+ | 0 | error response | - |
+
+ */
+ public ApiResponse putAcademyLessonsWithHttpInfo(@javax.annotation.Nonnull List academyLesson) throws ApiException {
+ okhttp3.Call localVarCall = putAcademyLessonsValidateBeforeCall(academyLesson, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Academy lessons to create (asynchronously)
+ * Create one or more user lessons
+ * @param academyLesson Academy lesson to create (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | create or update success | - |
+ | 0 | error response | - |
+
+ */
+ public okhttp3.Call putAcademyLessonsAsync(@javax.annotation.Nonnull List academyLesson, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = putAcademyLessonsValidateBeforeCall(academyLesson, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for putAcademyQuestionnaire
+ * @param questionnaireId questionnaire's id (required)
+ * @param academyQuestionnairePutRequest academy lesson to create (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | create or update success | - |
+ | 0 | error response | - |
+
+ */
+ public okhttp3.Call putAcademyQuestionnaireCall(@javax.annotation.Nonnull String questionnaireId, @javax.annotation.Nonnull AcademyQuestionnairePutRequest academyQuestionnairePutRequest, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = academyQuestionnairePutRequest;
+
+ // create path and map variables
+ String localVarPath = "/academy/questionnaires/{questionnaire_id}"
+ .replace("{" + "questionnaire_id" + "}", localVarApiClient.escapeString(questionnaireId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "OAuth2", "BasicAuth", "ApiKeyAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call putAcademyQuestionnaireValidateBeforeCall(@javax.annotation.Nonnull String questionnaireId, @javax.annotation.Nonnull AcademyQuestionnairePutRequest academyQuestionnairePutRequest, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'questionnaireId' is set
+ if (questionnaireId == null) {
+ throw new ApiException("Missing the required parameter 'questionnaireId' when calling putAcademyQuestionnaire(Async)");
+ }
+
+ // verify the required parameter 'academyQuestionnairePutRequest' is set
+ if (academyQuestionnairePutRequest == null) {
+ throw new ApiException("Missing the required parameter 'academyQuestionnairePutRequest' when calling putAcademyQuestionnaire(Async)");
+ }
+
+ return putAcademyQuestionnaireCall(questionnaireId, academyQuestionnairePutRequest, _callback);
+
+ }
+
+ /**
+ * Create or update academy questionnaire
+ * Create a new questionnaire or update an existing one
+ * @param questionnaireId questionnaire's id (required)
+ * @param academyQuestionnairePutRequest academy lesson to create (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | create or update success | - |
+ | 0 | error response | - |
+
+ */
+ public void putAcademyQuestionnaire(@javax.annotation.Nonnull String questionnaireId, @javax.annotation.Nonnull AcademyQuestionnairePutRequest academyQuestionnairePutRequest) throws ApiException {
+ putAcademyQuestionnaireWithHttpInfo(questionnaireId, academyQuestionnairePutRequest);
+ }
+
+ /**
+ * Create or update academy questionnaire
+ * Create a new questionnaire or update an existing one
+ * @param questionnaireId questionnaire's id (required)
+ * @param academyQuestionnairePutRequest academy lesson to create (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | create or update success | - |
+ | 0 | error response | - |
+
+ */
+ public ApiResponse putAcademyQuestionnaireWithHttpInfo(@javax.annotation.Nonnull String questionnaireId, @javax.annotation.Nonnull AcademyQuestionnairePutRequest academyQuestionnairePutRequest) throws ApiException {
+ okhttp3.Call localVarCall = putAcademyQuestionnaireValidateBeforeCall(questionnaireId, academyQuestionnairePutRequest, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Create or update academy questionnaire (asynchronously)
+ * Create a new questionnaire or update an existing one
+ * @param questionnaireId questionnaire's id (required)
+ * @param academyQuestionnairePutRequest academy lesson to create (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | create or update success | - |
+ | 0 | error response | - |
+
+ */
+ public okhttp3.Call putAcademyQuestionnaireAsync(@javax.annotation.Nonnull String questionnaireId, @javax.annotation.Nonnull AcademyQuestionnairePutRequest academyQuestionnairePutRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = putAcademyQuestionnaireValidateBeforeCall(questionnaireId, academyQuestionnairePutRequest, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+}
diff --git a/src/main/java/io/tiledb/cloud/rest_api/v4/api/AssetsApi.java b/src/main/java/io/tiledb/cloud/rest_api/v4/api/AssetsApi.java
new file mode 100644
index 0000000..d5417c0
--- /dev/null
+++ b/src/main/java/io/tiledb/cloud/rest_api/v4/api/AssetsApi.java
@@ -0,0 +1,1613 @@
+/*
+ * Specification file for tiledb-server v4 API
+ * This spec is exposed to the public under /v4 route group
+ *
+ * The version of the OpenAPI document: 0.0.1
+ * Contact: info@tiledb.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.tiledb.cloud.rest_api.v4.api;
+
+import io.tiledb.cloud.rest_api.v4.ApiCallback;
+import io.tiledb.cloud.rest_api.v4.ApiClient;
+import io.tiledb.cloud.rest_api.v4.ApiException;
+import io.tiledb.cloud.rest_api.v4.ApiResponse;
+import io.tiledb.cloud.rest_api.v4.Configuration;
+import io.tiledb.cloud.rest_api.v4.Pair;
+import io.tiledb.cloud.rest_api.v4.ProgressRequestBody;
+import io.tiledb.cloud.rest_api.v4.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import io.tiledb.cloud.rest_api.v4.model.AssetGetResponse;
+import io.tiledb.cloud.rest_api.v4.model.AssetListResponse;
+import io.tiledb.cloud.rest_api.v4.model.AssetMetadataListResponse;
+import io.tiledb.cloud.rest_api.v4.model.AssetMetadataSaveRequestInner;
+import io.tiledb.cloud.rest_api.v4.model.AssetMetadataSaveResponse;
+import io.tiledb.cloud.rest_api.v4.model.AssetPathResponse;
+import io.tiledb.cloud.rest_api.v4.model.AssetRegisterRequest;
+import io.tiledb.cloud.rest_api.v4.model.AssetType;
+import io.tiledb.cloud.rest_api.v4.model.AssetUpdateRequest;
+import io.tiledb.cloud.rest_api.v4.model.AssetsMoveRequest;
+import io.tiledb.cloud.rest_api.v4.model.Error;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AssetsApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public AssetsApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public AssetsApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for deleteAssetMetadata
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (required)
+ * @param metadataKey One or more metadata keys to delete (required)
+ * @param startTimestamp Start timestamp in milliseconds since epoch (optional)
+ * @param endTimestamp End timestamp in milliseconds since epoch (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 204 | Asset metadata deleted | - |
+ | 0 | Error response | - |
+
+ */
+ public okhttp3.Call deleteAssetMetadataCall(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, @javax.annotation.Nonnull List metadataKey, @javax.annotation.Nullable Integer startTimestamp, @javax.annotation.Nullable Integer endTimestamp, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/assets/item/{workspace}/{teamspace}/{asset}/metadata"
+ .replace("{" + "workspace" + "}", localVarApiClient.escapeString(workspace.toString()))
+ .replace("{" + "teamspace" + "}", localVarApiClient.escapeString(teamspace.toString()))
+ .replace("{" + "asset" + "}", localVarApiClient.escapeString(asset.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (startTimestamp != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("start_timestamp", startTimestamp));
+ }
+
+ if (endTimestamp != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("end_timestamp", endTimestamp));
+ }
+
+ if (metadataKey != null) {
+ localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "metadata_key", metadataKey));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "OAuth2", "BasicAuth", "ApiKeyAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteAssetMetadataValidateBeforeCall(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, @javax.annotation.Nonnull List metadataKey, @javax.annotation.Nullable Integer startTimestamp, @javax.annotation.Nullable Integer endTimestamp, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'workspace' is set
+ if (workspace == null) {
+ throw new ApiException("Missing the required parameter 'workspace' when calling deleteAssetMetadata(Async)");
+ }
+
+ // verify the required parameter 'teamspace' is set
+ if (teamspace == null) {
+ throw new ApiException("Missing the required parameter 'teamspace' when calling deleteAssetMetadata(Async)");
+ }
+
+ // verify the required parameter 'asset' is set
+ if (asset == null) {
+ throw new ApiException("Missing the required parameter 'asset' when calling deleteAssetMetadata(Async)");
+ }
+
+ // verify the required parameter 'metadataKey' is set
+ if (metadataKey == null) {
+ throw new ApiException("Missing the required parameter 'metadataKey' when calling deleteAssetMetadata(Async)");
+ }
+
+ return deleteAssetMetadataCall(workspace, teamspace, asset, metadataKey, startTimestamp, endTimestamp, _callback);
+
+ }
+
+ /**
+ * Delete asset metadata
+ * Delete one or more metadata keys for the given asset
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (required)
+ * @param metadataKey One or more metadata keys to delete (required)
+ * @param startTimestamp Start timestamp in milliseconds since epoch (optional)
+ * @param endTimestamp End timestamp in milliseconds since epoch (optional)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 204 | Asset metadata deleted | - |
+ | 0 | Error response | - |
+
+ */
+ public void deleteAssetMetadata(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, @javax.annotation.Nonnull List metadataKey, @javax.annotation.Nullable Integer startTimestamp, @javax.annotation.Nullable Integer endTimestamp) throws ApiException {
+ deleteAssetMetadataWithHttpInfo(workspace, teamspace, asset, metadataKey, startTimestamp, endTimestamp);
+ }
+
+ /**
+ * Delete asset metadata
+ * Delete one or more metadata keys for the given asset
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (required)
+ * @param metadataKey One or more metadata keys to delete (required)
+ * @param startTimestamp Start timestamp in milliseconds since epoch (optional)
+ * @param endTimestamp End timestamp in milliseconds since epoch (optional)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 204 | Asset metadata deleted | - |
+ | 0 | Error response | - |
+
+ */
+ public ApiResponse deleteAssetMetadataWithHttpInfo(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, @javax.annotation.Nonnull List metadataKey, @javax.annotation.Nullable Integer startTimestamp, @javax.annotation.Nullable Integer endTimestamp) throws ApiException {
+ okhttp3.Call localVarCall = deleteAssetMetadataValidateBeforeCall(workspace, teamspace, asset, metadataKey, startTimestamp, endTimestamp, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Delete asset metadata (asynchronously)
+ * Delete one or more metadata keys for the given asset
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (required)
+ * @param metadataKey One or more metadata keys to delete (required)
+ * @param startTimestamp Start timestamp in milliseconds since epoch (optional)
+ * @param endTimestamp End timestamp in milliseconds since epoch (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 204 | Asset metadata deleted | - |
+ | 0 | Error response | - |
+
+ */
+ public okhttp3.Call deleteAssetMetadataAsync(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, @javax.annotation.Nonnull List metadataKey, @javax.annotation.Nullable Integer startTimestamp, @javax.annotation.Nullable Integer endTimestamp, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteAssetMetadataValidateBeforeCall(workspace, teamspace, asset, metadataKey, startTimestamp, endTimestamp, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAsset
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Asset retrieved | - |
+ | 404 | Asset ID or path does not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public okhttp3.Call getAssetCall(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/assets/item/{workspace}/{teamspace}/{asset}"
+ .replace("{" + "workspace" + "}", localVarApiClient.escapeString(workspace.toString()))
+ .replace("{" + "teamspace" + "}", localVarApiClient.escapeString(teamspace.toString()))
+ .replace("{" + "asset" + "}", localVarApiClient.escapeString(asset.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "OAuth2", "BasicAuth", "ApiKeyAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAssetValidateBeforeCall(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'workspace' is set
+ if (workspace == null) {
+ throw new ApiException("Missing the required parameter 'workspace' when calling getAsset(Async)");
+ }
+
+ // verify the required parameter 'teamspace' is set
+ if (teamspace == null) {
+ throw new ApiException("Missing the required parameter 'teamspace' when calling getAsset(Async)");
+ }
+
+ // verify the required parameter 'asset' is set
+ if (asset == null) {
+ throw new ApiException("Missing the required parameter 'asset' when calling getAsset(Async)");
+ }
+
+ return getAssetCall(workspace, teamspace, asset, _callback);
+
+ }
+
+ /**
+ * Retrieve asset
+ * Retrieve the asset by the given asset_id or path
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (required)
+ * @return AssetGetResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Asset retrieved | - |
+ | 404 | Asset ID or path does not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public AssetGetResponse getAsset(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset) throws ApiException {
+ ApiResponse localVarResp = getAssetWithHttpInfo(workspace, teamspace, asset);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Retrieve asset
+ * Retrieve the asset by the given asset_id or path
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (required)
+ * @return ApiResponse<AssetGetResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Asset retrieved | - |
+ | 404 | Asset ID or path does not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public ApiResponse getAssetWithHttpInfo(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset) throws ApiException {
+ okhttp3.Call localVarCall = getAssetValidateBeforeCall(workspace, teamspace, asset, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Retrieve asset (asynchronously)
+ * Retrieve the asset by the given asset_id or path
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Asset retrieved | - |
+ | 404 | Asset ID or path does not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public okhttp3.Call getAssetAsync(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAssetValidateBeforeCall(workspace, teamspace, asset, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAssetMetadata
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (required)
+ * @param startTimestamp Start timestamp in milliseconds since epoch (optional)
+ * @param endTimestamp End timestamp in milliseconds since epoch (optional)
+ * @param page pagination offset (optional)
+ * @param perPage pagination limit (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Asset metadata retrieved | - |
+ | 404 | Asset ID does not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public okhttp3.Call getAssetMetadataCall(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, @javax.annotation.Nullable Integer startTimestamp, @javax.annotation.Nullable Integer endTimestamp, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer perPage, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/assets/item/{workspace}/{teamspace}/{asset}/metadata"
+ .replace("{" + "workspace" + "}", localVarApiClient.escapeString(workspace.toString()))
+ .replace("{" + "teamspace" + "}", localVarApiClient.escapeString(teamspace.toString()))
+ .replace("{" + "asset" + "}", localVarApiClient.escapeString(asset.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (startTimestamp != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("start_timestamp", startTimestamp));
+ }
+
+ if (endTimestamp != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("end_timestamp", endTimestamp));
+ }
+
+ if (page != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
+ }
+
+ if (perPage != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "OAuth2", "BasicAuth", "ApiKeyAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAssetMetadataValidateBeforeCall(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, @javax.annotation.Nullable Integer startTimestamp, @javax.annotation.Nullable Integer endTimestamp, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer perPage, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'workspace' is set
+ if (workspace == null) {
+ throw new ApiException("Missing the required parameter 'workspace' when calling getAssetMetadata(Async)");
+ }
+
+ // verify the required parameter 'teamspace' is set
+ if (teamspace == null) {
+ throw new ApiException("Missing the required parameter 'teamspace' when calling getAssetMetadata(Async)");
+ }
+
+ // verify the required parameter 'asset' is set
+ if (asset == null) {
+ throw new ApiException("Missing the required parameter 'asset' when calling getAssetMetadata(Async)");
+ }
+
+ return getAssetMetadataCall(workspace, teamspace, asset, startTimestamp, endTimestamp, page, perPage, _callback);
+
+ }
+
+ /**
+ * Retrieve asset's metadata
+ * Retrieve the given asset's metadata
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (required)
+ * @param startTimestamp Start timestamp in milliseconds since epoch (optional)
+ * @param endTimestamp End timestamp in milliseconds since epoch (optional)
+ * @param page pagination offset (optional)
+ * @param perPage pagination limit (optional)
+ * @return AssetMetadataListResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Asset metadata retrieved | - |
+ | 404 | Asset ID does not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public AssetMetadataListResponse getAssetMetadata(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, @javax.annotation.Nullable Integer startTimestamp, @javax.annotation.Nullable Integer endTimestamp, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer perPage) throws ApiException {
+ ApiResponse localVarResp = getAssetMetadataWithHttpInfo(workspace, teamspace, asset, startTimestamp, endTimestamp, page, perPage);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Retrieve asset's metadata
+ * Retrieve the given asset's metadata
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (required)
+ * @param startTimestamp Start timestamp in milliseconds since epoch (optional)
+ * @param endTimestamp End timestamp in milliseconds since epoch (optional)
+ * @param page pagination offset (optional)
+ * @param perPage pagination limit (optional)
+ * @return ApiResponse<AssetMetadataListResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Asset metadata retrieved | - |
+ | 404 | Asset ID does not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public ApiResponse getAssetMetadataWithHttpInfo(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, @javax.annotation.Nullable Integer startTimestamp, @javax.annotation.Nullable Integer endTimestamp, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer perPage) throws ApiException {
+ okhttp3.Call localVarCall = getAssetMetadataValidateBeforeCall(workspace, teamspace, asset, startTimestamp, endTimestamp, page, perPage, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Retrieve asset's metadata (asynchronously)
+ * Retrieve the given asset's metadata
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param asset The asset id or path for which to retrieve assets (required)
+ * @param startTimestamp Start timestamp in milliseconds since epoch (optional)
+ * @param endTimestamp End timestamp in milliseconds since epoch (optional)
+ * @param page pagination offset (optional)
+ * @param perPage pagination limit (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Asset metadata retrieved | - |
+ | 404 | Asset ID does not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public okhttp3.Call getAssetMetadataAsync(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String asset, @javax.annotation.Nullable Integer startTimestamp, @javax.annotation.Nullable Integer endTimestamp, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer perPage, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAssetMetadataValidateBeforeCall(workspace, teamspace, asset, startTimestamp, endTimestamp, page, perPage, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAssetsInPath
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param path The path for which to retrieve assets (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Assets in path retrieved | - |
+ | 404 | One or more of the given path components do not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public okhttp3.Call getAssetsInPathCall(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String path, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/assets/path/{workspace}/{teamspace}/{path}"
+ .replace("{" + "workspace" + "}", localVarApiClient.escapeString(workspace.toString()))
+ .replace("{" + "teamspace" + "}", localVarApiClient.escapeString(teamspace.toString()))
+ .replace("{" + "path" + "}", localVarApiClient.escapeString(path.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "OAuth2", "BasicAuth", "ApiKeyAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAssetsInPathValidateBeforeCall(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String path, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'workspace' is set
+ if (workspace == null) {
+ throw new ApiException("Missing the required parameter 'workspace' when calling getAssetsInPath(Async)");
+ }
+
+ // verify the required parameter 'teamspace' is set
+ if (teamspace == null) {
+ throw new ApiException("Missing the required parameter 'teamspace' when calling getAssetsInPath(Async)");
+ }
+
+ // verify the required parameter 'path' is set
+ if (path == null) {
+ throw new ApiException("Missing the required parameter 'path' when calling getAssetsInPath(Async)");
+ }
+
+ return getAssetsInPathCall(workspace, teamspace, path, _callback);
+
+ }
+
+ /**
+ * Retrieve all assets in a given path
+ * Retrieve all assets in a given path, e.g., a request for `/a/b/c` will return the assets `a`, `b`, and `c`.
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param path The path for which to retrieve assets (required)
+ * @return AssetPathResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Assets in path retrieved | - |
+ | 404 | One or more of the given path components do not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public AssetPathResponse getAssetsInPath(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String path) throws ApiException {
+ ApiResponse localVarResp = getAssetsInPathWithHttpInfo(workspace, teamspace, path);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Retrieve all assets in a given path
+ * Retrieve all assets in a given path, e.g., a request for `/a/b/c` will return the assets `a`, `b`, and `c`.
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param path The path for which to retrieve assets (required)
+ * @return ApiResponse<AssetPathResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Assets in path retrieved | - |
+ | 404 | One or more of the given path components do not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public ApiResponse getAssetsInPathWithHttpInfo(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String path) throws ApiException {
+ okhttp3.Call localVarCall = getAssetsInPathValidateBeforeCall(workspace, teamspace, path, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Retrieve all assets in a given path (asynchronously)
+ * Retrieve all assets in a given path, e.g., a request for `/a/b/c` will return the assets `a`, `b`, and `c`.
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param path The path for which to retrieve assets (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
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Assets in path retrieved | - |
+ | 404 | One or more of the given path components do not exist | - |
+ | 0 | An error occurred | - |
+
+ */
+ public okhttp3.Call getAssetsInPathAsync(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String path, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAssetsInPathValidateBeforeCall(workspace, teamspace, path, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for listAssets
+ * @param workspace The workspace name or id (required)
+ * @param teamspace The teamspace name or id (required)
+ * @param path The path for which to retrieve assets (required)
+ * @param page pagination offset (optional)
+ * @param perPage pagination limit (optional)
+ * @param assetType asset type to filter to (optional)
+ * @param createdBy users that created the asset to filter to (optional)
+ * @param orderBy order by string (optional)
+ * @param expand expand api response with supplemental information (optional)
+ * @param includeSystemAssets if true, system assets (like overlay arrays and groups) are returned (optional, default to false)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | Successful asset listing response | - |
+ | 404 | Teamspace not found | - |
+ | 0 | error response | - |
+
+ */
+ public okhttp3.Call listAssetsCall(@javax.annotation.Nonnull String workspace, @javax.annotation.Nonnull String teamspace, @javax.annotation.Nonnull String path, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer perPage, @javax.annotation.Nullable AssetType assetType, @javax.annotation.Nullable String createdBy, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String expand, @javax.annotation.Nullable Boolean includeSystemAssets, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/assets/list/{workspace}/{teamspace}/{path}"
+ .replace("{" + "workspace" + "}", localVarApiClient.escapeString(workspace.toString()))
+ .replace("{" + "teamspace" + "}", localVarApiClient.escapeString(teamspace.toString()))
+ .replace("{" + "path" + "}", localVarApiClient.escapeString(path.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList