ApiException class.
- */
-@SuppressWarnings("serial")
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-25T11:34:22.684345+05:30[Asia/Kolkata]", comments = "Generator version: 7.8.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/com/skyflow/generated/rest/ApiResponse.java b/src/main/java/com/skyflow/generated/rest/ApiResponse.java
deleted file mode 100644
index d3cdb698..00000000
--- a/src/main/java/com/skyflow/generated/rest/ApiResponse.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest;
-
-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/com/skyflow/generated/rest/AsyncApiClient.java b/src/main/java/com/skyflow/generated/rest/AsyncApiClient.java
new file mode 100644
index 00000000..d36c8141
--- /dev/null
+++ b/src/main/java/com/skyflow/generated/rest/AsyncApiClient.java
@@ -0,0 +1,92 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.skyflow.generated.rest;
+
+import com.skyflow.generated.rest.core.ClientOptions;
+import com.skyflow.generated.rest.core.Suppliers;
+import com.skyflow.generated.rest.resources.audit.AsyncAuditClient;
+import com.skyflow.generated.rest.resources.authentication.AsyncAuthenticationClient;
+import com.skyflow.generated.rest.resources.binlookup.AsyncBinLookupClient;
+import com.skyflow.generated.rest.resources.deprecated.AsyncDeprecatedClient;
+import com.skyflow.generated.rest.resources.files.AsyncFilesClient;
+import com.skyflow.generated.rest.resources.query.AsyncQueryClient;
+import com.skyflow.generated.rest.resources.records.AsyncRecordsClient;
+import com.skyflow.generated.rest.resources.strings.AsyncStringsClient;
+import com.skyflow.generated.rest.resources.tokens.AsyncTokensClient;
+import java.util.function.Supplier;
+
+public class AsyncApiClient {
+ protected final ClientOptions clientOptions;
+
+ protected final Supplier auditClient;
+
+ protected final Supplier binLookupClient;
+
+ protected final Supplier recordsClient;
+
+ protected final Supplier tokensClient;
+
+ protected final Supplier queryClient;
+
+ protected final Supplier authenticationClient;
+
+ protected final Supplier deprecatedClient;
+
+ protected final Supplier stringsClient;
+
+ protected final Supplier filesClient;
+
+ public AsyncApiClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ this.auditClient = Suppliers.memoize(() -> new AsyncAuditClient(clientOptions));
+ this.binLookupClient = Suppliers.memoize(() -> new AsyncBinLookupClient(clientOptions));
+ this.recordsClient = Suppliers.memoize(() -> new AsyncRecordsClient(clientOptions));
+ this.tokensClient = Suppliers.memoize(() -> new AsyncTokensClient(clientOptions));
+ this.queryClient = Suppliers.memoize(() -> new AsyncQueryClient(clientOptions));
+ this.authenticationClient = Suppliers.memoize(() -> new AsyncAuthenticationClient(clientOptions));
+ this.deprecatedClient = Suppliers.memoize(() -> new AsyncDeprecatedClient(clientOptions));
+ this.stringsClient = Suppliers.memoize(() -> new AsyncStringsClient(clientOptions));
+ this.filesClient = Suppliers.memoize(() -> new AsyncFilesClient(clientOptions));
+ }
+
+ public AsyncAuditClient audit() {
+ return this.auditClient.get();
+ }
+
+ public AsyncBinLookupClient binLookup() {
+ return this.binLookupClient.get();
+ }
+
+ public AsyncRecordsClient records() {
+ return this.recordsClient.get();
+ }
+
+ public AsyncTokensClient tokens() {
+ return this.tokensClient.get();
+ }
+
+ public AsyncQueryClient query() {
+ return this.queryClient.get();
+ }
+
+ public AsyncAuthenticationClient authentication() {
+ return this.authenticationClient.get();
+ }
+
+ public AsyncDeprecatedClient deprecated() {
+ return this.deprecatedClient.get();
+ }
+
+ public AsyncStringsClient strings() {
+ return this.stringsClient.get();
+ }
+
+ public AsyncFilesClient files() {
+ return this.filesClient.get();
+ }
+
+ public static AsyncApiClientBuilder builder() {
+ return new AsyncApiClientBuilder();
+ }
+}
diff --git a/src/main/java/com/skyflow/generated/rest/AsyncApiClientBuilder.java b/src/main/java/com/skyflow/generated/rest/AsyncApiClientBuilder.java
new file mode 100644
index 00000000..8e4b8474
--- /dev/null
+++ b/src/main/java/com/skyflow/generated/rest/AsyncApiClientBuilder.java
@@ -0,0 +1,67 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.skyflow.generated.rest;
+
+import com.skyflow.generated.rest.core.ClientOptions;
+import com.skyflow.generated.rest.core.Environment;
+import okhttp3.OkHttpClient;
+
+public final class AsyncApiClientBuilder {
+ private ClientOptions.Builder clientOptionsBuilder = ClientOptions.builder();
+
+ private String token = null;
+
+ private Environment environment = Environment.PRODUCTION;
+
+ /**
+ * Sets token
+ */
+ public AsyncApiClientBuilder token(String token) {
+ this.token = token;
+ return this;
+ }
+
+ public AsyncApiClientBuilder environment(Environment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ public AsyncApiClientBuilder url(String url) {
+ this.environment = Environment.custom(url);
+ return this;
+ }
+
+ /**
+ * Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
+ */
+ public AsyncApiClientBuilder timeout(int timeout) {
+ this.clientOptionsBuilder.timeout(timeout);
+ return this;
+ }
+
+ /**
+ * Sets the maximum number of retries for the client. Defaults to 2 retries.
+ */
+ public AsyncApiClientBuilder maxRetries(int maxRetries) {
+ this.clientOptionsBuilder.maxRetries(maxRetries);
+ return this;
+ }
+
+ /**
+ * Sets the underlying OkHttp client
+ */
+ public AsyncApiClientBuilder httpClient(OkHttpClient httpClient) {
+ this.clientOptionsBuilder.httpClient(httpClient);
+ return this;
+ }
+
+ public AsyncApiClient build() {
+ if (token == null) {
+ throw new RuntimeException("Please provide token");
+ }
+ this.clientOptionsBuilder.addHeader("Authorization", "Bearer " + this.token);
+ clientOptionsBuilder.environment(this.environment);
+ return new AsyncApiClient(clientOptionsBuilder.build());
+ }
+}
diff --git a/src/main/java/com/skyflow/generated/rest/Configuration.java b/src/main/java/com/skyflow/generated/rest/Configuration.java
deleted file mode 100644
index 6b12e8bb..00000000
--- a/src/main/java/com/skyflow/generated/rest/Configuration.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest;
-
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-25T11:34:22.684345+05:30[Asia/Kolkata]", comments = "Generator version: 7.8.0")
-public class Configuration {
- public static final String VERSION = "v1";
-
- private static ApiClient defaultApiClient = new ApiClient();
-
- /**
- * Get the default API client, which would be used when creating API
- * instances without providing an API client.
- *
- * @return Default API client
- */
- public static ApiClient getDefaultApiClient() {
- return defaultApiClient;
- }
-
- /**
- * Set the default API client, which would be used when creating API
- * instances without providing an API client.
- *
- * @param apiClient API client
- */
- public static void setDefaultApiClient(ApiClient apiClient) {
- defaultApiClient = apiClient;
- }
-}
diff --git a/src/main/java/com/skyflow/generated/rest/GzipRequestInterceptor.java b/src/main/java/com/skyflow/generated/rest/GzipRequestInterceptor.java
deleted file mode 100644
index 2b69f358..00000000
--- a/src/main/java/com/skyflow/generated/rest/GzipRequestInterceptor.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest;
-
-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/com/skyflow/generated/rest/JSON.java b/src/main/java/com/skyflow/generated/rest/JSON.java
deleted file mode 100644
index 8e6e8375..00000000
--- a/src/main/java/com/skyflow/generated/rest/JSON.java
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest;
-
-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.StringReader;
-import java.lang.reflect.Type;
-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 com.skyflow.generated.rest.models.AuditEventContext.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.AuditEventData.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.AuditEventHTTPInfo.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.GooglerpcStatus.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.ProtobufAny.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.QueryServiceExecuteQueryBody.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.RecordServiceBatchOperationBody.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.RecordServiceBulkDeleteRecordBody.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.RecordServiceInsertRecordBody.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.RecordServiceUpdateRecordBody.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1AuditAfterOptions.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1AuditEventResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1AuditResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1AuditResponseEvent.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1AuditResponseEventRequest.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1BINListRequest.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1BINListResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1BatchOperationResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1BatchRecord.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1BulkDeleteRecordResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1BulkGetRecordResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1Card.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1DeleteFileResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1DeleteRecordResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1DetokenizePayload.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1DetokenizeRecordRequest.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1DetokenizeRecordResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1DetokenizeResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1FieldRecords.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1GetFileScanStatusResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1GetQueryResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1InsertRecordResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1RecordMetaProperties.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1TokenizePayload.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1TokenizeRecordRequest.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1TokenizeRecordResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1TokenizeResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1UpdateRecordResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1VaultFieldMapping.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new com.skyflow.generated.rest.models.V1VaultSchemaConfig.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);
- }
- }
- }
-
- /**
- * 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/com/skyflow/generated/rest/Pair.java b/src/main/java/com/skyflow/generated/rest/Pair.java
deleted file mode 100644
index 0f182d02..00000000
--- a/src/main/java/com/skyflow/generated/rest/Pair.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest;
-
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-25T11:34:22.684345+05:30[Asia/Kolkata]", comments = "Generator version: 7.8.0")
-public class Pair {
- private String name = "";
- private String value = "";
-
- public Pair (String name, String value) {
- setName(name);
- setValue(value);
- }
-
- private void setName(String name) {
- if (!isValidString(name)) {
- return;
- }
-
- this.name = name;
- }
-
- private void setValue(String value) {
- if (!isValidString(value)) {
- return;
- }
-
- this.value = value;
- }
-
- public String getName() {
- return this.name;
- }
-
- public String getValue() {
- return this.value;
- }
-
- private boolean isValidString(String arg) {
- if (arg == null) {
- return false;
- }
-
- return true;
- }
-}
diff --git a/src/main/java/com/skyflow/generated/rest/ProgressRequestBody.java b/src/main/java/com/skyflow/generated/rest/ProgressRequestBody.java
deleted file mode 100644
index 38d16e94..00000000
--- a/src/main/java/com/skyflow/generated/rest/ProgressRequestBody.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest;
-
-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/com/skyflow/generated/rest/ProgressResponseBody.java b/src/main/java/com/skyflow/generated/rest/ProgressResponseBody.java
deleted file mode 100644
index 6bd61b5a..00000000
--- a/src/main/java/com/skyflow/generated/rest/ProgressResponseBody.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest;
-
-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/com/skyflow/generated/rest/ServerConfiguration.java b/src/main/java/com/skyflow/generated/rest/ServerConfiguration.java
deleted file mode 100644
index f91ef52d..00000000
--- a/src/main/java/com/skyflow/generated/rest/ServerConfiguration.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest;
-
-import java.util.Map;
-
-/**
- * Representing a Server configuration.
- */
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-25T11:34:22.684345+05:30[Asia/Kolkata]", comments = "Generator version: 7.8.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/com/skyflow/generated/rest/ServerVariable.java b/src/main/java/com/skyflow/generated/rest/ServerVariable.java
deleted file mode 100644
index 53b17180..00000000
--- a/src/main/java/com/skyflow/generated/rest/ServerVariable.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest;
-
-import java.util.HashSet;
-
-/**
- * Representing a Server Variable for server URL template substitution.
- */
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-25T11:34:22.684345+05:30[Asia/Kolkata]", comments = "Generator version: 7.8.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/com/skyflow/generated/rest/StringUtil.java b/src/main/java/com/skyflow/generated/rest/StringUtil.java
deleted file mode 100644
index 433e15d7..00000000
--- a/src/main/java/com/skyflow/generated/rest/StringUtil.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-25T11:34:22.684345+05:30[Asia/Kolkata]", comments = "Generator version: 7.8.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/com/skyflow/generated/rest/api/AuditApi.java b/src/main/java/com/skyflow/generated/rest/api/AuditApi.java
deleted file mode 100644
index 6b441971..00000000
--- a/src/main/java/com/skyflow/generated/rest/api/AuditApi.java
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * Skyflow Data API
- * # Data API This API inserts, retrieves, and otherwise manages data in a vault. The Data API is available from two base URIs. *identifier* is the identifier in your vault's URL.- Sandbox: https://_*identifier*.vault.skyflowapis-preview.com
- Production: https://_*identifier*.vault.skyflowapis.com
When you make an API call, you need to add a header: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest.api;
-
-import com.skyflow.generated.rest.ApiCallback;
-import com.skyflow.generated.rest.ApiClient;
-import com.skyflow.generated.rest.ApiException;
-import com.skyflow.generated.rest.ApiResponse;
-import com.skyflow.generated.rest.Configuration;
-import com.skyflow.generated.rest.Pair;
-import com.skyflow.generated.rest.ProgressRequestBody;
-import com.skyflow.generated.rest.ProgressResponseBody;
-
-import com.google.gson.reflect.TypeToken;
-
-import java.io.IOException;
-
-
-import com.skyflow.generated.rest.models.GooglerpcStatus;
-import com.skyflow.generated.rest.models.V1AuditResponse;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class AuditApi {
- private ApiClient localVarApiClient;
- private int localHostIndex;
- private String localCustomBaseUrl;
-
- public AuditApi() {
- this(Configuration.getDefaultApiClient());
- }
-
- public AuditApi(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 auditServiceListAuditEvents
- * @param filterOpsAccountID Resources with the specified account ID. (required)
- * @param filterOpsContextChangeID ID for the audit event. (optional)
- * @param filterOpsContextRequestID ID for the request that caused the event. (optional)
- * @param filterOpsContextTraceID ID for the request set by the service that received the request. (optional)
- * @param filterOpsContextSessionID ID for the session in which the request was sent. (optional)
- * @param filterOpsContextActor Member who sent the request. Depending on `actorType`, this may be a user ID or a service account ID. (optional)
- * @param filterOpsContextActorType Type of member who sent the request. (optional, default to NONE)
- * @param filterOpsContextAccessType Type of access for the request. (optional, default to ACCESS_NONE)
- * @param filterOpsContextIpAddress IP Address of the client that made the request. (optional)
- * @param filterOpsContextOrigin HTTP Origin request header (including scheme, hostname, and port) of the request. (optional)
- * @param filterOpsContextAuthMode Authentication mode the `actor` used. (optional, default to AUTH_NONE)
- * @param filterOpsContextJwtID ID of the JWT token. (optional)
- * @param filterOpsContextBearerTokenContextID Embedded User Context. (optional)
- * @param filterOpsParentAccountID Resources with the specified parent account ID. (optional)
- * @param filterOpsWorkspaceID Resources with the specified workspace ID. (optional)
- * @param filterOpsVaultID Resources with the specified vault ID. (optional)
- * @param filterOpsResourceIDs Resources with a specified ID. If a resource matches at least one ID, the associated event is returned. Format is a comma-separated list of \"\\<resourceType\\>/\\<resourceID\\>\". For example, \"VAULT/12345, USER/67890\". (optional)
- * @param filterOpsActionType Events with the specified action type. (optional, default to NONE)
- * @param filterOpsResourceType Resources with the specified type. (optional, default to NONE_API)
- * @param filterOpsTags Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, \"login, get\". (optional)
- * @param filterOpsResponseCode HTTP response code of the request. (optional)
- * @param filterOpsStartTime Start timestamp for the query, in SQL format. (optional)
- * @param filterOpsEndTime End timestamp for the query, in SQL format. (optional)
- * @param filterOpsApiName Name of the API called in the request. (optional)
- * @param filterOpsResponseMessage Response message of the request. (optional)
- * @param filterOpsHttpMethod HTTP method of the request. (optional)
- * @param filterOpsHttpURI HTTP URI of the request. (optional)
- * @param sortOpsSortBy Fully-qualified field by which to sort results. Field names should be in camel case (for example, \"capitalization.camelCase\"). (optional)
- * @param sortOpsOrderBy Ascending or descending ordering of results. (optional, default to ASCENDING)
- * @param afterOpsTimestamp Timestamp provided in the previous audit response's `nextOps` attribute. An alternate way to manage response pagination. Can't be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. (optional)
- * @param afterOpsChangeID Change ID provided in the previous audit response's `nextOps` attribute. An alternate way to manage response pagination. Can't be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. (optional)
- * @param limit Number of results to return. (optional, default to 25)
- * @param offset Record position at which to start returning results. (optional, default to 0)
- * @param _callback Callback for upload/download progress
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- * @http.response.details
-
- | Status Code | Description | Response Headers |
- | 200 | A successful response. | - |
- | 404 | Returned when the resource does not exist. | - |
- | 0 | An unexpected error response. | - |
-
- */
- public okhttp3.Call auditServiceListAuditEventsCall(String filterOpsAccountID, String filterOpsContextChangeID, String filterOpsContextRequestID, String filterOpsContextTraceID, String filterOpsContextSessionID, String filterOpsContextActor, String filterOpsContextActorType, String filterOpsContextAccessType, String filterOpsContextIpAddress, String filterOpsContextOrigin, String filterOpsContextAuthMode, String filterOpsContextJwtID, String filterOpsContextBearerTokenContextID, String filterOpsParentAccountID, String filterOpsWorkspaceID, String filterOpsVaultID, String filterOpsResourceIDs, String filterOpsActionType, String filterOpsResourceType, String filterOpsTags, Integer filterOpsResponseCode, String filterOpsStartTime, String filterOpsEndTime, String filterOpsApiName, String filterOpsResponseMessage, String filterOpsHttpMethod, String filterOpsHttpURI, String sortOpsSortBy, String sortOpsOrderBy, String afterOpsTimestamp, String afterOpsChangeID, Long limit, Long offset, 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 = "/v1/audit/events";
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
- Map localVarHeaderParams = new HashMap();
- Map localVarCookieParams = new HashMap();
- Map localVarFormParams = new HashMap();
-
- if (filterOpsContextChangeID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.changeID", filterOpsContextChangeID));
- }
-
- if (filterOpsContextRequestID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.requestID", filterOpsContextRequestID));
- }
-
- if (filterOpsContextTraceID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.traceID", filterOpsContextTraceID));
- }
-
- if (filterOpsContextSessionID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.sessionID", filterOpsContextSessionID));
- }
-
- if (filterOpsContextActor != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.actor", filterOpsContextActor));
- }
-
- if (filterOpsContextActorType != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.actorType", filterOpsContextActorType));
- }
-
- if (filterOpsContextAccessType != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.accessType", filterOpsContextAccessType));
- }
-
- if (filterOpsContextIpAddress != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.ipAddress", filterOpsContextIpAddress));
- }
-
- if (filterOpsContextOrigin != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.origin", filterOpsContextOrigin));
- }
-
- if (filterOpsContextAuthMode != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.authMode", filterOpsContextAuthMode));
- }
-
- if (filterOpsContextJwtID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.jwtID", filterOpsContextJwtID));
- }
-
- if (filterOpsContextBearerTokenContextID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.context.bearerTokenContextID", filterOpsContextBearerTokenContextID));
- }
-
- if (filterOpsParentAccountID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.parentAccountID", filterOpsParentAccountID));
- }
-
- if (filterOpsAccountID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.accountID", filterOpsAccountID));
- }
-
- if (filterOpsWorkspaceID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.workspaceID", filterOpsWorkspaceID));
- }
-
- if (filterOpsVaultID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.vaultID", filterOpsVaultID));
- }
-
- if (filterOpsResourceIDs != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.resourceIDs", filterOpsResourceIDs));
- }
-
- if (filterOpsActionType != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.actionType", filterOpsActionType));
- }
-
- if (filterOpsResourceType != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.resourceType", filterOpsResourceType));
- }
-
- if (filterOpsTags != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.tags", filterOpsTags));
- }
-
- if (filterOpsResponseCode != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.responseCode", filterOpsResponseCode));
- }
-
- if (filterOpsStartTime != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.startTime", filterOpsStartTime));
- }
-
- if (filterOpsEndTime != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.endTime", filterOpsEndTime));
- }
-
- if (filterOpsApiName != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.apiName", filterOpsApiName));
- }
-
- if (filterOpsResponseMessage != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.responseMessage", filterOpsResponseMessage));
- }
-
- if (filterOpsHttpMethod != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.httpMethod", filterOpsHttpMethod));
- }
-
- if (filterOpsHttpURI != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("filterOps.httpURI", filterOpsHttpURI));
- }
-
- if (sortOpsSortBy != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortOps.sortBy", sortOpsSortBy));
- }
-
- if (sortOpsOrderBy != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortOps.orderBy", sortOpsOrderBy));
- }
-
- if (afterOpsTimestamp != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("afterOps.timestamp", afterOpsTimestamp));
- }
-
- if (afterOpsChangeID != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("afterOps.changeID", afterOpsChangeID));
- }
-
- if (limit != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
- }
-
- if (offset != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset));
- }
-
- 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[] { "Bearer" };
- return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
- }
-
- @SuppressWarnings("rawtypes")
- private okhttp3.Call auditServiceListAuditEventsValidateBeforeCall(String filterOpsAccountID, String filterOpsContextChangeID, String filterOpsContextRequestID, String filterOpsContextTraceID, String filterOpsContextSessionID, String filterOpsContextActor, String filterOpsContextActorType, String filterOpsContextAccessType, String filterOpsContextIpAddress, String filterOpsContextOrigin, String filterOpsContextAuthMode, String filterOpsContextJwtID, String filterOpsContextBearerTokenContextID, String filterOpsParentAccountID, String filterOpsWorkspaceID, String filterOpsVaultID, String filterOpsResourceIDs, String filterOpsActionType, String filterOpsResourceType, String filterOpsTags, Integer filterOpsResponseCode, String filterOpsStartTime, String filterOpsEndTime, String filterOpsApiName, String filterOpsResponseMessage, String filterOpsHttpMethod, String filterOpsHttpURI, String sortOpsSortBy, String sortOpsOrderBy, String afterOpsTimestamp, String afterOpsChangeID, Long limit, Long offset, final ApiCallback _callback) throws ApiException {
- // verify the required parameter 'filterOpsAccountID' is set
- if (filterOpsAccountID == null) {
- throw new ApiException("Missing the required parameter 'filterOpsAccountID' when calling auditServiceListAuditEvents(Async)");
- }
-
- return auditServiceListAuditEventsCall(filterOpsAccountID, filterOpsContextChangeID, filterOpsContextRequestID, filterOpsContextTraceID, filterOpsContextSessionID, filterOpsContextActor, filterOpsContextActorType, filterOpsContextAccessType, filterOpsContextIpAddress, filterOpsContextOrigin, filterOpsContextAuthMode, filterOpsContextJwtID, filterOpsContextBearerTokenContextID, filterOpsParentAccountID, filterOpsWorkspaceID, filterOpsVaultID, filterOpsResourceIDs, filterOpsActionType, filterOpsResourceType, filterOpsTags, filterOpsResponseCode, filterOpsStartTime, filterOpsEndTime, filterOpsApiName, filterOpsResponseMessage, filterOpsHttpMethod, filterOpsHttpURI, sortOpsSortBy, sortOpsOrderBy, afterOpsTimestamp, afterOpsChangeID, limit, offset, _callback);
-
- }
-
- /**
- * List Audit Events
- * Lists audit events that match query parameters.
- * @param filterOpsAccountID Resources with the specified account ID. (required)
- * @param filterOpsContextChangeID ID for the audit event. (optional)
- * @param filterOpsContextRequestID ID for the request that caused the event. (optional)
- * @param filterOpsContextTraceID ID for the request set by the service that received the request. (optional)
- * @param filterOpsContextSessionID ID for the session in which the request was sent. (optional)
- * @param filterOpsContextActor Member who sent the request. Depending on `actorType`, this may be a user ID or a service account ID. (optional)
- * @param filterOpsContextActorType Type of member who sent the request. (optional, default to NONE)
- * @param filterOpsContextAccessType Type of access for the request. (optional, default to ACCESS_NONE)
- * @param filterOpsContextIpAddress IP Address of the client that made the request. (optional)
- * @param filterOpsContextOrigin HTTP Origin request header (including scheme, hostname, and port) of the request. (optional)
- * @param filterOpsContextAuthMode Authentication mode the `actor` used. (optional, default to AUTH_NONE)
- * @param filterOpsContextJwtID ID of the JWT token. (optional)
- * @param filterOpsContextBearerTokenContextID Embedded User Context. (optional)
- * @param filterOpsParentAccountID Resources with the specified parent account ID. (optional)
- * @param filterOpsWorkspaceID Resources with the specified workspace ID. (optional)
- * @param filterOpsVaultID Resources with the specified vault ID. (optional)
- * @param filterOpsResourceIDs Resources with a specified ID. If a resource matches at least one ID, the associated event is returned. Format is a comma-separated list of \"\\<resourceType\\>/\\<resourceID\\>\". For example, \"VAULT/12345, USER/67890\". (optional)
- * @param filterOpsActionType Events with the specified action type. (optional, default to NONE)
- * @param filterOpsResourceType Resources with the specified type. (optional, default to NONE_API)
- * @param filterOpsTags Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, \"login, get\". (optional)
- * @param filterOpsResponseCode HTTP response code of the request. (optional)
- * @param filterOpsStartTime Start timestamp for the query, in SQL format. (optional)
- * @param filterOpsEndTime End timestamp for the query, in SQL format. (optional)
- * @param filterOpsApiName Name of the API called in the request. (optional)
- * @param filterOpsResponseMessage Response message of the request. (optional)
- * @param filterOpsHttpMethod HTTP method of the request. (optional)
- * @param filterOpsHttpURI HTTP URI of the request. (optional)
- * @param sortOpsSortBy Fully-qualified field by which to sort results. Field names should be in camel case (for example, \"capitalization.camelCase\"). (optional)
- * @param sortOpsOrderBy Ascending or descending ordering of results. (optional, default to ASCENDING)
- * @param afterOpsTimestamp Timestamp provided in the previous audit response's `nextOps` attribute. An alternate way to manage response pagination. Can't be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. (optional)
- * @param afterOpsChangeID Change ID provided in the previous audit response's `nextOps` attribute. An alternate way to manage response pagination. Can't be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. (optional)
- * @param limit Number of results to return. (optional, default to 25)
- * @param offset Record position at which to start returning results. (optional, default to 0)
- * @return V1AuditResponse
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- | Status Code | Description | Response Headers |
- | 200 | A successful response. | - |
- | 404 | Returned when the resource does not exist. | - |
- | 0 | An unexpected error response. | - |
-
- */
- public V1AuditResponse auditServiceListAuditEvents(String filterOpsAccountID, String filterOpsContextChangeID, String filterOpsContextRequestID, String filterOpsContextTraceID, String filterOpsContextSessionID, String filterOpsContextActor, String filterOpsContextActorType, String filterOpsContextAccessType, String filterOpsContextIpAddress, String filterOpsContextOrigin, String filterOpsContextAuthMode, String filterOpsContextJwtID, String filterOpsContextBearerTokenContextID, String filterOpsParentAccountID, String filterOpsWorkspaceID, String filterOpsVaultID, String filterOpsResourceIDs, String filterOpsActionType, String filterOpsResourceType, String filterOpsTags, Integer filterOpsResponseCode, String filterOpsStartTime, String filterOpsEndTime, String filterOpsApiName, String filterOpsResponseMessage, String filterOpsHttpMethod, String filterOpsHttpURI, String sortOpsSortBy, String sortOpsOrderBy, String afterOpsTimestamp, String afterOpsChangeID, Long limit, Long offset) throws ApiException {
- ApiResponse localVarResp = auditServiceListAuditEventsWithHttpInfo(filterOpsAccountID, filterOpsContextChangeID, filterOpsContextRequestID, filterOpsContextTraceID, filterOpsContextSessionID, filterOpsContextActor, filterOpsContextActorType, filterOpsContextAccessType, filterOpsContextIpAddress, filterOpsContextOrigin, filterOpsContextAuthMode, filterOpsContextJwtID, filterOpsContextBearerTokenContextID, filterOpsParentAccountID, filterOpsWorkspaceID, filterOpsVaultID, filterOpsResourceIDs, filterOpsActionType, filterOpsResourceType, filterOpsTags, filterOpsResponseCode, filterOpsStartTime, filterOpsEndTime, filterOpsApiName, filterOpsResponseMessage, filterOpsHttpMethod, filterOpsHttpURI, sortOpsSortBy, sortOpsOrderBy, afterOpsTimestamp, afterOpsChangeID, limit, offset);
- return localVarResp.getData();
- }
-
- /**
- * List Audit Events
- * Lists audit events that match query parameters.
- * @param filterOpsAccountID Resources with the specified account ID. (required)
- * @param filterOpsContextChangeID ID for the audit event. (optional)
- * @param filterOpsContextRequestID ID for the request that caused the event. (optional)
- * @param filterOpsContextTraceID ID for the request set by the service that received the request. (optional)
- * @param filterOpsContextSessionID ID for the session in which the request was sent. (optional)
- * @param filterOpsContextActor Member who sent the request. Depending on `actorType`, this may be a user ID or a service account ID. (optional)
- * @param filterOpsContextActorType Type of member who sent the request. (optional, default to NONE)
- * @param filterOpsContextAccessType Type of access for the request. (optional, default to ACCESS_NONE)
- * @param filterOpsContextIpAddress IP Address of the client that made the request. (optional)
- * @param filterOpsContextOrigin HTTP Origin request header (including scheme, hostname, and port) of the request. (optional)
- * @param filterOpsContextAuthMode Authentication mode the `actor` used. (optional, default to AUTH_NONE)
- * @param filterOpsContextJwtID ID of the JWT token. (optional)
- * @param filterOpsContextBearerTokenContextID Embedded User Context. (optional)
- * @param filterOpsParentAccountID Resources with the specified parent account ID. (optional)
- * @param filterOpsWorkspaceID Resources with the specified workspace ID. (optional)
- * @param filterOpsVaultID Resources with the specified vault ID. (optional)
- * @param filterOpsResourceIDs Resources with a specified ID. If a resource matches at least one ID, the associated event is returned. Format is a comma-separated list of \"\\<resourceType\\>/\\<resourceID\\>\". For example, \"VAULT/12345, USER/67890\". (optional)
- * @param filterOpsActionType Events with the specified action type. (optional, default to NONE)
- * @param filterOpsResourceType Resources with the specified type. (optional, default to NONE_API)
- * @param filterOpsTags Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, \"login, get\". (optional)
- * @param filterOpsResponseCode HTTP response code of the request. (optional)
- * @param filterOpsStartTime Start timestamp for the query, in SQL format. (optional)
- * @param filterOpsEndTime End timestamp for the query, in SQL format. (optional)
- * @param filterOpsApiName Name of the API called in the request. (optional)
- * @param filterOpsResponseMessage Response message of the request. (optional)
- * @param filterOpsHttpMethod HTTP method of the request. (optional)
- * @param filterOpsHttpURI HTTP URI of the request. (optional)
- * @param sortOpsSortBy Fully-qualified field by which to sort results. Field names should be in camel case (for example, \"capitalization.camelCase\"). (optional)
- * @param sortOpsOrderBy Ascending or descending ordering of results. (optional, default to ASCENDING)
- * @param afterOpsTimestamp Timestamp provided in the previous audit response's `nextOps` attribute. An alternate way to manage response pagination. Can't be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. (optional)
- * @param afterOpsChangeID Change ID provided in the previous audit response's `nextOps` attribute. An alternate way to manage response pagination. Can't be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. (optional)
- * @param limit Number of results to return. (optional, default to 25)
- * @param offset Record position at which to start returning results. (optional, default to 0)
- * @return ApiResponse<V1AuditResponse>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- | Status Code | Description | Response Headers |
- | 200 | A successful response. | - |
- | 404 | Returned when the resource does not exist. | - |
- | 0 | An unexpected error response. | - |
-
- */
- public ApiResponse auditServiceListAuditEventsWithHttpInfo(String filterOpsAccountID, String filterOpsContextChangeID, String filterOpsContextRequestID, String filterOpsContextTraceID, String filterOpsContextSessionID, String filterOpsContextActor, String filterOpsContextActorType, String filterOpsContextAccessType, String filterOpsContextIpAddress, String filterOpsContextOrigin, String filterOpsContextAuthMode, String filterOpsContextJwtID, String filterOpsContextBearerTokenContextID, String filterOpsParentAccountID, String filterOpsWorkspaceID, String filterOpsVaultID, String filterOpsResourceIDs, String filterOpsActionType, String filterOpsResourceType, String filterOpsTags, Integer filterOpsResponseCode, String filterOpsStartTime, String filterOpsEndTime, String filterOpsApiName, String filterOpsResponseMessage, String filterOpsHttpMethod, String filterOpsHttpURI, String sortOpsSortBy, String sortOpsOrderBy, String afterOpsTimestamp, String afterOpsChangeID, Long limit, Long offset) throws ApiException {
- okhttp3.Call localVarCall = auditServiceListAuditEventsValidateBeforeCall(filterOpsAccountID, filterOpsContextChangeID, filterOpsContextRequestID, filterOpsContextTraceID, filterOpsContextSessionID, filterOpsContextActor, filterOpsContextActorType, filterOpsContextAccessType, filterOpsContextIpAddress, filterOpsContextOrigin, filterOpsContextAuthMode, filterOpsContextJwtID, filterOpsContextBearerTokenContextID, filterOpsParentAccountID, filterOpsWorkspaceID, filterOpsVaultID, filterOpsResourceIDs, filterOpsActionType, filterOpsResourceType, filterOpsTags, filterOpsResponseCode, filterOpsStartTime, filterOpsEndTime, filterOpsApiName, filterOpsResponseMessage, filterOpsHttpMethod, filterOpsHttpURI, sortOpsSortBy, sortOpsOrderBy, afterOpsTimestamp, afterOpsChangeID, limit, offset, null);
- Type localVarReturnType = new TypeToken(){}.getType();
- return localVarApiClient.execute(localVarCall, localVarReturnType);
- }
-
- /**
- * List Audit Events (asynchronously)
- * Lists audit events that match query parameters.
- * @param filterOpsAccountID Resources with the specified account ID. (required)
- * @param filterOpsContextChangeID ID for the audit event. (optional)
- * @param filterOpsContextRequestID ID for the request that caused the event. (optional)
- * @param filterOpsContextTraceID ID for the request set by the service that received the request. (optional)
- * @param filterOpsContextSessionID ID for the session in which the request was sent. (optional)
- * @param filterOpsContextActor Member who sent the request. Depending on `actorType`, this may be a user ID or a service account ID. (optional)
- * @param filterOpsContextActorType Type of member who sent the request. (optional, default to NONE)
- * @param filterOpsContextAccessType Type of access for the request. (optional, default to ACCESS_NONE)
- * @param filterOpsContextIpAddress IP Address of the client that made the request. (optional)
- * @param filterOpsContextOrigin HTTP Origin request header (including scheme, hostname, and port) of the request. (optional)
- * @param filterOpsContextAuthMode Authentication mode the `actor` used. (optional, default to AUTH_NONE)
- * @param filterOpsContextJwtID ID of the JWT token. (optional)
- * @param filterOpsContextBearerTokenContextID Embedded User Context. (optional)
- * @param filterOpsParentAccountID Resources with the specified parent account ID. (optional)
- * @param filterOpsWorkspaceID Resources with the specified workspace ID. (optional)
- * @param filterOpsVaultID Resources with the specified vault ID. (optional)
- * @param filterOpsResourceIDs Resources with a specified ID. If a resource matches at least one ID, the associated event is returned. Format is a comma-separated list of \"\\<resourceType\\>/\\<resourceID\\>\". For example, \"VAULT/12345, USER/67890\". (optional)
- * @param filterOpsActionType Events with the specified action type. (optional, default to NONE)
- * @param filterOpsResourceType Resources with the specified type. (optional, default to NONE_API)
- * @param filterOpsTags Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, \"login, get\". (optional)
- * @param filterOpsResponseCode HTTP response code of the request. (optional)
- * @param filterOpsStartTime Start timestamp for the query, in SQL format. (optional)
- * @param filterOpsEndTime End timestamp for the query, in SQL format. (optional)
- * @param filterOpsApiName Name of the API called in the request. (optional)
- * @param filterOpsResponseMessage Response message of the request. (optional)
- * @param filterOpsHttpMethod HTTP method of the request. (optional)
- * @param filterOpsHttpURI HTTP URI of the request. (optional)
- * @param sortOpsSortBy Fully-qualified field by which to sort results. Field names should be in camel case (for example, \"capitalization.camelCase\"). (optional)
- * @param sortOpsOrderBy Ascending or descending ordering of results. (optional, default to ASCENDING)
- * @param afterOpsTimestamp Timestamp provided in the previous audit response's `nextOps` attribute. An alternate way to manage response pagination. Can't be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. (optional)
- * @param afterOpsChangeID Change ID provided in the previous audit response's `nextOps` attribute. An alternate way to manage response pagination. Can't be used with `sortOps` or `offset`. For the first request in a series of audit requests, leave blank. (optional)
- * @param limit Number of results to return. (optional, default to 25)
- * @param offset Record position at which to start returning results. (optional, default to 0)
- * @param _callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- * @http.response.details
-
- | Status Code | Description | Response Headers |
- | 200 | A successful response. | - |
- | 404 | Returned when the resource does not exist. | - |
- | 0 | An unexpected error response. | - |
-
- */
- public okhttp3.Call auditServiceListAuditEventsAsync(String filterOpsAccountID, String filterOpsContextChangeID, String filterOpsContextRequestID, String filterOpsContextTraceID, String filterOpsContextSessionID, String filterOpsContextActor, String filterOpsContextActorType, String filterOpsContextAccessType, String filterOpsContextIpAddress, String filterOpsContextOrigin, String filterOpsContextAuthMode, String filterOpsContextJwtID, String filterOpsContextBearerTokenContextID, String filterOpsParentAccountID, String filterOpsWorkspaceID, String filterOpsVaultID, String filterOpsResourceIDs, String filterOpsActionType, String filterOpsResourceType, String filterOpsTags, Integer filterOpsResponseCode, String filterOpsStartTime, String filterOpsEndTime, String filterOpsApiName, String filterOpsResponseMessage, String filterOpsHttpMethod, String filterOpsHttpURI, String sortOpsSortBy, String sortOpsOrderBy, String afterOpsTimestamp, String afterOpsChangeID, Long limit, Long offset, final ApiCallback _callback) throws ApiException {
-
- okhttp3.Call localVarCall = auditServiceListAuditEventsValidateBeforeCall(filterOpsAccountID, filterOpsContextChangeID, filterOpsContextRequestID, filterOpsContextTraceID, filterOpsContextSessionID, filterOpsContextActor, filterOpsContextActorType, filterOpsContextAccessType, filterOpsContextIpAddress, filterOpsContextOrigin, filterOpsContextAuthMode, filterOpsContextJwtID, filterOpsContextBearerTokenContextID, filterOpsParentAccountID, filterOpsWorkspaceID, filterOpsVaultID, filterOpsResourceIDs, filterOpsActionType, filterOpsResourceType, filterOpsTags, filterOpsResponseCode, filterOpsStartTime, filterOpsEndTime, filterOpsApiName, filterOpsResponseMessage, filterOpsHttpMethod, filterOpsHttpURI, sortOpsSortBy, sortOpsOrderBy, afterOpsTimestamp, afterOpsChangeID, limit, offset, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
- localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
- return localVarCall;
- }
-}
diff --git a/src/main/java/com/skyflow/generated/rest/api/AuthenticationApi.java b/src/main/java/com/skyflow/generated/rest/api/AuthenticationApi.java
deleted file mode 100644
index e26da776..00000000
--- a/src/main/java/com/skyflow/generated/rest/api/AuthenticationApi.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Skyflow Management API
- * # Management API This API controls aspects of your account and schema, including workspaces, vaults, keys, users, permissions, and more. The Management API is available from two base URIs:- Sandbox: https://manage.skyflowapis-preview.com
- Production: https://manage.skyflowapis.com
When you make an API call, you need to add two headers: | Header | Value | Example |
|---|
| Authorization | A Bearer Token. See API Authentication. | Authorization: Bearer eyJhbGciOiJSUzI...1NiIsJdfPA |
| X-SKYFLOW-ACCOUNT-ID | Your Skyflow account ID. | X-SKYFLOW-ACCOUNT-ID: h451b763713e4424a7jke1bbkbbc84ef |
- *
- * The version of the OpenAPI document: v1
- * Contact: support@skyflow.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 com.skyflow.generated.rest.api;
-
-import com.skyflow.generated.rest.ApiCallback;
-import com.skyflow.generated.rest.ApiClient;
-import com.skyflow.generated.rest.ApiException;
-import com.skyflow.generated.rest.ApiResponse;
-import com.skyflow.generated.rest.Configuration;
-import com.skyflow.generated.rest.Pair;
-import com.skyflow.generated.rest.ProgressRequestBody;
-import com.skyflow.generated.rest.ProgressResponseBody;
-
-import com.google.gson.reflect.TypeToken;
-
-import java.io.IOException;
-
-
-import com.skyflow.generated.rest.models.GooglerpcStatus;
-import com.skyflow.generated.rest.models.V1GetAuthTokenRequest;
-import com.skyflow.generated.rest.models.V1GetAuthTokenResponse;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class AuthenticationApi {
- private ApiClient localVarApiClient;
- private int localHostIndex;
- private String localCustomBaseUrl;
-
- public AuthenticationApi() {
- this(Configuration.getDefaultApiClient());
- }
-
- public AuthenticationApi(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 authenticationServiceGetAuthToken
- * @param body (required)
- * @param _callback Callback for upload/download progress
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- * @http.response.details
-
- | Status Code | Description | Response Headers |
- | 200 | A successful response. | - |
- | 400 | Invalid scope format. | - |
- | 401 | Key expired or JWT token unparseable. | - |
- | 404 | Returned when the resource does not exist. | - |
- | 0 | An unexpected error response. | - |
-
- */
- public okhttp3.Call authenticationServiceGetAuthTokenCall(V1GetAuthTokenRequest body, 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 = body;
-
- // create path and map variables
- String localVarPath = "/v1/auth/sa/oauth/token";
-
- 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[] { "Bearer" };
- return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
- }
-
- @SuppressWarnings("rawtypes")
- private okhttp3.Call authenticationServiceGetAuthTokenValidateBeforeCall(V1GetAuthTokenRequest body, final ApiCallback _callback) throws ApiException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException("Missing the required parameter 'body' when calling authenticationServiceGetAuthToken(Async)");
- }
-
- return authenticationServiceGetAuthTokenCall(body, _callback);
-
- }
-
- /**
- * Get Bearer Token
- * <p>Generates a Bearer Token to authenticate with Skyflow. This method doesn't require the <code>Authorization</code> header.</p><p><b>Note:</b> For recommended ways to authenticate, see <a href='/api-authentication/'>API authentication</a>.</p>
- * @param body (required)
- * @return V1GetAuthTokenResponse
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-