diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml
index c723914a..13fcf623 100644
--- a/.github/workflows/beta-release.yml
+++ b/.github/workflows/beta-release.yml
@@ -7,12 +7,12 @@ jobs:
uses: ./.github/workflows/shared-build-and-deploy.yml
with:
ref: ${{ github.ref_name }}
- server-id: ossrh
+ server-id: central
profile: maven-central
tag: 'beta'
secrets:
- server-username: ${{ secrets.OSSRH_USERNAME }}
- server-password: ${{ secrets.OSSRH_PASSWORD }}
+ server-username: ${{ secrets.CENTRAL_PUBLISHER_PORTAL_USERNAME }}
+ server-password: ${{ secrets.CENTRAL_PUBLISHER_PORTAL_PASSWORD }}
gpg-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
skyflow-credentials: ${{ secrets.SKYFLOW_CREDENTIALS }} >> .env
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 855b7b4c..1cc20ca1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,12 +7,12 @@ jobs:
uses: ./.github/workflows/shared-build-and-deploy.yml
with:
ref: ${{ github.ref_name }}
- server-id: ossrh
+ server-id: central
profile: maven-central
tag: 'public'
secrets:
- server-username: ${{ secrets.OSSRH_USERNAME }}
- server-password: ${{ secrets.OSSRH_PASSWORD }}
+ server-username: ${{ secrets.CENTRAL_PUBLISHER_PORTAL_USERNAME }}
+ server-password: ${{ secrets.CENTRAL_PUBLISHER_PORTAL_PASSWORD }}
gpg-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
skyflow-credentials: ${{ secrets.SKYFLOW_CREDENTIALS }} >> .env
diff --git a/.github/workflows/shared-build-and-deploy.yml b/.github/workflows/shared-build-and-deploy.yml
index c9cadd2c..13fd1b5b 100644
--- a/.github/workflows/shared-build-and-deploy.yml
+++ b/.github/workflows/shared-build-and-deploy.yml
@@ -52,9 +52,9 @@ jobs:
fetch-depth: 0
- name: Set up maven or jfrog repository
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v4
with:
- java-version: "1.8"
+ java-version: "11"
distribution: "adopt"
server-id: ${{ inputs.server-id }}
server-username: SERVER_USERNAME
diff --git a/pom.xml b/pom.xml
index 832fd901..6ed0124d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.skyflow
skyflow-java
- 2.0.0-beta.2
+ 2.0.0-beta.3
jar
${project.groupId}:${project.artifactId}
@@ -45,12 +45,6 @@
-
- com.squareup.okhttp3
- okhttp
- 4.12.0
- compile
-
com.fasterxml.jackson.core
jackson-databind
@@ -126,9 +120,10 @@
junit
junit
- ${junit-version}
+ 4.13.2
test
+
org.powermock
powermock-module-junit4
@@ -141,12 +136,6 @@
2.0.9
test
-
- org.junit.jupiter
- junit-jupiter
- 5.13.2
- compile
-
@@ -185,7 +174,14 @@
org.apache.maven.plugins
maven-surefire-plugin
- 2.22.2
+ 3.2.5
+
+ false
+
+ **/*Test.java
+ **/*Tests.java
+
+
org.jacoco
@@ -263,25 +259,25 @@
maven-central
- ossrh
- https://s01.oss.sonatype.org/service/local/staging/deploy/maven2
+ central
+ https://central.sonatype.com/api/v1/publisher/upload
- ossrh
- https://s01.oss.sonatype.org/content/repositories/snapshots
+ central-snapshots
+ https://central.sonatype.com/api/v1/publisher/upload
- org.sonatype.plugins
- nexus-staging-maven-plugin
- 1.6.7
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.4.0
true
- ossrh
- https://s01.oss.sonatype.org/
- true
+ central
+ true
+ true
diff --git a/src/main/java/com/skyflow/VaultClient.java b/src/main/java/com/skyflow/VaultClient.java
index 7536a2c1..176f9349 100644
--- a/src/main/java/com/skyflow/VaultClient.java
+++ b/src/main/java/com/skyflow/VaultClient.java
@@ -512,7 +512,6 @@ protected DeidentifyPdfRequest getDeidentifyPdfRequest(DeidentifyFileRequest req
Optional> entityUniqueCounter = Optional.empty();
Optional> allowRegex = Optional.ofNullable(request.getAllowRegexList());
Optional> restrictRegex = Optional.ofNullable(request.getRestrictRegexList());
- Optional transformations = Optional.ofNullable(getTransformations(request.getTransformations()));
if (tokenFormat != null) {
if (tokenFormat.getEntityOnly() != null && !tokenFormat.getEntityOnly().isEmpty()) {
@@ -540,13 +539,12 @@ protected DeidentifyPdfRequest getDeidentifyPdfRequest(DeidentifyFileRequest req
return DeidentifyPdfRequest.builder()
.vaultId(vaultId)
.file(file)
- .density(request.getPixelDensity() != null ? request.getPixelDensity().intValue() : null)
- .maxResolution(request.getMaxResolution() != null ? request.getMaxResolution().intValue() : null)
+ .density(request.getPixelDensity() != null ? request.getPixelDensity().doubleValue() : null)
+ .maxResolution(request.getMaxResolution() != null ? request.getMaxResolution().doubleValue() : null)
.entityTypes(mappedEntityTypes)
.tokenType(tokenType)
.allowRegex(allowRegex)
.restrictRegex(restrictRegex)
- .transformations(transformations)
.build();
}
@@ -558,7 +556,6 @@ protected DeidentifyImageRequest getDeidentifyImageRequest(DeidentifyFileRequest
Optional> entityUniqueCounter = Optional.empty();
Optional> allowRegex = Optional.ofNullable(request.getAllowRegexList());
Optional> restrictRegex = Optional.ofNullable(request.getRestrictRegexList());
- Optional transformations = Optional.ofNullable(getTransformations(request.getTransformations()));
TokenTypeWithoutVault tokenType = buildTokenType(tokenFormat, entityTypes, entityUniqueCounter);
@@ -580,7 +577,6 @@ protected DeidentifyImageRequest getDeidentifyImageRequest(DeidentifyFileRequest
.tokenType(tokenType)
.allowRegex(allowRegex)
.restrictRegex(restrictRegex)
- .transformations(transformations)
.outputProcessedImage(request.getOutputProcessedImage())
.outputOcrText(request.getOutputOcrText())
.build();
@@ -594,7 +590,6 @@ protected DeidentifyPresentationRequest getDeidentifyPresentationRequest(Deident
Optional> entityUniqueCounter = Optional.empty();
Optional> allowRegex = Optional.ofNullable(request.getAllowRegexList());
Optional> restrictRegex = Optional.ofNullable(request.getRestrictRegexList());
- Optional transformations = Optional.ofNullable(getTransformations(request.getTransformations()));
TokenTypeWithoutVault tokenType = buildTokenType(tokenFormat, entityTypes, entityUniqueCounter);
@@ -610,7 +605,6 @@ protected DeidentifyPresentationRequest getDeidentifyPresentationRequest(Deident
.tokenType(tokenType)
.allowRegex(allowRegex)
.restrictRegex(restrictRegex)
- .transformations(transformations)
.build();
}
@@ -622,7 +616,6 @@ protected DeidentifySpreadsheetRequest getDeidentifySpreadsheetRequest(Deidentif
Optional> entityUniqueCounter = Optional.empty();
Optional> allowRegex = Optional.ofNullable(request.getAllowRegexList());
Optional> restrictRegex = Optional.ofNullable(request.getRestrictRegexList());
- Optional transformations = Optional.ofNullable(getTransformations(request.getTransformations()));
TokenTypeWithoutVault tokenType = buildTokenType(tokenFormat, entityTypes, entityUniqueCounter);
@@ -638,7 +631,6 @@ protected DeidentifySpreadsheetRequest getDeidentifySpreadsheetRequest(Deidentif
.tokenType(tokenType)
.allowRegex(allowRegex)
.restrictRegex(restrictRegex)
- .transformations(transformations)
.build();
}
@@ -678,7 +670,6 @@ protected DeidentifyDocumentRequest getDeidentifyDocumentRequest(DeidentifyFileR
Optional> entityUniqueCounter = Optional.empty();
Optional> allowRegex = Optional.ofNullable(request.getAllowRegexList());
Optional> restrictRegex = Optional.ofNullable(request.getRestrictRegexList());
- Optional transformations = Optional.ofNullable(getTransformations(request.getTransformations()));
TokenTypeWithoutVault tokenType = buildTokenType(tokenFormat, entityTypes, entityUniqueCounter);
@@ -694,7 +685,6 @@ protected DeidentifyDocumentRequest getDeidentifyDocumentRequest(DeidentifyFileR
.tokenType(tokenType)
.allowRegex(allowRegex)
.restrictRegex(restrictRegex)
- .transformations(transformations)
.build();
}
diff --git a/src/main/java/com/skyflow/enums/DeidentifyFileStatus.java b/src/main/java/com/skyflow/enums/DeidentifyFileStatus.java
index e17c6d0c..87ffc109 100644
--- a/src/main/java/com/skyflow/enums/DeidentifyFileStatus.java
+++ b/src/main/java/com/skyflow/enums/DeidentifyFileStatus.java
@@ -2,7 +2,9 @@
public enum DeidentifyFileStatus {
IN_PROGRESS("IN_PROGRESS"),
- SUCCESS("SUCCESS");
+ FAILED("FAILED"),
+ SUCCESS("SUCCESS"),
+ UNKNOWN("UNKNOWN");
private final String value;
diff --git a/src/main/java/com/skyflow/enums/DetectEntities.java b/src/main/java/com/skyflow/enums/DetectEntities.java
index f2c21eff..3fd15a67 100644
--- a/src/main/java/com/skyflow/enums/DetectEntities.java
+++ b/src/main/java/com/skyflow/enums/DetectEntities.java
@@ -13,17 +13,19 @@ public enum DetectEntities {
CREDIT_CARD_EXPIRATION("credit_card_expiration"),
CVV("cvv"),
DATE("date"),
+ DAY("day"),
DATE_INTERVAL("date_interval"),
DOB("dob"),
DOSE("dose"),
DRIVER_LICENSE("driver_license"),
DRUG("drug"),
DURATION("duration"),
+ EFFECT("effect"),
EMAIL_ADDRESS("email_address"),
EVENT("event"),
FILENAME("filename"),
FINANCIAL_METRIC("financial_metric"),
- GENDER_SEXUALITY("gender_sexuality"),
+ GENDER("gender"),
HEALTHCARE_NUMBER("healthcare_number"),
INJURY("injury"),
IP_ADDRESS("ip_address"),
@@ -40,6 +42,7 @@ public enum DetectEntities {
MEDICAL_CODE("medical_code"),
MEDICAL_PROCESS("medical_process"),
MONEY("money"),
+ MONTH("month"),
NAME("name"),
NAME_FAMILY("name_family"),
NAME_GIVEN("name_given"),
@@ -47,16 +50,19 @@ public enum DetectEntities {
NUMERICAL_PII("numerical_pii"),
OCCUPATION("occupation"),
ORGANIZATION("organization"),
+ ORGANIZATION_ID("organization_id"),
ORGANIZATION_MEDICAL_FACILITY("organization_medical_facility"),
ORIGIN("origin"),
PASSPORT_NUMBER("passport_number"),
PASSWORD("password"),
PHONE_NUMBER("phone_number"),
+ PROJECT("project"),
PHYSICAL_ATTRIBUTE("physical_attribute"),
POLITICAL_AFFILIATION("political_affiliation"),
PRODUCT("product"),
RELIGION("religion"),
ROUTING_NUMBER("routing_number"),
+ SEXUALITY("sexuality"),
SSN("ssn"),
STATISTICS("statistics"),
TIME("time"),
@@ -64,6 +70,7 @@ public enum DetectEntities {
URL("url"),
USERNAME("username"),
VEHICLE_ID("vehicle_id"),
+ YEAR("year"),
ZODIAC_SIGN("zodiac_sign");
private final String detectEntities;
diff --git a/src/main/java/com/skyflow/errors/ErrorMessage.java b/src/main/java/com/skyflow/errors/ErrorMessage.java
index df075bca..6070cb75 100644
--- a/src/main/java/com/skyflow/errors/ErrorMessage.java
+++ b/src/main/java/com/skyflow/errors/ErrorMessage.java
@@ -144,6 +144,7 @@ public enum ErrorMessage {
FailedToEncodeFile("%s0 Validation error. Failed to encode the file. Ensure the file is in a supported format and try again."),
FailedToDecodeFileFromResponse("%s0 Failed to decode the file from the response. Ensure the response is valid and try again."),
EmptyFileAndFilePathInDeIdentifyFile("%s0 Validation error. Both file and filePath are empty. Specify either file object or filePath, not both."),
+ VaultTokenFormatIsNotAllowedForFiles("%s0 Validation error. Vault token format is not allowed for deidentify file request."),
PollingForResultsFailed("%s0 API error. Polling for results failed. Unable to retrieve the deidentified file"),
FailedtoSaveProcessedFile("%s0 Validation error. Failed to save the processed file. Ensure the output directory is valid and writable."),
InvalidAudioFileType("%s0 Validation error. The file type is not supported. Specify a valid file type mp3 or wav."),
diff --git a/src/main/java/com/skyflow/generated/rest/ApiClient.java b/src/main/java/com/skyflow/generated/rest/ApiClient.java
index 296a553f..7c5ae554 100644
--- a/src/main/java/com/skyflow/generated/rest/ApiClient.java
+++ b/src/main/java/com/skyflow/generated/rest/ApiClient.java
@@ -8,8 +8,8 @@
import com.skyflow.generated.rest.resources.audit.AuditClient;
import com.skyflow.generated.rest.resources.authentication.AuthenticationClient;
import com.skyflow.generated.rest.resources.binlookup.BinLookupClient;
-import com.skyflow.generated.rest.resources.deprecated.DeprecatedClient;
import com.skyflow.generated.rest.resources.files.FilesClient;
+import com.skyflow.generated.rest.resources.guardrails.GuardrailsClient;
import com.skyflow.generated.rest.resources.query.QueryClient;
import com.skyflow.generated.rest.resources.records.RecordsClient;
import com.skyflow.generated.rest.resources.strings.StringsClient;
@@ -31,7 +31,7 @@ public class ApiClient {
protected final Supplier authenticationClient;
- protected final Supplier deprecatedClient;
+ protected final Supplier guardrailsClient;
protected final Supplier stringsClient;
@@ -45,7 +45,7 @@ public ApiClient(ClientOptions clientOptions) {
this.tokensClient = Suppliers.memoize(() -> new TokensClient(clientOptions));
this.queryClient = Suppliers.memoize(() -> new QueryClient(clientOptions));
this.authenticationClient = Suppliers.memoize(() -> new AuthenticationClient(clientOptions));
- this.deprecatedClient = Suppliers.memoize(() -> new DeprecatedClient(clientOptions));
+ this.guardrailsClient = Suppliers.memoize(() -> new GuardrailsClient(clientOptions));
this.stringsClient = Suppliers.memoize(() -> new StringsClient(clientOptions));
this.filesClient = Suppliers.memoize(() -> new FilesClient(clientOptions));
}
@@ -74,8 +74,8 @@ public AuthenticationClient authentication() {
return this.authenticationClient.get();
}
- public DeprecatedClient deprecated() {
- return this.deprecatedClient.get();
+ public GuardrailsClient guardrails() {
+ return this.guardrailsClient.get();
}
public StringsClient strings() {
diff --git a/src/main/java/com/skyflow/generated/rest/AsyncApiClient.java b/src/main/java/com/skyflow/generated/rest/AsyncApiClient.java
index d36c8141..1fb7b844 100644
--- a/src/main/java/com/skyflow/generated/rest/AsyncApiClient.java
+++ b/src/main/java/com/skyflow/generated/rest/AsyncApiClient.java
@@ -8,8 +8,8 @@
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.guardrails.AsyncGuardrailsClient;
import com.skyflow.generated.rest.resources.query.AsyncQueryClient;
import com.skyflow.generated.rest.resources.records.AsyncRecordsClient;
import com.skyflow.generated.rest.resources.strings.AsyncStringsClient;
@@ -31,7 +31,7 @@ public class AsyncApiClient {
protected final Supplier authenticationClient;
- protected final Supplier deprecatedClient;
+ protected final Supplier guardrailsClient;
protected final Supplier stringsClient;
@@ -45,7 +45,7 @@ public AsyncApiClient(ClientOptions 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.guardrailsClient = Suppliers.memoize(() -> new AsyncGuardrailsClient(clientOptions));
this.stringsClient = Suppliers.memoize(() -> new AsyncStringsClient(clientOptions));
this.filesClient = Suppliers.memoize(() -> new AsyncFilesClient(clientOptions));
}
@@ -74,8 +74,8 @@ public AsyncAuthenticationClient authentication() {
return this.authenticationClient.get();
}
- public AsyncDeprecatedClient deprecated() {
- return this.deprecatedClient.get();
+ public AsyncGuardrailsClient guardrails() {
+ return this.guardrailsClient.get();
}
public AsyncStringsClient strings() {
diff --git a/src/main/java/com/skyflow/generated/rest/core/ApiClientApiException.java b/src/main/java/com/skyflow/generated/rest/core/ApiClientApiException.java
index a4487b1e..4fab1d41 100644
--- a/src/main/java/com/skyflow/generated/rest/core/ApiClientApiException.java
+++ b/src/main/java/com/skyflow/generated/rest/core/ApiClientApiException.java
@@ -65,7 +65,7 @@ public Map> headers() {
return this.headers;
}
- @java.lang.Override
+ @Override
public String toString() {
return "ApiClientApiException{" + "message: " + getMessage() + ", statusCode: " + statusCode + ", body: " + body
+ "}";
diff --git a/src/main/java/com/skyflow/generated/rest/core/ClientOptions.java b/src/main/java/com/skyflow/generated/rest/core/ClientOptions.java
index badaddd3..62a6ddd4 100644
--- a/src/main/java/com/skyflow/generated/rest/core/ClientOptions.java
+++ b/src/main/java/com/skyflow/generated/rest/core/ClientOptions.java
@@ -34,7 +34,7 @@ private ClientOptions(
{
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.skyflow.fern:api-sdk");
- put("X-Fern-SDK-Version", "0.0.219");
+ put("X-Fern-SDK-Version", "0.0.305");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/skyflow/generated/rest/core/QueryStringMapperTest.java b/src/main/java/com/skyflow/generated/rest/core/QueryStringMapperTest.java
deleted file mode 100644
index c5728721..00000000
--- a/src/main/java/com/skyflow/generated/rest/core/QueryStringMapperTest.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.skyflow.generated.rest.core;
-
-import java.time.Instant;
-import java.time.OffsetDateTime;
-import java.time.ZoneId;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import okhttp3.HttpUrl;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-public final class QueryStringMapperTest {
- @Test
- public void testObjectWithQuotedString_indexedArrays() {
- Map map = new HashMap() {
- {
- put("hello", "\"world\"");
- }
- };
-
- String expectedQueryString = "withquoted%5Bhello%5D=%22world%22";
-
- String actualQueryString = queryString(
- new HashMap() {
- {
- put("withquoted", map);
- }
- },
- false);
-
- Assertions.assertEquals(expectedQueryString, actualQueryString);
- }
-
- @Test
- public void testObjectWithQuotedString_arraysAsRepeats() {
- Map map = new HashMap() {
- {
- put("hello", "\"world\"");
- }
- };
-
- String expectedQueryString = "withquoted%5Bhello%5D=%22world%22";
-
- String actualQueryString = queryString(
- new HashMap() {
- {
- put("withquoted", map);
- }
- },
- true);
-
- Assertions.assertEquals(expectedQueryString, actualQueryString);
- }
-
- @Test
- public void testObject_indexedArrays() {
- Map map = new HashMap() {
- {
- put("foo", "bar");
- put("baz", "qux");
- }
- };
-
- String expectedQueryString = "metadata%5Bfoo%5D=bar&metadata%5Bbaz%5D=qux";
-
- String actualQueryString = queryString(
- new HashMap() {
- {
- put("metadata", map);
- }
- },
- false);
-
- Assertions.assertEquals(expectedQueryString, actualQueryString);
- }
-
- @Test
- public void testObject_arraysAsRepeats() {
- Map map = new HashMap() {
- {
- put("foo", "bar");
- put("baz", "qux");
- }
- };
-
- String expectedQueryString = "metadata%5Bfoo%5D=bar&metadata%5Bbaz%5D=qux";
-
- String actualQueryString = queryString(
- new HashMap() {
- {
- put("metadata", map);
- }
- },
- true);
-
- Assertions.assertEquals(expectedQueryString, actualQueryString);
- }
-
- @Test
- public void testNestedObject_indexedArrays() {
- Map> nestedMap = new HashMap>() {
- {
- put("mapkey1", new HashMap() {
- {
- put("mapkey1mapkey1", "mapkey1mapkey1value");
- put("mapkey1mapkey2", "mapkey1mapkey2value");
- }
- });
- put("mapkey2", new HashMap() {
- {
- put("mapkey2mapkey1", "mapkey2mapkey1value");
- }
- });
- }
- };
-
- String expectedQueryString =
- "nested%5Bmapkey2%5D%5Bmapkey2mapkey1%5D=mapkey2mapkey1value&nested%5Bmapkey1%5D%5Bmapkey1mapkey1"
- + "%5D=mapkey1mapkey1value&nested%5Bmapkey1%5D%5Bmapkey1mapkey2%5D=mapkey1mapkey2value";
-
- String actualQueryString = queryString(
- new HashMap() {
- {
- put("nested", nestedMap);
- }
- },
- false);
-
- Assertions.assertEquals(expectedQueryString, actualQueryString);
- }
-
- @Test
- public void testNestedObject_arraysAsRepeats() {
- Map> nestedMap = new HashMap>() {
- {
- put("mapkey1", new HashMap() {
- {
- put("mapkey1mapkey1", "mapkey1mapkey1value");
- put("mapkey1mapkey2", "mapkey1mapkey2value");
- }
- });
- put("mapkey2", new HashMap() {
- {
- put("mapkey2mapkey1", "mapkey2mapkey1value");
- }
- });
- }
- };
-
- String expectedQueryString =
- "nested%5Bmapkey2%5D%5Bmapkey2mapkey1%5D=mapkey2mapkey1value&nested%5Bmapkey1%5D%5Bmapkey1mapkey1"
- + "%5D=mapkey1mapkey1value&nested%5Bmapkey1%5D%5Bmapkey1mapkey2%5D=mapkey1mapkey2value";
-
- String actualQueryString = queryString(
- new HashMap() {
- {
- put("nested", nestedMap);
- }
- },
- true);
-
- Assertions.assertEquals(expectedQueryString, actualQueryString);
- }
-
- @Test
- public void testDateTime_indexedArrays() {
- OffsetDateTime dateTime =
- OffsetDateTime.ofInstant(Instant.ofEpochSecond(1740412107L), ZoneId.of("America/New_York"));
-
- String expectedQueryString = "datetime=2025-02-24T10%3A48%3A27-05%3A00";
-
- String actualQueryString = queryString(
- new HashMap() {
- {
- put("datetime", dateTime);
- }
- },
- false);
-
- Assertions.assertEquals(expectedQueryString, actualQueryString);
- }
-
- @Test
- public void testDateTime_arraysAsRepeats() {
- OffsetDateTime dateTime =
- OffsetDateTime.ofInstant(Instant.ofEpochSecond(1740412107L), ZoneId.of("America/New_York"));
-
- String expectedQueryString = "datetime=2025-02-24T10%3A48%3A27-05%3A00";
-
- String actualQueryString = queryString(
- new HashMap() {
- {
- put("datetime", dateTime);
- }
- },
- true);
-
- Assertions.assertEquals(expectedQueryString, actualQueryString);
- }
-
- @Test
- public void testObjectArray_indexedArrays() {
- List
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage sortOpsSortBy(String sortOpsSortBy) {
this.sortOpsSortBy = Optional.ofNullable(sortOpsSortBy);
return this;
@@ -1010,7 +1010,7 @@ public _FinalStage sortOpsSortBy(String sortOpsSortBy) {
/**
* Fully-qualified field by which to sort results. Field names should be in camel case (for example, "capitalization.camelCase").
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "sortOps.sortBy", nulls = Nulls.SKIP)
public _FinalStage sortOpsSortBy(Optional sortOpsSortBy) {
this.sortOpsSortBy = sortOpsSortBy;
@@ -1021,7 +1021,7 @@ public _FinalStage sortOpsSortBy(Optional sortOpsSortBy) {
* HTTP URI of the request.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsHttpUri(String filterOpsHttpUri) {
this.filterOpsHttpUri = Optional.ofNullable(filterOpsHttpUri);
return this;
@@ -1030,7 +1030,7 @@ public _FinalStage filterOpsHttpUri(String filterOpsHttpUri) {
/**
* HTTP URI of the request.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.httpURI", nulls = Nulls.SKIP)
public _FinalStage filterOpsHttpUri(Optional filterOpsHttpUri) {
this.filterOpsHttpUri = filterOpsHttpUri;
@@ -1041,7 +1041,7 @@ public _FinalStage filterOpsHttpUri(Optional filterOpsHttpUri) {
* HTTP method of the request.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsHttpMethod(String filterOpsHttpMethod) {
this.filterOpsHttpMethod = Optional.ofNullable(filterOpsHttpMethod);
return this;
@@ -1050,7 +1050,7 @@ public _FinalStage filterOpsHttpMethod(String filterOpsHttpMethod) {
/**
* HTTP method of the request.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.httpMethod", nulls = Nulls.SKIP)
public _FinalStage filterOpsHttpMethod(Optional filterOpsHttpMethod) {
this.filterOpsHttpMethod = filterOpsHttpMethod;
@@ -1061,7 +1061,7 @@ public _FinalStage filterOpsHttpMethod(Optional filterOpsHttpMethod) {
* Response message of the request.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsResponseMessage(String filterOpsResponseMessage) {
this.filterOpsResponseMessage = Optional.ofNullable(filterOpsResponseMessage);
return this;
@@ -1070,7 +1070,7 @@ public _FinalStage filterOpsResponseMessage(String filterOpsResponseMessage) {
/**
* Response message of the request.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.responseMessage", nulls = Nulls.SKIP)
public _FinalStage filterOpsResponseMessage(Optional filterOpsResponseMessage) {
this.filterOpsResponseMessage = filterOpsResponseMessage;
@@ -1081,7 +1081,7 @@ public _FinalStage filterOpsResponseMessage(Optional filterOpsResponseMe
* Name of the API called in the request.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsApiName(String filterOpsApiName) {
this.filterOpsApiName = Optional.ofNullable(filterOpsApiName);
return this;
@@ -1090,7 +1090,7 @@ public _FinalStage filterOpsApiName(String filterOpsApiName) {
/**
* Name of the API called in the request.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.apiName", nulls = Nulls.SKIP)
public _FinalStage filterOpsApiName(Optional filterOpsApiName) {
this.filterOpsApiName = filterOpsApiName;
@@ -1101,7 +1101,7 @@ public _FinalStage filterOpsApiName(Optional filterOpsApiName) {
* End timestamp for the query, in SQL format.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsEndTime(String filterOpsEndTime) {
this.filterOpsEndTime = Optional.ofNullable(filterOpsEndTime);
return this;
@@ -1110,7 +1110,7 @@ public _FinalStage filterOpsEndTime(String filterOpsEndTime) {
/**
* End timestamp for the query, in SQL format.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.endTime", nulls = Nulls.SKIP)
public _FinalStage filterOpsEndTime(Optional filterOpsEndTime) {
this.filterOpsEndTime = filterOpsEndTime;
@@ -1121,7 +1121,7 @@ public _FinalStage filterOpsEndTime(Optional filterOpsEndTime) {
* Start timestamp for the query, in SQL format.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsStartTime(String filterOpsStartTime) {
this.filterOpsStartTime = Optional.ofNullable(filterOpsStartTime);
return this;
@@ -1130,7 +1130,7 @@ public _FinalStage filterOpsStartTime(String filterOpsStartTime) {
/**
* Start timestamp for the query, in SQL format.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.startTime", nulls = Nulls.SKIP)
public _FinalStage filterOpsStartTime(Optional filterOpsStartTime) {
this.filterOpsStartTime = filterOpsStartTime;
@@ -1141,7 +1141,7 @@ public _FinalStage filterOpsStartTime(Optional filterOpsStartTime) {
* HTTP response code of the request.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsResponseCode(Integer filterOpsResponseCode) {
this.filterOpsResponseCode = Optional.ofNullable(filterOpsResponseCode);
return this;
@@ -1150,7 +1150,7 @@ public _FinalStage filterOpsResponseCode(Integer filterOpsResponseCode) {
/**
* HTTP response code of the request.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.responseCode", nulls = Nulls.SKIP)
public _FinalStage filterOpsResponseCode(Optional filterOpsResponseCode) {
this.filterOpsResponseCode = filterOpsResponseCode;
@@ -1161,7 +1161,7 @@ public _FinalStage filterOpsResponseCode(Optional filterOpsResponseCode
* Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, "login, get".
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsTags(String filterOpsTags) {
this.filterOpsTags = Optional.ofNullable(filterOpsTags);
return this;
@@ -1170,7 +1170,7 @@ public _FinalStage filterOpsTags(String filterOpsTags) {
/**
* Events with associated tags. If an event matches at least one tag, the event is returned. Comma-separated list. For example, "login, get".
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.tags", nulls = Nulls.SKIP)
public _FinalStage filterOpsTags(Optional filterOpsTags) {
this.filterOpsTags = filterOpsTags;
@@ -1181,7 +1181,7 @@ public _FinalStage filterOpsTags(Optional filterOpsTags) {
* Resources with the specified type.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsResourceType(
AuditServiceListAuditEventsRequestFilterOpsResourceType filterOpsResourceType) {
this.filterOpsResourceType = Optional.ofNullable(filterOpsResourceType);
@@ -1191,7 +1191,7 @@ public _FinalStage filterOpsResourceType(
/**
* Resources with the specified type.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.resourceType", nulls = Nulls.SKIP)
public _FinalStage filterOpsResourceType(
Optional filterOpsResourceType) {
@@ -1203,7 +1203,7 @@ public _FinalStage filterOpsResourceType(
* Events with the specified action type.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsActionType(
AuditServiceListAuditEventsRequestFilterOpsActionType filterOpsActionType) {
this.filterOpsActionType = Optional.ofNullable(filterOpsActionType);
@@ -1213,7 +1213,7 @@ public _FinalStage filterOpsActionType(
/**
* Events with the specified action type.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.actionType", nulls = Nulls.SKIP)
public _FinalStage filterOpsActionType(
Optional filterOpsActionType) {
@@ -1225,7 +1225,7 @@ public _FinalStage filterOpsActionType(
* 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".
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsResourceIDs(String filterOpsResourceIDs) {
this.filterOpsResourceIDs = Optional.ofNullable(filterOpsResourceIDs);
return this;
@@ -1234,7 +1234,7 @@ public _FinalStage filterOpsResourceIDs(String 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".
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.resourceIDs", nulls = Nulls.SKIP)
public _FinalStage filterOpsResourceIDs(Optional filterOpsResourceIDs) {
this.filterOpsResourceIDs = filterOpsResourceIDs;
@@ -1245,7 +1245,7 @@ public _FinalStage filterOpsResourceIDs(Optional filterOpsResourceIDs) {
* Resources with the specified vault ID.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsVaultId(String filterOpsVaultId) {
this.filterOpsVaultId = Optional.ofNullable(filterOpsVaultId);
return this;
@@ -1254,7 +1254,7 @@ public _FinalStage filterOpsVaultId(String filterOpsVaultId) {
/**
* Resources with the specified vault ID.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.vaultID", nulls = Nulls.SKIP)
public _FinalStage filterOpsVaultId(Optional filterOpsVaultId) {
this.filterOpsVaultId = filterOpsVaultId;
@@ -1265,7 +1265,7 @@ public _FinalStage filterOpsVaultId(Optional filterOpsVaultId) {
* Resources with the specified workspace ID.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsWorkspaceId(String filterOpsWorkspaceId) {
this.filterOpsWorkspaceId = Optional.ofNullable(filterOpsWorkspaceId);
return this;
@@ -1274,7 +1274,7 @@ public _FinalStage filterOpsWorkspaceId(String filterOpsWorkspaceId) {
/**
* Resources with the specified workspace ID.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.workspaceID", nulls = Nulls.SKIP)
public _FinalStage filterOpsWorkspaceId(Optional filterOpsWorkspaceId) {
this.filterOpsWorkspaceId = filterOpsWorkspaceId;
@@ -1285,7 +1285,7 @@ public _FinalStage filterOpsWorkspaceId(Optional filterOpsWorkspaceId) {
* Resources with the specified parent account ID.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsParentAccountId(String filterOpsParentAccountId) {
this.filterOpsParentAccountId = Optional.ofNullable(filterOpsParentAccountId);
return this;
@@ -1294,7 +1294,7 @@ public _FinalStage filterOpsParentAccountId(String filterOpsParentAccountId) {
/**
* Resources with the specified parent account ID.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.parentAccountID", nulls = Nulls.SKIP)
public _FinalStage filterOpsParentAccountId(Optional filterOpsParentAccountId) {
this.filterOpsParentAccountId = filterOpsParentAccountId;
@@ -1305,7 +1305,7 @@ public _FinalStage filterOpsParentAccountId(Optional filterOpsParentAcco
* Embedded User Context.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextBearerTokenContextId(String filterOpsContextBearerTokenContextId) {
this.filterOpsContextBearerTokenContextId = Optional.ofNullable(filterOpsContextBearerTokenContextId);
return this;
@@ -1314,7 +1314,7 @@ public _FinalStage filterOpsContextBearerTokenContextId(String filterOpsContextB
/**
* Embedded User Context.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.bearerTokenContextID", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextBearerTokenContextId(Optional filterOpsContextBearerTokenContextId) {
this.filterOpsContextBearerTokenContextId = filterOpsContextBearerTokenContextId;
@@ -1325,7 +1325,7 @@ public _FinalStage filterOpsContextBearerTokenContextId(Optional filterO
* ID of the JWT token.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextJwtId(String filterOpsContextJwtId) {
this.filterOpsContextJwtId = Optional.ofNullable(filterOpsContextJwtId);
return this;
@@ -1334,7 +1334,7 @@ public _FinalStage filterOpsContextJwtId(String filterOpsContextJwtId) {
/**
* ID of the JWT token.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.jwtID", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextJwtId(Optional filterOpsContextJwtId) {
this.filterOpsContextJwtId = filterOpsContextJwtId;
@@ -1345,7 +1345,7 @@ public _FinalStage filterOpsContextJwtId(Optional filterOpsContextJwtId)
* Authentication mode the actor used.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextAuthMode(
AuditServiceListAuditEventsRequestFilterOpsContextAuthMode filterOpsContextAuthMode) {
this.filterOpsContextAuthMode = Optional.ofNullable(filterOpsContextAuthMode);
@@ -1355,7 +1355,7 @@ public _FinalStage filterOpsContextAuthMode(
/**
* Authentication mode the actor used.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.authMode", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextAuthMode(
Optional filterOpsContextAuthMode) {
@@ -1367,7 +1367,7 @@ public _FinalStage filterOpsContextAuthMode(
* HTTP Origin request header (including scheme, hostname, and port) of the request.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextOrigin(String filterOpsContextOrigin) {
this.filterOpsContextOrigin = Optional.ofNullable(filterOpsContextOrigin);
return this;
@@ -1376,7 +1376,7 @@ public _FinalStage filterOpsContextOrigin(String filterOpsContextOrigin) {
/**
* HTTP Origin request header (including scheme, hostname, and port) of the request.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.origin", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextOrigin(Optional filterOpsContextOrigin) {
this.filterOpsContextOrigin = filterOpsContextOrigin;
@@ -1387,7 +1387,7 @@ public _FinalStage filterOpsContextOrigin(Optional filterOpsContextOrigi
* IP Address of the client that made the request.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextIpAddress(String filterOpsContextIpAddress) {
this.filterOpsContextIpAddress = Optional.ofNullable(filterOpsContextIpAddress);
return this;
@@ -1396,7 +1396,7 @@ public _FinalStage filterOpsContextIpAddress(String filterOpsContextIpAddress) {
/**
* IP Address of the client that made the request.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.ipAddress", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextIpAddress(Optional filterOpsContextIpAddress) {
this.filterOpsContextIpAddress = filterOpsContextIpAddress;
@@ -1407,7 +1407,7 @@ public _FinalStage filterOpsContextIpAddress(Optional filterOpsContextIp
* Type of access for the request.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextAccessType(
AuditServiceListAuditEventsRequestFilterOpsContextAccessType filterOpsContextAccessType) {
this.filterOpsContextAccessType = Optional.ofNullable(filterOpsContextAccessType);
@@ -1417,7 +1417,7 @@ public _FinalStage filterOpsContextAccessType(
/**
* Type of access for the request.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.accessType", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextAccessType(
Optional filterOpsContextAccessType) {
@@ -1429,7 +1429,7 @@ public _FinalStage filterOpsContextAccessType(
* Type of member who sent the request.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextActorType(
AuditServiceListAuditEventsRequestFilterOpsContextActorType filterOpsContextActorType) {
this.filterOpsContextActorType = Optional.ofNullable(filterOpsContextActorType);
@@ -1439,7 +1439,7 @@ public _FinalStage filterOpsContextActorType(
/**
* Type of member who sent the request.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.actorType", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextActorType(
Optional filterOpsContextActorType) {
@@ -1451,7 +1451,7 @@ public _FinalStage filterOpsContextActorType(
* Member who sent the request. Depending on actorType, this may be a user ID or a service account ID.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextActor(String filterOpsContextActor) {
this.filterOpsContextActor = Optional.ofNullable(filterOpsContextActor);
return this;
@@ -1460,7 +1460,7 @@ public _FinalStage filterOpsContextActor(String filterOpsContextActor) {
/**
* Member who sent the request. Depending on actorType, this may be a user ID or a service account ID.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.actor", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextActor(Optional filterOpsContextActor) {
this.filterOpsContextActor = filterOpsContextActor;
@@ -1471,7 +1471,7 @@ public _FinalStage filterOpsContextActor(Optional filterOpsContextActor)
* ID for the session in which the request was sent.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextSessionId(String filterOpsContextSessionId) {
this.filterOpsContextSessionId = Optional.ofNullable(filterOpsContextSessionId);
return this;
@@ -1480,7 +1480,7 @@ public _FinalStage filterOpsContextSessionId(String filterOpsContextSessionId) {
/**
* ID for the session in which the request was sent.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.sessionID", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextSessionId(Optional filterOpsContextSessionId) {
this.filterOpsContextSessionId = filterOpsContextSessionId;
@@ -1491,7 +1491,7 @@ public _FinalStage filterOpsContextSessionId(Optional filterOpsContextSe
* ID for the request set by the service that received the request.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextTraceId(String filterOpsContextTraceId) {
this.filterOpsContextTraceId = Optional.ofNullable(filterOpsContextTraceId);
return this;
@@ -1500,7 +1500,7 @@ public _FinalStage filterOpsContextTraceId(String filterOpsContextTraceId) {
/**
* ID for the request set by the service that received the request.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.traceID", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextTraceId(Optional filterOpsContextTraceId) {
this.filterOpsContextTraceId = filterOpsContextTraceId;
@@ -1511,7 +1511,7 @@ public _FinalStage filterOpsContextTraceId(Optional filterOpsContextTrac
* ID for the request that caused the event.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextRequestId(String filterOpsContextRequestId) {
this.filterOpsContextRequestId = Optional.ofNullable(filterOpsContextRequestId);
return this;
@@ -1520,7 +1520,7 @@ public _FinalStage filterOpsContextRequestId(String filterOpsContextRequestId) {
/**
* ID for the request that caused the event.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.requestID", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextRequestId(Optional filterOpsContextRequestId) {
this.filterOpsContextRequestId = filterOpsContextRequestId;
@@ -1531,7 +1531,7 @@ public _FinalStage filterOpsContextRequestId(Optional filterOpsContextRe
* ID for the audit event.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage filterOpsContextChangeId(String filterOpsContextChangeId) {
this.filterOpsContextChangeId = Optional.ofNullable(filterOpsContextChangeId);
return this;
@@ -1540,14 +1540,14 @@ public _FinalStage filterOpsContextChangeId(String filterOpsContextChangeId) {
/**
* ID for the audit event.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "filterOps.context.changeID", nulls = Nulls.SKIP)
public _FinalStage filterOpsContextChangeId(Optional filterOpsContextChangeId) {
this.filterOpsContextChangeId = filterOpsContextChangeId;
return this;
}
- @java.lang.Override
+ @Override
public AuditServiceListAuditEventsRequest build() {
return new AuditServiceListAuditEventsRequest(
filterOpsContextChangeId,
diff --git a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsActionType.java b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsActionType.java
index a9fb6d44..9611f8ab 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsActionType.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsActionType.java
@@ -49,7 +49,7 @@ public enum AuditServiceListAuditEventsRequestFilterOpsActionType {
}
@JsonValue
- @java.lang.Override
+ @Override
public String toString() {
return this.value;
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextAccessType.java b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextAccessType.java
index 0b082305..44ac80d9 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextAccessType.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextAccessType.java
@@ -21,7 +21,7 @@ public enum AuditServiceListAuditEventsRequestFilterOpsContextAccessType {
}
@JsonValue
- @java.lang.Override
+ @Override
public String toString() {
return this.value;
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextActorType.java b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextActorType.java
index 76a357f4..1948ea9c 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextActorType.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextActorType.java
@@ -19,7 +19,7 @@ public enum AuditServiceListAuditEventsRequestFilterOpsContextActorType {
}
@JsonValue
- @java.lang.Override
+ @Override
public String toString() {
return this.value;
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextAuthMode.java b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextAuthMode.java
index cfca2e35..82c375aa 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextAuthMode.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsContextAuthMode.java
@@ -21,7 +21,7 @@ public enum AuditServiceListAuditEventsRequestFilterOpsContextAuthMode {
}
@JsonValue
- @java.lang.Override
+ @Override
public String toString() {
return this.value;
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsResourceType.java b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsResourceType.java
index f5d2eafe..864213ec 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsResourceType.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestFilterOpsResourceType.java
@@ -73,7 +73,7 @@ public enum AuditServiceListAuditEventsRequestFilterOpsResourceType {
}
@JsonValue
- @java.lang.Override
+ @Override
public String toString() {
return this.value;
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestSortOpsOrderBy.java b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestSortOpsOrderBy.java
index 51fc2715..fe3f928e 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestSortOpsOrderBy.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/audit/types/AuditServiceListAuditEventsRequestSortOpsOrderBy.java
@@ -17,7 +17,7 @@ public enum AuditServiceListAuditEventsRequestSortOpsOrderBy {
}
@JsonValue
- @java.lang.Override
+ @Override
public String toString() {
return this.value;
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/authentication/requests/V1GetAuthTokenRequest.java b/src/main/java/com/skyflow/generated/rest/resources/authentication/requests/V1GetAuthTokenRequest.java
index 8c4961b1..182952bc 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/authentication/requests/V1GetAuthTokenRequest.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/authentication/requests/V1GetAuthTokenRequest.java
@@ -100,7 +100,7 @@ public Optional getScope() {
return scope;
}
- @java.lang.Override
+ @Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof V1GetAuthTokenRequest && equalTo((V1GetAuthTokenRequest) other);
@@ -120,7 +120,7 @@ private boolean equalTo(V1GetAuthTokenRequest other) {
&& scope.equals(other.scope);
}
- @java.lang.Override
+ @Override
public int hashCode() {
return Objects.hash(
this.grantType,
@@ -131,7 +131,7 @@ public int hashCode() {
this.scope);
}
- @java.lang.Override
+ @Override
public String toString() {
return ObjectMappers.stringify(this);
}
@@ -207,7 +207,7 @@ public static final class Builder implements GrantTypeStage, AssertionStage, _Fi
private Builder() {}
- @java.lang.Override
+ @Override
public Builder from(V1GetAuthTokenRequest other) {
grantType(other.getGrantType());
assertion(other.getAssertion());
@@ -222,7 +222,7 @@ public Builder from(V1GetAuthTokenRequest other) {
* Grant type of the request. Set this to `urn:ietf:params:oauth:grant-type:jwt-bearer`.Grant type of the request. Set this to urn:ietf:params:oauth:grant-type:jwt-bearer.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
@JsonSetter("grant_type")
public AssertionStage grantType(@NotNull String grantType) {
this.grantType = Objects.requireNonNull(grantType, "grantType must not be null");
@@ -233,7 +233,7 @@ public AssertionStage grantType(@NotNull String grantType) {
* User-signed JWT token that contains the following fields:
iss: Issuer of the JWT.key: Unique identifier for the key.aud: Recipient the JWT is intended for.exp: Time the JWT expires.sub: Subject of the JWT.ctx: (Optional) Value for Context-aware authorization.
User-signed JWT token that contains the following fields: <br/> <ul><li><code>iss</code>: Issuer of the JWT.</li><li><code>key</code>: Unique identifier for the key.</li><li><code>aud</code>: Recipient the JWT is intended for.</li><li><code>exp</code>: Time the JWT expires.</li><li><code>sub</code>: Subject of the JWT.</li><li><code>ctx</code>: (Optional) Value for <a href='/context-aware-overview/'>Context-aware authorization</a>.</li></ul>
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
@JsonSetter("assertion")
public _FinalStage assertion(@NotNull String assertion) {
this.assertion = Objects.requireNonNull(assertion, "assertion must not be null");
@@ -244,7 +244,7 @@ public _FinalStage assertion(@NotNull String assertion) {
* Subset of available <a href='#Roles'>roles</a> to associate with the requested token. Uses the format "role:<roleID1> role:<roleID2>".
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage scope(String scope) {
this.scope = Optional.ofNullable(scope);
return this;
@@ -253,7 +253,7 @@ public _FinalStage scope(String scope) {
/**
* Subset of available <a href='#Roles'>roles</a> to associate with the requested token. Uses the format "role:<roleID1> role:<roleID2>".
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "scope", nulls = Nulls.SKIP)
public _FinalStage scope(Optional scope) {
this.scope = scope;
@@ -264,7 +264,7 @@ public _FinalStage scope(Optional scope) {
* Token use type. Either delegation or impersonation.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage requestedTokenUse(String requestedTokenUse) {
this.requestedTokenUse = Optional.ofNullable(requestedTokenUse);
return this;
@@ -273,7 +273,7 @@ public _FinalStage requestedTokenUse(String requestedTokenUse) {
/**
* Token use type. Either delegation or impersonation.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "requested_token_use", nulls = Nulls.SKIP)
public _FinalStage requestedTokenUse(Optional requestedTokenUse) {
this.requestedTokenUse = requestedTokenUse;
@@ -284,7 +284,7 @@ public _FinalStage requestedTokenUse(Optional requestedTokenUse) {
* Subject token type.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage subjectTokenType(String subjectTokenType) {
this.subjectTokenType = Optional.ofNullable(subjectTokenType);
return this;
@@ -293,7 +293,7 @@ public _FinalStage subjectTokenType(String subjectTokenType) {
/**
* Subject token type.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "subject_token_type", nulls = Nulls.SKIP)
public _FinalStage subjectTokenType(Optional subjectTokenType) {
this.subjectTokenType = subjectTokenType;
@@ -304,7 +304,7 @@ public _FinalStage subjectTokenType(Optional subjectTokenType) {
* Subject token.
* @return Reference to {@code this} so that method calls can be chained together.
*/
- @java.lang.Override
+ @Override
public _FinalStage subjectToken(String subjectToken) {
this.subjectToken = Optional.ofNullable(subjectToken);
return this;
@@ -313,14 +313,14 @@ public _FinalStage subjectToken(String subjectToken) {
/**
* Subject token.
*/
- @java.lang.Override
+ @Override
@JsonSetter(value = "subject_token", nulls = Nulls.SKIP)
public _FinalStage subjectToken(Optional subjectToken) {
this.subjectToken = subjectToken;
return this;
}
- @java.lang.Override
+ @Override
public V1GetAuthTokenRequest build() {
return new V1GetAuthTokenRequest(
grantType,
diff --git a/src/main/java/com/skyflow/generated/rest/resources/binlookup/requests/V1BinListRequest.java b/src/main/java/com/skyflow/generated/rest/resources/binlookup/requests/V1BinListRequest.java
index d4a1c21b..af827e01 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/binlookup/requests/V1BinListRequest.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/binlookup/requests/V1BinListRequest.java
@@ -74,7 +74,7 @@ public Optional getSkyflowId() {
return skyflowId;
}
- @java.lang.Override
+ @Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof V1BinListRequest && equalTo((V1BinListRequest) other);
@@ -92,12 +92,12 @@ private boolean equalTo(V1BinListRequest other) {
&& skyflowId.equals(other.skyflowId);
}
- @java.lang.Override
+ @Override
public int hashCode() {
return Objects.hash(this.fields, this.bin, this.vaultSchemaConfig, this.skyflowId);
}
- @java.lang.Override
+ @Override
public String toString() {
return ObjectMappers.stringify(this);
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/deprecated/AsyncDeprecatedClient.java b/src/main/java/com/skyflow/generated/rest/resources/deprecated/AsyncDeprecatedClient.java
deleted file mode 100644
index c1709f7f..00000000
--- a/src/main/java/com/skyflow/generated/rest/resources/deprecated/AsyncDeprecatedClient.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.skyflow.generated.rest.resources.deprecated;
-
-import com.skyflow.generated.rest.core.ClientOptions;
-import com.skyflow.generated.rest.core.RequestOptions;
-import com.skyflow.generated.rest.resources.deprecated.requests.DetectServiceDetectStatusRequest;
-import com.skyflow.generated.rest.resources.deprecated.requests.DetectServiceDetectTextRequest;
-import com.skyflow.generated.rest.resources.deprecated.requests.V1DetectFileRequest;
-import com.skyflow.generated.rest.types.V1DetectFileResponse;
-import com.skyflow.generated.rest.types.V1DetectStatusResponse;
-import com.skyflow.generated.rest.types.V1DetectTextResponse;
-import java.util.concurrent.CompletableFuture;
-
-public class AsyncDeprecatedClient {
- protected final ClientOptions clientOptions;
-
- private final AsyncRawDeprecatedClient rawClient;
-
- public AsyncDeprecatedClient(ClientOptions clientOptions) {
- this.clientOptions = clientOptions;
- this.rawClient = new AsyncRawDeprecatedClient(clientOptions);
- }
-
- /**
- * Get responses with HTTP metadata like headers
- */
- public AsyncRawDeprecatedClient withRawResponse() {
- return this.rawClient;
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use one of the <a href=#De-identify%20File>De-identify File</a> operations.<br/><br/>Detects and deidentifies sensitive data from image, audio, and video files.
- */
- public CompletableFuture detectServiceDetectFileInput(V1DetectFileRequest request) {
- return this.rawClient.detectServiceDetectFileInput(request).thenApply(response -> response.body());
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use one of the <a href=#De-identify%20File>De-identify File</a> operations.<br/><br/>Detects and deidentifies sensitive data from image, audio, and video files.
- */
- public CompletableFuture detectServiceDetectFileInput(
- V1DetectFileRequest request, RequestOptions requestOptions) {
- return this.rawClient
- .detectServiceDetectFileInput(request, requestOptions)
- .thenApply(response -> response.body());
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public CompletableFuture detectServiceDetectStatus(String id) {
- return this.rawClient.detectServiceDetectStatus(id).thenApply(response -> response.body());
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public CompletableFuture detectServiceDetectStatus(
- String id, DetectServiceDetectStatusRequest request) {
- return this.rawClient.detectServiceDetectStatus(id, request).thenApply(response -> response.body());
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public CompletableFuture detectServiceDetectStatus(
- String id, DetectServiceDetectStatusRequest request, RequestOptions requestOptions) {
- return this.rawClient
- .detectServiceDetectStatus(id, request, requestOptions)
- .thenApply(response -> response.body());
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#deidentify_string>De-identify String</a>.<br/><br/>Detects and deidentifies sensitive data from text.
- */
- public CompletableFuture detectServiceDetectText(DetectServiceDetectTextRequest request) {
- return this.rawClient.detectServiceDetectText(request).thenApply(response -> response.body());
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#deidentify_string>De-identify String</a>.<br/><br/>Detects and deidentifies sensitive data from text.
- */
- public CompletableFuture detectServiceDetectText(
- DetectServiceDetectTextRequest request, RequestOptions requestOptions) {
- return this.rawClient.detectServiceDetectText(request, requestOptions).thenApply(response -> response.body());
- }
-}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/deprecated/AsyncRawDeprecatedClient.java b/src/main/java/com/skyflow/generated/rest/resources/deprecated/AsyncRawDeprecatedClient.java
deleted file mode 100644
index 9c9ec79a..00000000
--- a/src/main/java/com/skyflow/generated/rest/resources/deprecated/AsyncRawDeprecatedClient.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.skyflow.generated.rest.resources.deprecated;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.skyflow.generated.rest.core.ApiClientApiException;
-import com.skyflow.generated.rest.core.ApiClientException;
-import com.skyflow.generated.rest.core.ApiClientHttpResponse;
-import com.skyflow.generated.rest.core.ClientOptions;
-import com.skyflow.generated.rest.core.MediaTypes;
-import com.skyflow.generated.rest.core.ObjectMappers;
-import com.skyflow.generated.rest.core.QueryStringMapper;
-import com.skyflow.generated.rest.core.RequestOptions;
-import com.skyflow.generated.rest.errors.NotFoundError;
-import com.skyflow.generated.rest.resources.deprecated.requests.DetectServiceDetectStatusRequest;
-import com.skyflow.generated.rest.resources.deprecated.requests.DetectServiceDetectTextRequest;
-import com.skyflow.generated.rest.resources.deprecated.requests.V1DetectFileRequest;
-import com.skyflow.generated.rest.types.V1DetectFileResponse;
-import com.skyflow.generated.rest.types.V1DetectStatusResponse;
-import com.skyflow.generated.rest.types.V1DetectTextResponse;
-import java.io.IOException;
-import java.util.concurrent.CompletableFuture;
-import okhttp3.Call;
-import okhttp3.Callback;
-import okhttp3.Headers;
-import okhttp3.HttpUrl;
-import okhttp3.OkHttpClient;
-import okhttp3.Request;
-import okhttp3.RequestBody;
-import okhttp3.Response;
-import okhttp3.ResponseBody;
-import org.jetbrains.annotations.NotNull;
-
-public class AsyncRawDeprecatedClient {
- protected final ClientOptions clientOptions;
-
- public AsyncRawDeprecatedClient(ClientOptions clientOptions) {
- this.clientOptions = clientOptions;
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use one of the <a href=#De-identify%20File>De-identify File</a> operations.<br/><br/>Detects and deidentifies sensitive data from image, audio, and video files.
- */
- public CompletableFuture> detectServiceDetectFileInput(
- V1DetectFileRequest request) {
- return detectServiceDetectFileInput(request, null);
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use one of the <a href=#De-identify%20File>De-identify File</a> operations.<br/><br/>Detects and deidentifies sensitive data from image, audio, and video files.
- */
- public CompletableFuture> detectServiceDetectFileInput(
- V1DetectFileRequest request, RequestOptions requestOptions) {
- HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
- .newBuilder()
- .addPathSegments("v1/detect/file")
- .build();
- RequestBody body;
- try {
- body = RequestBody.create(
- ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
- } catch (JsonProcessingException e) {
- throw new ApiClientException("Failed to serialize request", e);
- }
- Request okhttpRequest = new Request.Builder()
- .url(httpUrl)
- .method("POST", body)
- .headers(Headers.of(clientOptions.headers(requestOptions)))
- .addHeader("Content-Type", "application/json")
- .addHeader("Accept", "application/json")
- .build();
- OkHttpClient client = clientOptions.httpClient();
- if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
- client = clientOptions.httpClientWithTimeout(requestOptions);
- }
- CompletableFuture> future = new CompletableFuture<>();
- client.newCall(okhttpRequest).enqueue(new Callback() {
- @Override
- public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
- try (ResponseBody responseBody = response.body()) {
- if (response.isSuccessful()) {
- future.complete(new ApiClientHttpResponse<>(
- ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), V1DetectFileResponse.class),
- response));
- return;
- }
- String responseBodyString = responseBody != null ? responseBody.string() : "{}";
- try {
- if (response.code() == 404) {
- future.completeExceptionally(new NotFoundError(
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response));
- return;
- }
- } catch (JsonProcessingException ignored) {
- // unable to map error response, throwing generic error
- }
- future.completeExceptionally(new ApiClientApiException(
- "Error with status code " + response.code(),
- response.code(),
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
- response));
- return;
- } catch (IOException e) {
- future.completeExceptionally(new ApiClientException("Network error executing HTTP request", e));
- }
- }
-
- @Override
- public void onFailure(@NotNull Call call, @NotNull IOException e) {
- future.completeExceptionally(new ApiClientException("Network error executing HTTP request", e));
- }
- });
- return future;
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public CompletableFuture> detectServiceDetectStatus(String id) {
- return detectServiceDetectStatus(
- id, DetectServiceDetectStatusRequest.builder().build());
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public CompletableFuture> detectServiceDetectStatus(
- String id, DetectServiceDetectStatusRequest request) {
- return detectServiceDetectStatus(id, request, null);
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public CompletableFuture> detectServiceDetectStatus(
- String id, DetectServiceDetectStatusRequest request, RequestOptions requestOptions) {
- HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
- .newBuilder()
- .addPathSegments("v1/detect/status")
- .addPathSegment(id);
- if (request.getVaultId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "vault_id", request.getVaultId().get(), false);
- }
- Request.Builder _requestBuilder = new Request.Builder()
- .url(httpUrl.build())
- .method("GET", null)
- .headers(Headers.of(clientOptions.headers(requestOptions)))
- .addHeader("Accept", "application/json");
- Request okhttpRequest = _requestBuilder.build();
- OkHttpClient client = clientOptions.httpClient();
- if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
- client = clientOptions.httpClientWithTimeout(requestOptions);
- }
- CompletableFuture> future = new CompletableFuture<>();
- client.newCall(okhttpRequest).enqueue(new Callback() {
- @Override
- public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
- try (ResponseBody responseBody = response.body()) {
- if (response.isSuccessful()) {
- future.complete(new ApiClientHttpResponse<>(
- ObjectMappers.JSON_MAPPER.readValue(
- responseBody.string(), V1DetectStatusResponse.class),
- response));
- return;
- }
- String responseBodyString = responseBody != null ? responseBody.string() : "{}";
- try {
- if (response.code() == 404) {
- future.completeExceptionally(new NotFoundError(
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response));
- return;
- }
- } catch (JsonProcessingException ignored) {
- // unable to map error response, throwing generic error
- }
- future.completeExceptionally(new ApiClientApiException(
- "Error with status code " + response.code(),
- response.code(),
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
- response));
- return;
- } catch (IOException e) {
- future.completeExceptionally(new ApiClientException("Network error executing HTTP request", e));
- }
- }
-
- @Override
- public void onFailure(@NotNull Call call, @NotNull IOException e) {
- future.completeExceptionally(new ApiClientException("Network error executing HTTP request", e));
- }
- });
- return future;
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#deidentify_string>De-identify String</a>.<br/><br/>Detects and deidentifies sensitive data from text.
- */
- public CompletableFuture> detectServiceDetectText(
- DetectServiceDetectTextRequest request) {
- return detectServiceDetectText(request, null);
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#deidentify_string>De-identify String</a>.<br/><br/>Detects and deidentifies sensitive data from text.
- */
- public CompletableFuture> detectServiceDetectText(
- DetectServiceDetectTextRequest request, RequestOptions requestOptions) {
- HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
- .newBuilder()
- .addPathSegments("v1/detect/text")
- .build();
- RequestBody body;
- try {
- body = RequestBody.create(
- ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
- } catch (JsonProcessingException e) {
- throw new ApiClientException("Failed to serialize request", e);
- }
- Request okhttpRequest = new Request.Builder()
- .url(httpUrl)
- .method("POST", body)
- .headers(Headers.of(clientOptions.headers(requestOptions)))
- .addHeader("Content-Type", "application/json")
- .addHeader("Accept", "application/json")
- .build();
- OkHttpClient client = clientOptions.httpClient();
- if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
- client = clientOptions.httpClientWithTimeout(requestOptions);
- }
- CompletableFuture> future = new CompletableFuture<>();
- client.newCall(okhttpRequest).enqueue(new Callback() {
- @Override
- public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
- try (ResponseBody responseBody = response.body()) {
- if (response.isSuccessful()) {
- future.complete(new ApiClientHttpResponse<>(
- ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), V1DetectTextResponse.class),
- response));
- return;
- }
- String responseBodyString = responseBody != null ? responseBody.string() : "{}";
- try {
- if (response.code() == 404) {
- future.completeExceptionally(new NotFoundError(
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response));
- return;
- }
- } catch (JsonProcessingException ignored) {
- // unable to map error response, throwing generic error
- }
- future.completeExceptionally(new ApiClientApiException(
- "Error with status code " + response.code(),
- response.code(),
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
- response));
- return;
- } catch (IOException e) {
- future.completeExceptionally(new ApiClientException("Network error executing HTTP request", e));
- }
- }
-
- @Override
- public void onFailure(@NotNull Call call, @NotNull IOException e) {
- future.completeExceptionally(new ApiClientException("Network error executing HTTP request", e));
- }
- });
- return future;
- }
-}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/deprecated/DeprecatedClient.java b/src/main/java/com/skyflow/generated/rest/resources/deprecated/DeprecatedClient.java
deleted file mode 100644
index 820a349b..00000000
--- a/src/main/java/com/skyflow/generated/rest/resources/deprecated/DeprecatedClient.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.skyflow.generated.rest.resources.deprecated;
-
-import com.skyflow.generated.rest.core.ClientOptions;
-import com.skyflow.generated.rest.core.RequestOptions;
-import com.skyflow.generated.rest.resources.deprecated.requests.DetectServiceDetectStatusRequest;
-import com.skyflow.generated.rest.resources.deprecated.requests.DetectServiceDetectTextRequest;
-import com.skyflow.generated.rest.resources.deprecated.requests.V1DetectFileRequest;
-import com.skyflow.generated.rest.types.V1DetectFileResponse;
-import com.skyflow.generated.rest.types.V1DetectStatusResponse;
-import com.skyflow.generated.rest.types.V1DetectTextResponse;
-
-public class DeprecatedClient {
- protected final ClientOptions clientOptions;
-
- private final RawDeprecatedClient rawClient;
-
- public DeprecatedClient(ClientOptions clientOptions) {
- this.clientOptions = clientOptions;
- this.rawClient = new RawDeprecatedClient(clientOptions);
- }
-
- /**
- * Get responses with HTTP metadata like headers
- */
- public RawDeprecatedClient withRawResponse() {
- return this.rawClient;
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use one of the <a href=#De-identify%20File>De-identify File</a> operations.<br/><br/>Detects and deidentifies sensitive data from image, audio, and video files.
- */
- public V1DetectFileResponse detectServiceDetectFileInput(V1DetectFileRequest request) {
- return this.rawClient.detectServiceDetectFileInput(request).body();
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use one of the <a href=#De-identify%20File>De-identify File</a> operations.<br/><br/>Detects and deidentifies sensitive data from image, audio, and video files.
- */
- public V1DetectFileResponse detectServiceDetectFileInput(
- V1DetectFileRequest request, RequestOptions requestOptions) {
- return this.rawClient
- .detectServiceDetectFileInput(request, requestOptions)
- .body();
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public V1DetectStatusResponse detectServiceDetectStatus(String id) {
- return this.rawClient.detectServiceDetectStatus(id).body();
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public V1DetectStatusResponse detectServiceDetectStatus(String id, DetectServiceDetectStatusRequest request) {
- return this.rawClient.detectServiceDetectStatus(id, request).body();
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public V1DetectStatusResponse detectServiceDetectStatus(
- String id, DetectServiceDetectStatusRequest request, RequestOptions requestOptions) {
- return this.rawClient
- .detectServiceDetectStatus(id, request, requestOptions)
- .body();
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#deidentify_string>De-identify String</a>.<br/><br/>Detects and deidentifies sensitive data from text.
- */
- public V1DetectTextResponse detectServiceDetectText(DetectServiceDetectTextRequest request) {
- return this.rawClient.detectServiceDetectText(request).body();
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#deidentify_string>De-identify String</a>.<br/><br/>Detects and deidentifies sensitive data from text.
- */
- public V1DetectTextResponse detectServiceDetectText(
- DetectServiceDetectTextRequest request, RequestOptions requestOptions) {
- return this.rawClient.detectServiceDetectText(request, requestOptions).body();
- }
-}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/deprecated/RawDeprecatedClient.java b/src/main/java/com/skyflow/generated/rest/resources/deprecated/RawDeprecatedClient.java
deleted file mode 100644
index 4472487f..00000000
--- a/src/main/java/com/skyflow/generated/rest/resources/deprecated/RawDeprecatedClient.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.skyflow.generated.rest.resources.deprecated;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.skyflow.generated.rest.core.ApiClientApiException;
-import com.skyflow.generated.rest.core.ApiClientException;
-import com.skyflow.generated.rest.core.ApiClientHttpResponse;
-import com.skyflow.generated.rest.core.ClientOptions;
-import com.skyflow.generated.rest.core.MediaTypes;
-import com.skyflow.generated.rest.core.ObjectMappers;
-import com.skyflow.generated.rest.core.QueryStringMapper;
-import com.skyflow.generated.rest.core.RequestOptions;
-import com.skyflow.generated.rest.errors.NotFoundError;
-import com.skyflow.generated.rest.resources.deprecated.requests.DetectServiceDetectStatusRequest;
-import com.skyflow.generated.rest.resources.deprecated.requests.DetectServiceDetectTextRequest;
-import com.skyflow.generated.rest.resources.deprecated.requests.V1DetectFileRequest;
-import com.skyflow.generated.rest.types.V1DetectFileResponse;
-import com.skyflow.generated.rest.types.V1DetectStatusResponse;
-import com.skyflow.generated.rest.types.V1DetectTextResponse;
-import java.io.IOException;
-import okhttp3.Headers;
-import okhttp3.HttpUrl;
-import okhttp3.OkHttpClient;
-import okhttp3.Request;
-import okhttp3.RequestBody;
-import okhttp3.Response;
-import okhttp3.ResponseBody;
-
-public class RawDeprecatedClient {
- protected final ClientOptions clientOptions;
-
- public RawDeprecatedClient(ClientOptions clientOptions) {
- this.clientOptions = clientOptions;
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use one of the <a href=#De-identify%20File>De-identify File</a> operations.<br/><br/>Detects and deidentifies sensitive data from image, audio, and video files.
- */
- public ApiClientHttpResponse detectServiceDetectFileInput(V1DetectFileRequest request) {
- return detectServiceDetectFileInput(request, null);
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use one of the <a href=#De-identify%20File>De-identify File</a> operations.<br/><br/>Detects and deidentifies sensitive data from image, audio, and video files.
- */
- public ApiClientHttpResponse detectServiceDetectFileInput(
- V1DetectFileRequest request, RequestOptions requestOptions) {
- HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
- .newBuilder()
- .addPathSegments("v1/detect/file")
- .build();
- RequestBody body;
- try {
- body = RequestBody.create(
- ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
- } catch (JsonProcessingException e) {
- throw new ApiClientException("Failed to serialize request", e);
- }
- Request okhttpRequest = new Request.Builder()
- .url(httpUrl)
- .method("POST", body)
- .headers(Headers.of(clientOptions.headers(requestOptions)))
- .addHeader("Content-Type", "application/json")
- .addHeader("Accept", "application/json")
- .build();
- OkHttpClient client = clientOptions.httpClient();
- if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
- client = clientOptions.httpClientWithTimeout(requestOptions);
- }
- try (Response response = client.newCall(okhttpRequest).execute()) {
- ResponseBody responseBody = response.body();
- if (response.isSuccessful()) {
- return new ApiClientHttpResponse<>(
- ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), V1DetectFileResponse.class),
- response);
- }
- String responseBodyString = responseBody != null ? responseBody.string() : "{}";
- try {
- if (response.code() == 404) {
- throw new NotFoundError(
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
- }
- } catch (JsonProcessingException ignored) {
- // unable to map error response, throwing generic error
- }
- throw new ApiClientApiException(
- "Error with status code " + response.code(),
- response.code(),
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
- response);
- } catch (IOException e) {
- throw new ApiClientException("Network error executing HTTP request", e);
- }
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public ApiClientHttpResponse detectServiceDetectStatus(String id) {
- return detectServiceDetectStatus(
- id, DetectServiceDetectStatusRequest.builder().build());
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public ApiClientHttpResponse detectServiceDetectStatus(
- String id, DetectServiceDetectStatusRequest request) {
- return detectServiceDetectStatus(id, request, null);
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#get_detect_run>Get Detect Run</a>.<br/><br/>Returns the status of a file deidentification request.
- */
- public ApiClientHttpResponse detectServiceDetectStatus(
- String id, DetectServiceDetectStatusRequest request, RequestOptions requestOptions) {
- HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
- .newBuilder()
- .addPathSegments("v1/detect/status")
- .addPathSegment(id);
- if (request.getVaultId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "vault_id", request.getVaultId().get(), false);
- }
- Request.Builder _requestBuilder = new Request.Builder()
- .url(httpUrl.build())
- .method("GET", null)
- .headers(Headers.of(clientOptions.headers(requestOptions)))
- .addHeader("Accept", "application/json");
- Request okhttpRequest = _requestBuilder.build();
- OkHttpClient client = clientOptions.httpClient();
- if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
- client = clientOptions.httpClientWithTimeout(requestOptions);
- }
- try (Response response = client.newCall(okhttpRequest).execute()) {
- ResponseBody responseBody = response.body();
- if (response.isSuccessful()) {
- return new ApiClientHttpResponse<>(
- ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), V1DetectStatusResponse.class),
- response);
- }
- String responseBodyString = responseBody != null ? responseBody.string() : "{}";
- try {
- if (response.code() == 404) {
- throw new NotFoundError(
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
- }
- } catch (JsonProcessingException ignored) {
- // unable to map error response, throwing generic error
- }
- throw new ApiClientApiException(
- "Error with status code " + response.code(),
- response.code(),
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
- response);
- } catch (IOException e) {
- throw new ApiClientException("Network error executing HTTP request", e);
- }
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#deidentify_string>De-identify String</a>.<br/><br/>Detects and deidentifies sensitive data from text.
- */
- public ApiClientHttpResponse detectServiceDetectText(DetectServiceDetectTextRequest request) {
- return detectServiceDetectText(request, null);
- }
-
- /**
- * <b>Note</b>: This operation is deprecated. Use <a href=#deidentify_string>De-identify String</a>.<br/><br/>Detects and deidentifies sensitive data from text.
- */
- public ApiClientHttpResponse detectServiceDetectText(
- DetectServiceDetectTextRequest request, RequestOptions requestOptions) {
- HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
- .newBuilder()
- .addPathSegments("v1/detect/text")
- .build();
- RequestBody body;
- try {
- body = RequestBody.create(
- ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
- } catch (JsonProcessingException e) {
- throw new ApiClientException("Failed to serialize request", e);
- }
- Request okhttpRequest = new Request.Builder()
- .url(httpUrl)
- .method("POST", body)
- .headers(Headers.of(clientOptions.headers(requestOptions)))
- .addHeader("Content-Type", "application/json")
- .addHeader("Accept", "application/json")
- .build();
- OkHttpClient client = clientOptions.httpClient();
- if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
- client = clientOptions.httpClientWithTimeout(requestOptions);
- }
- try (Response response = client.newCall(okhttpRequest).execute()) {
- ResponseBody responseBody = response.body();
- if (response.isSuccessful()) {
- return new ApiClientHttpResponse<>(
- ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), V1DetectTextResponse.class),
- response);
- }
- String responseBodyString = responseBody != null ? responseBody.string() : "{}";
- try {
- if (response.code() == 404) {
- throw new NotFoundError(
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
- }
- } catch (JsonProcessingException ignored) {
- // unable to map error response, throwing generic error
- }
- throw new ApiClientApiException(
- "Error with status code " + response.code(),
- response.code(),
- ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
- response);
- } catch (IOException e) {
- throw new ApiClientException("Network error executing HTTP request", e);
- }
- }
-}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/deprecated/requests/DetectServiceDetectStatusRequest.java b/src/main/java/com/skyflow/generated/rest/resources/deprecated/requests/DetectServiceDetectStatusRequest.java
deleted file mode 100644
index 45997db3..00000000
--- a/src/main/java/com/skyflow/generated/rest/resources/deprecated/requests/DetectServiceDetectStatusRequest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.skyflow.generated.rest.resources.deprecated.requests;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonSetter;
-import com.fasterxml.jackson.annotation.Nulls;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.skyflow.generated.rest.core.ObjectMappers;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-
-@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = DetectServiceDetectStatusRequest.Builder.class)
-public final class DetectServiceDetectStatusRequest {
- private final Optional vaultId;
-
- private final Map additionalProperties;
-
- private DetectServiceDetectStatusRequest(Optional vaultId, Map additionalProperties) {
- this.vaultId = vaultId;
- this.additionalProperties = additionalProperties;
- }
-
- /**
- * @return ID of the vault.
- */
- @JsonProperty("vault_id")
- public Optional getVaultId() {
- return vaultId;
- }
-
- @java.lang.Override
- public boolean equals(Object other) {
- if (this == other) return true;
- return other instanceof DetectServiceDetectStatusRequest && equalTo((DetectServiceDetectStatusRequest) other);
- }
-
- @JsonAnyGetter
- public Map getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- private boolean equalTo(DetectServiceDetectStatusRequest other) {
- return vaultId.equals(other.vaultId);
- }
-
- @java.lang.Override
- public int hashCode() {
- return Objects.hash(this.vaultId);
- }
-
- @java.lang.Override
- public String toString() {
- return ObjectMappers.stringify(this);
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder {
- private Optional vaultId = Optional.empty();
-
- @JsonAnySetter
- private Map additionalProperties = new HashMap<>();
-
- private Builder() {}
-
- public Builder from(DetectServiceDetectStatusRequest other) {
- vaultId(other.getVaultId());
- return this;
- }
-
- /**
- * ID of the vault.
- */
- @JsonSetter(value = "vault_id", nulls = Nulls.SKIP)
- public Builder vaultId(Optional vaultId) {
- this.vaultId = vaultId;
- return this;
- }
-
- public Builder vaultId(String vaultId) {
- this.vaultId = Optional.ofNullable(vaultId);
- return this;
- }
-
- public DetectServiceDetectStatusRequest build() {
- return new DetectServiceDetectStatusRequest(vaultId, additionalProperties);
- }
- }
-}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/deprecated/requests/DetectServiceDetectTextRequest.java b/src/main/java/com/skyflow/generated/rest/resources/deprecated/requests/DetectServiceDetectTextRequest.java
deleted file mode 100644
index 3c4b4ea2..00000000
--- a/src/main/java/com/skyflow/generated/rest/resources/deprecated/requests/DetectServiceDetectTextRequest.java
+++ /dev/null
@@ -1,526 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.skyflow.generated.rest.resources.deprecated.requests;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonSetter;
-import com.fasterxml.jackson.annotation.Nulls;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.skyflow.generated.rest.core.ObjectMappers;
-import com.skyflow.generated.rest.types.DetectDataAccuracy;
-import com.skyflow.generated.rest.types.DetectDataEntities;
-import com.skyflow.generated.rest.types.DetectRequestDeidentifyOption;
-import com.skyflow.generated.rest.types.V1AdvancedOptions;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import org.jetbrains.annotations.NotNull;
-
-@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = DetectServiceDetectTextRequest.Builder.class)
-public final class DetectServiceDetectTextRequest {
- private final String text;
-
- private final String vaultId;
-
- private final Optional sessionId;
-
- private final Optional> restrictEntityTypes;
-
- private final Optional deidentifyTokenFormat;
-
- private final Optional> allowRegex;
-
- private final Optional> restrictRegex;
-
- private final Optional returnEntities;
-
- private final Optional accuracy;
-
- private final Optional advancedOptions;
-
- private final Optional storeEntities;
-
- private final Map additionalProperties;
-
- private DetectServiceDetectTextRequest(
- String text,
- String vaultId,
- Optional sessionId,
- Optional> restrictEntityTypes,
- Optional deidentifyTokenFormat,
- Optional> allowRegex,
- Optional> restrictRegex,
- Optional returnEntities,
- Optional accuracy,
- Optional advancedOptions,
- Optional storeEntities,
- Map additionalProperties) {
- this.text = text;
- this.vaultId = vaultId;
- this.sessionId = sessionId;
- this.restrictEntityTypes = restrictEntityTypes;
- this.deidentifyTokenFormat = deidentifyTokenFormat;
- this.allowRegex = allowRegex;
- this.restrictRegex = restrictRegex;
- this.returnEntities = returnEntities;
- this.accuracy = accuracy;
- this.advancedOptions = advancedOptions;
- this.storeEntities = storeEntities;
- this.additionalProperties = additionalProperties;
- }
-
- /**
- * @return Data to deidentify.
- */
- @JsonProperty("text")
- public String getText() {
- return text;
- }
-
- /**
- * @return ID of the vault.
- */
- @JsonProperty("vault_id")
- public String getVaultId() {
- return vaultId;
- }
-
- /**
- * @return Will give a handle to delete the tokens generated during a specific interaction.
- */
- @JsonProperty("session_id")
- public Optional getSessionId() {
- return sessionId;
- }
-
- /**
- * @return Entities to detect and deidentify.
- */
- @JsonProperty("restrict_entity_types")
- public Optional> getRestrictEntityTypes() {
- return restrictEntityTypes;
- }
-
- @JsonProperty("deidentify_token_format")
- public Optional getDeidentifyTokenFormat() {
- return deidentifyTokenFormat;
- }
-
- /**
- * @return Regular expressions to ignore when detecting entities.
- */
- @JsonProperty("allow_regex")
- public Optional> getAllowRegex() {
- return allowRegex;
- }
-
- /**
- * @return Regular expressions to always restrict. Strings matching these regular expressions are replaced with 'RESTRICTED'.
- */
- @JsonProperty("restrict_regex")
- public Optional> getRestrictRegex() {
- return restrictRegex;
- }
-
- /**
- * @return If true, returns the details for the detected entities.
- */
- @JsonProperty("return_entities")
- public Optional getReturnEntities() {
- return returnEntities;
- }
-
- @JsonProperty("accuracy")
- public Optional getAccuracy() {
- return accuracy;
- }
-
- @JsonProperty("advanced_options")
- public Optional getAdvancedOptions() {
- return advancedOptions;
- }
-
- /**
- * @return Indicates whether entities should be stored in the vault.
- */
- @JsonProperty("store_entities")
- public Optional getStoreEntities() {
- return storeEntities;
- }
-
- @java.lang.Override
- public boolean equals(Object other) {
- if (this == other) return true;
- return other instanceof DetectServiceDetectTextRequest && equalTo((DetectServiceDetectTextRequest) other);
- }
-
- @JsonAnyGetter
- public Map getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- private boolean equalTo(DetectServiceDetectTextRequest other) {
- return text.equals(other.text)
- && vaultId.equals(other.vaultId)
- && sessionId.equals(other.sessionId)
- && restrictEntityTypes.equals(other.restrictEntityTypes)
- && deidentifyTokenFormat.equals(other.deidentifyTokenFormat)
- && allowRegex.equals(other.allowRegex)
- && restrictRegex.equals(other.restrictRegex)
- && returnEntities.equals(other.returnEntities)
- && accuracy.equals(other.accuracy)
- && advancedOptions.equals(other.advancedOptions)
- && storeEntities.equals(other.storeEntities);
- }
-
- @java.lang.Override
- public int hashCode() {
- return Objects.hash(
- this.text,
- this.vaultId,
- this.sessionId,
- this.restrictEntityTypes,
- this.deidentifyTokenFormat,
- this.allowRegex,
- this.restrictRegex,
- this.returnEntities,
- this.accuracy,
- this.advancedOptions,
- this.storeEntities);
- }
-
- @java.lang.Override
- public String toString() {
- return ObjectMappers.stringify(this);
- }
-
- public static TextStage builder() {
- return new Builder();
- }
-
- public interface TextStage {
- /**
- * Data to deidentify.
- */
- VaultIdStage text(@NotNull String text);
-
- Builder from(DetectServiceDetectTextRequest other);
- }
-
- public interface VaultIdStage {
- /**
- * ID of the vault.
- */
- _FinalStage vaultId(@NotNull String vaultId);
- }
-
- public interface _FinalStage {
- DetectServiceDetectTextRequest build();
-
- /**
- * Will give a handle to delete the tokens generated during a specific interaction.
- */
- _FinalStage sessionId(Optional sessionId);
-
- _FinalStage sessionId(String sessionId);
-
- /**
- * Entities to detect and deidentify.
- */
- _FinalStage restrictEntityTypes(Optional> restrictEntityTypes);
-
- _FinalStage restrictEntityTypes(List restrictEntityTypes);
-
- _FinalStage deidentifyTokenFormat(Optional deidentifyTokenFormat);
-
- _FinalStage deidentifyTokenFormat(DetectRequestDeidentifyOption deidentifyTokenFormat);
-
- /**
- * Regular expressions to ignore when detecting entities.
- */
- _FinalStage allowRegex(Optional> allowRegex);
-
- _FinalStage allowRegex(List allowRegex);
-
- /**
- * Regular expressions to always restrict. Strings matching these regular expressions are replaced with 'RESTRICTED'.
- */
- _FinalStage restrictRegex(Optional> restrictRegex);
-
- _FinalStage restrictRegex(List restrictRegex);
-
- /**
- * If true, returns the details for the detected entities.
- */
- _FinalStage returnEntities(Optional returnEntities);
-
- _FinalStage returnEntities(Boolean returnEntities);
-
- _FinalStage accuracy(Optional accuracy);
-
- _FinalStage accuracy(DetectDataAccuracy accuracy);
-
- _FinalStage advancedOptions(Optional advancedOptions);
-
- _FinalStage advancedOptions(V1AdvancedOptions advancedOptions);
-
- /**
- * Indicates whether entities should be stored in the vault.
- */
- _FinalStage storeEntities(Optional storeEntities);
-
- _FinalStage storeEntities(Boolean storeEntities);
- }
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder implements TextStage, VaultIdStage, _FinalStage {
- private String text;
-
- private String vaultId;
-
- private Optional storeEntities = Optional.empty();
-
- private Optional advancedOptions = Optional.empty();
-
- private Optional accuracy = Optional.empty();
-
- private Optional returnEntities = Optional.empty();
-
- private Optional> restrictRegex = Optional.empty();
-
- private Optional> allowRegex = Optional.empty();
-
- private Optional deidentifyTokenFormat = Optional.empty();
-
- private Optional> restrictEntityTypes = Optional.empty();
-
- private Optional sessionId = Optional.empty();
-
- @JsonAnySetter
- private Map additionalProperties = new HashMap<>();
-
- private Builder() {}
-
- @java.lang.Override
- public Builder from(DetectServiceDetectTextRequest other) {
- text(other.getText());
- vaultId(other.getVaultId());
- sessionId(other.getSessionId());
- restrictEntityTypes(other.getRestrictEntityTypes());
- deidentifyTokenFormat(other.getDeidentifyTokenFormat());
- allowRegex(other.getAllowRegex());
- restrictRegex(other.getRestrictRegex());
- returnEntities(other.getReturnEntities());
- accuracy(other.getAccuracy());
- advancedOptions(other.getAdvancedOptions());
- storeEntities(other.getStoreEntities());
- return this;
- }
-
- /**
- * Data to deidentify.Data to deidentify.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- @JsonSetter("text")
- public VaultIdStage text(@NotNull String text) {
- this.text = Objects.requireNonNull(text, "text must not be null");
- return this;
- }
-
- /**
- * ID of the vault.ID of the vault.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- @JsonSetter("vault_id")
- public _FinalStage vaultId(@NotNull String vaultId) {
- this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null");
- return this;
- }
-
- /**
- * Indicates whether entities should be stored in the vault.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage storeEntities(Boolean storeEntities) {
- this.storeEntities = Optional.ofNullable(storeEntities);
- return this;
- }
-
- /**
- * Indicates whether entities should be stored in the vault.
- */
- @java.lang.Override
- @JsonSetter(value = "store_entities", nulls = Nulls.SKIP)
- public _FinalStage storeEntities(Optional storeEntities) {
- this.storeEntities = storeEntities;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage advancedOptions(V1AdvancedOptions advancedOptions) {
- this.advancedOptions = Optional.ofNullable(advancedOptions);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "advanced_options", nulls = Nulls.SKIP)
- public _FinalStage advancedOptions(Optional advancedOptions) {
- this.advancedOptions = advancedOptions;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage accuracy(DetectDataAccuracy accuracy) {
- this.accuracy = Optional.ofNullable(accuracy);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "accuracy", nulls = Nulls.SKIP)
- public _FinalStage accuracy(Optional accuracy) {
- this.accuracy = accuracy;
- return this;
- }
-
- /**
- * If true, returns the details for the detected entities.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage returnEntities(Boolean returnEntities) {
- this.returnEntities = Optional.ofNullable(returnEntities);
- return this;
- }
-
- /**
- * If true, returns the details for the detected entities.
- */
- @java.lang.Override
- @JsonSetter(value = "return_entities", nulls = Nulls.SKIP)
- public _FinalStage returnEntities(Optional returnEntities) {
- this.returnEntities = returnEntities;
- return this;
- }
-
- /**
- * Regular expressions to always restrict. Strings matching these regular expressions are replaced with 'RESTRICTED'.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage restrictRegex(List restrictRegex) {
- this.restrictRegex = Optional.ofNullable(restrictRegex);
- return this;
- }
-
- /**
- * Regular expressions to always restrict. Strings matching these regular expressions are replaced with 'RESTRICTED'.
- */
- @java.lang.Override
- @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP)
- public _FinalStage restrictRegex(Optional> restrictRegex) {
- this.restrictRegex = restrictRegex;
- return this;
- }
-
- /**
- * Regular expressions to ignore when detecting entities.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage allowRegex(List allowRegex) {
- this.allowRegex = Optional.ofNullable(allowRegex);
- return this;
- }
-
- /**
- * Regular expressions to ignore when detecting entities.
- */
- @java.lang.Override
- @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP)
- public _FinalStage allowRegex(Optional> allowRegex) {
- this.allowRegex = allowRegex;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage deidentifyTokenFormat(DetectRequestDeidentifyOption deidentifyTokenFormat) {
- this.deidentifyTokenFormat = Optional.ofNullable(deidentifyTokenFormat);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "deidentify_token_format", nulls = Nulls.SKIP)
- public _FinalStage deidentifyTokenFormat(Optional deidentifyTokenFormat) {
- this.deidentifyTokenFormat = deidentifyTokenFormat;
- return this;
- }
-
- /**
- * Entities to detect and deidentify.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage restrictEntityTypes(List restrictEntityTypes) {
- this.restrictEntityTypes = Optional.ofNullable(restrictEntityTypes);
- return this;
- }
-
- /**
- * Entities to detect and deidentify.
- */
- @java.lang.Override
- @JsonSetter(value = "restrict_entity_types", nulls = Nulls.SKIP)
- public _FinalStage restrictEntityTypes(Optional> restrictEntityTypes) {
- this.restrictEntityTypes = restrictEntityTypes;
- return this;
- }
-
- /**
- * Will give a handle to delete the tokens generated during a specific interaction.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage sessionId(String sessionId) {
- this.sessionId = Optional.ofNullable(sessionId);
- return this;
- }
-
- /**
- * Will give a handle to delete the tokens generated during a specific interaction.
- */
- @java.lang.Override
- @JsonSetter(value = "session_id", nulls = Nulls.SKIP)
- public _FinalStage sessionId(Optional sessionId) {
- this.sessionId = sessionId;
- return this;
- }
-
- @java.lang.Override
- public DetectServiceDetectTextRequest build() {
- return new DetectServiceDetectTextRequest(
- text,
- vaultId,
- sessionId,
- restrictEntityTypes,
- deidentifyTokenFormat,
- allowRegex,
- restrictRegex,
- returnEntities,
- accuracy,
- advancedOptions,
- storeEntities,
- additionalProperties);
- }
- }
-}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/deprecated/requests/V1DetectFileRequest.java b/src/main/java/com/skyflow/generated/rest/resources/deprecated/requests/V1DetectFileRequest.java
deleted file mode 100644
index 8bdee935..00000000
--- a/src/main/java/com/skyflow/generated/rest/resources/deprecated/requests/V1DetectFileRequest.java
+++ /dev/null
@@ -1,634 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.skyflow.generated.rest.resources.deprecated.requests;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonSetter;
-import com.fasterxml.jackson.annotation.Nulls;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.skyflow.generated.rest.core.ObjectMappers;
-import com.skyflow.generated.rest.types.DetectDataAccuracy;
-import com.skyflow.generated.rest.types.DetectDataEntities;
-import com.skyflow.generated.rest.types.DetectFileRequestDataType;
-import com.skyflow.generated.rest.types.DetectRequestDeidentifyOption;
-import com.skyflow.generated.rest.types.V1AdvancedOptions;
-import com.skyflow.generated.rest.types.V1AudioConfig;
-import com.skyflow.generated.rest.types.V1FileDataFormat;
-import com.skyflow.generated.rest.types.V1ImageOptions;
-import com.skyflow.generated.rest.types.V1PdfConfig;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import org.jetbrains.annotations.NotNull;
-
-@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = V1DetectFileRequest.Builder.class)
-public final class V1DetectFileRequest {
- private final String file;
-
- private final V1FileDataFormat dataFormat;
-
- private final DetectFileRequestDataType inputType;
-
- private final String vaultId;
-
- private final Optional sessionId;
-
- private final Optional> restrictEntityTypes;
-
- private final Optional> allowRegex;
-
- private final Optional> restrictRegex;
-
- private final Optional returnEntities;
-
- private final Optional accuracy;
-
- private final Optional audio;
-
- private final Optional image;
-
- private final Optional pdf;
-
- private final Optional advancedOptions;
-
- private final Optional deidentifyTokenFormat;
-
- private final Map additionalProperties;
-
- private V1DetectFileRequest(
- String file,
- V1FileDataFormat dataFormat,
- DetectFileRequestDataType inputType,
- String vaultId,
- Optional sessionId,
- Optional> restrictEntityTypes,
- Optional> allowRegex,
- Optional> restrictRegex,
- Optional returnEntities,
- Optional accuracy,
- Optional audio,
- Optional image,
- Optional pdf,
- Optional advancedOptions,
- Optional deidentifyTokenFormat,
- Map additionalProperties) {
- this.file = file;
- this.dataFormat = dataFormat;
- this.inputType = inputType;
- this.vaultId = vaultId;
- this.sessionId = sessionId;
- this.restrictEntityTypes = restrictEntityTypes;
- this.allowRegex = allowRegex;
- this.restrictRegex = restrictRegex;
- this.returnEntities = returnEntities;
- this.accuracy = accuracy;
- this.audio = audio;
- this.image = image;
- this.pdf = pdf;
- this.advancedOptions = advancedOptions;
- this.deidentifyTokenFormat = deidentifyTokenFormat;
- this.additionalProperties = additionalProperties;
- }
-
- /**
- * @return Path of the file or base64-encoded data that has to be processed.
- */
- @JsonProperty("file")
- public String getFile() {
- return file;
- }
-
- @JsonProperty("data_format")
- public V1FileDataFormat getDataFormat() {
- return dataFormat;
- }
-
- @JsonProperty("input_type")
- public DetectFileRequestDataType getInputType() {
- return inputType;
- }
-
- /**
- * @return ID of the vault.
- */
- @JsonProperty("vault_id")
- public String getVaultId() {
- return vaultId;
- }
-
- /**
- * @return Will give a handle to delete the tokens generated during a specific interaction.
- */
- @JsonProperty("session_id")
- public Optional getSessionId() {
- return sessionId;
- }
-
- /**
- * @return Entities to detect and deidentify.
- */
- @JsonProperty("restrict_entity_types")
- public Optional> getRestrictEntityTypes() {
- return restrictEntityTypes;
- }
-
- /**
- * @return Regular expressions to ignore when detecting entities.
- */
- @JsonProperty("allow_regex")
- public Optional> getAllowRegex() {
- return allowRegex;
- }
-
- /**
- * @return Regular expressions to always restrict. Strings matching these regular expressions are replaced with 'RESTRICTED'.
- */
- @JsonProperty("restrict_regex")
- public Optional> getRestrictRegex() {
- return restrictRegex;
- }
-
- /**
- * @return If true, returns the details for the detected entities.
- */
- @JsonProperty("return_entities")
- public Optional getReturnEntities() {
- return returnEntities;
- }
-
- @JsonProperty("accuracy")
- public Optional getAccuracy() {
- return accuracy;
- }
-
- @JsonProperty("audio")
- public Optional getAudio() {
- return audio;
- }
-
- @JsonProperty("image")
- public Optional getImage() {
- return image;
- }
-
- @JsonProperty("pdf")
- public Optional getPdf() {
- return pdf;
- }
-
- @JsonProperty("advanced_options")
- public Optional getAdvancedOptions() {
- return advancedOptions;
- }
-
- @JsonProperty("deidentify_token_format")
- public Optional getDeidentifyTokenFormat() {
- return deidentifyTokenFormat;
- }
-
- @java.lang.Override
- public boolean equals(Object other) {
- if (this == other) return true;
- return other instanceof V1DetectFileRequest && equalTo((V1DetectFileRequest) other);
- }
-
- @JsonAnyGetter
- public Map getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- private boolean equalTo(V1DetectFileRequest other) {
- return file.equals(other.file)
- && dataFormat.equals(other.dataFormat)
- && inputType.equals(other.inputType)
- && vaultId.equals(other.vaultId)
- && sessionId.equals(other.sessionId)
- && restrictEntityTypes.equals(other.restrictEntityTypes)
- && allowRegex.equals(other.allowRegex)
- && restrictRegex.equals(other.restrictRegex)
- && returnEntities.equals(other.returnEntities)
- && accuracy.equals(other.accuracy)
- && audio.equals(other.audio)
- && image.equals(other.image)
- && pdf.equals(other.pdf)
- && advancedOptions.equals(other.advancedOptions)
- && deidentifyTokenFormat.equals(other.deidentifyTokenFormat);
- }
-
- @java.lang.Override
- public int hashCode() {
- return Objects.hash(
- this.file,
- this.dataFormat,
- this.inputType,
- this.vaultId,
- this.sessionId,
- this.restrictEntityTypes,
- this.allowRegex,
- this.restrictRegex,
- this.returnEntities,
- this.accuracy,
- this.audio,
- this.image,
- this.pdf,
- this.advancedOptions,
- this.deidentifyTokenFormat);
- }
-
- @java.lang.Override
- public String toString() {
- return ObjectMappers.stringify(this);
- }
-
- public static FileStage builder() {
- return new Builder();
- }
-
- public interface FileStage {
- /**
- * Path of the file or base64-encoded data that has to be processed.
- */
- DataFormatStage file(@NotNull String file);
-
- Builder from(V1DetectFileRequest other);
- }
-
- public interface DataFormatStage {
- InputTypeStage dataFormat(@NotNull V1FileDataFormat dataFormat);
- }
-
- public interface InputTypeStage {
- VaultIdStage inputType(@NotNull DetectFileRequestDataType inputType);
- }
-
- public interface VaultIdStage {
- /**
- * ID of the vault.
- */
- _FinalStage vaultId(@NotNull String vaultId);
- }
-
- public interface _FinalStage {
- V1DetectFileRequest build();
-
- /**
- * Will give a handle to delete the tokens generated during a specific interaction.
- */
- _FinalStage sessionId(Optional sessionId);
-
- _FinalStage sessionId(String sessionId);
-
- /**
- * Entities to detect and deidentify.
- */
- _FinalStage restrictEntityTypes(Optional> restrictEntityTypes);
-
- _FinalStage restrictEntityTypes(List restrictEntityTypes);
-
- /**
- * Regular expressions to ignore when detecting entities.
- */
- _FinalStage allowRegex(Optional> allowRegex);
-
- _FinalStage allowRegex(List allowRegex);
-
- /**
- * Regular expressions to always restrict. Strings matching these regular expressions are replaced with 'RESTRICTED'.
- */
- _FinalStage restrictRegex(Optional> restrictRegex);
-
- _FinalStage restrictRegex(List restrictRegex);
-
- /**
- * If true, returns the details for the detected entities.
- */
- _FinalStage returnEntities(Optional returnEntities);
-
- _FinalStage returnEntities(Boolean returnEntities);
-
- _FinalStage accuracy(Optional accuracy);
-
- _FinalStage accuracy(DetectDataAccuracy accuracy);
-
- _FinalStage audio(Optional audio);
-
- _FinalStage audio(V1AudioConfig audio);
-
- _FinalStage image(Optional image);
-
- _FinalStage image(V1ImageOptions image);
-
- _FinalStage pdf(Optional pdf);
-
- _FinalStage pdf(V1PdfConfig pdf);
-
- _FinalStage advancedOptions(Optional advancedOptions);
-
- _FinalStage advancedOptions(V1AdvancedOptions advancedOptions);
-
- _FinalStage deidentifyTokenFormat(Optional deidentifyTokenFormat);
-
- _FinalStage deidentifyTokenFormat(DetectRequestDeidentifyOption deidentifyTokenFormat);
- }
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder implements FileStage, DataFormatStage, InputTypeStage, VaultIdStage, _FinalStage {
- private String file;
-
- private V1FileDataFormat dataFormat;
-
- private DetectFileRequestDataType inputType;
-
- private String vaultId;
-
- private Optional deidentifyTokenFormat = Optional.empty();
-
- private Optional advancedOptions = Optional.empty();
-
- private Optional pdf = Optional.empty();
-
- private Optional image = Optional.empty();
-
- private Optional audio = Optional.empty();
-
- private Optional accuracy = Optional.empty();
-
- private Optional returnEntities = Optional.empty();
-
- private Optional> restrictRegex = Optional.empty();
-
- private Optional> allowRegex = Optional.empty();
-
- private Optional> restrictEntityTypes = Optional.empty();
-
- private Optional sessionId = Optional.empty();
-
- @JsonAnySetter
- private Map additionalProperties = new HashMap<>();
-
- private Builder() {}
-
- @java.lang.Override
- public Builder from(V1DetectFileRequest other) {
- file(other.getFile());
- dataFormat(other.getDataFormat());
- inputType(other.getInputType());
- vaultId(other.getVaultId());
- sessionId(other.getSessionId());
- restrictEntityTypes(other.getRestrictEntityTypes());
- allowRegex(other.getAllowRegex());
- restrictRegex(other.getRestrictRegex());
- returnEntities(other.getReturnEntities());
- accuracy(other.getAccuracy());
- audio(other.getAudio());
- image(other.getImage());
- pdf(other.getPdf());
- advancedOptions(other.getAdvancedOptions());
- deidentifyTokenFormat(other.getDeidentifyTokenFormat());
- return this;
- }
-
- /**
- * Path of the file or base64-encoded data that has to be processed.Path of the file or base64-encoded data that has to be processed.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- @JsonSetter("file")
- public DataFormatStage file(@NotNull String file) {
- this.file = Objects.requireNonNull(file, "file must not be null");
- return this;
- }
-
- @java.lang.Override
- @JsonSetter("data_format")
- public InputTypeStage dataFormat(@NotNull V1FileDataFormat dataFormat) {
- this.dataFormat = Objects.requireNonNull(dataFormat, "dataFormat must not be null");
- return this;
- }
-
- @java.lang.Override
- @JsonSetter("input_type")
- public VaultIdStage inputType(@NotNull DetectFileRequestDataType inputType) {
- this.inputType = Objects.requireNonNull(inputType, "inputType must not be null");
- return this;
- }
-
- /**
- * ID of the vault.ID of the vault.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- @JsonSetter("vault_id")
- public _FinalStage vaultId(@NotNull String vaultId) {
- this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null");
- return this;
- }
-
- @java.lang.Override
- public _FinalStage deidentifyTokenFormat(DetectRequestDeidentifyOption deidentifyTokenFormat) {
- this.deidentifyTokenFormat = Optional.ofNullable(deidentifyTokenFormat);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "deidentify_token_format", nulls = Nulls.SKIP)
- public _FinalStage deidentifyTokenFormat(Optional deidentifyTokenFormat) {
- this.deidentifyTokenFormat = deidentifyTokenFormat;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage advancedOptions(V1AdvancedOptions advancedOptions) {
- this.advancedOptions = Optional.ofNullable(advancedOptions);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "advanced_options", nulls = Nulls.SKIP)
- public _FinalStage advancedOptions(Optional advancedOptions) {
- this.advancedOptions = advancedOptions;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage pdf(V1PdfConfig pdf) {
- this.pdf = Optional.ofNullable(pdf);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "pdf", nulls = Nulls.SKIP)
- public _FinalStage pdf(Optional pdf) {
- this.pdf = pdf;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage image(V1ImageOptions image) {
- this.image = Optional.ofNullable(image);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "image", nulls = Nulls.SKIP)
- public _FinalStage image(Optional image) {
- this.image = image;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage audio(V1AudioConfig audio) {
- this.audio = Optional.ofNullable(audio);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "audio", nulls = Nulls.SKIP)
- public _FinalStage audio(Optional audio) {
- this.audio = audio;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage accuracy(DetectDataAccuracy accuracy) {
- this.accuracy = Optional.ofNullable(accuracy);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "accuracy", nulls = Nulls.SKIP)
- public _FinalStage accuracy(Optional accuracy) {
- this.accuracy = accuracy;
- return this;
- }
-
- /**
- * If true, returns the details for the detected entities.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage returnEntities(Boolean returnEntities) {
- this.returnEntities = Optional.ofNullable(returnEntities);
- return this;
- }
-
- /**
- * If true, returns the details for the detected entities.
- */
- @java.lang.Override
- @JsonSetter(value = "return_entities", nulls = Nulls.SKIP)
- public _FinalStage returnEntities(Optional returnEntities) {
- this.returnEntities = returnEntities;
- return this;
- }
-
- /**
- * Regular expressions to always restrict. Strings matching these regular expressions are replaced with 'RESTRICTED'.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage restrictRegex(List restrictRegex) {
- this.restrictRegex = Optional.ofNullable(restrictRegex);
- return this;
- }
-
- /**
- * Regular expressions to always restrict. Strings matching these regular expressions are replaced with 'RESTRICTED'.
- */
- @java.lang.Override
- @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP)
- public _FinalStage restrictRegex(Optional> restrictRegex) {
- this.restrictRegex = restrictRegex;
- return this;
- }
-
- /**
- * Regular expressions to ignore when detecting entities.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage allowRegex(List allowRegex) {
- this.allowRegex = Optional.ofNullable(allowRegex);
- return this;
- }
-
- /**
- * Regular expressions to ignore when detecting entities.
- */
- @java.lang.Override
- @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP)
- public _FinalStage allowRegex(Optional> allowRegex) {
- this.allowRegex = allowRegex;
- return this;
- }
-
- /**
- * Entities to detect and deidentify.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage restrictEntityTypes(List restrictEntityTypes) {
- this.restrictEntityTypes = Optional.ofNullable(restrictEntityTypes);
- return this;
- }
-
- /**
- * Entities to detect and deidentify.
- */
- @java.lang.Override
- @JsonSetter(value = "restrict_entity_types", nulls = Nulls.SKIP)
- public _FinalStage restrictEntityTypes(Optional> restrictEntityTypes) {
- this.restrictEntityTypes = restrictEntityTypes;
- return this;
- }
-
- /**
- * Will give a handle to delete the tokens generated during a specific interaction.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage sessionId(String sessionId) {
- this.sessionId = Optional.ofNullable(sessionId);
- return this;
- }
-
- /**
- * Will give a handle to delete the tokens generated during a specific interaction.
- */
- @java.lang.Override
- @JsonSetter(value = "session_id", nulls = Nulls.SKIP)
- public _FinalStage sessionId(Optional sessionId) {
- this.sessionId = sessionId;
- return this;
- }
-
- @java.lang.Override
- public V1DetectFileRequest build() {
- return new V1DetectFileRequest(
- file,
- dataFormat,
- inputType,
- vaultId,
- sessionId,
- restrictEntityTypes,
- allowRegex,
- restrictRegex,
- returnEntities,
- accuracy,
- audio,
- image,
- pdf,
- advancedOptions,
- deidentifyTokenFormat,
- additionalProperties);
- }
- }
-}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/AsyncFilesClient.java b/src/main/java/com/skyflow/generated/rest/resources/files/AsyncFilesClient.java
index 48692d9f..782d2d2b 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/files/AsyncFilesClient.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/files/AsyncFilesClient.java
@@ -15,8 +15,10 @@
import com.skyflow.generated.rest.resources.files.requests.DeidentifyStructuredTextRequest;
import com.skyflow.generated.rest.resources.files.requests.DeidentifyTextRequest;
import com.skyflow.generated.rest.resources.files.requests.GetRunRequest;
+import com.skyflow.generated.rest.resources.files.requests.ReidentifyFileRequest;
import com.skyflow.generated.rest.types.DeidentifyFileResponse;
import com.skyflow.generated.rest.types.DeidentifyStatusResponse;
+import com.skyflow.generated.rest.types.ReidentifyFileResponse;
import java.util.concurrent.CompletableFuture;
public class AsyncFilesClient {
@@ -185,4 +187,19 @@ public CompletableFuture getRun(
String runId, GetRunRequest request, RequestOptions requestOptions) {
return this.rawClient.getRun(runId, request, requestOptions).thenApply(response -> response.body());
}
+
+ /**
+ * Re-identifies tokens in a file.
+ */
+ public CompletableFuture reidentifyFile(ReidentifyFileRequest request) {
+ return this.rawClient.reidentifyFile(request).thenApply(response -> response.body());
+ }
+
+ /**
+ * Re-identifies tokens in a file.
+ */
+ public CompletableFuture reidentifyFile(
+ ReidentifyFileRequest request, RequestOptions requestOptions) {
+ return this.rawClient.reidentifyFile(request, requestOptions).thenApply(response -> response.body());
+ }
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/AsyncRawFilesClient.java b/src/main/java/com/skyflow/generated/rest/resources/files/AsyncRawFilesClient.java
index f400bb2a..4672288a 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/files/AsyncRawFilesClient.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/files/AsyncRawFilesClient.java
@@ -26,9 +26,11 @@
import com.skyflow.generated.rest.resources.files.requests.DeidentifyStructuredTextRequest;
import com.skyflow.generated.rest.resources.files.requests.DeidentifyTextRequest;
import com.skyflow.generated.rest.resources.files.requests.GetRunRequest;
+import com.skyflow.generated.rest.resources.files.requests.ReidentifyFileRequest;
import com.skyflow.generated.rest.types.DeidentifyFileResponse;
import com.skyflow.generated.rest.types.DeidentifyStatusResponse;
import com.skyflow.generated.rest.types.ErrorResponse;
+import com.skyflow.generated.rest.types.ReidentifyFileResponse;
import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import okhttp3.Call;
@@ -926,4 +928,92 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
});
return future;
}
+
+ /**
+ * Re-identifies tokens in a file.
+ */
+ public CompletableFuture> reidentifyFile(
+ ReidentifyFileRequest request) {
+ return reidentifyFile(request, null);
+ }
+
+ /**
+ * Re-identifies tokens in a file.
+ */
+ public CompletableFuture> reidentifyFile(
+ ReidentifyFileRequest request, RequestOptions requestOptions) {
+ HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("v1/detect/reidentify/file")
+ .build();
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
+ } catch (JsonProcessingException e) {
+ throw new ApiClientException("Failed to serialize request", e);
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl)
+ .method("POST", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ if (response.isSuccessful()) {
+ future.complete(new ApiClientHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBody.string(), ReidentifyFileResponse.class),
+ response));
+ return;
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ case 500:
+ future.completeExceptionally(new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ErrorResponse.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ future.completeExceptionally(new ApiClientApiException(
+ "Error with status code " + response.code(),
+ response.code(),
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response));
+ return;
+ } catch (IOException e) {
+ future.completeExceptionally(new ApiClientException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new ApiClientException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/FilesClient.java b/src/main/java/com/skyflow/generated/rest/resources/files/FilesClient.java
index 89898d41..5eee1560 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/files/FilesClient.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/files/FilesClient.java
@@ -15,8 +15,10 @@
import com.skyflow.generated.rest.resources.files.requests.DeidentifyStructuredTextRequest;
import com.skyflow.generated.rest.resources.files.requests.DeidentifyTextRequest;
import com.skyflow.generated.rest.resources.files.requests.GetRunRequest;
+import com.skyflow.generated.rest.resources.files.requests.ReidentifyFileRequest;
import com.skyflow.generated.rest.types.DeidentifyFileResponse;
import com.skyflow.generated.rest.types.DeidentifyStatusResponse;
+import com.skyflow.generated.rest.types.ReidentifyFileResponse;
public class FilesClient {
protected final ClientOptions clientOptions;
@@ -177,4 +179,18 @@ public DeidentifyStatusResponse getRun(String runId, GetRunRequest request) {
public DeidentifyStatusResponse getRun(String runId, GetRunRequest request, RequestOptions requestOptions) {
return this.rawClient.getRun(runId, request, requestOptions).body();
}
+
+ /**
+ * Re-identifies tokens in a file.
+ */
+ public ReidentifyFileResponse reidentifyFile(ReidentifyFileRequest request) {
+ return this.rawClient.reidentifyFile(request).body();
+ }
+
+ /**
+ * Re-identifies tokens in a file.
+ */
+ public ReidentifyFileResponse reidentifyFile(ReidentifyFileRequest request, RequestOptions requestOptions) {
+ return this.rawClient.reidentifyFile(request, requestOptions).body();
+ }
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/RawFilesClient.java b/src/main/java/com/skyflow/generated/rest/resources/files/RawFilesClient.java
index 85939625..d0fb0bfc 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/files/RawFilesClient.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/files/RawFilesClient.java
@@ -26,9 +26,11 @@
import com.skyflow.generated.rest.resources.files.requests.DeidentifyStructuredTextRequest;
import com.skyflow.generated.rest.resources.files.requests.DeidentifyTextRequest;
import com.skyflow.generated.rest.resources.files.requests.GetRunRequest;
+import com.skyflow.generated.rest.resources.files.requests.ReidentifyFileRequest;
import com.skyflow.generated.rest.types.DeidentifyFileResponse;
import com.skyflow.generated.rest.types.DeidentifyStatusResponse;
import com.skyflow.generated.rest.types.ErrorResponse;
+import com.skyflow.generated.rest.types.ReidentifyFileResponse;
import java.io.IOException;
import okhttp3.Headers;
import okhttp3.HttpUrl;
@@ -711,4 +713,71 @@ public ApiClientHttpResponse getRun(
throw new ApiClientException("Network error executing HTTP request", e);
}
}
+
+ /**
+ * Re-identifies tokens in a file.
+ */
+ public ApiClientHttpResponse reidentifyFile(ReidentifyFileRequest request) {
+ return reidentifyFile(request, null);
+ }
+
+ /**
+ * Re-identifies tokens in a file.
+ */
+ public ApiClientHttpResponse reidentifyFile(
+ ReidentifyFileRequest request, RequestOptions requestOptions) {
+ HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("v1/detect/reidentify/file")
+ .build();
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
+ } catch (JsonProcessingException e) {
+ throw new ApiClientException("Failed to serialize request", e);
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl)
+ .method("POST", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ if (response.isSuccessful()) {
+ return new ApiClientHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ReidentifyFileResponse.class),
+ response);
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response);
+ case 500:
+ throw new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ErrorResponse.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ throw new ApiClientApiException(
+ "Error with status code " + response.code(),
+ response.code(),
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response);
+ } catch (IOException e) {
+ throw new ApiClientException("Network error executing HTTP request", e);
+ }
+ }
}
diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyAudioRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyAudioRequest.java
index 5f4929aa..fddcb445 100644
--- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyAudioRequest.java
+++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyAudioRequest.java
@@ -31,6 +31,8 @@ public final class DeidentifyAudioRequest {
private final DeidentifyAudioRequestFile file;
+ private final Optional configurationId;
+
private final Optional outputProcessedAudio;
private final Optional outputTranscription;
@@ -58,6 +60,7 @@ public final class DeidentifyAudioRequest {
private DeidentifyAudioRequest(
String vaultId,
DeidentifyAudioRequestFile file,
+ Optional configurationId,
Optional outputProcessedAudio,
Optional outputTranscription,
Optional bleepGain,
@@ -72,6 +75,7 @@ private DeidentifyAudioRequest(
Map additionalProperties) {
this.vaultId = vaultId;
this.file = file;
+ this.configurationId = configurationId;
this.outputProcessedAudio = outputProcessedAudio;
this.outputTranscription = outputTranscription;
this.bleepGain = bleepGain;
@@ -99,6 +103,11 @@ public DeidentifyAudioRequestFile getFile() {
return file;
}
+ @JsonProperty("configuration_id")
+ public Optional getConfigurationId() {
+ return configurationId;
+ }
+
/**
* @return If true, includes processed audio file in the response.
*/
@@ -172,7 +181,7 @@ public Optional getTransformations() {
return transformations;
}
- @java.lang.Override
+ @Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof DeidentifyAudioRequest && equalTo((DeidentifyAudioRequest) other);
@@ -186,6 +195,7 @@ public Map getAdditionalProperties() {
private boolean equalTo(DeidentifyAudioRequest other) {
return vaultId.equals(other.vaultId)
&& file.equals(other.file)
+ && configurationId.equals(other.configurationId)
&& outputProcessedAudio.equals(other.outputProcessedAudio)
&& outputTranscription.equals(other.outputTranscription)
&& bleepGain.equals(other.bleepGain)
@@ -199,11 +209,12 @@ private boolean equalTo(DeidentifyAudioRequest other) {
&& transformations.equals(other.transformations);
}
- @java.lang.Override
+ @Override
public int hashCode() {
return Objects.hash(
this.vaultId,
this.file,
+ this.configurationId,
this.outputProcessedAudio,
this.outputTranscription,
this.bleepGain,
@@ -217,7 +228,7 @@ public int hashCode() {
this.transformations);
}
- @java.lang.Override
+ @Override
public String toString() {
return ObjectMappers.stringify(this);
}
@@ -242,6 +253,10 @@ public interface FileStage {
public interface _FinalStage {
DeidentifyAudioRequest build();
+ _FinalStage configurationId(Optional configurationId);
+
+ _FinalStage configurationId(String configurationId);
+
/**
* If true, includes processed audio file in the response.
*/
@@ -333,15 +348,18 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag
private Optional outputProcessedAudio = Optional.empty();
+ private Optional configurationId = Optional.empty();
+
@JsonAnySetter
private Map