Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@
</properties>

<dependencies>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.12.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down Expand Up @@ -126,9 +120,10 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
Expand All @@ -141,12 +136,6 @@
<version>2.0.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.13.2</version>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -185,7 +174,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.2.5</version>
<configuration>
<useModulePath>false</useModulePath>
<includes>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
Expand Down
14 changes: 2 additions & 12 deletions src/main/java/com/skyflow/VaultClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ protected DeidentifyPdfRequest getDeidentifyPdfRequest(DeidentifyFileRequest req
Optional<List<EntityType>> entityUniqueCounter = Optional.empty();
Optional<List<String>> allowRegex = Optional.ofNullable(request.getAllowRegexList());
Optional<List<String>> restrictRegex = Optional.ofNullable(request.getRestrictRegexList());
Optional<Transformations> transformations = Optional.ofNullable(getTransformations(request.getTransformations()));

if (tokenFormat != null) {
if (tokenFormat.getEntityOnly() != null && !tokenFormat.getEntityOnly().isEmpty()) {
Expand Down Expand Up @@ -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(Double.valueOf(request.getPixelDensity() != null ? request.getPixelDensity().intValue() : null))
.maxResolution(Double.valueOf(request.getMaxResolution() != null ? request.getMaxResolution().intValue() : null))
.entityTypes(mappedEntityTypes)
.tokenType(tokenType)
.allowRegex(allowRegex)
.restrictRegex(restrictRegex)
.transformations(transformations)
.build();
}

Expand All @@ -558,7 +556,6 @@ protected DeidentifyImageRequest getDeidentifyImageRequest(DeidentifyFileRequest
Optional<List<EntityType>> entityUniqueCounter = Optional.empty();
Optional<List<String>> allowRegex = Optional.ofNullable(request.getAllowRegexList());
Optional<List<String>> restrictRegex = Optional.ofNullable(request.getRestrictRegexList());
Optional<Transformations> transformations = Optional.ofNullable(getTransformations(request.getTransformations()));

TokenTypeWithoutVault tokenType = buildTokenType(tokenFormat, entityTypes, entityUniqueCounter);

Expand All @@ -580,7 +577,6 @@ protected DeidentifyImageRequest getDeidentifyImageRequest(DeidentifyFileRequest
.tokenType(tokenType)
.allowRegex(allowRegex)
.restrictRegex(restrictRegex)
.transformations(transformations)
.outputProcessedImage(request.getOutputProcessedImage())
.outputOcrText(request.getOutputOcrText())
.build();
Expand All @@ -594,7 +590,6 @@ protected DeidentifyPresentationRequest getDeidentifyPresentationRequest(Deident
Optional<List<EntityType>> entityUniqueCounter = Optional.empty();
Optional<List<String>> allowRegex = Optional.ofNullable(request.getAllowRegexList());
Optional<List<String>> restrictRegex = Optional.ofNullable(request.getRestrictRegexList());
Optional<Transformations> transformations = Optional.ofNullable(getTransformations(request.getTransformations()));

TokenTypeWithoutVault tokenType = buildTokenType(tokenFormat, entityTypes, entityUniqueCounter);

Expand All @@ -610,7 +605,6 @@ protected DeidentifyPresentationRequest getDeidentifyPresentationRequest(Deident
.tokenType(tokenType)
.allowRegex(allowRegex)
.restrictRegex(restrictRegex)
.transformations(transformations)
.build();
}

Expand All @@ -622,7 +616,6 @@ protected DeidentifySpreadsheetRequest getDeidentifySpreadsheetRequest(Deidentif
Optional<List<EntityType>> entityUniqueCounter = Optional.empty();
Optional<List<String>> allowRegex = Optional.ofNullable(request.getAllowRegexList());
Optional<List<String>> restrictRegex = Optional.ofNullable(request.getRestrictRegexList());
Optional<Transformations> transformations = Optional.ofNullable(getTransformations(request.getTransformations()));

TokenTypeWithoutVault tokenType = buildTokenType(tokenFormat, entityTypes, entityUniqueCounter);

Expand All @@ -638,7 +631,6 @@ protected DeidentifySpreadsheetRequest getDeidentifySpreadsheetRequest(Deidentif
.tokenType(tokenType)
.allowRegex(allowRegex)
.restrictRegex(restrictRegex)
.transformations(transformations)
.build();
}

Expand Down Expand Up @@ -678,7 +670,6 @@ protected DeidentifyDocumentRequest getDeidentifyDocumentRequest(DeidentifyFileR
Optional<List<EntityType>> entityUniqueCounter = Optional.empty();
Optional<List<String>> allowRegex = Optional.ofNullable(request.getAllowRegexList());
Optional<List<String>> restrictRegex = Optional.ofNullable(request.getRestrictRegexList());
Optional<Transformations> transformations = Optional.ofNullable(getTransformations(request.getTransformations()));

TokenTypeWithoutVault tokenType = buildTokenType(tokenFormat, entityTypes, entityUniqueCounter);

Expand All @@ -694,7 +685,6 @@ protected DeidentifyDocumentRequest getDeidentifyDocumentRequest(DeidentifyFileR
.tokenType(tokenType)
.allowRegex(allowRegex)
.restrictRegex(restrictRegex)
.transformations(transformations)
.build();
}

Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/skyflow/errors/ErrorMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -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."),
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/skyflow/generated/rest/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,7 +31,7 @@ public class ApiClient {

protected final Supplier<AuthenticationClient> authenticationClient;

protected final Supplier<DeprecatedClient> deprecatedClient;
protected final Supplier<GuardrailsClient> guardrailsClient;

protected final Supplier<StringsClient> stringsClient;

Expand All @@ -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));
}
Expand Down Expand Up @@ -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() {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/skyflow/generated/rest/AsyncApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,7 +31,7 @@ public class AsyncApiClient {

protected final Supplier<AsyncAuthenticationClient> authenticationClient;

protected final Supplier<AsyncDeprecatedClient> deprecatedClient;
protected final Supplier<AsyncGuardrailsClient> guardrailsClient;

protected final Supplier<AsyncStringsClient> stringsClient;

Expand All @@ -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));
}
Expand Down Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Map<String, List<String>> headers() {
return this.headers;
}

@java.lang.Override
@Override
public String toString() {
return "ApiClientApiException{" + "message: " + getMessage() + ", statusCode: " + statusCode + ", body: " + body
+ "}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading
Loading