diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3883a1a9..2b2945f0 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: - java-version: "1.8" + java-version: "11" - name: create-json id: create-json diff --git a/src/main/java/com/skyflow/VaultClient.java b/src/main/java/com/skyflow/VaultClient.java index 176f9349..edb8ee47 100644 --- a/src/main/java/com/skyflow/VaultClient.java +++ b/src/main/java/com/skyflow/VaultClient.java @@ -17,6 +17,7 @@ import com.skyflow.generated.rest.resources.records.requests.RecordServiceBatchOperationBody; import com.skyflow.generated.rest.resources.records.requests.RecordServiceInsertRecordBody; import com.skyflow.generated.rest.resources.records.requests.RecordServiceUpdateRecordBody; +import com.skyflow.generated.rest.resources.records.requests.UploadFileV2Request; import com.skyflow.generated.rest.resources.strings.StringsClient; import com.skyflow.generated.rest.resources.strings.requests.DeidentifyStringRequest; import com.skyflow.generated.rest.resources.strings.requests.ReidentifyStringRequest; @@ -32,6 +33,7 @@ import com.skyflow.utils.Utils; import com.skyflow.utils.logger.LogUtil; import com.skyflow.utils.validations.Validations; +import com.skyflow.vault.data.FileUploadRequest; import com.skyflow.vault.data.InsertRequest; import com.skyflow.vault.data.UpdateRequest; import com.skyflow.vault.detect.*; @@ -44,6 +46,10 @@ import io.github.cdimascio.dotenv.Dotenv; import io.github.cdimascio.dotenv.DotenvException; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; import java.util.*; import java.util.stream.Collectors; @@ -209,6 +215,22 @@ protected V1TokenizePayload getTokenizePayload(TokenizeRequest request) { return payloadBuilder.build(); } + protected File getFileForFileUpload(FileUploadRequest fileUploadRequest) throws IOException { + if (fileUploadRequest.getFilePath() != null) { + return new File(fileUploadRequest.getFilePath()); + } + else if (fileUploadRequest.getBase64() != null) { + byte[] decodedBytes = Base64.getDecoder().decode(fileUploadRequest.getBase64()); + File file = new File(fileUploadRequest.getFileName()); + Files.write(file.toPath(), decodedBytes); + return file; + } + else if (fileUploadRequest.getFileObject() != null) { + return fileUploadRequest.getFileObject(); + } + return null; + } + protected void setBearerToken() throws SkyflowException { prioritiseCredentials(); Validations.validateCredentials(this.finalCredentials); diff --git a/src/main/java/com/skyflow/errors/ErrorMessage.java b/src/main/java/com/skyflow/errors/ErrorMessage.java index 6070cb75..ac6adfd0 100644 --- a/src/main/java/com/skyflow/errors/ErrorMessage.java +++ b/src/main/java/com/skyflow/errors/ErrorMessage.java @@ -124,6 +124,13 @@ public enum ErrorMessage { InvalidRequestBody("%s0 Validation error. Invalid request body. Specify the request body as an object."), EmptyRequestBody("%s0 Validation error. Request body can't be empty. Specify a valid request body."), + // File upload + ColumnNameKeyErrorFileUpload("%s0 Validation error. columnName is missing from the payload. Specify a columnName key."), + MissingFileSourceInUploadFileRequest("%s0 Validation error. Provide exactly one of filePath, base64, or fileObject."), + FileNameMustBeProvidedWithFileObject("%s0 Validation error. fileName must be provided when using fileObject."), + InvalidFileObject("%s0 Validation error. Invalid file object in file upload request. Specify a valid file object."), + InvalidBase64("%s0 Validation error. Invalid base64 string in file upload request. Specify a valid base64 string."), + // detect InvalidTextInDeIdentify("%s0 Validation error. The text field is required and must be a non-empty string. Specify a valid text."), InvalidTextInReIdentify("%s0 Validation error. The text field is required and must be a non-empty string. Specify a valid text."), 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 4fab1d41..a4487b1e 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; } - @Override + @java.lang.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 62a6ddd4..fe635bf1 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.305"); + put("X-Fern-SDK-Version", "0.0.322"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/skyflow/generated/rest/errors/BadRequestError.java b/src/main/java/com/skyflow/generated/rest/errors/BadRequestError.java index 80ae5e7c..c8d4bb99 100644 --- a/src/main/java/com/skyflow/generated/rest/errors/BadRequestError.java +++ b/src/main/java/com/skyflow/generated/rest/errors/BadRequestError.java @@ -25,7 +25,7 @@ public BadRequestError(Object body, Response rawResponse) { /** * @return the body */ - @Override + @java.lang.Override public Object body() { return this.body; } diff --git a/src/main/java/com/skyflow/generated/rest/errors/InternalServerError.java b/src/main/java/com/skyflow/generated/rest/errors/InternalServerError.java index ffeed9d7..d29f2b82 100644 --- a/src/main/java/com/skyflow/generated/rest/errors/InternalServerError.java +++ b/src/main/java/com/skyflow/generated/rest/errors/InternalServerError.java @@ -26,7 +26,7 @@ public InternalServerError(ErrorResponse body, Response rawResponse) { /** * @return the body */ - @Override + @java.lang.Override public ErrorResponse body() { return this.body; } diff --git a/src/main/java/com/skyflow/generated/rest/errors/NotFoundError.java b/src/main/java/com/skyflow/generated/rest/errors/NotFoundError.java index 1d0a6ad0..efa94aad 100644 --- a/src/main/java/com/skyflow/generated/rest/errors/NotFoundError.java +++ b/src/main/java/com/skyflow/generated/rest/errors/NotFoundError.java @@ -25,7 +25,7 @@ public NotFoundError(Object body, Response rawResponse) { /** * @return the body */ - @Override + @java.lang.Override public Object body() { return this.body; } diff --git a/src/main/java/com/skyflow/generated/rest/errors/UnauthorizedError.java b/src/main/java/com/skyflow/generated/rest/errors/UnauthorizedError.java index 3bc254bc..3b6d6ae1 100644 --- a/src/main/java/com/skyflow/generated/rest/errors/UnauthorizedError.java +++ b/src/main/java/com/skyflow/generated/rest/errors/UnauthorizedError.java @@ -25,7 +25,7 @@ public UnauthorizedError(Object body, Response rawResponse) { /** * @return the body */ - @Override + @java.lang.Override public Object body() { return this.body; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/audit/requests/AuditServiceListAuditEventsRequest.java b/src/main/java/com/skyflow/generated/rest/resources/audit/requests/AuditServiceListAuditEventsRequest.java index 8b6686e4..3da04589 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/audit/requests/AuditServiceListAuditEventsRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/audit/requests/AuditServiceListAuditEventsRequest.java @@ -430,7 +430,7 @@ public Optional getOffset() { return offset; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof AuditServiceListAuditEventsRequest @@ -478,7 +478,7 @@ private boolean equalTo(AuditServiceListAuditEventsRequest other) { && offset.equals(other.offset); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.filterOpsContextChangeId, @@ -516,7 +516,7 @@ public int hashCode() { this.offset); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -848,7 +848,7 @@ public static final class Builder implements FilterOpsAccountIdStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(AuditServiceListAuditEventsRequest other) { filterOpsContextChangeId(other.getFilterOpsContextChangeId()); filterOpsContextRequestId(other.getFilterOpsContextRequestId()); @@ -890,7 +890,7 @@ public Builder from(AuditServiceListAuditEventsRequest other) { * Resources with the specified account ID.

Resources with the specified account ID.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("filterOps.accountID") public _FinalStage filterOpsAccountId(@NotNull String filterOpsAccountId) { this.filterOpsAccountId = Objects.requireNonNull(filterOpsAccountId, "filterOpsAccountId must not be null"); @@ -901,7 +901,7 @@ public _FinalStage filterOpsAccountId(@NotNull String filterOpsAccountId) { *

Record position at which to start returning results.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage offset(Long offset) { this.offset = Optional.ofNullable(offset); return this; @@ -910,7 +910,7 @@ public _FinalStage offset(Long offset) { /** *

Record position at which to start returning results.

*/ - @Override + @java.lang.Override @JsonSetter(value = "offset", nulls = Nulls.SKIP) public _FinalStage offset(Optional offset) { this.offset = offset; @@ -921,7 +921,7 @@ public _FinalStage offset(Optional offset) { *

Number of results to return.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage limit(Long limit) { this.limit = Optional.ofNullable(limit); return this; @@ -930,7 +930,7 @@ public _FinalStage limit(Long limit) { /** *

Number of results to return.

*/ - @Override + @java.lang.Override @JsonSetter(value = "limit", nulls = Nulls.SKIP) public _FinalStage limit(Optional limit) { this.limit = limit; @@ -941,7 +941,7 @@ public _FinalStage limit(Optional limit) { *

Change ID provided in the previous audit response's nextOps attribute. An alternate way to manage response pagination. Can't be used with sortOps or offset. For the first request in a series of audit requests, leave blank.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage afterOpsChangeId(String afterOpsChangeId) { this.afterOpsChangeId = Optional.ofNullable(afterOpsChangeId); return this; @@ -950,7 +950,7 @@ public _FinalStage afterOpsChangeId(String afterOpsChangeId) { /** *

Change ID provided in the previous audit response's nextOps attribute. An alternate way to manage response pagination. Can't be used with sortOps or offset. For the first request in a series of audit requests, leave blank.

*/ - @Override + @java.lang.Override @JsonSetter(value = "afterOps.changeID", nulls = Nulls.SKIP) public _FinalStage afterOpsChangeId(Optional afterOpsChangeId) { this.afterOpsChangeId = afterOpsChangeId; @@ -961,7 +961,7 @@ public _FinalStage afterOpsChangeId(Optional afterOpsChangeId) { *

Timestamp provided in the previous audit response's nextOps attribute. An alternate way to manage response pagination. Can't be used with sortOps or offset. For the first request in a series of audit requests, leave blank.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage afterOpsTimestamp(String afterOpsTimestamp) { this.afterOpsTimestamp = Optional.ofNullable(afterOpsTimestamp); return this; @@ -970,7 +970,7 @@ public _FinalStage afterOpsTimestamp(String afterOpsTimestamp) { /** *

Timestamp provided in the previous audit response's nextOps attribute. An alternate way to manage response pagination. Can't be used with sortOps or offset. For the first request in a series of audit requests, leave blank.

*/ - @Override + @java.lang.Override @JsonSetter(value = "afterOps.timestamp", nulls = Nulls.SKIP) public _FinalStage afterOpsTimestamp(Optional afterOpsTimestamp) { this.afterOpsTimestamp = afterOpsTimestamp; @@ -981,7 +981,7 @@ public _FinalStage afterOpsTimestamp(Optional afterOpsTimestamp) { *

Ascending or descending ordering of results.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage sortOpsOrderBy(AuditServiceListAuditEventsRequestSortOpsOrderBy sortOpsOrderBy) { this.sortOpsOrderBy = Optional.ofNullable(sortOpsOrderBy); return this; @@ -990,7 +990,7 @@ public _FinalStage sortOpsOrderBy(AuditServiceListAuditEventsRequestSortOpsOrder /** *

Ascending or descending ordering of results.

*/ - @Override + @java.lang.Override @JsonSetter(value = "sortOps.orderBy", nulls = Nulls.SKIP) public _FinalStage sortOpsOrderBy(Optional sortOpsOrderBy) { this.sortOpsOrderBy = sortOpsOrderBy; @@ -1001,7 +1001,7 @@ public _FinalStage sortOpsOrderBy(OptionalFully-qualified field by which to sort results. Field names should be in camel case (for example, "capitalization.camelCase").

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.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").

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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".

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.Override public _FinalStage filterOpsResourceType( AuditServiceListAuditEventsRequestFilterOpsResourceType filterOpsResourceType) { this.filterOpsResourceType = Optional.ofNullable(filterOpsResourceType); @@ -1191,7 +1191,7 @@ public _FinalStage filterOpsResourceType( /** *

Resources with the specified type.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.Override public _FinalStage filterOpsActionType( AuditServiceListAuditEventsRequestFilterOpsActionType filterOpsActionType) { this.filterOpsActionType = Optional.ofNullable(filterOpsActionType); @@ -1213,7 +1213,7 @@ public _FinalStage filterOpsActionType( /** *

Events with the specified action type.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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".

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.Override public _FinalStage filterOpsContextAuthMode( AuditServiceListAuditEventsRequestFilterOpsContextAuthMode filterOpsContextAuthMode) { this.filterOpsContextAuthMode = Optional.ofNullable(filterOpsContextAuthMode); @@ -1355,7 +1355,7 @@ public _FinalStage filterOpsContextAuthMode( /** *

Authentication mode the actor used.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.Override public _FinalStage filterOpsContextAccessType( AuditServiceListAuditEventsRequestFilterOpsContextAccessType filterOpsContextAccessType) { this.filterOpsContextAccessType = Optional.ofNullable(filterOpsContextAccessType); @@ -1417,7 +1417,7 @@ public _FinalStage filterOpsContextAccessType( /** *

Type of access for the request.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.Override @JsonSetter(value = "filterOps.context.changeID", nulls = Nulls.SKIP) public _FinalStage filterOpsContextChangeId(Optional filterOpsContextChangeId) { this.filterOpsContextChangeId = filterOpsContextChangeId; return this; } - @Override + @java.lang.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 9611f8ab..a9fb6d44 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 - @Override + @java.lang.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 44ac80d9..0b082305 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 - @Override + @java.lang.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 1948ea9c..76a357f4 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 - @Override + @java.lang.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 82c375aa..cfca2e35 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 - @Override + @java.lang.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 864213ec..f5d2eafe 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 - @Override + @java.lang.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 fe3f928e..51fc2715 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 - @Override + @java.lang.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 182952bc..8c4961b1 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; } - @Override + @java.lang.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); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.grantType, @@ -131,7 +131,7 @@ public int hashCode() { this.scope); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -207,7 +207,7 @@ public static final class Builder implements GrantTypeStage, AssertionStage, _Fi private Builder() {} - @Override + @java.lang.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. */ - @Override + @java.lang.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. */ - @Override + @java.lang.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. */ - @Override + @java.lang.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>".

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.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.

*/ - @Override + @java.lang.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. */ - @Override + @java.lang.Override public _FinalStage subjectToken(String subjectToken) { this.subjectToken = Optional.ofNullable(subjectToken); return this; @@ -313,14 +313,14 @@ public _FinalStage subjectToken(String subjectToken) { /** *

Subject token.

*/ - @Override + @java.lang.Override @JsonSetter(value = "subject_token", nulls = Nulls.SKIP) public _FinalStage subjectToken(Optional subjectToken) { this.subjectToken = subjectToken; return this; } - @Override + @java.lang.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 af827e01..d4a1c21b 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; } - @Override + @java.lang.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); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.fields, this.bin, this.vaultSchemaConfig, this.skyflowId); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } 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 fddcb445..b9f02d97 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 @@ -181,7 +181,7 @@ public Optional getTransformations() { return transformations; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyAudioRequest && equalTo((DeidentifyAudioRequest) other); @@ -209,7 +209,7 @@ private boolean equalTo(DeidentifyAudioRequest other) { && transformations.equals(other.transformations); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.vaultId, @@ -228,7 +228,7 @@ public int hashCode() { this.transformations); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -355,7 +355,7 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyAudioRequest other) { vaultId(other.getVaultId()); file(other.getFile()); @@ -374,7 +374,7 @@ public Builder from(DeidentifyAudioRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public FileStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -385,72 +385,72 @@ public FileStage vaultId(@NotNull String vaultId) { * File to de-identify. Files are specified as Base64-encoded data.

File to de-identify. Files are specified as Base64-encoded data.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("file") public _FinalStage file(@NotNull DeidentifyAudioRequestFile file) { this.file = Objects.requireNonNull(file, "file must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage transformations(Transformations transformations) { this.transformations = Optional.ofNullable(transformations); return this; } - @Override + @java.lang.Override @JsonSetter(value = "transformations", nulls = Nulls.SKIP) public _FinalStage transformations(Optional transformations) { this.transformations = transformations; return this; } - @Override + @java.lang.Override public _FinalStage restrictRegex(List restrictRegex) { this.restrictRegex = Optional.ofNullable(restrictRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP) public _FinalStage restrictRegex(Optional> restrictRegex) { this.restrictRegex = restrictRegex; return this; } - @Override + @java.lang.Override public _FinalStage allowRegex(List allowRegex) { this.allowRegex = Optional.ofNullable(allowRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP) public _FinalStage allowRegex(Optional> allowRegex) { this.allowRegex = allowRegex; return this; } - @Override + @java.lang.Override public _FinalStage tokenType(TokenTypeWithoutVault tokenType) { this.tokenType = Optional.ofNullable(tokenType); return this; } - @Override + @java.lang.Override @JsonSetter(value = "token_type", nulls = Nulls.SKIP) public _FinalStage tokenType(Optional tokenType) { this.tokenType = tokenType; return this; } - @Override + @java.lang.Override public _FinalStage entityTypes(List entityTypes) { this.entityTypes = Optional.ofNullable(entityTypes); return this; } - @Override + @java.lang.Override @JsonSetter(value = "entity_types", nulls = Nulls.SKIP) public _FinalStage entityTypes(Optional> entityTypes) { this.entityTypes = entityTypes; @@ -461,7 +461,7 @@ public _FinalStage entityTypes(Optional> entityTypes) { *

Padding added to the end of a bleep, in seconds.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage bleepStopPadding(Double bleepStopPadding) { this.bleepStopPadding = Optional.ofNullable(bleepStopPadding); return this; @@ -470,7 +470,7 @@ public _FinalStage bleepStopPadding(Double bleepStopPadding) { /** *

Padding added to the end of a bleep, in seconds.

*/ - @Override + @java.lang.Override @JsonSetter(value = "bleep_stop_padding", nulls = Nulls.SKIP) public _FinalStage bleepStopPadding(Optional bleepStopPadding) { this.bleepStopPadding = bleepStopPadding; @@ -481,7 +481,7 @@ public _FinalStage bleepStopPadding(Optional bleepStopPadding) { *

Padding added to the beginning of a bleep, in seconds.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage bleepStartPadding(Double bleepStartPadding) { this.bleepStartPadding = Optional.ofNullable(bleepStartPadding); return this; @@ -490,7 +490,7 @@ public _FinalStage bleepStartPadding(Double bleepStartPadding) { /** *

Padding added to the beginning of a bleep, in seconds.

*/ - @Override + @java.lang.Override @JsonSetter(value = "bleep_start_padding", nulls = Nulls.SKIP) public _FinalStage bleepStartPadding(Optional bleepStartPadding) { this.bleepStartPadding = bleepStartPadding; @@ -501,7 +501,7 @@ public _FinalStage bleepStartPadding(Optional bleepStartPadding) { *

The pitch of the bleep sound, in Hz. The higher the number, the higher the pitch.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage bleepFrequency(Double bleepFrequency) { this.bleepFrequency = Optional.ofNullable(bleepFrequency); return this; @@ -510,7 +510,7 @@ public _FinalStage bleepFrequency(Double bleepFrequency) { /** *

The pitch of the bleep sound, in Hz. The higher the number, the higher the pitch.

*/ - @Override + @java.lang.Override @JsonSetter(value = "bleep_frequency", nulls = Nulls.SKIP) public _FinalStage bleepFrequency(Optional bleepFrequency) { this.bleepFrequency = bleepFrequency; @@ -521,7 +521,7 @@ public _FinalStage bleepFrequency(Optional bleepFrequency) { *

Relative loudness of the bleep in dB. Positive values increase its loudness, and negative values decrease it.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage bleepGain(Double bleepGain) { this.bleepGain = Optional.ofNullable(bleepGain); return this; @@ -530,7 +530,7 @@ public _FinalStage bleepGain(Double bleepGain) { /** *

Relative loudness of the bleep in dB. Positive values increase its loudness, and negative values decrease it.

*/ - @Override + @java.lang.Override @JsonSetter(value = "bleep_gain", nulls = Nulls.SKIP) public _FinalStage bleepGain(Optional bleepGain) { this.bleepGain = bleepGain; @@ -541,7 +541,7 @@ public _FinalStage bleepGain(Optional bleepGain) { *

Type of transcription to output.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage outputTranscription(DeidentifyAudioRequestOutputTranscription outputTranscription) { this.outputTranscription = Optional.ofNullable(outputTranscription); return this; @@ -550,7 +550,7 @@ public _FinalStage outputTranscription(DeidentifyAudioRequestOutputTranscription /** *

Type of transcription to output.

*/ - @Override + @java.lang.Override @JsonSetter(value = "output_transcription", nulls = Nulls.SKIP) public _FinalStage outputTranscription( Optional outputTranscription) { @@ -562,7 +562,7 @@ public _FinalStage outputTranscription( *

If true, includes processed audio file in the response.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage outputProcessedAudio(Boolean outputProcessedAudio) { this.outputProcessedAudio = Optional.ofNullable(outputProcessedAudio); return this; @@ -571,27 +571,27 @@ public _FinalStage outputProcessedAudio(Boolean outputProcessedAudio) { /** *

If true, includes processed audio file in the response.

*/ - @Override + @java.lang.Override @JsonSetter(value = "output_processed_audio", nulls = Nulls.SKIP) public _FinalStage outputProcessedAudio(Optional outputProcessedAudio) { this.outputProcessedAudio = outputProcessedAudio; return this; } - @Override + @java.lang.Override public _FinalStage configurationId(String configurationId) { this.configurationId = Optional.ofNullable(configurationId); return this; } - @Override + @java.lang.Override @JsonSetter(value = "configuration_id", nulls = Nulls.SKIP) public _FinalStage configurationId(Optional configurationId) { this.configurationId = configurationId; return this; } - @Override + @java.lang.Override public DeidentifyAudioRequest build() { return new DeidentifyAudioRequest( vaultId, diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyDocumentRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyDocumentRequest.java index cd2cd7f6..dd2d1548 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyDocumentRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyDocumentRequest.java @@ -108,7 +108,7 @@ public Optional getTransformations() { return transformations; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyDocumentRequest && equalTo((DeidentifyDocumentRequest) other); @@ -130,7 +130,7 @@ private boolean equalTo(DeidentifyDocumentRequest other) { && transformations.equals(other.transformations); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.vaultId, @@ -143,7 +143,7 @@ public int hashCode() { this.transformations); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -216,7 +216,7 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyDocumentRequest other) { vaultId(other.getVaultId()); file(other.getFile()); @@ -229,7 +229,7 @@ public Builder from(DeidentifyDocumentRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public FileStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -240,92 +240,92 @@ public FileStage vaultId(@NotNull String vaultId) { * File to de-identify. Files are specified as Base64-encoded data.

File to de-identify. Files are specified as Base64-encoded data.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("file") public _FinalStage file(@NotNull DeidentifyDocumentRequestFile file) { this.file = Objects.requireNonNull(file, "file must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage transformations(Transformations transformations) { this.transformations = Optional.ofNullable(transformations); return this; } - @Override + @java.lang.Override @JsonSetter(value = "transformations", nulls = Nulls.SKIP) public _FinalStage transformations(Optional transformations) { this.transformations = transformations; return this; } - @Override + @java.lang.Override public _FinalStage restrictRegex(List restrictRegex) { this.restrictRegex = Optional.ofNullable(restrictRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP) public _FinalStage restrictRegex(Optional> restrictRegex) { this.restrictRegex = restrictRegex; return this; } - @Override + @java.lang.Override public _FinalStage allowRegex(List allowRegex) { this.allowRegex = Optional.ofNullable(allowRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP) public _FinalStage allowRegex(Optional> allowRegex) { this.allowRegex = allowRegex; return this; } - @Override + @java.lang.Override public _FinalStage tokenType(TokenTypeWithoutVault tokenType) { this.tokenType = Optional.ofNullable(tokenType); return this; } - @Override + @java.lang.Override @JsonSetter(value = "token_type", nulls = Nulls.SKIP) public _FinalStage tokenType(Optional tokenType) { this.tokenType = tokenType; return this; } - @Override + @java.lang.Override public _FinalStage entityTypes(List entityTypes) { this.entityTypes = Optional.ofNullable(entityTypes); return this; } - @Override + @java.lang.Override @JsonSetter(value = "entity_types", nulls = Nulls.SKIP) public _FinalStage entityTypes(Optional> entityTypes) { this.entityTypes = entityTypes; return this; } - @Override + @java.lang.Override public _FinalStage configurationId(String configurationId) { this.configurationId = Optional.ofNullable(configurationId); return this; } - @Override + @java.lang.Override @JsonSetter(value = "configuration_id", nulls = Nulls.SKIP) public _FinalStage configurationId(Optional configurationId) { this.configurationId = configurationId; return this; } - @Override + @java.lang.Override public DeidentifyDocumentRequest build() { return new DeidentifyDocumentRequest( vaultId, diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyFileRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyFileRequest.java index 08f642dd..ae21845d 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyFileRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyFileRequest.java @@ -108,7 +108,7 @@ public Optional getTransformations() { return transformations; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyFileRequest && equalTo((DeidentifyFileRequest) other); @@ -130,7 +130,7 @@ private boolean equalTo(DeidentifyFileRequest other) { && transformations.equals(other.transformations); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.vaultId, @@ -143,7 +143,7 @@ public int hashCode() { this.transformations); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -216,7 +216,7 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyFileRequest other) { vaultId(other.getVaultId()); file(other.getFile()); @@ -229,7 +229,7 @@ public Builder from(DeidentifyFileRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public FileStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -240,92 +240,92 @@ public FileStage vaultId(@NotNull String vaultId) { * File to de-identify. Files are specified as Base64-encoded data.

File to de-identify. Files are specified as Base64-encoded data.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("file") public _FinalStage file(@NotNull DeidentifyFileRequestFile file) { this.file = Objects.requireNonNull(file, "file must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage transformations(Transformations transformations) { this.transformations = Optional.ofNullable(transformations); return this; } - @Override + @java.lang.Override @JsonSetter(value = "transformations", nulls = Nulls.SKIP) public _FinalStage transformations(Optional transformations) { this.transformations = transformations; return this; } - @Override + @java.lang.Override public _FinalStage restrictRegex(List restrictRegex) { this.restrictRegex = Optional.ofNullable(restrictRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP) public _FinalStage restrictRegex(Optional> restrictRegex) { this.restrictRegex = restrictRegex; return this; } - @Override + @java.lang.Override public _FinalStage allowRegex(List allowRegex) { this.allowRegex = Optional.ofNullable(allowRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP) public _FinalStage allowRegex(Optional> allowRegex) { this.allowRegex = allowRegex; return this; } - @Override + @java.lang.Override public _FinalStage tokenType(TokenTypeWithoutVault tokenType) { this.tokenType = Optional.ofNullable(tokenType); return this; } - @Override + @java.lang.Override @JsonSetter(value = "token_type", nulls = Nulls.SKIP) public _FinalStage tokenType(Optional tokenType) { this.tokenType = tokenType; return this; } - @Override + @java.lang.Override public _FinalStage entityTypes(List entityTypes) { this.entityTypes = Optional.ofNullable(entityTypes); return this; } - @Override + @java.lang.Override @JsonSetter(value = "entity_types", nulls = Nulls.SKIP) public _FinalStage entityTypes(Optional> entityTypes) { this.entityTypes = entityTypes; return this; } - @Override + @java.lang.Override public _FinalStage configurationId(String configurationId) { this.configurationId = Optional.ofNullable(configurationId); return this; } - @Override + @java.lang.Override @JsonSetter(value = "configuration_id", nulls = Nulls.SKIP) public _FinalStage configurationId(Optional configurationId) { this.configurationId = configurationId; return this; } - @Override + @java.lang.Override public DeidentifyFileRequest build() { return new DeidentifyFileRequest( vaultId, diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyImageRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyImageRequest.java index e113a437..92445d02 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyImageRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyImageRequest.java @@ -145,7 +145,7 @@ public Optional getTransformations() { return transformations; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyImageRequest && equalTo((DeidentifyImageRequest) other); @@ -170,7 +170,7 @@ private boolean equalTo(DeidentifyImageRequest other) { && transformations.equals(other.transformations); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.vaultId, @@ -186,7 +186,7 @@ public int hashCode() { this.transformations); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -286,7 +286,7 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyImageRequest other) { vaultId(other.getVaultId()); file(other.getFile()); @@ -302,7 +302,7 @@ public Builder from(DeidentifyImageRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public FileStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -313,72 +313,72 @@ public FileStage vaultId(@NotNull String vaultId) { * File to de-identify. Files are specified as Base64-encoded data.

File to de-identify. Files are specified as Base64-encoded data.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("file") public _FinalStage file(@NotNull DeidentifyImageRequestFile file) { this.file = Objects.requireNonNull(file, "file must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage transformations(Transformations transformations) { this.transformations = Optional.ofNullable(transformations); return this; } - @Override + @java.lang.Override @JsonSetter(value = "transformations", nulls = Nulls.SKIP) public _FinalStage transformations(Optional transformations) { this.transformations = transformations; return this; } - @Override + @java.lang.Override public _FinalStage restrictRegex(List restrictRegex) { this.restrictRegex = Optional.ofNullable(restrictRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP) public _FinalStage restrictRegex(Optional> restrictRegex) { this.restrictRegex = restrictRegex; return this; } - @Override + @java.lang.Override public _FinalStage allowRegex(List allowRegex) { this.allowRegex = Optional.ofNullable(allowRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP) public _FinalStage allowRegex(Optional> allowRegex) { this.allowRegex = allowRegex; return this; } - @Override + @java.lang.Override public _FinalStage tokenType(TokenTypeWithoutVault tokenType) { this.tokenType = Optional.ofNullable(tokenType); return this; } - @Override + @java.lang.Override @JsonSetter(value = "token_type", nulls = Nulls.SKIP) public _FinalStage tokenType(Optional tokenType) { this.tokenType = tokenType; return this; } - @Override + @java.lang.Override public _FinalStage entityTypes(List entityTypes) { this.entityTypes = Optional.ofNullable(entityTypes); return this; } - @Override + @java.lang.Override @JsonSetter(value = "entity_types", nulls = Nulls.SKIP) public _FinalStage entityTypes(Optional> entityTypes) { this.entityTypes = entityTypes; @@ -389,7 +389,7 @@ public _FinalStage entityTypes(Optional> entityTypes) { *

Method to mask the entities in the image.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage maskingMethod(DeidentifyImageRequestMaskingMethod maskingMethod) { this.maskingMethod = Optional.ofNullable(maskingMethod); return this; @@ -398,7 +398,7 @@ public _FinalStage maskingMethod(DeidentifyImageRequestMaskingMethod maskingMeth /** *

Method to mask the entities in the image.

*/ - @Override + @java.lang.Override @JsonSetter(value = "masking_method", nulls = Nulls.SKIP) public _FinalStage maskingMethod(Optional maskingMethod) { this.maskingMethod = maskingMethod; @@ -409,7 +409,7 @@ public _FinalStage maskingMethod(Optional m *

If true, includes OCR text output in the response.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage outputOcrText(Boolean outputOcrText) { this.outputOcrText = Optional.ofNullable(outputOcrText); return this; @@ -418,7 +418,7 @@ public _FinalStage outputOcrText(Boolean outputOcrText) { /** *

If true, includes OCR text output in the response.

*/ - @Override + @java.lang.Override @JsonSetter(value = "output_ocr_text", nulls = Nulls.SKIP) public _FinalStage outputOcrText(Optional outputOcrText) { this.outputOcrText = outputOcrText; @@ -429,7 +429,7 @@ public _FinalStage outputOcrText(Optional outputOcrText) { *

If true, includes processed image in the output.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage outputProcessedImage(Boolean outputProcessedImage) { this.outputProcessedImage = Optional.ofNullable(outputProcessedImage); return this; @@ -438,27 +438,27 @@ public _FinalStage outputProcessedImage(Boolean outputProcessedImage) { /** *

If true, includes processed image in the output.

*/ - @Override + @java.lang.Override @JsonSetter(value = "output_processed_image", nulls = Nulls.SKIP) public _FinalStage outputProcessedImage(Optional outputProcessedImage) { this.outputProcessedImage = outputProcessedImage; return this; } - @Override + @java.lang.Override public _FinalStage configurationId(String configurationId) { this.configurationId = Optional.ofNullable(configurationId); return this; } - @Override + @java.lang.Override @JsonSetter(value = "configuration_id", nulls = Nulls.SKIP) public _FinalStage configurationId(Optional configurationId) { this.configurationId = configurationId; return this; } - @Override + @java.lang.Override public DeidentifyImageRequest build() { return new DeidentifyImageRequest( vaultId, diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyPdfRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyPdfRequest.java index 0ce2a1e4..4927eff3 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyPdfRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyPdfRequest.java @@ -132,7 +132,7 @@ public Optional getTransformations() { return transformations; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyPdfRequest && equalTo((DeidentifyPdfRequest) other); @@ -156,7 +156,7 @@ private boolean equalTo(DeidentifyPdfRequest other) { && transformations.equals(other.transformations); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.vaultId, @@ -171,7 +171,7 @@ public int hashCode() { this.transformations); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -262,7 +262,7 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyPdfRequest other) { vaultId(other.getVaultId()); file(other.getFile()); @@ -277,7 +277,7 @@ public Builder from(DeidentifyPdfRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public FileStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -288,72 +288,72 @@ public FileStage vaultId(@NotNull String vaultId) { * File to de-identify. Files are specified as Base64-encoded data.

File to de-identify. Files are specified as Base64-encoded data.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("file") public _FinalStage file(@NotNull DeidentifyPdfRequestFile file) { this.file = Objects.requireNonNull(file, "file must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage transformations(Transformations transformations) { this.transformations = Optional.ofNullable(transformations); return this; } - @Override + @java.lang.Override @JsonSetter(value = "transformations", nulls = Nulls.SKIP) public _FinalStage transformations(Optional transformations) { this.transformations = transformations; return this; } - @Override + @java.lang.Override public _FinalStage restrictRegex(List restrictRegex) { this.restrictRegex = Optional.ofNullable(restrictRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP) public _FinalStage restrictRegex(Optional> restrictRegex) { this.restrictRegex = restrictRegex; return this; } - @Override + @java.lang.Override public _FinalStage allowRegex(List allowRegex) { this.allowRegex = Optional.ofNullable(allowRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP) public _FinalStage allowRegex(Optional> allowRegex) { this.allowRegex = allowRegex; return this; } - @Override + @java.lang.Override public _FinalStage tokenType(TokenTypeWithoutVault tokenType) { this.tokenType = Optional.ofNullable(tokenType); return this; } - @Override + @java.lang.Override @JsonSetter(value = "token_type", nulls = Nulls.SKIP) public _FinalStage tokenType(Optional tokenType) { this.tokenType = tokenType; return this; } - @Override + @java.lang.Override public _FinalStage entityTypes(List entityTypes) { this.entityTypes = Optional.ofNullable(entityTypes); return this; } - @Override + @java.lang.Override @JsonSetter(value = "entity_types", nulls = Nulls.SKIP) public _FinalStage entityTypes(Optional> entityTypes) { this.entityTypes = entityTypes; @@ -364,7 +364,7 @@ public _FinalStage entityTypes(Optional> entityTypes) { *

Max resolution at which to process the PDF file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage maxResolution(Double maxResolution) { this.maxResolution = Optional.ofNullable(maxResolution); return this; @@ -373,7 +373,7 @@ public _FinalStage maxResolution(Double maxResolution) { /** *

Max resolution at which to process the PDF file.

*/ - @Override + @java.lang.Override @JsonSetter(value = "max_resolution", nulls = Nulls.SKIP) public _FinalStage maxResolution(Optional maxResolution) { this.maxResolution = maxResolution; @@ -384,7 +384,7 @@ public _FinalStage maxResolution(Optional maxResolution) { *

Pixel density at which to process the PDF file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage density(Double density) { this.density = Optional.ofNullable(density); return this; @@ -393,27 +393,27 @@ public _FinalStage density(Double density) { /** *

Pixel density at which to process the PDF file.

*/ - @Override + @java.lang.Override @JsonSetter(value = "density", nulls = Nulls.SKIP) public _FinalStage density(Optional density) { this.density = density; return this; } - @Override + @java.lang.Override public _FinalStage configurationId(String configurationId) { this.configurationId = Optional.ofNullable(configurationId); return this; } - @Override + @java.lang.Override @JsonSetter(value = "configuration_id", nulls = Nulls.SKIP) public _FinalStage configurationId(Optional configurationId) { this.configurationId = configurationId; return this; } - @Override + @java.lang.Override public DeidentifyPdfRequest build() { return new DeidentifyPdfRequest( vaultId, diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyPresentationRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyPresentationRequest.java index c2ebbb6c..95ced625 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyPresentationRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyPresentationRequest.java @@ -108,7 +108,7 @@ public Optional getTransformations() { return transformations; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyPresentationRequest && equalTo((DeidentifyPresentationRequest) other); @@ -130,7 +130,7 @@ private boolean equalTo(DeidentifyPresentationRequest other) { && transformations.equals(other.transformations); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.vaultId, @@ -143,7 +143,7 @@ public int hashCode() { this.transformations); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -216,7 +216,7 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyPresentationRequest other) { vaultId(other.getVaultId()); file(other.getFile()); @@ -229,7 +229,7 @@ public Builder from(DeidentifyPresentationRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public FileStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -240,92 +240,92 @@ public FileStage vaultId(@NotNull String vaultId) { * File to de-identify. Files are specified as Base64-encoded data.

File to de-identify. Files are specified as Base64-encoded data.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("file") public _FinalStage file(@NotNull DeidentifyPresentationRequestFile file) { this.file = Objects.requireNonNull(file, "file must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage transformations(Transformations transformations) { this.transformations = Optional.ofNullable(transformations); return this; } - @Override + @java.lang.Override @JsonSetter(value = "transformations", nulls = Nulls.SKIP) public _FinalStage transformations(Optional transformations) { this.transformations = transformations; return this; } - @Override + @java.lang.Override public _FinalStage restrictRegex(List restrictRegex) { this.restrictRegex = Optional.ofNullable(restrictRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP) public _FinalStage restrictRegex(Optional> restrictRegex) { this.restrictRegex = restrictRegex; return this; } - @Override + @java.lang.Override public _FinalStage allowRegex(List allowRegex) { this.allowRegex = Optional.ofNullable(allowRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP) public _FinalStage allowRegex(Optional> allowRegex) { this.allowRegex = allowRegex; return this; } - @Override + @java.lang.Override public _FinalStage tokenType(TokenTypeWithoutVault tokenType) { this.tokenType = Optional.ofNullable(tokenType); return this; } - @Override + @java.lang.Override @JsonSetter(value = "token_type", nulls = Nulls.SKIP) public _FinalStage tokenType(Optional tokenType) { this.tokenType = tokenType; return this; } - @Override + @java.lang.Override public _FinalStage entityTypes(List entityTypes) { this.entityTypes = Optional.ofNullable(entityTypes); return this; } - @Override + @java.lang.Override @JsonSetter(value = "entity_types", nulls = Nulls.SKIP) public _FinalStage entityTypes(Optional> entityTypes) { this.entityTypes = entityTypes; return this; } - @Override + @java.lang.Override public _FinalStage configurationId(String configurationId) { this.configurationId = Optional.ofNullable(configurationId); return this; } - @Override + @java.lang.Override @JsonSetter(value = "configuration_id", nulls = Nulls.SKIP) public _FinalStage configurationId(Optional configurationId) { this.configurationId = configurationId; return this; } - @Override + @java.lang.Override public DeidentifyPresentationRequest build() { return new DeidentifyPresentationRequest( vaultId, diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifySpreadsheetRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifySpreadsheetRequest.java index d5ec413c..283457f8 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifySpreadsheetRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifySpreadsheetRequest.java @@ -108,7 +108,7 @@ public Optional getTransformations() { return transformations; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifySpreadsheetRequest && equalTo((DeidentifySpreadsheetRequest) other); @@ -130,7 +130,7 @@ private boolean equalTo(DeidentifySpreadsheetRequest other) { && transformations.equals(other.transformations); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.vaultId, @@ -143,7 +143,7 @@ public int hashCode() { this.transformations); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -216,7 +216,7 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifySpreadsheetRequest other) { vaultId(other.getVaultId()); file(other.getFile()); @@ -229,7 +229,7 @@ public Builder from(DeidentifySpreadsheetRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public FileStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -240,92 +240,92 @@ public FileStage vaultId(@NotNull String vaultId) { * File to de-identify. Files are specified as Base64-encoded data.

File to de-identify. Files are specified as Base64-encoded data.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("file") public _FinalStage file(@NotNull DeidentifySpreadsheetRequestFile file) { this.file = Objects.requireNonNull(file, "file must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage transformations(Transformations transformations) { this.transformations = Optional.ofNullable(transformations); return this; } - @Override + @java.lang.Override @JsonSetter(value = "transformations", nulls = Nulls.SKIP) public _FinalStage transformations(Optional transformations) { this.transformations = transformations; return this; } - @Override + @java.lang.Override public _FinalStage restrictRegex(List restrictRegex) { this.restrictRegex = Optional.ofNullable(restrictRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP) public _FinalStage restrictRegex(Optional> restrictRegex) { this.restrictRegex = restrictRegex; return this; } - @Override + @java.lang.Override public _FinalStage allowRegex(List allowRegex) { this.allowRegex = Optional.ofNullable(allowRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP) public _FinalStage allowRegex(Optional> allowRegex) { this.allowRegex = allowRegex; return this; } - @Override + @java.lang.Override public _FinalStage tokenType(TokenTypeWithoutVault tokenType) { this.tokenType = Optional.ofNullable(tokenType); return this; } - @Override + @java.lang.Override @JsonSetter(value = "token_type", nulls = Nulls.SKIP) public _FinalStage tokenType(Optional tokenType) { this.tokenType = tokenType; return this; } - @Override + @java.lang.Override public _FinalStage entityTypes(List entityTypes) { this.entityTypes = Optional.ofNullable(entityTypes); return this; } - @Override + @java.lang.Override @JsonSetter(value = "entity_types", nulls = Nulls.SKIP) public _FinalStage entityTypes(Optional> entityTypes) { this.entityTypes = entityTypes; return this; } - @Override + @java.lang.Override public _FinalStage configurationId(String configurationId) { this.configurationId = Optional.ofNullable(configurationId); return this; } - @Override + @java.lang.Override @JsonSetter(value = "configuration_id", nulls = Nulls.SKIP) public _FinalStage configurationId(Optional configurationId) { this.configurationId = configurationId; return this; } - @Override + @java.lang.Override public DeidentifySpreadsheetRequest build() { return new DeidentifySpreadsheetRequest( vaultId, diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyStructuredTextRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyStructuredTextRequest.java index 0fca98a5..8ff7e195 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyStructuredTextRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyStructuredTextRequest.java @@ -108,7 +108,7 @@ public Optional getTransformations() { return transformations; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyStructuredTextRequest && equalTo((DeidentifyStructuredTextRequest) other); @@ -130,7 +130,7 @@ private boolean equalTo(DeidentifyStructuredTextRequest other) { && transformations.equals(other.transformations); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.vaultId, @@ -143,7 +143,7 @@ public int hashCode() { this.transformations); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -216,7 +216,7 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyStructuredTextRequest other) { vaultId(other.getVaultId()); file(other.getFile()); @@ -229,7 +229,7 @@ public Builder from(DeidentifyStructuredTextRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public FileStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -240,92 +240,92 @@ public FileStage vaultId(@NotNull String vaultId) { * File to de-identify. Files are specified as Base64-encoded data.

File to de-identify. Files are specified as Base64-encoded data.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("file") public _FinalStage file(@NotNull DeidentifyStructuredTextRequestFile file) { this.file = Objects.requireNonNull(file, "file must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage transformations(Transformations transformations) { this.transformations = Optional.ofNullable(transformations); return this; } - @Override + @java.lang.Override @JsonSetter(value = "transformations", nulls = Nulls.SKIP) public _FinalStage transformations(Optional transformations) { this.transformations = transformations; return this; } - @Override + @java.lang.Override public _FinalStage restrictRegex(List restrictRegex) { this.restrictRegex = Optional.ofNullable(restrictRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP) public _FinalStage restrictRegex(Optional> restrictRegex) { this.restrictRegex = restrictRegex; return this; } - @Override + @java.lang.Override public _FinalStage allowRegex(List allowRegex) { this.allowRegex = Optional.ofNullable(allowRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP) public _FinalStage allowRegex(Optional> allowRegex) { this.allowRegex = allowRegex; return this; } - @Override + @java.lang.Override public _FinalStage tokenType(TokenTypeWithoutVault tokenType) { this.tokenType = Optional.ofNullable(tokenType); return this; } - @Override + @java.lang.Override @JsonSetter(value = "token_type", nulls = Nulls.SKIP) public _FinalStage tokenType(Optional tokenType) { this.tokenType = tokenType; return this; } - @Override + @java.lang.Override public _FinalStage entityTypes(List entityTypes) { this.entityTypes = Optional.ofNullable(entityTypes); return this; } - @Override + @java.lang.Override @JsonSetter(value = "entity_types", nulls = Nulls.SKIP) public _FinalStage entityTypes(Optional> entityTypes) { this.entityTypes = entityTypes; return this; } - @Override + @java.lang.Override public _FinalStage configurationId(String configurationId) { this.configurationId = Optional.ofNullable(configurationId); return this; } - @Override + @java.lang.Override @JsonSetter(value = "configuration_id", nulls = Nulls.SKIP) public _FinalStage configurationId(Optional configurationId) { this.configurationId = configurationId; return this; } - @Override + @java.lang.Override public DeidentifyStructuredTextRequest build() { return new DeidentifyStructuredTextRequest( vaultId, diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyTextRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyTextRequest.java index ba671082..e65d89e8 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyTextRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/DeidentifyTextRequest.java @@ -108,7 +108,7 @@ public Optional getTransformations() { return transformations; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyTextRequest && equalTo((DeidentifyTextRequest) other); @@ -130,7 +130,7 @@ private boolean equalTo(DeidentifyTextRequest other) { && transformations.equals(other.transformations); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.vaultId, @@ -143,7 +143,7 @@ public int hashCode() { this.transformations); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -216,7 +216,7 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyTextRequest other) { vaultId(other.getVaultId()); file(other.getFile()); @@ -229,7 +229,7 @@ public Builder from(DeidentifyTextRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public FileStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -240,92 +240,92 @@ public FileStage vaultId(@NotNull String vaultId) { * File to de-identify. Files are specified as Base64-encoded data.

File to de-identify. Files are specified as Base64-encoded data.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("file") public _FinalStage file(@NotNull DeidentifyTextRequestFile file) { this.file = Objects.requireNonNull(file, "file must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage transformations(Transformations transformations) { this.transformations = Optional.ofNullable(transformations); return this; } - @Override + @java.lang.Override @JsonSetter(value = "transformations", nulls = Nulls.SKIP) public _FinalStage transformations(Optional transformations) { this.transformations = transformations; return this; } - @Override + @java.lang.Override public _FinalStage restrictRegex(List restrictRegex) { this.restrictRegex = Optional.ofNullable(restrictRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP) public _FinalStage restrictRegex(Optional> restrictRegex) { this.restrictRegex = restrictRegex; return this; } - @Override + @java.lang.Override public _FinalStage allowRegex(List allowRegex) { this.allowRegex = Optional.ofNullable(allowRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP) public _FinalStage allowRegex(Optional> allowRegex) { this.allowRegex = allowRegex; return this; } - @Override + @java.lang.Override public _FinalStage tokenType(TokenTypeWithoutVault tokenType) { this.tokenType = Optional.ofNullable(tokenType); return this; } - @Override + @java.lang.Override @JsonSetter(value = "token_type", nulls = Nulls.SKIP) public _FinalStage tokenType(Optional tokenType) { this.tokenType = tokenType; return this; } - @Override + @java.lang.Override public _FinalStage entityTypes(List entityTypes) { this.entityTypes = Optional.ofNullable(entityTypes); return this; } - @Override + @java.lang.Override @JsonSetter(value = "entity_types", nulls = Nulls.SKIP) public _FinalStage entityTypes(Optional> entityTypes) { this.entityTypes = entityTypes; return this; } - @Override + @java.lang.Override public _FinalStage configurationId(String configurationId) { this.configurationId = Optional.ofNullable(configurationId); return this; } - @Override + @java.lang.Override @JsonSetter(value = "configuration_id", nulls = Nulls.SKIP) public _FinalStage configurationId(Optional configurationId) { this.configurationId = configurationId; return this; } - @Override + @java.lang.Override public DeidentifyTextRequest build() { return new DeidentifyTextRequest( vaultId, diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/GetRunRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/GetRunRequest.java index c1a4051c..390d2090 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/GetRunRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/GetRunRequest.java @@ -36,7 +36,7 @@ public String getVaultId() { return vaultId; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof GetRunRequest && equalTo((GetRunRequest) other); @@ -51,12 +51,12 @@ private boolean equalTo(GetRunRequest other) { return vaultId.equals(other.vaultId); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.vaultId); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -87,7 +87,7 @@ public static final class Builder implements VaultIdStage, _FinalStage { private Builder() {} - @Override + @java.lang.Override public Builder from(GetRunRequest other) { vaultId(other.getVaultId()); return this; @@ -97,14 +97,14 @@ public Builder from(GetRunRequest other) { * ID of the vault.

ID of the vault.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("vault_id") public _FinalStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); return this; } - @Override + @java.lang.Override public GetRunRequest build() { return new GetRunRequest(vaultId, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/requests/ReidentifyFileRequest.java b/src/main/java/com/skyflow/generated/rest/resources/files/requests/ReidentifyFileRequest.java index 6f5f7e93..4afb0146 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/requests/ReidentifyFileRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/requests/ReidentifyFileRequest.java @@ -63,7 +63,7 @@ public Optional getFormat() { return format; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ReidentifyFileRequest && equalTo((ReidentifyFileRequest) other); @@ -78,12 +78,12 @@ private boolean equalTo(ReidentifyFileRequest other) { return vaultId.equals(other.vaultId) && file.equals(other.file) && format.equals(other.format); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.vaultId, this.file, this.format); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -129,7 +129,7 @@ public static final class Builder implements VaultIdStage, FileStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(ReidentifyFileRequest other) { vaultId(other.getVaultId()); file(other.getFile()); @@ -137,7 +137,7 @@ public Builder from(ReidentifyFileRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public FileStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -148,7 +148,7 @@ public FileStage vaultId(@NotNull String vaultId) { * File to re-identify. Files are specified as Base64-encoded data or an EFS path.

File to re-identify. Files are specified as Base64-encoded data or an EFS path.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("file") public _FinalStage file(@NotNull ReidentifyFileRequestFile file) { this.file = Objects.requireNonNull(file, "file must not be null"); @@ -159,7 +159,7 @@ public _FinalStage file(@NotNull ReidentifyFileRequestFile file) { *

Mapping of preferred data formatting options to entity types. Returned values are dependent on the configuration of the vault storing the data and the permissions of the user or account making the request.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage format(ReidentifyFileRequestFormat format) { this.format = Optional.ofNullable(format); return this; @@ -168,14 +168,14 @@ public _FinalStage format(ReidentifyFileRequestFormat format) { /** *

Mapping of preferred data formatting options to entity types. Returned values are dependent on the configuration of the vault storing the data and the permissions of the user or account making the request.

*/ - @Override + @java.lang.Override @JsonSetter(value = "format", nulls = Nulls.SKIP) public _FinalStage format(Optional format) { this.format = format; return this; } - @Override + @java.lang.Override public ReidentifyFileRequest build() { return new ReidentifyFileRequest(vaultId, file, format, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestFile.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestFile.java index e45ced48..ad124de0 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestFile.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestFile.java @@ -48,7 +48,7 @@ public DeidentifyAudioRequestFileDataFormat getDataFormat() { return dataFormat; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyAudioRequestFile && equalTo((DeidentifyAudioRequestFile) other); @@ -63,12 +63,12 @@ private boolean equalTo(DeidentifyAudioRequestFile other) { return base64.equals(other.base64) && dataFormat.equals(other.dataFormat); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.base64, this.dataFormat); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -108,7 +108,7 @@ public static final class Builder implements Base64Stage, DataFormatStage, _Fina private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyAudioRequestFile other) { base64(other.getBase64()); dataFormat(other.getDataFormat()); @@ -119,7 +119,7 @@ public Builder from(DeidentifyAudioRequestFile other) { * Base64-encoded data of the file to de-identify.

Base64-encoded data of the file to de-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("base64") public DataFormatStage base64(@NotNull String base64) { this.base64 = Objects.requireNonNull(base64, "base64 must not be null"); @@ -130,14 +130,14 @@ public DataFormatStage base64(@NotNull String base64) { * Data format of the file.

Data format of the file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("data_format") public _FinalStage dataFormat(@NotNull DeidentifyAudioRequestFileDataFormat dataFormat) { this.dataFormat = Objects.requireNonNull(dataFormat, "dataFormat must not be null"); return this; } - @Override + @java.lang.Override public DeidentifyAudioRequestFile build() { return new DeidentifyAudioRequestFile(base64, dataFormat, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestFileDataFormat.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestFileDataFormat.java index 1a9ac79a..05203b05 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestFileDataFormat.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestFileDataFormat.java @@ -17,7 +17,7 @@ public enum DeidentifyAudioRequestFileDataFormat { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestOutputTranscription.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestOutputTranscription.java index 728e3d77..bd2d8aac 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestOutputTranscription.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyAudioRequestOutputTranscription.java @@ -23,7 +23,7 @@ public enum DeidentifyAudioRequestOutputTranscription { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyDocumentRequestFile.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyDocumentRequestFile.java index 1bdeb84a..76c7972c 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyDocumentRequestFile.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyDocumentRequestFile.java @@ -50,7 +50,7 @@ public DeidentifyDocumentRequestFileDataFormat getDataFormat() { return dataFormat; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyDocumentRequestFile && equalTo((DeidentifyDocumentRequestFile) other); @@ -65,12 +65,12 @@ private boolean equalTo(DeidentifyDocumentRequestFile other) { return base64.equals(other.base64) && dataFormat.equals(other.dataFormat); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.base64, this.dataFormat); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -110,7 +110,7 @@ public static final class Builder implements Base64Stage, DataFormatStage, _Fina private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyDocumentRequestFile other) { base64(other.getBase64()); dataFormat(other.getDataFormat()); @@ -121,7 +121,7 @@ public Builder from(DeidentifyDocumentRequestFile other) { * Base64-encoded data of the file to de-identify.

Base64-encoded data of the file to de-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("base64") public DataFormatStage base64(@NotNull String base64) { this.base64 = Objects.requireNonNull(base64, "base64 must not be null"); @@ -132,14 +132,14 @@ public DataFormatStage base64(@NotNull String base64) { * Data format of the file.

Data format of the file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("data_format") public _FinalStage dataFormat(@NotNull DeidentifyDocumentRequestFileDataFormat dataFormat) { this.dataFormat = Objects.requireNonNull(dataFormat, "dataFormat must not be null"); return this; } - @Override + @java.lang.Override public DeidentifyDocumentRequestFile build() { return new DeidentifyDocumentRequestFile(base64, dataFormat, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyDocumentRequestFileDataFormat.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyDocumentRequestFileDataFormat.java index ea1e0930..6b741b95 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyDocumentRequestFileDataFormat.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyDocumentRequestFileDataFormat.java @@ -19,7 +19,7 @@ public enum DeidentifyDocumentRequestFileDataFormat { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyFileRequestFile.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyFileRequestFile.java index 08e0bbb1..f21ddeef 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyFileRequestFile.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyFileRequestFile.java @@ -48,7 +48,7 @@ public DeidentifyFileRequestFileDataFormat getDataFormat() { return dataFormat; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyFileRequestFile && equalTo((DeidentifyFileRequestFile) other); @@ -63,12 +63,12 @@ private boolean equalTo(DeidentifyFileRequestFile other) { return base64.equals(other.base64) && dataFormat.equals(other.dataFormat); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.base64, this.dataFormat); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -108,7 +108,7 @@ public static final class Builder implements Base64Stage, DataFormatStage, _Fina private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyFileRequestFile other) { base64(other.getBase64()); dataFormat(other.getDataFormat()); @@ -119,7 +119,7 @@ public Builder from(DeidentifyFileRequestFile other) { * Base64-encoded data of the file to de-identify.

Base64-encoded data of the file to de-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("base64") public DataFormatStage base64(@NotNull String base64) { this.base64 = Objects.requireNonNull(base64, "base64 must not be null"); @@ -130,14 +130,14 @@ public DataFormatStage base64(@NotNull String base64) { * Data format of the file.

Data format of the file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("data_format") public _FinalStage dataFormat(@NotNull DeidentifyFileRequestFileDataFormat dataFormat) { this.dataFormat = Objects.requireNonNull(dataFormat, "dataFormat must not be null"); return this; } - @Override + @java.lang.Override public DeidentifyFileRequestFile build() { return new DeidentifyFileRequestFile(base64, dataFormat, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyFileRequestFileDataFormat.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyFileRequestFileDataFormat.java index 1ad893ef..b0ab22b9 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyFileRequestFileDataFormat.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyFileRequestFileDataFormat.java @@ -53,7 +53,7 @@ public enum DeidentifyFileRequestFileDataFormat { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestFile.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestFile.java index 89a54aaf..116fd94d 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestFile.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestFile.java @@ -48,7 +48,7 @@ public DeidentifyImageRequestFileDataFormat getDataFormat() { return dataFormat; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyImageRequestFile && equalTo((DeidentifyImageRequestFile) other); @@ -63,12 +63,12 @@ private boolean equalTo(DeidentifyImageRequestFile other) { return base64.equals(other.base64) && dataFormat.equals(other.dataFormat); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.base64, this.dataFormat); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -108,7 +108,7 @@ public static final class Builder implements Base64Stage, DataFormatStage, _Fina private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyImageRequestFile other) { base64(other.getBase64()); dataFormat(other.getDataFormat()); @@ -119,7 +119,7 @@ public Builder from(DeidentifyImageRequestFile other) { * Base64-encoded data of the file to de-identify.

Base64-encoded data of the file to de-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("base64") public DataFormatStage base64(@NotNull String base64) { this.base64 = Objects.requireNonNull(base64, "base64 must not be null"); @@ -130,14 +130,14 @@ public DataFormatStage base64(@NotNull String base64) { * Data format of the file.

Data format of the file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("data_format") public _FinalStage dataFormat(@NotNull DeidentifyImageRequestFileDataFormat dataFormat) { this.dataFormat = Objects.requireNonNull(dataFormat, "dataFormat must not be null"); return this; } - @Override + @java.lang.Override public DeidentifyImageRequestFile build() { return new DeidentifyImageRequestFile(base64, dataFormat, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestFileDataFormat.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestFileDataFormat.java index 27e241d6..cfb324d9 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestFileDataFormat.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestFileDataFormat.java @@ -25,7 +25,7 @@ public enum DeidentifyImageRequestFileDataFormat { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestMaskingMethod.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestMaskingMethod.java index e4a0fd19..8cf5bf3c 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestMaskingMethod.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyImageRequestMaskingMethod.java @@ -17,7 +17,7 @@ public enum DeidentifyImageRequestMaskingMethod { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPdfRequestFile.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPdfRequestFile.java index 1d9bb8d9..14028aab 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPdfRequestFile.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPdfRequestFile.java @@ -44,7 +44,7 @@ public String getDataFormat() { return "pdf"; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyPdfRequestFile && equalTo((DeidentifyPdfRequestFile) other); @@ -59,12 +59,12 @@ private boolean equalTo(DeidentifyPdfRequestFile other) { return base64.equals(other.base64); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.base64); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -95,7 +95,7 @@ public static final class Builder implements Base64Stage, _FinalStage { private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyPdfRequestFile other) { base64(other.getBase64()); return this; @@ -105,14 +105,14 @@ public Builder from(DeidentifyPdfRequestFile other) { * Base64-encoded data of the file to de-identify.

Base64-encoded data of the file to de-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("base64") public _FinalStage base64(@NotNull String base64) { this.base64 = Objects.requireNonNull(base64, "base64 must not be null"); return this; } - @Override + @java.lang.Override public DeidentifyPdfRequestFile build() { return new DeidentifyPdfRequestFile(base64, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPresentationRequestFile.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPresentationRequestFile.java index 60a013ce..1b2e247f 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPresentationRequestFile.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPresentationRequestFile.java @@ -50,7 +50,7 @@ public DeidentifyPresentationRequestFileDataFormat getDataFormat() { return dataFormat; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyPresentationRequestFile && equalTo((DeidentifyPresentationRequestFile) other); @@ -65,12 +65,12 @@ private boolean equalTo(DeidentifyPresentationRequestFile other) { return base64.equals(other.base64) && dataFormat.equals(other.dataFormat); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.base64, this.dataFormat); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -110,7 +110,7 @@ public static final class Builder implements Base64Stage, DataFormatStage, _Fina private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyPresentationRequestFile other) { base64(other.getBase64()); dataFormat(other.getDataFormat()); @@ -121,7 +121,7 @@ public Builder from(DeidentifyPresentationRequestFile other) { * Base64-encoded data of the file to de-identify.

Base64-encoded data of the file to de-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("base64") public DataFormatStage base64(@NotNull String base64) { this.base64 = Objects.requireNonNull(base64, "base64 must not be null"); @@ -132,14 +132,14 @@ public DataFormatStage base64(@NotNull String base64) { * Data format of the file.

Data format of the file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("data_format") public _FinalStage dataFormat(@NotNull DeidentifyPresentationRequestFileDataFormat dataFormat) { this.dataFormat = Objects.requireNonNull(dataFormat, "dataFormat must not be null"); return this; } - @Override + @java.lang.Override public DeidentifyPresentationRequestFile build() { return new DeidentifyPresentationRequestFile(base64, dataFormat, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPresentationRequestFileDataFormat.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPresentationRequestFileDataFormat.java index 7770a61e..e6bcd268 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPresentationRequestFileDataFormat.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyPresentationRequestFileDataFormat.java @@ -17,7 +17,7 @@ public enum DeidentifyPresentationRequestFileDataFormat { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifySpreadsheetRequestFile.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifySpreadsheetRequestFile.java index b749ebe0..2e291563 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifySpreadsheetRequestFile.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifySpreadsheetRequestFile.java @@ -50,7 +50,7 @@ public DeidentifySpreadsheetRequestFileDataFormat getDataFormat() { return dataFormat; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifySpreadsheetRequestFile && equalTo((DeidentifySpreadsheetRequestFile) other); @@ -65,12 +65,12 @@ private boolean equalTo(DeidentifySpreadsheetRequestFile other) { return base64.equals(other.base64) && dataFormat.equals(other.dataFormat); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.base64, this.dataFormat); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -110,7 +110,7 @@ public static final class Builder implements Base64Stage, DataFormatStage, _Fina private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifySpreadsheetRequestFile other) { base64(other.getBase64()); dataFormat(other.getDataFormat()); @@ -121,7 +121,7 @@ public Builder from(DeidentifySpreadsheetRequestFile other) { * Base64-encoded data of the file to de-identify.

Base64-encoded data of the file to de-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("base64") public DataFormatStage base64(@NotNull String base64) { this.base64 = Objects.requireNonNull(base64, "base64 must not be null"); @@ -132,14 +132,14 @@ public DataFormatStage base64(@NotNull String base64) { * Data format of the file.

Data format of the file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("data_format") public _FinalStage dataFormat(@NotNull DeidentifySpreadsheetRequestFileDataFormat dataFormat) { this.dataFormat = Objects.requireNonNull(dataFormat, "dataFormat must not be null"); return this; } - @Override + @java.lang.Override public DeidentifySpreadsheetRequestFile build() { return new DeidentifySpreadsheetRequestFile(base64, dataFormat, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifySpreadsheetRequestFileDataFormat.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifySpreadsheetRequestFileDataFormat.java index c44e4fb2..795a2666 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifySpreadsheetRequestFileDataFormat.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifySpreadsheetRequestFileDataFormat.java @@ -19,7 +19,7 @@ public enum DeidentifySpreadsheetRequestFileDataFormat { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyStructuredTextRequestFile.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyStructuredTextRequestFile.java index 14b34a29..d8d5193a 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyStructuredTextRequestFile.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyStructuredTextRequestFile.java @@ -50,7 +50,7 @@ public DeidentifyStructuredTextRequestFileDataFormat getDataFormat() { return dataFormat; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyStructuredTextRequestFile @@ -66,12 +66,12 @@ private boolean equalTo(DeidentifyStructuredTextRequestFile other) { return base64.equals(other.base64) && dataFormat.equals(other.dataFormat); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.base64, this.dataFormat); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -111,7 +111,7 @@ public static final class Builder implements Base64Stage, DataFormatStage, _Fina private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyStructuredTextRequestFile other) { base64(other.getBase64()); dataFormat(other.getDataFormat()); @@ -122,7 +122,7 @@ public Builder from(DeidentifyStructuredTextRequestFile other) { * Base64-encoded data of the file to de-identify.

Base64-encoded data of the file to de-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("base64") public DataFormatStage base64(@NotNull String base64) { this.base64 = Objects.requireNonNull(base64, "base64 must not be null"); @@ -133,14 +133,14 @@ public DataFormatStage base64(@NotNull String base64) { * Data format of the file.

Data format of the file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("data_format") public _FinalStage dataFormat(@NotNull DeidentifyStructuredTextRequestFileDataFormat dataFormat) { this.dataFormat = Objects.requireNonNull(dataFormat, "dataFormat must not be null"); return this; } - @Override + @java.lang.Override public DeidentifyStructuredTextRequestFile build() { return new DeidentifyStructuredTextRequestFile(base64, dataFormat, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyStructuredTextRequestFileDataFormat.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyStructuredTextRequestFileDataFormat.java index 8182b567..11b30288 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyStructuredTextRequestFileDataFormat.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyStructuredTextRequestFileDataFormat.java @@ -17,7 +17,7 @@ public enum DeidentifyStructuredTextRequestFileDataFormat { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyTextRequestFile.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyTextRequestFile.java index 953a9075..c7cbc5b3 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyTextRequestFile.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/DeidentifyTextRequestFile.java @@ -44,7 +44,7 @@ public String getDataFormat() { return "txt"; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyTextRequestFile && equalTo((DeidentifyTextRequestFile) other); @@ -59,12 +59,12 @@ private boolean equalTo(DeidentifyTextRequestFile other) { return base64.equals(other.base64); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.base64); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -95,7 +95,7 @@ public static final class Builder implements Base64Stage, _FinalStage { private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyTextRequestFile other) { base64(other.getBase64()); return this; @@ -105,14 +105,14 @@ public Builder from(DeidentifyTextRequestFile other) { * Base64-encoded data of the file to de-identify.

Base64-encoded data of the file to de-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("base64") public _FinalStage base64(@NotNull String base64) { this.base64 = Objects.requireNonNull(base64, "base64 must not be null"); return this; } - @Override + @java.lang.Override public DeidentifyTextRequestFile build() { return new DeidentifyTextRequestFile(base64, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFile.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFile.java index 51ac25a8..bea9b303 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFile.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFile.java @@ -48,7 +48,7 @@ public ReidentifyFileRequestFileDataFormat getDataFormat() { return dataFormat; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ReidentifyFileRequestFile && equalTo((ReidentifyFileRequestFile) other); @@ -63,12 +63,12 @@ private boolean equalTo(ReidentifyFileRequestFile other) { return base64.equals(other.base64) && dataFormat.equals(other.dataFormat); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.base64, this.dataFormat); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -108,7 +108,7 @@ public static final class Builder implements Base64Stage, DataFormatStage, _Fina private Builder() {} - @Override + @java.lang.Override public Builder from(ReidentifyFileRequestFile other) { base64(other.getBase64()); dataFormat(other.getDataFormat()); @@ -119,7 +119,7 @@ public Builder from(ReidentifyFileRequestFile other) { * Base64-encoded data of the file to re-identify.

Base64-encoded data of the file to re-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("base64") public DataFormatStage base64(@NotNull String base64) { this.base64 = Objects.requireNonNull(base64, "base64 must not be null"); @@ -130,14 +130,14 @@ public DataFormatStage base64(@NotNull String base64) { * Data format of the file.

Data format of the file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("data_format") public _FinalStage dataFormat(@NotNull ReidentifyFileRequestFileDataFormat dataFormat) { this.dataFormat = Objects.requireNonNull(dataFormat, "dataFormat must not be null"); return this; } - @Override + @java.lang.Override public ReidentifyFileRequestFile build() { return new ReidentifyFileRequestFile(base64, dataFormat, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFileDataFormat.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFileDataFormat.java index bd8e6718..3e1555f3 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFileDataFormat.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFileDataFormat.java @@ -29,7 +29,7 @@ public enum ReidentifyFileRequestFileDataFormat { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFormat.java b/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFormat.java index e54b35fc..232fcd55 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFormat.java +++ b/src/main/java/com/skyflow/generated/rest/resources/files/types/ReidentifyFileRequestFormat.java @@ -65,7 +65,7 @@ public Optional> getPlaintext() { return plaintext; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ReidentifyFileRequestFormat && equalTo((ReidentifyFileRequestFormat) other); @@ -80,12 +80,12 @@ private boolean equalTo(ReidentifyFileRequestFormat other) { return redacted.equals(other.redacted) && masked.equals(other.masked) && plaintext.equals(other.plaintext); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.redacted, this.masked, this.plaintext); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/guardrails/requests/CheckGuardrailsRequest.java b/src/main/java/com/skyflow/generated/rest/resources/guardrails/requests/CheckGuardrailsRequest.java index d5d1178e..8fbf90f7 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/guardrails/requests/CheckGuardrailsRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/guardrails/requests/CheckGuardrailsRequest.java @@ -74,7 +74,7 @@ public Optional> getDenyTopics() { return denyTopics; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof CheckGuardrailsRequest && equalTo((CheckGuardrailsRequest) other); @@ -92,12 +92,12 @@ private boolean equalTo(CheckGuardrailsRequest other) { && denyTopics.equals(other.denyTopics); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.vaultId, this.text, this.checkToxicity, this.denyTopics); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -152,7 +152,7 @@ public static final class Builder implements VaultIdStage, TextStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(CheckGuardrailsRequest other) { vaultId(other.getVaultId()); text(other.getText()); @@ -161,7 +161,7 @@ public Builder from(CheckGuardrailsRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public TextStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -172,7 +172,7 @@ public TextStage vaultId(@NotNull String vaultId) { * Text to check against guardrails.

Text to check against guardrails.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("text") public _FinalStage text(@NotNull String text) { this.text = Objects.requireNonNull(text, "text must not be null"); @@ -183,7 +183,7 @@ public _FinalStage text(@NotNull String text) { *

List of topics to deny.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage denyTopics(List denyTopics) { this.denyTopics = Optional.ofNullable(denyTopics); return this; @@ -192,7 +192,7 @@ public _FinalStage denyTopics(List denyTopics) { /** *

List of topics to deny.

*/ - @Override + @java.lang.Override @JsonSetter(value = "deny_topics", nulls = Nulls.SKIP) public _FinalStage denyTopics(Optional> denyTopics) { this.denyTopics = denyTopics; @@ -203,7 +203,7 @@ public _FinalStage denyTopics(Optional> denyTopics) { *

Check for toxicity in the text.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage checkToxicity(Boolean checkToxicity) { this.checkToxicity = Optional.ofNullable(checkToxicity); return this; @@ -212,14 +212,14 @@ public _FinalStage checkToxicity(Boolean checkToxicity) { /** *

Check for toxicity in the text.

*/ - @Override + @java.lang.Override @JsonSetter(value = "check_toxicity", nulls = Nulls.SKIP) public _FinalStage checkToxicity(Optional checkToxicity) { this.checkToxicity = checkToxicity; return this; } - @Override + @java.lang.Override public CheckGuardrailsRequest build() { return new CheckGuardrailsRequest(vaultId, text, checkToxicity, denyTopics, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/query/requests/QueryServiceExecuteQueryBody.java b/src/main/java/com/skyflow/generated/rest/resources/query/requests/QueryServiceExecuteQueryBody.java index 60565eb5..dfa21d15 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/query/requests/QueryServiceExecuteQueryBody.java +++ b/src/main/java/com/skyflow/generated/rest/resources/query/requests/QueryServiceExecuteQueryBody.java @@ -37,7 +37,7 @@ public Optional getQuery() { return query; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof QueryServiceExecuteQueryBody && equalTo((QueryServiceExecuteQueryBody) other); @@ -52,12 +52,12 @@ private boolean equalTo(QueryServiceExecuteQueryBody other) { return query.equals(other.query); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.query); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/AsyncRawRecordsClient.java b/src/main/java/com/skyflow/generated/rest/resources/records/AsyncRawRecordsClient.java index b8487e65..a810f142 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/AsyncRawRecordsClient.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/AsyncRawRecordsClient.java @@ -12,7 +12,10 @@ 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.BadRequestError; +import com.skyflow.generated.rest.errors.InternalServerError; import com.skyflow.generated.rest.errors.NotFoundError; +import com.skyflow.generated.rest.errors.UnauthorizedError; import com.skyflow.generated.rest.resources.records.requests.FileServiceUploadFileRequest; import com.skyflow.generated.rest.resources.records.requests.RecordServiceBatchOperationBody; import com.skyflow.generated.rest.resources.records.requests.RecordServiceBulkDeleteRecordBody; @@ -20,6 +23,9 @@ import com.skyflow.generated.rest.resources.records.requests.RecordServiceGetRecordRequest; import com.skyflow.generated.rest.resources.records.requests.RecordServiceInsertRecordBody; import com.skyflow.generated.rest.resources.records.requests.RecordServiceUpdateRecordBody; +import com.skyflow.generated.rest.resources.records.requests.UploadFileV2Request; +import com.skyflow.generated.rest.types.ErrorResponse; +import com.skyflow.generated.rest.types.UploadFileV2Response; import com.skyflow.generated.rest.types.V1BatchOperationResponse; import com.skyflow.generated.rest.types.V1BulkDeleteRecordResponse; import com.skyflow.generated.rest.types.V1BulkGetRecordResponse; @@ -747,10 +753,8 @@ public CompletableFuture> fileServ "file", file.get().getName(), RequestBody.create(file.get(), fileMimeTypeMediaType)); } if (request.getColumnName().isPresent()) { - body.addFormDataPart( - "columnName", - ObjectMappers.JSON_MAPPER.writeValueAsString( - request.getColumnName().get())); + QueryStringMapper.addFormDataPart( + body, "columnName", request.getColumnName().get(), false); } } catch (Exception e) { throw new RuntimeException(e); @@ -951,4 +955,111 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { }); return future; } + + /** + * Uploads the specified file to a record. If an existing record isn't specified, creates a new record and uploads the file to that record. + */ + public CompletableFuture> uploadFileV2( + String vaultId, File file, UploadFileV2Request request) { + return uploadFileV2(vaultId, file, request, null); + } + + /** + * Uploads the specified file to a record. If an existing record isn't specified, creates a new record and uploads the file to that record. + */ + public CompletableFuture> uploadFileV2( + String vaultId, File file, UploadFileV2Request request, RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("v2/vaults") + .addPathSegment(vaultId) + .addPathSegments("files/upload") + .build(); + MultipartBody.Builder body = new MultipartBody.Builder().setType(MultipartBody.FORM); + try { + QueryStringMapper.addFormDataPart(body, "tableName", request.getTableName(), false); + QueryStringMapper.addFormDataPart(body, "columnName", request.getColumnName(), false); + String fileMimeType = Files.probeContentType(file.toPath()); + MediaType fileMimeTypeMediaType = fileMimeType != null ? MediaType.parse(fileMimeType) : null; + body.addFormDataPart("file", file.getName(), RequestBody.create(file, fileMimeTypeMediaType)); + if (request.getSkyflowId().isPresent()) { + QueryStringMapper.addFormDataPart( + body, "skyflowID", request.getSkyflowId().get(), false); + } + if (request.getReturnFileMetadata().isPresent()) { + QueryStringMapper.addFormDataPart( + body, + "returnFileMetadata", + request.getReturnFileMetadata().get(), + false); + } + } catch (Exception e) { + throw new RuntimeException(e); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl) + .method("POST", body.build()) + .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(), UploadFileV2Response.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 404: + future.completeExceptionally(new NotFoundError( + 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/records/AsyncRecordsClient.java b/src/main/java/com/skyflow/generated/rest/resources/records/AsyncRecordsClient.java index d82aef9e..c6925b50 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/AsyncRecordsClient.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/AsyncRecordsClient.java @@ -12,6 +12,8 @@ import com.skyflow.generated.rest.resources.records.requests.RecordServiceGetRecordRequest; import com.skyflow.generated.rest.resources.records.requests.RecordServiceInsertRecordBody; import com.skyflow.generated.rest.resources.records.requests.RecordServiceUpdateRecordBody; +import com.skyflow.generated.rest.resources.records.requests.UploadFileV2Request; +import com.skyflow.generated.rest.types.UploadFileV2Response; import com.skyflow.generated.rest.types.V1BatchOperationResponse; import com.skyflow.generated.rest.types.V1BulkDeleteRecordResponse; import com.skyflow.generated.rest.types.V1BulkGetRecordResponse; @@ -310,4 +312,22 @@ public CompletableFuture fileServiceGetFileScanStat .fileServiceGetFileScanStatus(vaultId, tableName, id, columnName, requestOptions) .thenApply(response -> response.body()); } + + /** + * Uploads the specified file to a record. If an existing record isn't specified, creates a new record and uploads the file to that record. + */ + public CompletableFuture uploadFileV2( + String vaultId, File file, UploadFileV2Request request) { + return this.rawClient.uploadFileV2(vaultId, file, request).thenApply(response -> response.body()); + } + + /** + * Uploads the specified file to a record. If an existing record isn't specified, creates a new record and uploads the file to that record. + */ + public CompletableFuture uploadFileV2( + String vaultId, File file, UploadFileV2Request request, RequestOptions requestOptions) { + return this.rawClient + .uploadFileV2(vaultId, file, request, requestOptions) + .thenApply(response -> response.body()); + } } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/RawRecordsClient.java b/src/main/java/com/skyflow/generated/rest/resources/records/RawRecordsClient.java index 2a839096..d1b607a0 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/RawRecordsClient.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/RawRecordsClient.java @@ -12,7 +12,10 @@ 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.BadRequestError; +import com.skyflow.generated.rest.errors.InternalServerError; import com.skyflow.generated.rest.errors.NotFoundError; +import com.skyflow.generated.rest.errors.UnauthorizedError; import com.skyflow.generated.rest.resources.records.requests.FileServiceUploadFileRequest; import com.skyflow.generated.rest.resources.records.requests.RecordServiceBatchOperationBody; import com.skyflow.generated.rest.resources.records.requests.RecordServiceBulkDeleteRecordBody; @@ -20,6 +23,9 @@ import com.skyflow.generated.rest.resources.records.requests.RecordServiceGetRecordRequest; import com.skyflow.generated.rest.resources.records.requests.RecordServiceInsertRecordBody; import com.skyflow.generated.rest.resources.records.requests.RecordServiceUpdateRecordBody; +import com.skyflow.generated.rest.resources.records.requests.UploadFileV2Request; +import com.skyflow.generated.rest.types.ErrorResponse; +import com.skyflow.generated.rest.types.UploadFileV2Response; import com.skyflow.generated.rest.types.V1BatchOperationResponse; import com.skyflow.generated.rest.types.V1BulkDeleteRecordResponse; import com.skyflow.generated.rest.types.V1BulkGetRecordResponse; @@ -635,10 +641,8 @@ public ApiClientHttpResponse fileServiceUploadFile( "file", file.get().getName(), RequestBody.create(file.get(), fileMimeTypeMediaType)); } if (request.getColumnName().isPresent()) { - body.addFormDataPart( - "columnName", - ObjectMappers.JSON_MAPPER.writeValueAsString( - request.getColumnName().get())); + QueryStringMapper.addFormDataPart( + body, "columnName", request.getColumnName().get(), false); } } catch (Exception e) { throw new RuntimeException(e); @@ -795,4 +799,90 @@ public ApiClientHttpResponse fileServiceGetFileScan throw new ApiClientException("Network error executing HTTP request", e); } } + + /** + * Uploads the specified file to a record. If an existing record isn't specified, creates a new record and uploads the file to that record. + */ + public ApiClientHttpResponse uploadFileV2( + String vaultId, File file, UploadFileV2Request request) { + return uploadFileV2(vaultId, file, request, null); + } + + /** + * Uploads the specified file to a record. If an existing record isn't specified, creates a new record and uploads the file to that record. + */ + public ApiClientHttpResponse uploadFileV2( + String vaultId, File file, UploadFileV2Request request, RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("v2/vaults") + .addPathSegment(vaultId) + .addPathSegments("files/upload") + .build(); + MultipartBody.Builder body = new MultipartBody.Builder().setType(MultipartBody.FORM); + try { + QueryStringMapper.addFormDataPart(body, "tableName", request.getTableName(), false); + QueryStringMapper.addFormDataPart(body, "columnName", request.getColumnName(), false); + String fileMimeType = Files.probeContentType(file.toPath()); + MediaType fileMimeTypeMediaType = fileMimeType != null ? MediaType.parse(fileMimeType) : null; + body.addFormDataPart("file", file.getName(), RequestBody.create(file, fileMimeTypeMediaType)); + if (request.getSkyflowId().isPresent()) { + QueryStringMapper.addFormDataPart( + body, "skyflowID", request.getSkyflowId().get(), false); + } + if (request.getReturnFileMetadata().isPresent()) { + QueryStringMapper.addFormDataPart( + body, + "returnFileMetadata", + request.getReturnFileMetadata().get(), + false); + } + } catch (Exception e) { + throw new RuntimeException(e); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl) + .method("POST", body.build()) + .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(), UploadFileV2Response.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 404: + throw new NotFoundError( + 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/records/RecordsClient.java b/src/main/java/com/skyflow/generated/rest/resources/records/RecordsClient.java index a9a6930d..7b4599c6 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/RecordsClient.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/RecordsClient.java @@ -12,6 +12,8 @@ import com.skyflow.generated.rest.resources.records.requests.RecordServiceGetRecordRequest; import com.skyflow.generated.rest.resources.records.requests.RecordServiceInsertRecordBody; import com.skyflow.generated.rest.resources.records.requests.RecordServiceUpdateRecordBody; +import com.skyflow.generated.rest.resources.records.requests.UploadFileV2Request; +import com.skyflow.generated.rest.types.UploadFileV2Response; import com.skyflow.generated.rest.types.V1BatchOperationResponse; import com.skyflow.generated.rest.types.V1BulkDeleteRecordResponse; import com.skyflow.generated.rest.types.V1BulkGetRecordResponse; @@ -305,4 +307,21 @@ public V1GetFileScanStatusResponse fileServiceGetFileScanStatus( .fileServiceGetFileScanStatus(vaultId, tableName, id, columnName, requestOptions) .body(); } + + /** + * Uploads the specified file to a record. If an existing record isn't specified, creates a new record and uploads the file to that record. + */ + public UploadFileV2Response uploadFileV2(String vaultId, File file, UploadFileV2Request request) { + return this.rawClient.uploadFileV2(vaultId, file, request).body(); + } + + /** + * Uploads the specified file to a record. If an existing record isn't specified, creates a new record and uploads the file to that record. + */ + public UploadFileV2Response uploadFileV2( + String vaultId, File file, UploadFileV2Request request, RequestOptions requestOptions) { + return this.rawClient + .uploadFileV2(vaultId, file, request, requestOptions) + .body(); + } } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/requests/FileServiceUploadFileRequest.java b/src/main/java/com/skyflow/generated/rest/resources/records/requests/FileServiceUploadFileRequest.java index fe805970..8152e4d7 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/requests/FileServiceUploadFileRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/requests/FileServiceUploadFileRequest.java @@ -37,7 +37,7 @@ public Optional getColumnName() { return columnName; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof FileServiceUploadFileRequest && equalTo((FileServiceUploadFileRequest) other); @@ -52,12 +52,12 @@ private boolean equalTo(FileServiceUploadFileRequest other) { return columnName.equals(other.columnName); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.columnName); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBatchOperationBody.java b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBatchOperationBody.java index 48586839..33b92483 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBatchOperationBody.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBatchOperationBody.java @@ -63,7 +63,7 @@ public Optional getByot() { return byot; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof RecordServiceBatchOperationBody && equalTo((RecordServiceBatchOperationBody) other); @@ -80,12 +80,12 @@ private boolean equalTo(RecordServiceBatchOperationBody other) { && byot.equals(other.byot); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.records, this.continueOnError, this.byot); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBulkDeleteRecordBody.java b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBulkDeleteRecordBody.java index b417adbb..b2c991f9 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBulkDeleteRecordBody.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBulkDeleteRecordBody.java @@ -39,7 +39,7 @@ public Optional> getSkyflowIds() { return skyflowIds; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof RecordServiceBulkDeleteRecordBody && equalTo((RecordServiceBulkDeleteRecordBody) other); @@ -54,12 +54,12 @@ private boolean equalTo(RecordServiceBulkDeleteRecordBody other) { return skyflowIds.equals(other.skyflowIds); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.skyflowIds); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBulkGetRecordRequest.java b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBulkGetRecordRequest.java index 22c9090c..f8cccf09 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBulkGetRecordRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceBulkGetRecordRequest.java @@ -151,7 +151,7 @@ public Optional getOrderBy() { return orderBy; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof RecordServiceBulkGetRecordRequest && equalTo((RecordServiceBulkGetRecordRequest) other); @@ -175,7 +175,7 @@ private boolean equalTo(RecordServiceBulkGetRecordRequest other) { && orderBy.equals(other.orderBy); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.skyflowIds, @@ -190,7 +190,7 @@ public int hashCode() { this.orderBy); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceGetRecordRequest.java b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceGetRecordRequest.java index eef17665..0fa5319d 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceGetRecordRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceGetRecordRequest.java @@ -78,7 +78,7 @@ public Optional getDownloadUrl() { return downloadUrl; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof RecordServiceGetRecordRequest && equalTo((RecordServiceGetRecordRequest) other); @@ -96,12 +96,12 @@ private boolean equalTo(RecordServiceGetRecordRequest other) { && downloadUrl.equals(other.downloadUrl); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.fields, this.redaction, this.tokenization, this.downloadUrl); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceInsertRecordBody.java b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceInsertRecordBody.java index e1de00f7..4ac78692 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceInsertRecordBody.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceInsertRecordBody.java @@ -87,7 +87,7 @@ public Optional getByot() { return byot; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof RecordServiceInsertRecordBody && equalTo((RecordServiceInsertRecordBody) other); @@ -106,12 +106,12 @@ private boolean equalTo(RecordServiceInsertRecordBody other) { && byot.equals(other.byot); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.records, this.tokenization, this.upsert, this.homogeneous, this.byot); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceUpdateRecordBody.java b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceUpdateRecordBody.java index e52af2e4..19e0ae23 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceUpdateRecordBody.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/requests/RecordServiceUpdateRecordBody.java @@ -59,7 +59,7 @@ public Optional getByot() { return byot; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof RecordServiceUpdateRecordBody && equalTo((RecordServiceUpdateRecordBody) other); @@ -74,12 +74,12 @@ private boolean equalTo(RecordServiceUpdateRecordBody other) { return record.equals(other.record) && tokenization.equals(other.tokenization) && byot.equals(other.byot); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.record, this.tokenization, this.byot); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/requests/UploadFileV2Request.java b/src/main/java/com/skyflow/generated/rest/resources/records/requests/UploadFileV2Request.java new file mode 100644 index 00000000..ca26f0d3 --- /dev/null +++ b/src/main/java/com/skyflow/generated/rest/resources/records/requests/UploadFileV2Request.java @@ -0,0 +1,236 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.skyflow.generated.rest.resources.records.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; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UploadFileV2Request.Builder.class) +public final class UploadFileV2Request { + private final String tableName; + + private final String columnName; + + private final Optional skyflowId; + + private final Optional returnFileMetadata; + + private final Map additionalProperties; + + private UploadFileV2Request( + String tableName, + String columnName, + Optional skyflowId, + Optional returnFileMetadata, + Map additionalProperties) { + this.tableName = tableName; + this.columnName = columnName; + this.skyflowId = skyflowId; + this.returnFileMetadata = returnFileMetadata; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the table to upload the file to. + */ + @JsonProperty("tableName") + public String getTableName() { + return tableName; + } + + /** + * @return Name of the column to upload the file to. The column must have a file data type. + */ + @JsonProperty("columnName") + public String getColumnName() { + return columnName; + } + + /** + * @return Skyflow ID of the record to upload the file to. If skyflowID isn't specified, a new record will be created. + */ + @JsonProperty("skyflowID") + public Optional getSkyflowId() { + return skyflowId; + } + + /** + * @return If true, returns metadata about the uploaded file. + */ + @JsonProperty("returnFileMetadata") + public Optional getReturnFileMetadata() { + return returnFileMetadata; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UploadFileV2Request && equalTo((UploadFileV2Request) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UploadFileV2Request other) { + return tableName.equals(other.tableName) + && columnName.equals(other.columnName) + && skyflowId.equals(other.skyflowId) + && returnFileMetadata.equals(other.returnFileMetadata); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.tableName, this.columnName, this.skyflowId, this.returnFileMetadata); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TableNameStage builder() { + return new Builder(); + } + + public interface TableNameStage { + /** + * Name of the table to upload the file to. + */ + ColumnNameStage tableName(@NotNull String tableName); + + Builder from(UploadFileV2Request other); + } + + public interface ColumnNameStage { + /** + * Name of the column to upload the file to. The column must have a `file` data type. + */ + _FinalStage columnName(@NotNull String columnName); + } + + public interface _FinalStage { + UploadFileV2Request build(); + + /** + *

Skyflow ID of the record to upload the file to. If skyflowID isn't specified, a new record will be created.

+ */ + _FinalStage skyflowId(Optional skyflowId); + + _FinalStage skyflowId(String skyflowId); + + /** + *

If true, returns metadata about the uploaded file.

+ */ + _FinalStage returnFileMetadata(Optional returnFileMetadata); + + _FinalStage returnFileMetadata(Boolean returnFileMetadata); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TableNameStage, ColumnNameStage, _FinalStage { + private String tableName; + + private String columnName; + + private Optional returnFileMetadata = Optional.empty(); + + private Optional skyflowId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UploadFileV2Request other) { + tableName(other.getTableName()); + columnName(other.getColumnName()); + skyflowId(other.getSkyflowId()); + returnFileMetadata(other.getReturnFileMetadata()); + return this; + } + + /** + * Name of the table to upload the file to.

Name of the table to upload the file to.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("tableName") + public ColumnNameStage tableName(@NotNull String tableName) { + this.tableName = Objects.requireNonNull(tableName, "tableName must not be null"); + return this; + } + + /** + * Name of the column to upload the file to. The column must have a `file` data type.

Name of the column to upload the file to. The column must have a file data type.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("columnName") + public _FinalStage columnName(@NotNull String columnName) { + this.columnName = Objects.requireNonNull(columnName, "columnName must not be null"); + return this; + } + + /** + *

If true, returns metadata about the uploaded file.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage returnFileMetadata(Boolean returnFileMetadata) { + this.returnFileMetadata = Optional.ofNullable(returnFileMetadata); + return this; + } + + /** + *

If true, returns metadata about the uploaded file.

+ */ + @java.lang.Override + @JsonSetter(value = "returnFileMetadata", nulls = Nulls.SKIP) + public _FinalStage returnFileMetadata(Optional returnFileMetadata) { + this.returnFileMetadata = returnFileMetadata; + return this; + } + + /** + *

Skyflow ID of the record to upload the file to. If skyflowID isn't specified, a new record will be created.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage skyflowId(String skyflowId) { + this.skyflowId = Optional.ofNullable(skyflowId); + return this; + } + + /** + *

Skyflow ID of the record to upload the file to. If skyflowID isn't specified, a new record will be created.

+ */ + @java.lang.Override + @JsonSetter(value = "skyflowID", nulls = Nulls.SKIP) + public _FinalStage skyflowId(Optional skyflowId) { + this.skyflowId = skyflowId; + return this; + } + + @java.lang.Override + public UploadFileV2Request build() { + return new UploadFileV2Request(tableName, columnName, skyflowId, returnFileMetadata, additionalProperties); + } + } +} diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceBulkGetRecordRequestOrderBy.java b/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceBulkGetRecordRequestOrderBy.java index 1f25b38d..2563652f 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceBulkGetRecordRequestOrderBy.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceBulkGetRecordRequestOrderBy.java @@ -19,7 +19,7 @@ public enum RecordServiceBulkGetRecordRequestOrderBy { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceBulkGetRecordRequestRedaction.java b/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceBulkGetRecordRequestRedaction.java index 12bbc291..b20f2541 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceBulkGetRecordRequestRedaction.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceBulkGetRecordRequestRedaction.java @@ -21,7 +21,7 @@ public enum RecordServiceBulkGetRecordRequestRedaction { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceGetRecordRequestRedaction.java b/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceGetRecordRequestRedaction.java index 4f546262..468e3edd 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceGetRecordRequestRedaction.java +++ b/src/main/java/com/skyflow/generated/rest/resources/records/types/RecordServiceGetRecordRequestRedaction.java @@ -21,7 +21,7 @@ public enum RecordServiceGetRecordRequestRedaction { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/resources/strings/requests/DeidentifyStringRequest.java b/src/main/java/com/skyflow/generated/rest/resources/strings/requests/DeidentifyStringRequest.java index ec42384d..18b6cd98 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/strings/requests/DeidentifyStringRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/strings/requests/DeidentifyStringRequest.java @@ -107,7 +107,7 @@ public Optional getTransformations() { return transformations; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyStringRequest && equalTo((DeidentifyStringRequest) other); @@ -129,7 +129,7 @@ private boolean equalTo(DeidentifyStringRequest other) { && transformations.equals(other.transformations); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.vaultId, @@ -142,7 +142,7 @@ public int hashCode() { this.transformations); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -215,7 +215,7 @@ public static final class Builder implements VaultIdStage, TextStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyStringRequest other) { vaultId(other.getVaultId()); text(other.getText()); @@ -228,7 +228,7 @@ public Builder from(DeidentifyStringRequest other) { return this; } - @Override + @java.lang.Override @JsonSetter("vault_id") public TextStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -239,92 +239,92 @@ public TextStage vaultId(@NotNull String vaultId) { * String to de-identify.

String to de-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("text") public _FinalStage text(@NotNull String text) { this.text = Objects.requireNonNull(text, "text must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage transformations(Transformations transformations) { this.transformations = Optional.ofNullable(transformations); return this; } - @Override + @java.lang.Override @JsonSetter(value = "transformations", nulls = Nulls.SKIP) public _FinalStage transformations(Optional transformations) { this.transformations = transformations; return this; } - @Override + @java.lang.Override public _FinalStage restrictRegex(List restrictRegex) { this.restrictRegex = Optional.ofNullable(restrictRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "restrict_regex", nulls = Nulls.SKIP) public _FinalStage restrictRegex(Optional> restrictRegex) { this.restrictRegex = restrictRegex; return this; } - @Override + @java.lang.Override public _FinalStage allowRegex(List allowRegex) { this.allowRegex = Optional.ofNullable(allowRegex); return this; } - @Override + @java.lang.Override @JsonSetter(value = "allow_regex", nulls = Nulls.SKIP) public _FinalStage allowRegex(Optional> allowRegex) { this.allowRegex = allowRegex; return this; } - @Override + @java.lang.Override public _FinalStage tokenType(TokenType tokenType) { this.tokenType = Optional.ofNullable(tokenType); return this; } - @Override + @java.lang.Override @JsonSetter(value = "token_type", nulls = Nulls.SKIP) public _FinalStage tokenType(Optional tokenType) { this.tokenType = tokenType; return this; } - @Override + @java.lang.Override public _FinalStage entityTypes(List entityTypes) { this.entityTypes = Optional.ofNullable(entityTypes); return this; } - @Override + @java.lang.Override @JsonSetter(value = "entity_types", nulls = Nulls.SKIP) public _FinalStage entityTypes(Optional> entityTypes) { this.entityTypes = entityTypes; return this; } - @Override + @java.lang.Override public _FinalStage configurationId(String configurationId) { this.configurationId = Optional.ofNullable(configurationId); return this; } - @Override + @java.lang.Override @JsonSetter(value = "configuration_id", nulls = Nulls.SKIP) public _FinalStage configurationId(Optional configurationId) { this.configurationId = configurationId; return this; } - @Override + @java.lang.Override public DeidentifyStringRequest build() { return new DeidentifyStringRequest( vaultId, diff --git a/src/main/java/com/skyflow/generated/rest/resources/strings/requests/ReidentifyStringRequest.java b/src/main/java/com/skyflow/generated/rest/resources/strings/requests/ReidentifyStringRequest.java index e18b2169..e61cb5a2 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/strings/requests/ReidentifyStringRequest.java +++ b/src/main/java/com/skyflow/generated/rest/resources/strings/requests/ReidentifyStringRequest.java @@ -65,7 +65,7 @@ public Optional getFormat() { return format; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ReidentifyStringRequest && equalTo((ReidentifyStringRequest) other); @@ -80,12 +80,12 @@ private boolean equalTo(ReidentifyStringRequest other) { return text.equals(other.text) && vaultId.equals(other.vaultId) && format.equals(other.format); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.text, this.vaultId, this.format); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -134,7 +134,7 @@ public static final class Builder implements TextStage, VaultIdStage, _FinalStag private Builder() {} - @Override + @java.lang.Override public Builder from(ReidentifyStringRequest other) { text(other.getText()); vaultId(other.getVaultId()); @@ -146,7 +146,7 @@ public Builder from(ReidentifyStringRequest other) { * String to re-identify.

String to re-identify.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("text") public VaultIdStage text(@NotNull String text) { this.text = Objects.requireNonNull(text, "text must not be null"); @@ -157,7 +157,7 @@ public VaultIdStage text(@NotNull String text) { * ID of the vault where the entities are stored.

ID of the vault where the entities are stored.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("vault_id") public _FinalStage vaultId(@NotNull String vaultId) { this.vaultId = Objects.requireNonNull(vaultId, "vaultId must not be null"); @@ -168,7 +168,7 @@ public _FinalStage vaultId(@NotNull String vaultId) { *

Mapping of perferred data formatting options to entity types. Returned values are dependent on the configuration of the vault storing the data and the permissions of the user or account making the request.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage format(ReidentifyStringRequestFormat format) { this.format = Optional.ofNullable(format); return this; @@ -177,14 +177,14 @@ public _FinalStage format(ReidentifyStringRequestFormat format) { /** *

Mapping of perferred data formatting options to entity types. Returned values are dependent on the configuration of the vault storing the data and the permissions of the user or account making the request.

*/ - @Override + @java.lang.Override @JsonSetter(value = "format", nulls = Nulls.SKIP) public _FinalStage format(Optional format) { this.format = format; return this; } - @Override + @java.lang.Override public ReidentifyStringRequest build() { return new ReidentifyStringRequest(text, vaultId, format, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/strings/types/ReidentifyStringRequestFormat.java b/src/main/java/com/skyflow/generated/rest/resources/strings/types/ReidentifyStringRequestFormat.java index 748cc2f6..68c5209f 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/strings/types/ReidentifyStringRequestFormat.java +++ b/src/main/java/com/skyflow/generated/rest/resources/strings/types/ReidentifyStringRequestFormat.java @@ -65,7 +65,7 @@ public Optional> getPlaintext() { return plaintext; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ReidentifyStringRequestFormat && equalTo((ReidentifyStringRequestFormat) other); @@ -80,12 +80,12 @@ private boolean equalTo(ReidentifyStringRequestFormat other) { return redacted.equals(other.redacted) && masked.equals(other.masked) && plaintext.equals(other.plaintext); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.redacted, this.masked, this.plaintext); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/tokens/requests/V1DetokenizePayload.java b/src/main/java/com/skyflow/generated/rest/resources/tokens/requests/V1DetokenizePayload.java index 59318aa8..1d3cb407 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/tokens/requests/V1DetokenizePayload.java +++ b/src/main/java/com/skyflow/generated/rest/resources/tokens/requests/V1DetokenizePayload.java @@ -65,7 +65,7 @@ public Optional getContinueOnError() { return continueOnError; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1DetokenizePayload && equalTo((V1DetokenizePayload) other); @@ -82,12 +82,12 @@ private boolean equalTo(V1DetokenizePayload other) { && continueOnError.equals(other.continueOnError); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.detokenizationParameters, this.downloadUrl, this.continueOnError); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/resources/tokens/requests/V1TokenizePayload.java b/src/main/java/com/skyflow/generated/rest/resources/tokens/requests/V1TokenizePayload.java index 9729023e..30bdde6a 100644 --- a/src/main/java/com/skyflow/generated/rest/resources/tokens/requests/V1TokenizePayload.java +++ b/src/main/java/com/skyflow/generated/rest/resources/tokens/requests/V1TokenizePayload.java @@ -40,7 +40,7 @@ public Optional> getTokenizationParameters() { return tokenizationParameters; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1TokenizePayload && equalTo((V1TokenizePayload) other); @@ -55,12 +55,12 @@ private boolean equalTo(V1TokenizePayload other) { return tokenizationParameters.equals(other.tokenizationParameters); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.tokenizationParameters); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/AuditEventAuditResourceType.java b/src/main/java/com/skyflow/generated/rest/types/AuditEventAuditResourceType.java index d16caf10..4264996a 100644 --- a/src/main/java/com/skyflow/generated/rest/types/AuditEventAuditResourceType.java +++ b/src/main/java/com/skyflow/generated/rest/types/AuditEventAuditResourceType.java @@ -73,7 +73,7 @@ public enum AuditEventAuditResourceType { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/AuditEventContext.java b/src/main/java/com/skyflow/generated/rest/types/AuditEventContext.java index 210f96c0..2a5c104a 100644 --- a/src/main/java/com/skyflow/generated/rest/types/AuditEventContext.java +++ b/src/main/java/com/skyflow/generated/rest/types/AuditEventContext.java @@ -162,7 +162,7 @@ public Optional getBearerTokenContextId() { return bearerTokenContextId; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof AuditEventContext && equalTo((AuditEventContext) other); @@ -188,7 +188,7 @@ private boolean equalTo(AuditEventContext other) { && bearerTokenContextId.equals(other.bearerTokenContextId); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.changeId, @@ -205,7 +205,7 @@ public int hashCode() { this.bearerTokenContextId); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/AuditEventData.java b/src/main/java/com/skyflow/generated/rest/types/AuditEventData.java index e2028fba..45d15be1 100644 --- a/src/main/java/com/skyflow/generated/rest/types/AuditEventData.java +++ b/src/main/java/com/skyflow/generated/rest/types/AuditEventData.java @@ -37,7 +37,7 @@ public Optional getContent() { return content; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof AuditEventData && equalTo((AuditEventData) other); @@ -52,12 +52,12 @@ private boolean equalTo(AuditEventData other) { return content.equals(other.content); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.content); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/AuditEventHttpInfo.java b/src/main/java/com/skyflow/generated/rest/types/AuditEventHttpInfo.java index 1352c42f..91126cc0 100644 --- a/src/main/java/com/skyflow/generated/rest/types/AuditEventHttpInfo.java +++ b/src/main/java/com/skyflow/generated/rest/types/AuditEventHttpInfo.java @@ -49,7 +49,7 @@ public Optional getMethod() { return method; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof AuditEventHttpInfo && equalTo((AuditEventHttpInfo) other); @@ -64,12 +64,12 @@ private boolean equalTo(AuditEventHttpInfo other) { return uri.equals(other.uri) && method.equals(other.method); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.uri, this.method); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/BatchRecordMethod.java b/src/main/java/com/skyflow/generated/rest/types/BatchRecordMethod.java index a6f5e673..c50f618d 100644 --- a/src/main/java/com/skyflow/generated/rest/types/BatchRecordMethod.java +++ b/src/main/java/com/skyflow/generated/rest/types/BatchRecordMethod.java @@ -23,7 +23,7 @@ public enum BatchRecordMethod { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/CheckGuardrailsResponse.java b/src/main/java/com/skyflow/generated/rest/types/CheckGuardrailsResponse.java index 31aadbe8..324cd1e6 100644 --- a/src/main/java/com/skyflow/generated/rest/types/CheckGuardrailsResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/CheckGuardrailsResponse.java @@ -75,7 +75,7 @@ public Optional getValidation() { return validation; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof CheckGuardrailsResponse && equalTo((CheckGuardrailsResponse) other); @@ -93,12 +93,12 @@ private boolean equalTo(CheckGuardrailsResponse other) { && validation.equals(other.validation); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.text, this.toxicity, this.deniedTopics, this.validation); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/CheckGuardrailsResponseValidation.java b/src/main/java/com/skyflow/generated/rest/types/CheckGuardrailsResponseValidation.java index ad97e07e..2ff9edb8 100644 --- a/src/main/java/com/skyflow/generated/rest/types/CheckGuardrailsResponseValidation.java +++ b/src/main/java/com/skyflow/generated/rest/types/CheckGuardrailsResponseValidation.java @@ -17,7 +17,7 @@ public enum CheckGuardrailsResponseValidation { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/ContextAccessType.java b/src/main/java/com/skyflow/generated/rest/types/ContextAccessType.java index 163e862e..b1b6072c 100644 --- a/src/main/java/com/skyflow/generated/rest/types/ContextAccessType.java +++ b/src/main/java/com/skyflow/generated/rest/types/ContextAccessType.java @@ -19,7 +19,7 @@ public enum ContextAccessType { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/ContextAuthMode.java b/src/main/java/com/skyflow/generated/rest/types/ContextAuthMode.java index 204ad039..349ca23a 100644 --- a/src/main/java/com/skyflow/generated/rest/types/ContextAuthMode.java +++ b/src/main/java/com/skyflow/generated/rest/types/ContextAuthMode.java @@ -21,7 +21,7 @@ public enum ContextAuthMode { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileOutput.java b/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileOutput.java index 4938361f..59839994 100644 --- a/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileOutput.java +++ b/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileOutput.java @@ -63,7 +63,7 @@ public Optional getProcessedFileExtension() { return processedFileExtension; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyFileOutput && equalTo((DeidentifyFileOutput) other); @@ -80,12 +80,12 @@ private boolean equalTo(DeidentifyFileOutput other) { && processedFileExtension.equals(other.processedFileExtension); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.processedFile, this.processedFileType, this.processedFileExtension); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileOutputProcessedFileType.java b/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileOutputProcessedFileType.java index 8b602431..c560dc9e 100644 --- a/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileOutputProcessedFileType.java +++ b/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileOutputProcessedFileType.java @@ -33,7 +33,7 @@ public enum DeidentifyFileOutputProcessedFileType { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileResponse.java b/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileResponse.java index 6b06d486..460058dc 100644 --- a/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/DeidentifyFileResponse.java @@ -36,7 +36,7 @@ public String getRunId() { return runId; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyFileResponse && equalTo((DeidentifyFileResponse) other); @@ -51,12 +51,12 @@ private boolean equalTo(DeidentifyFileResponse other) { return runId.equals(other.runId); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.runId); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -87,7 +87,7 @@ public static final class Builder implements RunIdStage, _FinalStage { private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyFileResponse other) { runId(other.getRunId()); return this; @@ -97,14 +97,14 @@ public Builder from(DeidentifyFileResponse other) { * Status URL for the detect run.

Status URL for the detect run.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("run_id") public _FinalStage runId(@NotNull String runId) { this.runId = Objects.requireNonNull(runId, "runId must not be null"); return this; } - @Override + @java.lang.Override public DeidentifyFileResponse build() { return new DeidentifyFileResponse(runId, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponse.java b/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponse.java index c01d6e5d..9beef0a2 100644 --- a/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponse.java @@ -150,7 +150,7 @@ public Optional getSlides() { return slides; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyStatusResponse && equalTo((DeidentifyStatusResponse) other); @@ -174,7 +174,7 @@ private boolean equalTo(DeidentifyStatusResponse other) { && slides.equals(other.slides); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.status, @@ -189,7 +189,7 @@ public int hashCode() { this.slides); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -303,7 +303,7 @@ public static final class Builder implements StatusStage, OutputTypeStage, Messa private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyStatusResponse other) { status(other.getStatus()); output(other.getOutput()); @@ -322,7 +322,7 @@ public Builder from(DeidentifyStatusResponse other) { * Status of the detect run.

Status of the detect run.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("status") public OutputTypeStage status(@NotNull DeidentifyStatusResponseStatus status) { this.status = Objects.requireNonNull(status, "status must not be null"); @@ -333,7 +333,7 @@ public OutputTypeStage status(@NotNull DeidentifyStatusResponseStatus status) { * How the output file is specified.

How the output file is specified.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("output_type") public MessageStage outputType(@NotNull DeidentifyStatusResponseOutputType outputType) { this.outputType = Objects.requireNonNull(outputType, "outputType must not be null"); @@ -344,7 +344,7 @@ public MessageStage outputType(@NotNull DeidentifyStatusResponseOutputType outpu * Status details about the detect run.

Status details about the detect run.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("message") public _FinalStage message(@NotNull String message) { this.message = Objects.requireNonNull(message, "message must not be null"); @@ -355,7 +355,7 @@ public _FinalStage message(@NotNull String message) { *

Number of slides in the processed presentation.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage slides(Integer slides) { this.slides = Optional.ofNullable(slides); return this; @@ -364,7 +364,7 @@ public _FinalStage slides(Integer slides) { /** *

Number of slides in the processed presentation.

*/ - @Override + @java.lang.Override @JsonSetter(value = "slides", nulls = Nulls.SKIP) public _FinalStage slides(Optional slides) { this.slides = slides; @@ -375,7 +375,7 @@ public _FinalStage slides(Optional slides) { *

Number of pages in the processed PDF.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage pages(Integer pages) { this.pages = Optional.ofNullable(pages); return this; @@ -384,7 +384,7 @@ public _FinalStage pages(Integer pages) { /** *

Number of pages in the processed PDF.

*/ - @Override + @java.lang.Override @JsonSetter(value = "pages", nulls = Nulls.SKIP) public _FinalStage pages(Optional pages) { this.pages = pages; @@ -395,7 +395,7 @@ public _FinalStage pages(Optional pages) { *

Duration of the processed audio in seconds.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage duration(Double duration) { this.duration = Optional.ofNullable(duration); return this; @@ -404,7 +404,7 @@ public _FinalStage duration(Double duration) { /** *

Duration of the processed audio in seconds.

*/ - @Override + @java.lang.Override @JsonSetter(value = "duration", nulls = Nulls.SKIP) public _FinalStage duration(Optional duration) { this.duration = duration; @@ -415,7 +415,7 @@ public _FinalStage duration(Optional duration) { *

Size of the processed text in kilobytes (KB).

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage size(Double size) { this.size = Optional.ofNullable(size); return this; @@ -424,7 +424,7 @@ public _FinalStage size(Double size) { /** *

Size of the processed text in kilobytes (KB).

*/ - @Override + @java.lang.Override @JsonSetter(value = "size", nulls = Nulls.SKIP) public _FinalStage size(Optional size) { this.size = size; @@ -435,7 +435,7 @@ public _FinalStage size(Optional size) { *

Number of characters in the processed text.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage characterCount(Integer characterCount) { this.characterCount = Optional.ofNullable(characterCount); return this; @@ -444,7 +444,7 @@ public _FinalStage characterCount(Integer characterCount) { /** *

Number of characters in the processed text.

*/ - @Override + @java.lang.Override @JsonSetter(value = "character_count", nulls = Nulls.SKIP) public _FinalStage characterCount(Optional characterCount) { this.characterCount = characterCount; @@ -455,7 +455,7 @@ public _FinalStage characterCount(Optional characterCount) { *

Number of words in the processed text.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage wordCount(Integer wordCount) { this.wordCount = Optional.ofNullable(wordCount); return this; @@ -464,7 +464,7 @@ public _FinalStage wordCount(Integer wordCount) { /** *

Number of words in the processed text.

*/ - @Override + @java.lang.Override @JsonSetter(value = "word_count", nulls = Nulls.SKIP) public _FinalStage wordCount(Optional wordCount) { this.wordCount = wordCount; @@ -475,7 +475,7 @@ public _FinalStage wordCount(Optional wordCount) { *

How the input file was specified.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage addAllOutput(List output) { this.output.addAll(output); return this; @@ -485,7 +485,7 @@ public _FinalStage addAllOutput(List output) { *

How the input file was specified.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage addOutput(DeidentifyFileOutput output) { this.output.add(output); return this; @@ -494,7 +494,7 @@ public _FinalStage addOutput(DeidentifyFileOutput output) { /** *

How the input file was specified.

*/ - @Override + @java.lang.Override @JsonSetter(value = "output", nulls = Nulls.SKIP) public _FinalStage output(List output) { this.output.clear(); @@ -502,7 +502,7 @@ public _FinalStage output(List output) { return this; } - @Override + @java.lang.Override public DeidentifyStatusResponse build() { return new DeidentifyStatusResponse( status, diff --git a/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponseOutputType.java b/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponseOutputType.java index 5f20de6e..4db4d813 100644 --- a/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponseOutputType.java +++ b/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponseOutputType.java @@ -17,7 +17,7 @@ public enum DeidentifyStatusResponseOutputType { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponseStatus.java b/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponseStatus.java index 5cf2be23..f03db2ed 100644 --- a/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponseStatus.java +++ b/src/main/java/com/skyflow/generated/rest/types/DeidentifyStatusResponseStatus.java @@ -21,7 +21,7 @@ public enum DeidentifyStatusResponseStatus { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/DeidentifyStringResponse.java b/src/main/java/com/skyflow/generated/rest/types/DeidentifyStringResponse.java index b78bb43e..5b768610 100644 --- a/src/main/java/com/skyflow/generated/rest/types/DeidentifyStringResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/DeidentifyStringResponse.java @@ -77,7 +77,7 @@ public int getCharacterCount() { return characterCount; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DeidentifyStringResponse && equalTo((DeidentifyStringResponse) other); @@ -95,12 +95,12 @@ private boolean equalTo(DeidentifyStringResponse other) { && characterCount == other.characterCount; } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.processedText, this.entities, this.wordCount, this.characterCount); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -160,7 +160,7 @@ public static final class Builder implements ProcessedTextStage, WordCountStage, private Builder() {} - @Override + @java.lang.Override public Builder from(DeidentifyStringResponse other) { processedText(other.getProcessedText()); entities(other.getEntities()); @@ -173,7 +173,7 @@ public Builder from(DeidentifyStringResponse other) { * De-identified text.

De-identified text.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("processed_text") public WordCountStage processedText(@NotNull String processedText) { this.processedText = Objects.requireNonNull(processedText, "processedText must not be null"); @@ -184,7 +184,7 @@ public WordCountStage processedText(@NotNull String processedText) { * Number of words from the input text.

Number of words from the input text.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("word_count") public CharacterCountStage wordCount(int wordCount) { this.wordCount = wordCount; @@ -195,7 +195,7 @@ public CharacterCountStage wordCount(int wordCount) { * Number of characters from the input text.

Number of characters from the input text.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("character_count") public _FinalStage characterCount(int characterCount) { this.characterCount = characterCount; @@ -206,7 +206,7 @@ public _FinalStage characterCount(int characterCount) { *

Detected entities.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage addAllEntities(List entities) { this.entities.addAll(entities); return this; @@ -216,7 +216,7 @@ public _FinalStage addAllEntities(List entities) { *

Detected entities.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override public _FinalStage addEntities(DetectedEntity entities) { this.entities.add(entities); return this; @@ -225,7 +225,7 @@ public _FinalStage addEntities(DetectedEntity entities) { /** *

Detected entities.

*/ - @Override + @java.lang.Override @JsonSetter(value = "entities", nulls = Nulls.SKIP) public _FinalStage entities(List entities) { this.entities.clear(); @@ -233,7 +233,7 @@ public _FinalStage entities(List entities) { return this; } - @Override + @java.lang.Override public DeidentifyStringResponse build() { return new DeidentifyStringResponse( processedText, entities, wordCount, characterCount, additionalProperties); diff --git a/src/main/java/com/skyflow/generated/rest/types/DetectedEntity.java b/src/main/java/com/skyflow/generated/rest/types/DetectedEntity.java index 840a62a9..6de2200a 100644 --- a/src/main/java/com/skyflow/generated/rest/types/DetectedEntity.java +++ b/src/main/java/com/skyflow/generated/rest/types/DetectedEntity.java @@ -84,7 +84,7 @@ public Optional> getEntityScores() { return entityScores; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof DetectedEntity && equalTo((DetectedEntity) other); @@ -103,12 +103,12 @@ private boolean equalTo(DetectedEntity other) { && entityScores.equals(other.entityScores); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.token, this.value, this.location, this.entityType, this.entityScores); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/DetokenizeRecordResponseValueType.java b/src/main/java/com/skyflow/generated/rest/types/DetokenizeRecordResponseValueType.java index e9f4be2a..f192c14f 100644 --- a/src/main/java/com/skyflow/generated/rest/types/DetokenizeRecordResponseValueType.java +++ b/src/main/java/com/skyflow/generated/rest/types/DetokenizeRecordResponseValueType.java @@ -31,7 +31,7 @@ public enum DetokenizeRecordResponseValueType { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/EntityLocation.java b/src/main/java/com/skyflow/generated/rest/types/EntityLocation.java index 197afeda..6e711422 100644 --- a/src/main/java/com/skyflow/generated/rest/types/EntityLocation.java +++ b/src/main/java/com/skyflow/generated/rest/types/EntityLocation.java @@ -75,7 +75,7 @@ public Optional getEndIndexProcessed() { return endIndexProcessed; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof EntityLocation && equalTo((EntityLocation) other); @@ -93,12 +93,12 @@ private boolean equalTo(EntityLocation other) { && endIndexProcessed.equals(other.endIndexProcessed); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.startIndex, this.endIndex, this.startIndexProcessed, this.endIndexProcessed); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/EntityType.java b/src/main/java/com/skyflow/generated/rest/types/EntityType.java index c06b16e2..e6dcf699 100644 --- a/src/main/java/com/skyflow/generated/rest/types/EntityType.java +++ b/src/main/java/com/skyflow/generated/rest/types/EntityType.java @@ -153,7 +153,7 @@ public enum EntityType { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/ErrorResponse.java b/src/main/java/com/skyflow/generated/rest/types/ErrorResponse.java index 565714eb..68778cb1 100644 --- a/src/main/java/com/skyflow/generated/rest/types/ErrorResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/ErrorResponse.java @@ -33,7 +33,7 @@ public ErrorResponseError getError() { return error; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ErrorResponse && equalTo((ErrorResponse) other); @@ -48,12 +48,12 @@ private boolean equalTo(ErrorResponse other) { return error.equals(other.error); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.error); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -81,20 +81,20 @@ public static final class Builder implements ErrorStage, _FinalStage { private Builder() {} - @Override + @java.lang.Override public Builder from(ErrorResponse other) { error(other.getError()); return this; } - @Override + @java.lang.Override @JsonSetter("error") public _FinalStage error(@NotNull ErrorResponseError error) { this.error = Objects.requireNonNull(error, "error must not be null"); return this; } - @Override + @java.lang.Override public ErrorResponse build() { return new ErrorResponse(error, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/types/ErrorResponseError.java b/src/main/java/com/skyflow/generated/rest/types/ErrorResponseError.java index 21799203..5d0ee57d 100644 --- a/src/main/java/com/skyflow/generated/rest/types/ErrorResponseError.java +++ b/src/main/java/com/skyflow/generated/rest/types/ErrorResponseError.java @@ -83,7 +83,7 @@ public Optional>> getDetails() { return details; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ErrorResponseError && equalTo((ErrorResponseError) other); @@ -102,12 +102,12 @@ private boolean equalTo(ErrorResponseError other) { && details.equals(other.details); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.grpcCode, this.httpCode, this.httpStatus, this.message, this.details); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -169,7 +169,7 @@ public static final class Builder private Builder() {} - @Override + @java.lang.Override public Builder from(ErrorResponseError other) { grpcCode(other.getGrpcCode()); httpCode(other.getHttpCode()); @@ -183,7 +183,7 @@ public Builder from(ErrorResponseError other) { * gRPC status codes. See https://grpc.io/docs/guides/status-codes.

gRPC status codes. See https://grpc.io/docs/guides/status-codes.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("grpc_code") public HttpCodeStage grpcCode(int grpcCode) { this.grpcCode = grpcCode; @@ -194,7 +194,7 @@ public HttpCodeStage grpcCode(int grpcCode) { * HTTP status codes. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status.

HTTP status codes. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("http_code") public HttpStatusStage httpCode(int httpCode) { this.httpCode = httpCode; @@ -205,34 +205,34 @@ public HttpStatusStage httpCode(int httpCode) { * HTTP status message.

HTTP status message.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("http_status") public MessageStage httpStatus(@NotNull String httpStatus) { this.httpStatus = Objects.requireNonNull(httpStatus, "httpStatus must not be null"); return this; } - @Override + @java.lang.Override @JsonSetter("message") public _FinalStage message(@NotNull String message) { this.message = Objects.requireNonNull(message, "message must not be null"); return this; } - @Override + @java.lang.Override public _FinalStage details(List> details) { this.details = Optional.ofNullable(details); return this; } - @Override + @java.lang.Override @JsonSetter(value = "details", nulls = Nulls.SKIP) public _FinalStage details(Optional>> details) { this.details = details; return this; } - @Override + @java.lang.Override public ErrorResponseError build() { return new ErrorResponseError(grpcCode, httpCode, httpStatus, message, details, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/types/GooglerpcStatus.java b/src/main/java/com/skyflow/generated/rest/types/GooglerpcStatus.java index 807aee4e..d0290573 100644 --- a/src/main/java/com/skyflow/generated/rest/types/GooglerpcStatus.java +++ b/src/main/java/com/skyflow/generated/rest/types/GooglerpcStatus.java @@ -55,7 +55,7 @@ public Optional> getDetails() { return details; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof GooglerpcStatus && equalTo((GooglerpcStatus) other); @@ -70,12 +70,12 @@ private boolean equalTo(GooglerpcStatus other) { return code.equals(other.code) && message.equals(other.message) && details.equals(other.details); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.code, this.message, this.details); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/ProtobufAny.java b/src/main/java/com/skyflow/generated/rest/types/ProtobufAny.java index 9f019b66..37555aae 100644 --- a/src/main/java/com/skyflow/generated/rest/types/ProtobufAny.java +++ b/src/main/java/com/skyflow/generated/rest/types/ProtobufAny.java @@ -34,7 +34,7 @@ public Optional getType() { return type; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ProtobufAny && equalTo((ProtobufAny) other); @@ -49,12 +49,12 @@ private boolean equalTo(ProtobufAny other) { return type.equals(other.type); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.type); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/RedactionEnumRedaction.java b/src/main/java/com/skyflow/generated/rest/types/RedactionEnumRedaction.java index 88022df8..3e83052b 100644 --- a/src/main/java/com/skyflow/generated/rest/types/RedactionEnumRedaction.java +++ b/src/main/java/com/skyflow/generated/rest/types/RedactionEnumRedaction.java @@ -21,7 +21,7 @@ public enum RedactionEnumRedaction { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponse.java b/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponse.java index c9b35261..46804db0 100644 --- a/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponse.java @@ -59,7 +59,7 @@ public ReidentifyFileResponseOutput getOutput() { return output; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ReidentifyFileResponse && equalTo((ReidentifyFileResponse) other); @@ -74,12 +74,12 @@ private boolean equalTo(ReidentifyFileResponse other) { return status.equals(other.status) && outputType.equals(other.outputType) && output.equals(other.output); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.status, this.outputType, this.output); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -125,7 +125,7 @@ public static final class Builder implements StatusStage, OutputTypeStage, Outpu private Builder() {} - @Override + @java.lang.Override public Builder from(ReidentifyFileResponse other) { status(other.getStatus()); outputType(other.getOutputType()); @@ -137,7 +137,7 @@ public Builder from(ReidentifyFileResponse other) { * Status of the re-identify operation.

Status of the re-identify operation.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("status") public OutputTypeStage status(@NotNull ReidentifyFileResponseStatus status) { this.status = Objects.requireNonNull(status, "status must not be null"); @@ -148,21 +148,21 @@ public OutputTypeStage status(@NotNull ReidentifyFileResponseStatus status) { * Format of the output file.

Format of the output file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("output_type") public OutputStage outputType(@NotNull ReidentifyFileResponseOutputType outputType) { this.outputType = Objects.requireNonNull(outputType, "outputType must not be null"); return this; } - @Override + @java.lang.Override @JsonSetter("output") public _FinalStage output(@NotNull ReidentifyFileResponseOutput output) { this.output = Objects.requireNonNull(output, "output must not be null"); return this; } - @Override + @java.lang.Override public ReidentifyFileResponse build() { return new ReidentifyFileResponse(status, outputType, output, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseOutput.java b/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseOutput.java index 90e2fb38..266a9475 100644 --- a/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseOutput.java +++ b/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseOutput.java @@ -56,7 +56,7 @@ public String getProcessedFileExtension() { return processedFileExtension; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ReidentifyFileResponseOutput && equalTo((ReidentifyFileResponseOutput) other); @@ -71,12 +71,12 @@ private boolean equalTo(ReidentifyFileResponseOutput other) { return processedFile.equals(other.processedFile) && processedFileExtension.equals(other.processedFileExtension); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.processedFile, this.processedFileExtension); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } @@ -116,7 +116,7 @@ public static final class Builder implements ProcessedFileStage, ProcessedFileEx private Builder() {} - @Override + @java.lang.Override public Builder from(ReidentifyFileResponseOutput other) { processedFile(other.getProcessedFile()); processedFileExtension(other.getProcessedFileExtension()); @@ -127,7 +127,7 @@ public Builder from(ReidentifyFileResponseOutput other) { * Re-identified file content in base64 format.

Re-identified file content in base64 format.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("processed_file") public ProcessedFileExtensionStage processedFile(@NotNull String processedFile) { this.processedFile = Objects.requireNonNull(processedFile, "processedFile must not be null"); @@ -138,7 +138,7 @@ public ProcessedFileExtensionStage processedFile(@NotNull String processedFile) * Extension of the processed file.

Extension of the processed file.

* @return Reference to {@code this} so that method calls can be chained together. */ - @Override + @java.lang.Override @JsonSetter("processed_file_extension") public _FinalStage processedFileExtension(@NotNull String processedFileExtension) { this.processedFileExtension = @@ -146,7 +146,7 @@ public _FinalStage processedFileExtension(@NotNull String processedFileExtension return this; } - @Override + @java.lang.Override public ReidentifyFileResponseOutput build() { return new ReidentifyFileResponseOutput(processedFile, processedFileExtension, additionalProperties); } diff --git a/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseOutputType.java b/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseOutputType.java index 6a754641..167cb387 100644 --- a/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseOutputType.java +++ b/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseOutputType.java @@ -17,7 +17,7 @@ public enum ReidentifyFileResponseOutputType { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseStatus.java b/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseStatus.java index da44ec81..7b56adcf 100644 --- a/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseStatus.java +++ b/src/main/java/com/skyflow/generated/rest/types/ReidentifyFileResponseStatus.java @@ -21,7 +21,7 @@ public enum ReidentifyFileResponseStatus { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/ReidentifyStringResponse.java b/src/main/java/com/skyflow/generated/rest/types/ReidentifyStringResponse.java index dad2f08f..ba305e63 100644 --- a/src/main/java/com/skyflow/generated/rest/types/ReidentifyStringResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/ReidentifyStringResponse.java @@ -37,7 +37,7 @@ public Optional getText() { return text; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof ReidentifyStringResponse && equalTo((ReidentifyStringResponse) other); @@ -52,12 +52,12 @@ private boolean equalTo(ReidentifyStringResponse other) { return text.equals(other.text); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.text); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/RequestActionType.java b/src/main/java/com/skyflow/generated/rest/types/RequestActionType.java index ad0a32a7..436a1de8 100644 --- a/src/main/java/com/skyflow/generated/rest/types/RequestActionType.java +++ b/src/main/java/com/skyflow/generated/rest/types/RequestActionType.java @@ -49,7 +49,7 @@ public enum RequestActionType { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/TokenType.java b/src/main/java/com/skyflow/generated/rest/types/TokenType.java index eb30f761..a50e861b 100644 --- a/src/main/java/com/skyflow/generated/rest/types/TokenType.java +++ b/src/main/java/com/skyflow/generated/rest/types/TokenType.java @@ -73,7 +73,7 @@ public Optional> getEntityOnly() { return entityOnly; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof TokenType && equalTo((TokenType) other); @@ -91,12 +91,12 @@ private boolean equalTo(TokenType other) { && entityOnly.equals(other.entityOnly); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.default_, this.vaultToken, this.entityUnqCounter, this.entityOnly); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/TokenTypeDefault.java b/src/main/java/com/skyflow/generated/rest/types/TokenTypeDefault.java index 5eeed0a7..14ab8f0f 100644 --- a/src/main/java/com/skyflow/generated/rest/types/TokenTypeDefault.java +++ b/src/main/java/com/skyflow/generated/rest/types/TokenTypeDefault.java @@ -19,7 +19,7 @@ public enum TokenTypeDefault { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/TokenTypeWithoutVault.java b/src/main/java/com/skyflow/generated/rest/types/TokenTypeWithoutVault.java index 4bf8dffb..5f5938a0 100644 --- a/src/main/java/com/skyflow/generated/rest/types/TokenTypeWithoutVault.java +++ b/src/main/java/com/skyflow/generated/rest/types/TokenTypeWithoutVault.java @@ -61,7 +61,7 @@ public Optional> getEntityOnly() { return entityOnly; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof TokenTypeWithoutVault && equalTo((TokenTypeWithoutVault) other); @@ -78,12 +78,12 @@ private boolean equalTo(TokenTypeWithoutVault other) { && entityOnly.equals(other.entityOnly); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.default_, this.entityUnqCounter, this.entityOnly); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/TokenTypeWithoutVaultDefault.java b/src/main/java/com/skyflow/generated/rest/types/TokenTypeWithoutVaultDefault.java index d7d0d573..45dba579 100644 --- a/src/main/java/com/skyflow/generated/rest/types/TokenTypeWithoutVaultDefault.java +++ b/src/main/java/com/skyflow/generated/rest/types/TokenTypeWithoutVaultDefault.java @@ -17,7 +17,7 @@ public enum TokenTypeWithoutVaultDefault { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/Transformations.java b/src/main/java/com/skyflow/generated/rest/types/Transformations.java index bef63c2a..46022faa 100644 --- a/src/main/java/com/skyflow/generated/rest/types/Transformations.java +++ b/src/main/java/com/skyflow/generated/rest/types/Transformations.java @@ -37,7 +37,7 @@ public Optional getShiftDates() { return shiftDates; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof Transformations && equalTo((Transformations) other); @@ -52,12 +52,12 @@ private boolean equalTo(Transformations other) { return shiftDates.equals(other.shiftDates); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.shiftDates); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/TransformationsShiftDates.java b/src/main/java/com/skyflow/generated/rest/types/TransformationsShiftDates.java index e9206467..1e11938b 100644 --- a/src/main/java/com/skyflow/generated/rest/types/TransformationsShiftDates.java +++ b/src/main/java/com/skyflow/generated/rest/types/TransformationsShiftDates.java @@ -64,7 +64,7 @@ public Optional> getEntityTypes() return entityTypes; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof TransformationsShiftDates && equalTo((TransformationsShiftDates) other); @@ -79,12 +79,12 @@ private boolean equalTo(TransformationsShiftDates other) { return maxDays.equals(other.maxDays) && minDays.equals(other.minDays) && entityTypes.equals(other.entityTypes); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.maxDays, this.minDays, this.entityTypes); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/TransformationsShiftDatesEntityTypesItem.java b/src/main/java/com/skyflow/generated/rest/types/TransformationsShiftDatesEntityTypesItem.java index 3da8eb6d..148cea23 100644 --- a/src/main/java/com/skyflow/generated/rest/types/TransformationsShiftDatesEntityTypesItem.java +++ b/src/main/java/com/skyflow/generated/rest/types/TransformationsShiftDatesEntityTypesItem.java @@ -19,7 +19,7 @@ public enum TransformationsShiftDatesEntityTypesItem { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/UploadFileV2Response.java b/src/main/java/com/skyflow/generated/rest/types/UploadFileV2Response.java new file mode 100644 index 00000000..85f98bd1 --- /dev/null +++ b/src/main/java/com/skyflow/generated/rest/types/UploadFileV2Response.java @@ -0,0 +1,124 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.skyflow.generated.rest.types; + +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 = UploadFileV2Response.Builder.class) +public final class UploadFileV2Response { + private final Optional skyflowId; + + private final Optional fileMetadata; + + private final Map additionalProperties; + + private UploadFileV2Response( + Optional skyflowId, Optional fileMetadata, Map additionalProperties) { + this.skyflowId = skyflowId; + this.fileMetadata = fileMetadata; + this.additionalProperties = additionalProperties; + } + + /** + * @return Skyflow ID of the record the file was uploaded to. + */ + @JsonProperty("skyflowID") + public Optional getSkyflowId() { + return skyflowId; + } + + @JsonProperty("fileMetadata") + public Optional getFileMetadata() { + return fileMetadata; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UploadFileV2Response && equalTo((UploadFileV2Response) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UploadFileV2Response other) { + return skyflowId.equals(other.skyflowId) && fileMetadata.equals(other.fileMetadata); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.skyflowId, this.fileMetadata); + } + + @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 skyflowId = Optional.empty(); + + private Optional fileMetadata = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UploadFileV2Response other) { + skyflowId(other.getSkyflowId()); + fileMetadata(other.getFileMetadata()); + return this; + } + + /** + *

Skyflow ID of the record the file was uploaded to.

+ */ + @JsonSetter(value = "skyflowID", nulls = Nulls.SKIP) + public Builder skyflowId(Optional skyflowId) { + this.skyflowId = skyflowId; + return this; + } + + public Builder skyflowId(String skyflowId) { + this.skyflowId = Optional.ofNullable(skyflowId); + return this; + } + + @JsonSetter(value = "fileMetadata", nulls = Nulls.SKIP) + public Builder fileMetadata(Optional fileMetadata) { + this.fileMetadata = fileMetadata; + return this; + } + + public Builder fileMetadata(Object fileMetadata) { + this.fileMetadata = Optional.ofNullable(fileMetadata); + return this; + } + + public UploadFileV2Response build() { + return new UploadFileV2Response(skyflowId, fileMetadata, additionalProperties); + } + } +} diff --git a/src/main/java/com/skyflow/generated/rest/types/V1AuditAfterOptions.java b/src/main/java/com/skyflow/generated/rest/types/V1AuditAfterOptions.java index d942fdcd..1453dd99 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1AuditAfterOptions.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1AuditAfterOptions.java @@ -49,7 +49,7 @@ public Optional getChangeId() { return changeId; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1AuditAfterOptions && equalTo((V1AuditAfterOptions) other); @@ -64,12 +64,12 @@ private boolean equalTo(V1AuditAfterOptions other) { return timestamp.equals(other.timestamp) && changeId.equals(other.changeId); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.timestamp, this.changeId); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1AuditEventResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1AuditEventResponse.java index c582d06d..2dd2ca4e 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1AuditEventResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1AuditEventResponse.java @@ -72,7 +72,7 @@ public Optional getTimestamp() { return timestamp; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1AuditEventResponse && equalTo((V1AuditEventResponse) other); @@ -90,12 +90,12 @@ private boolean equalTo(V1AuditEventResponse other) { && timestamp.equals(other.timestamp); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.code, this.message, this.data, this.timestamp); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1AuditResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1AuditResponse.java index dd23d77c..88496f03 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1AuditResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1AuditResponse.java @@ -49,7 +49,7 @@ public Optional getNextOps() { return nextOps; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1AuditResponse && equalTo((V1AuditResponse) other); @@ -64,12 +64,12 @@ private boolean equalTo(V1AuditResponse other) { return event.equals(other.event) && nextOps.equals(other.nextOps); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.event, this.nextOps); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1AuditResponseEvent.java b/src/main/java/com/skyflow/generated/rest/types/V1AuditResponseEvent.java index ca2bfdc2..595b724c 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1AuditResponseEvent.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1AuditResponseEvent.java @@ -91,7 +91,7 @@ public Optional> getResourceIDs() { return resourceIDs; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1AuditResponseEvent && equalTo((V1AuditResponseEvent) other); @@ -111,13 +111,13 @@ private boolean equalTo(V1AuditResponseEvent other) { && resourceIDs.equals(other.resourceIDs); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.context, this.request, this.response, this.parentAccountId, this.accountId, this.resourceIDs); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1AuditResponseEventRequest.java b/src/main/java/com/skyflow/generated/rest/types/V1AuditResponseEventRequest.java index 046c8fb4..c77bc31f 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1AuditResponseEventRequest.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1AuditResponseEventRequest.java @@ -124,7 +124,7 @@ public Optional getHttpInfo() { return httpInfo; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1AuditResponseEventRequest && equalTo((V1AuditResponseEventRequest) other); @@ -147,7 +147,7 @@ private boolean equalTo(V1AuditResponseEventRequest other) { && httpInfo.equals(other.httpInfo); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.data, @@ -161,7 +161,7 @@ public int hashCode() { this.httpInfo); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1BatchOperationResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1BatchOperationResponse.java index a557da82..03d752d9 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1BatchOperationResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1BatchOperationResponse.java @@ -52,7 +52,7 @@ public Optional>> getResponses() { return responses; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1BatchOperationResponse && equalTo((V1BatchOperationResponse) other); @@ -67,12 +67,12 @@ private boolean equalTo(V1BatchOperationResponse other) { return vaultId.equals(other.vaultId) && responses.equals(other.responses); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.vaultId, this.responses); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1BatchRecord.java b/src/main/java/com/skyflow/generated/rest/types/V1BatchRecord.java index afc572cf..39eb2e68 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1BatchRecord.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1BatchRecord.java @@ -141,7 +141,7 @@ public Optional> getTokens() { return tokens; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1BatchRecord && equalTo((V1BatchRecord) other); @@ -165,7 +165,7 @@ private boolean equalTo(V1BatchRecord other) { && tokens.equals(other.tokens); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.fields, @@ -180,7 +180,7 @@ public int hashCode() { this.tokens); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1BinListResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1BinListResponse.java index 58472a8b..cf3a3326 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1BinListResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1BinListResponse.java @@ -38,7 +38,7 @@ public Optional> getCardsData() { return cardsData; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1BinListResponse && equalTo((V1BinListResponse) other); @@ -53,12 +53,12 @@ private boolean equalTo(V1BinListResponse other) { return cardsData.equals(other.cardsData); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.cardsData); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1BulkDeleteRecordResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1BulkDeleteRecordResponse.java index ddb0d213..5f781686 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1BulkDeleteRecordResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1BulkDeleteRecordResponse.java @@ -39,7 +39,7 @@ public Optional> getRecordIdResponse() { return recordIdResponse; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1BulkDeleteRecordResponse && equalTo((V1BulkDeleteRecordResponse) other); @@ -54,12 +54,12 @@ private boolean equalTo(V1BulkDeleteRecordResponse other) { return recordIdResponse.equals(other.recordIdResponse); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.recordIdResponse); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1BulkGetRecordResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1BulkGetRecordResponse.java index c2d3790a..70d31034 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1BulkGetRecordResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1BulkGetRecordResponse.java @@ -38,7 +38,7 @@ public Optional> getRecords() { return records; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1BulkGetRecordResponse && equalTo((V1BulkGetRecordResponse) other); @@ -53,12 +53,12 @@ private boolean equalTo(V1BulkGetRecordResponse other) { return records.equals(other.records); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.records); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1Byot.java b/src/main/java/com/skyflow/generated/rest/types/V1Byot.java index bafd7a09..819fdb42 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1Byot.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1Byot.java @@ -19,7 +19,7 @@ public enum V1Byot { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1Card.java b/src/main/java/com/skyflow/generated/rest/types/V1Card.java index f2a9db90..d19d3099 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1Card.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1Card.java @@ -135,7 +135,7 @@ public Optional getCardExpiry() { return cardExpiry; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1Card && equalTo((V1Card) other); @@ -158,7 +158,7 @@ private boolean equalTo(V1Card other) { && cardExpiry.equals(other.cardExpiry); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash( this.bin, @@ -172,7 +172,7 @@ public int hashCode() { this.cardExpiry); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1DeleteFileResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1DeleteFileResponse.java index 4ec85903..efdb8e42 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1DeleteFileResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1DeleteFileResponse.java @@ -49,7 +49,7 @@ public Optional getDeleted() { return deleted; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1DeleteFileResponse && equalTo((V1DeleteFileResponse) other); @@ -64,12 +64,12 @@ private boolean equalTo(V1DeleteFileResponse other) { return skyflowId.equals(other.skyflowId) && deleted.equals(other.deleted); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.skyflowId, this.deleted); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1DeleteRecordResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1DeleteRecordResponse.java index 2f3bde14..700bfe2f 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1DeleteRecordResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1DeleteRecordResponse.java @@ -49,7 +49,7 @@ public Optional getDeleted() { return deleted; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1DeleteRecordResponse && equalTo((V1DeleteRecordResponse) other); @@ -64,12 +64,12 @@ private boolean equalTo(V1DeleteRecordResponse other) { return skyflowId.equals(other.skyflowId) && deleted.equals(other.deleted); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.skyflowId, this.deleted); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeRecordRequest.java b/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeRecordRequest.java index 3cf5b59c..5b6927d1 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeRecordRequest.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeRecordRequest.java @@ -48,7 +48,7 @@ public Optional getRedaction() { return redaction; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1DetokenizeRecordRequest && equalTo((V1DetokenizeRecordRequest) other); @@ -63,12 +63,12 @@ private boolean equalTo(V1DetokenizeRecordRequest other) { return token.equals(other.token) && redaction.equals(other.redaction); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.token, this.redaction); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeRecordResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeRecordResponse.java index ba0abbfa..423abfe8 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeRecordResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeRecordResponse.java @@ -72,7 +72,7 @@ public Optional getError() { return error; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1DetokenizeRecordResponse && equalTo((V1DetokenizeRecordResponse) other); @@ -90,12 +90,12 @@ private boolean equalTo(V1DetokenizeRecordResponse other) { && error.equals(other.error); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.token, this.valueType, this.value, this.error); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeResponse.java index 74f4f6e6..20d7d8e4 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1DetokenizeResponse.java @@ -39,7 +39,7 @@ public Optional> getRecords() { return records; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1DetokenizeResponse && equalTo((V1DetokenizeResponse) other); @@ -54,12 +54,12 @@ private boolean equalTo(V1DetokenizeResponse other) { return records.equals(other.records); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.records); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1FieldRecords.java b/src/main/java/com/skyflow/generated/rest/types/V1FieldRecords.java index dfbccb8b..8d520d3b 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1FieldRecords.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1FieldRecords.java @@ -51,7 +51,7 @@ public Optional> getTokens() { return tokens; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1FieldRecords && equalTo((V1FieldRecords) other); @@ -66,12 +66,12 @@ private boolean equalTo(V1FieldRecords other) { return fields.equals(other.fields) && tokens.equals(other.tokens); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.fields, this.tokens); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1FileAvScanStatus.java b/src/main/java/com/skyflow/generated/rest/types/V1FileAvScanStatus.java index 02658ef2..afe545fe 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1FileAvScanStatus.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1FileAvScanStatus.java @@ -31,7 +31,7 @@ public enum V1FileAvScanStatus { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1GetAuthTokenResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1GetAuthTokenResponse.java index f5669085..9b6be70b 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1GetAuthTokenResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1GetAuthTokenResponse.java @@ -49,7 +49,7 @@ public Optional getTokenType() { return tokenType; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1GetAuthTokenResponse && equalTo((V1GetAuthTokenResponse) other); @@ -64,12 +64,12 @@ private boolean equalTo(V1GetAuthTokenResponse other) { return accessToken.equals(other.accessToken) && tokenType.equals(other.tokenType); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.accessToken, this.tokenType); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1GetFileScanStatusResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1GetFileScanStatusResponse.java index 4bd67013..27100e6d 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1GetFileScanStatusResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1GetFileScanStatusResponse.java @@ -35,7 +35,7 @@ public Optional getAvScanStatus() { return avScanStatus; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1GetFileScanStatusResponse && equalTo((V1GetFileScanStatusResponse) other); @@ -50,12 +50,12 @@ private boolean equalTo(V1GetFileScanStatusResponse other) { return avScanStatus.equals(other.avScanStatus); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.avScanStatus); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1GetQueryResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1GetQueryResponse.java index 821d1f06..6a8689ae 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1GetQueryResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1GetQueryResponse.java @@ -38,7 +38,7 @@ public Optional> getRecords() { return records; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1GetQueryResponse && equalTo((V1GetQueryResponse) other); @@ -53,12 +53,12 @@ private boolean equalTo(V1GetQueryResponse other) { return records.equals(other.records); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.records); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1InsertRecordResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1InsertRecordResponse.java index 0addf786..724bee91 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1InsertRecordResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1InsertRecordResponse.java @@ -39,7 +39,7 @@ public Optional> getRecords() { return records; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1InsertRecordResponse && equalTo((V1InsertRecordResponse) other); @@ -54,12 +54,12 @@ private boolean equalTo(V1InsertRecordResponse other) { return records.equals(other.records); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.records); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1MemberType.java b/src/main/java/com/skyflow/generated/rest/types/V1MemberType.java index 48e96379..dacca1b9 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1MemberType.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1MemberType.java @@ -19,7 +19,7 @@ public enum V1MemberType { } @JsonValue - @Override + @java.lang.Override public String toString() { return this.value; } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1RecordMetaProperties.java b/src/main/java/com/skyflow/generated/rest/types/V1RecordMetaProperties.java index f69719cf..419b8e16 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1RecordMetaProperties.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1RecordMetaProperties.java @@ -51,7 +51,7 @@ public Optional> getTokens() { return tokens; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1RecordMetaProperties && equalTo((V1RecordMetaProperties) other); @@ -66,12 +66,12 @@ private boolean equalTo(V1RecordMetaProperties other) { return skyflowId.equals(other.skyflowId) && tokens.equals(other.tokens); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.skyflowId, this.tokens); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1TokenizeRecordRequest.java b/src/main/java/com/skyflow/generated/rest/types/V1TokenizeRecordRequest.java index 2c15ceac..03c5ef89 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1TokenizeRecordRequest.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1TokenizeRecordRequest.java @@ -49,7 +49,7 @@ public Optional getColumnGroup() { return columnGroup; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1TokenizeRecordRequest && equalTo((V1TokenizeRecordRequest) other); @@ -64,12 +64,12 @@ private boolean equalTo(V1TokenizeRecordRequest other) { return value.equals(other.value) && columnGroup.equals(other.columnGroup); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.value, this.columnGroup); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1TokenizeRecordResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1TokenizeRecordResponse.java index 201a4f60..4cd41dd0 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1TokenizeRecordResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1TokenizeRecordResponse.java @@ -37,7 +37,7 @@ public Optional getToken() { return token; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1TokenizeRecordResponse && equalTo((V1TokenizeRecordResponse) other); @@ -52,12 +52,12 @@ private boolean equalTo(V1TokenizeRecordResponse other) { return token.equals(other.token); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.token); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1TokenizeResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1TokenizeResponse.java index 62d77bed..38159283 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1TokenizeResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1TokenizeResponse.java @@ -39,7 +39,7 @@ public Optional> getRecords() { return records; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1TokenizeResponse && equalTo((V1TokenizeResponse) other); @@ -54,12 +54,12 @@ private boolean equalTo(V1TokenizeResponse other) { return records.equals(other.records); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.records); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1UpdateRecordResponse.java b/src/main/java/com/skyflow/generated/rest/types/V1UpdateRecordResponse.java index 03ed7b58..658926b9 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1UpdateRecordResponse.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1UpdateRecordResponse.java @@ -51,7 +51,7 @@ public Optional> getTokens() { return tokens; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1UpdateRecordResponse && equalTo((V1UpdateRecordResponse) other); @@ -66,12 +66,12 @@ private boolean equalTo(V1UpdateRecordResponse other) { return skyflowId.equals(other.skyflowId) && tokens.equals(other.tokens); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.skyflowId, this.tokens); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1VaultFieldMapping.java b/src/main/java/com/skyflow/generated/rest/types/V1VaultFieldMapping.java index c19d1cb5..bad4474a 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1VaultFieldMapping.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1VaultFieldMapping.java @@ -63,7 +63,7 @@ public Optional getCardExpiry() { return cardExpiry; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1VaultFieldMapping && equalTo((V1VaultFieldMapping) other); @@ -80,12 +80,12 @@ private boolean equalTo(V1VaultFieldMapping other) { && cardExpiry.equals(other.cardExpiry); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.cardNumber, this.cardLastFourDigits, this.cardExpiry); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/generated/rest/types/V1VaultSchemaConfig.java b/src/main/java/com/skyflow/generated/rest/types/V1VaultSchemaConfig.java index cd838305..28a609b6 100644 --- a/src/main/java/com/skyflow/generated/rest/types/V1VaultSchemaConfig.java +++ b/src/main/java/com/skyflow/generated/rest/types/V1VaultSchemaConfig.java @@ -60,7 +60,7 @@ public Optional getMapping() { return mapping; } - @Override + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; return other instanceof V1VaultSchemaConfig && equalTo((V1VaultSchemaConfig) other); @@ -75,12 +75,12 @@ private boolean equalTo(V1VaultSchemaConfig other) { return id.equals(other.id) && tableName.equals(other.tableName) && mapping.equals(other.mapping); } - @Override + @java.lang.Override public int hashCode() { return Objects.hash(this.id, this.tableName, this.mapping); } - @Override + @java.lang.Override public String toString() { return ObjectMappers.stringify(this); } diff --git a/src/main/java/com/skyflow/logs/ErrorLogs.java b/src/main/java/com/skyflow/logs/ErrorLogs.java index 3415860c..eb5ea742 100644 --- a/src/main/java/com/skyflow/logs/ErrorLogs.java +++ b/src/main/java/com/skyflow/logs/ErrorLogs.java @@ -109,6 +109,15 @@ public enum ErrorLogs { INVALID_REQUEST_BODY("Invalid %s1 request. Request body can not be empty."), INVOKE_CONNECTION_REQUEST_REJECTED("Invoke connection request resulted in failure."), + // File upload interface + COLUMN_NAME_IS_REQUIRED_FILE_UPLOAD("Invalid %s1 request. Column name is required."), + EMPTY_COLUMN_NAME_FILE_UPLOAD("Invalid %s1 request. Column name can not be empty."), + FILE_IS_REQUIRED("Invalid %s1 request. File is required."), + EMPTY_FILE("Invalid %s1 request. File can not be empty."), + INVALID_FILE_TYPE("Invalid %s1 request. File should be of type java.io.File"), + MISSING_FILE_SOURCE_IN_UPLOAD_FILE("Invalid %s1 request. Provide exactly one of filePath, base64, or fileObject."), + UPLOAD_FILE_REQUEST_REJECTED("Upload file request resulted in failure."), + // detect interface INVALID_TEXT_IN_DEIDENTIFY("Invalid %s1 request. The text field is required and must be a non-empty string. Specify a valid text."), diff --git a/src/main/java/com/skyflow/logs/InfoLogs.java b/src/main/java/com/skyflow/logs/InfoLogs.java index efd81a49..f71fc416 100644 --- a/src/main/java/com/skyflow/logs/InfoLogs.java +++ b/src/main/java/com/skyflow/logs/InfoLogs.java @@ -69,6 +69,11 @@ public enum InfoLogs { TOKENIZE_REQUEST_RESOLVED("Tokenize request resolved."), TOKENIZE_SUCCESS("Data tokenized."), + // File upload interface + FILE_UPLOAD_TRIGGERED("File upload method triggered."), + VALIDATING_FILE_UPLOAD_REQUEST("Validating file upload request."), + FILE_UPLOAD_REQUEST_RESOLVED("File upload request resolved."), + FILE_UPLOAD_SUCCESS("File uploaded successfully."), // Invoke connection interface INVOKE_CONNECTION_TRIGGERED("Invoke connection method triggered."), diff --git a/src/main/java/com/skyflow/utils/validations/Validations.java b/src/main/java/com/skyflow/utils/validations/Validations.java index 7070f358..dc27c888 100644 --- a/src/main/java/com/skyflow/utils/validations/Validations.java +++ b/src/main/java/com/skyflow/utils/validations/Validations.java @@ -687,6 +687,99 @@ public static void validateTokenizeRequest(TokenizeRequest tokenizeRequest) thro } } + public static void validateFileUploadRequest(FileUploadRequest fileUploadRequest) throws SkyflowException { + if (fileUploadRequest == null) { + LogUtil.printErrorLog(Utils.parameterizedString( + ErrorLogs.EMPTY_REQUEST_BODY.getLog(), InterfaceName.FILE_UPLOAD.getName() + )); + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.EmptyRequestBody.getMessage()); + } + + String table = fileUploadRequest.getTable(); + if (table == null) { + LogUtil.printErrorLog(Utils.parameterizedString( + ErrorLogs.TABLE_IS_REQUIRED.getLog(), InterfaceName.FILE_UPLOAD.getName() + )); + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.TableKeyError.getMessage()); + } else if (table.trim().isEmpty()) { + LogUtil.printErrorLog(Utils.parameterizedString( + ErrorLogs.EMPTY_TABLE_NAME.getLog(), InterfaceName.FILE_UPLOAD.getName() + )); + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.EmptyTable.getMessage()); + } + + String skyflowId = fileUploadRequest.getSkyflowId(); + if (skyflowId == null) { + LogUtil.printErrorLog(Utils.parameterizedString( + ErrorLogs.SKYFLOW_ID_IS_REQUIRED.getLog(), InterfaceName.FILE_UPLOAD.getName() + )); + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.SkyflowIdKeyError.getMessage()); + } else if (skyflowId.trim().isEmpty()) { + LogUtil.printErrorLog(Utils.parameterizedString( + ErrorLogs.EMPTY_SKYFLOW_ID.getLog(), InterfaceName.FILE_UPLOAD.getName() + )); + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.EmptySkyflowId.getMessage()); + } + + String columnName = fileUploadRequest.getColumnName(); + if (columnName == null) { + LogUtil.printErrorLog(Utils.parameterizedString( + ErrorLogs.COLUMN_NAME_IS_REQUIRED_FILE_UPLOAD.getLog(), InterfaceName.FILE_UPLOAD.getName() + )); + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.ColumnNameKeyErrorFileUpload.getMessage()); + } else if (columnName.trim().isEmpty()) { + LogUtil.printErrorLog(Utils.parameterizedString( + ErrorLogs.EMPTY_COLUMN_NAME.getLog(), InterfaceName.FILE_UPLOAD.getName() + )); + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.EmptyColumnName.getMessage()); + } + + String filePath = fileUploadRequest.getFilePath(); + String base64 = fileUploadRequest.getBase64(); + File fileObject = fileUploadRequest.getFileObject(); + String fileName = fileUploadRequest.getFileName(); + + // Check if at least one (path, base64, fileObject) is provided + if (isNullOrEmpty(filePath) && isNullOrEmpty(base64) && fileObject == null) { + LogUtil.printErrorLog(Utils.parameterizedString( + ErrorLogs.MISSING_FILE_SOURCE_IN_UPLOAD_FILE.getLog(), InterfaceName.FILE_UPLOAD.getName() + )); + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.MissingFileSourceInUploadFileRequest.getMessage()); + } + + // Check filePath + if (!isNullOrEmpty(filePath)) { + File f = new File(filePath); + if (!f.exists() || !f.isFile()) { + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.InvalidFilePath.getMessage()); + } + } + + // Check base64 + if (!isNullOrEmpty(base64)) { + if (isNullOrEmpty(fileName)) { + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.FileNameMustBeProvidedWithFileObject.getMessage()); + } + // Validate if Base64 is actually valid + try { + java.util.Base64.getDecoder().decode(base64); + } catch (IllegalArgumentException e) { + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.InvalidBase64.getMessage()); + } + } + + // Check fileObject + if (fileObject != null) { + if (!fileObject.exists() || !fileObject.isFile()) { + throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.InvalidFileObject.getMessage()); + } + } + } + + private static boolean isNullOrEmpty(String str) { + return str == null || str.trim().isEmpty(); + } + public static void validateDeidentifyTextRequest(DeidentifyTextRequest deidentifyTextRequest) throws SkyflowException { // Validate required fields String deidentifyText = deidentifyTextRequest.getText(); diff --git a/src/main/java/com/skyflow/vault/controller/VaultController.java b/src/main/java/com/skyflow/vault/controller/VaultController.java index 3c307c29..3493227c 100644 --- a/src/main/java/com/skyflow/vault/controller/VaultController.java +++ b/src/main/java/com/skyflow/vault/controller/VaultController.java @@ -22,6 +22,9 @@ import com.skyflow.utils.validations.Validations; import com.skyflow.vault.data.*; import com.skyflow.vault.tokens.*; + +import java.io.File; +import java.io.IOException; import java.util.*; public final class VaultController extends VaultClient { @@ -359,4 +362,40 @@ public TokenizeResponse tokenize(TokenizeRequest tokenizeRequest) throws Skyflow LogUtil.printInfoLog(InfoLogs.TOKENIZE_SUCCESS.getLog()); return new TokenizeResponse(list); } + + public FileUploadResponse uploadFile(FileUploadRequest fileUploadRequest) throws SkyflowException { + LogUtil.printInfoLog(InfoLogs.FILE_UPLOAD_TRIGGERED.getLog()); + FileUploadResponse fileUploadResponse = null; + + try { + LogUtil.printInfoLog(InfoLogs.VALIDATING_FILE_UPLOAD_REQUEST.getLog()); + Validations.validateFileUploadRequest(fileUploadRequest); + setBearerToken(); + File file = super.getFileForFileUpload(fileUploadRequest); + + UploadFileV2Request uploadFileV2Request = UploadFileV2Request.builder() + .tableName(fileUploadRequest.getTable()) + .columnName(fileUploadRequest.getColumnName()) + .skyflowId(fileUploadRequest.getSkyflowId()) + .returnFileMetadata(false) + .build(); + + UploadFileV2Response uploadFileV2Response = super.getRecordsApi().uploadFileV2(super.getVaultConfig().getVaultId(), file, uploadFileV2Request); + + fileUploadResponse = new FileUploadResponse( + uploadFileV2Response.getSkyflowId().orElse(null), + null + ); + + } catch (ApiClientApiException e) { + String bodyString = gson.toJson(e.body()); + LogUtil.printErrorLog(ErrorLogs.UPLOAD_FILE_REQUEST_REJECTED.getLog()); + throw new SkyflowException(e.statusCode(), e, e.headers(), bodyString); + } catch (IOException e) { + LogUtil.printErrorLog(ErrorLogs.UPLOAD_FILE_REQUEST_REJECTED.getLog()); + throw new SkyflowException(e.getMessage(), e); + } + LogUtil.printInfoLog(InfoLogs.FILE_UPLOAD_SUCCESS.getLog()); + return fileUploadResponse; + } } diff --git a/src/main/java/com/skyflow/vault/data/FileUploadRequest.java b/src/main/java/com/skyflow/vault/data/FileUploadRequest.java new file mode 100644 index 00000000..1d6ba6be --- /dev/null +++ b/src/main/java/com/skyflow/vault/data/FileUploadRequest.java @@ -0,0 +1,97 @@ +package com.skyflow.vault.data; + +import java.io.File; + +public class FileUploadRequest { + + private final FileUploadRequest.FileUploadRequestBuilder builder; + + private FileUploadRequest(FileUploadRequest.FileUploadRequestBuilder builder) { + this.builder = builder; + } + + public static FileUploadRequest.FileUploadRequestBuilder builder() { + return new FileUploadRequest.FileUploadRequestBuilder(); + } + + public String getTable() { + return this.builder.table; + } + + public String getSkyflowId() { + return this.builder.skyflowId; + } + + public String getColumnName() { + return this.builder.columnName; + } + + public String getFilePath() { + return this.builder.filePath; + } + + public String getBase64() { + return this.builder.base64; + } + + public File getFileObject() { + return this.builder.fileObject; + } + + public String getFileName() { + return this.builder.fileName; + } + + public static final class FileUploadRequestBuilder { + + private String table; + private String skyflowId; + private String columnName; + private String filePath; + private String base64; + private File fileObject; + private String fileName; + + private FileUploadRequestBuilder() { + } + + public FileUploadRequest.FileUploadRequestBuilder table(String table) { + this.table = table; + return this; + } + + public FileUploadRequest.FileUploadRequestBuilder skyflowId(String skyflowId) { + this.skyflowId = skyflowId; + return this; + } + + public FileUploadRequest.FileUploadRequestBuilder columnName(String columnName) { + this.columnName = columnName; + return this; + } + + public FileUploadRequest.FileUploadRequestBuilder filePath(String filePath) { + this.filePath = filePath; + return this; + } + + public FileUploadRequest.FileUploadRequestBuilder base64(String base64) { + this.base64 = base64; + return this; + } + + public FileUploadRequest.FileUploadRequestBuilder fileObject(File fileObject) { + this.fileObject = fileObject; + return this; + } + + public FileUploadRequest.FileUploadRequestBuilder fileName(String fileName) { + this.fileName = fileName; + return this; + } + + public FileUploadRequest build() { + return new FileUploadRequest(this); + } + } +} diff --git a/src/main/java/com/skyflow/vault/data/FileUploadResponse.java b/src/main/java/com/skyflow/vault/data/FileUploadResponse.java new file mode 100644 index 00000000..9e4557a3 --- /dev/null +++ b/src/main/java/com/skyflow/vault/data/FileUploadResponse.java @@ -0,0 +1,31 @@ +package com.skyflow.vault.data; + +import com.google.gson.Gson; + +import java.util.ArrayList; +import java.util.HashMap; + +public class FileUploadResponse { + private final String skyflowId; + private final ArrayList> errors; + + public FileUploadResponse(String skyflowId, ArrayList> errors) { + this.skyflowId = skyflowId; + this.errors = errors; + } + + public String getSkyflowId() { + return skyflowId; + } + + public ArrayList> getErrors() { + return errors; + } + + @Override + public String toString() { + Gson gson = new Gson().newBuilder().serializeNulls().create(); + return gson.toJson(this); + } + +} diff --git a/src/test/java/com/skyflow/vault/controller/VaultControllerTests.java b/src/test/java/com/skyflow/vault/controller/VaultControllerTests.java index 5f3ae771..4115bc2c 100644 --- a/src/test/java/com/skyflow/vault/controller/VaultControllerTests.java +++ b/src/test/java/com/skyflow/vault/controller/VaultControllerTests.java @@ -165,4 +165,24 @@ public void testInvalidRequestInTokenizeMethod() { } } + @Test + public void testInvalidRequestInFileUploadMethod() { + try { + FileUploadRequest request = FileUploadRequest.builder().build(); + skyflowClient = Skyflow.builder().setLogLevel(LogLevel.DEBUG).addVaultConfig(vaultConfig).build(); + skyflowClient.vault().uploadFile(request); + Assert.fail(EXCEPTION_NOT_THROWN); + } catch (SkyflowException e) { + Assert.assertEquals(ErrorCode.INVALID_INPUT.getCode(), e.getHttpCode()); + Assert.assertEquals( + Utils.parameterizedString(ErrorMessage.TableKeyError.getMessage(), Constants.SDK_PREFIX), + e.getMessage() + ); + Assert.assertNull(e.getRequestId()); + Assert.assertNull(e.getGrpcCode()); + Assert.assertTrue(e.getDetails().isEmpty()); + Assert.assertEquals(HttpStatus.BAD_REQUEST.getHttpStatus(), e.getHttpStatus()); + } + } + } diff --git a/src/test/java/com/skyflow/vault/data/FileUploadTests.java b/src/test/java/com/skyflow/vault/data/FileUploadTests.java new file mode 100644 index 00000000..9c0b7b81 --- /dev/null +++ b/src/test/java/com/skyflow/vault/data/FileUploadTests.java @@ -0,0 +1,221 @@ +package com.skyflow.vault.data; + +import com.skyflow.errors.ErrorCode; +import com.skyflow.errors.ErrorMessage; +import com.skyflow.errors.SkyflowException; +import com.skyflow.utils.Constants; +import com.skyflow.utils.Utils; +import com.skyflow.utils.validations.Validations; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.io.File; + +public class FileUploadTests { + private static final String INVALID_EXCEPTION_THROWN = "Should not have thrown any exception"; + private static final String EXCEPTION_NOT_THROWN = "Should have thrown an exception"; + private static String table; + private static String skyflowId; + private static String columnName; + private static String filePath; + private static String base64Content; + private static File fileObject; + private static String fileName; + + @BeforeClass + public static void setup() { + table = "test_table"; + skyflowId = "test_id"; + columnName = "file_column"; + filePath = "src/test/resources/notJson.txt"; + base64Content = "SGVsbG8gV29ybGQ="; + fileObject = new File(filePath); + fileName = "notJson.txt"; + } + + @Test + public void testValidFileUploadRequestWithFilePath() { + try { + FileUploadRequest request = FileUploadRequest.builder() + .table(table) + .skyflowId(skyflowId) + .columnName(columnName) + .filePath(filePath) + .fileName(fileName) + .build(); + + Validations.validateFileUploadRequest(request); + Assert.assertEquals(table, request.getTable()); + Assert.assertEquals(skyflowId, request.getSkyflowId()); + Assert.assertEquals(columnName, request.getColumnName()); + Assert.assertEquals(filePath, request.getFilePath()); + Assert.assertEquals(fileName, request.getFileName()); + } catch (SkyflowException e) { + Assert.fail(INVALID_EXCEPTION_THROWN); + } + } + + @Test + public void testValidFileUploadRequestWithBase64() { + try { + FileUploadRequest request = FileUploadRequest.builder() + .table(table) + .skyflowId(skyflowId) + .columnName(columnName) + .base64(base64Content) + .fileName(fileName) + .build(); + + Validations.validateFileUploadRequest(request); + Assert.assertEquals(base64Content, request.getBase64()); + } catch (SkyflowException e) { + Assert.fail(INVALID_EXCEPTION_THROWN); + } + } + + @Test + public void testValidFileUploadRequestWithFileObject() { + try { + FileUploadRequest request = FileUploadRequest.builder() + .table(table) + .skyflowId(skyflowId) + .columnName(columnName) + .fileObject(fileObject) + .fileName(fileName) + .build(); + + Validations.validateFileUploadRequest(request); + Assert.assertEquals(fileObject, request.getFileObject()); + } catch (SkyflowException e) { + System.out.println("## e:" + e.getMessage()); + Assert.fail(INVALID_EXCEPTION_THROWN); + } + } + + @Test + public void testMissingTable() { + try { + FileUploadRequest request = FileUploadRequest.builder() + .skyflowId(skyflowId) + .columnName(columnName) + .filePath(filePath) + .fileName(fileName) + .build(); + + Validations.validateFileUploadRequest(request); + Assert.fail(EXCEPTION_NOT_THROWN); + } catch (SkyflowException e) { + Assert.assertEquals(ErrorCode.INVALID_INPUT.getCode(), e.getHttpCode()); + Assert.assertEquals( + Utils.parameterizedString(ErrorMessage.TableKeyError.getMessage(), Constants.SDK_PREFIX), + e.getMessage() + ); + } + } + + @Test + public void testMissingSkyflowId() { + try { + FileUploadRequest request = FileUploadRequest.builder() + .table(table) + .columnName(columnName) + .fileName(fileName) + .build(); + + Validations.validateFileUploadRequest(request); + Assert.fail(EXCEPTION_NOT_THROWN); + } catch (SkyflowException e) { + Assert.assertEquals(ErrorCode.INVALID_INPUT.getCode(), e.getHttpCode()); + Assert.assertEquals( + Utils.parameterizedString(ErrorMessage.SkyflowIdKeyError.getMessage(), Constants.SDK_PREFIX), + e.getMessage() + ); + } + } + + @Test + public void testEmptySkyflowId() { + try { + FileUploadRequest request = FileUploadRequest.builder() + .table(table) + .skyflowId("") + .columnName(columnName) + .fileName(fileName) + .build(); + + Validations.validateFileUploadRequest(request); + Assert.fail(EXCEPTION_NOT_THROWN); + } catch (SkyflowException e) { + Assert.assertEquals(ErrorCode.INVALID_INPUT.getCode(), e.getHttpCode()); + Assert.assertEquals( + Utils.parameterizedString(ErrorMessage.EmptySkyflowId.getMessage(), Constants.SDK_PREFIX), + e.getMessage() + ); + } + } + + @Test + public void testMissingColumnName() { + try { + FileUploadRequest request = FileUploadRequest.builder() + .table(table) + .skyflowId(skyflowId) + .filePath(filePath) + .fileName(fileName) + .build(); + + Validations.validateFileUploadRequest(request); + Assert.fail(EXCEPTION_NOT_THROWN); + } catch (SkyflowException e) { + Assert.assertEquals(ErrorCode.INVALID_INPUT.getCode(), e.getHttpCode()); + Assert.assertEquals( + Utils.parameterizedString(ErrorMessage.ColumnNameKeyErrorFileUpload.getMessage(), Constants.SDK_PREFIX), + e.getMessage() + ); + } + } + + @Test + public void testMissingFileData() { + try { + FileUploadRequest request = FileUploadRequest.builder() + .table(table) + .skyflowId(skyflowId) + .columnName(columnName) + .fileName(fileName) + .build(); + + Validations.validateFileUploadRequest(request); + Assert.fail(EXCEPTION_NOT_THROWN); + } catch (SkyflowException e) { + Assert.assertEquals(ErrorCode.INVALID_INPUT.getCode(), e.getHttpCode()); + Assert.assertEquals( + Utils.parameterizedString(ErrorMessage.MissingFileSourceInUploadFileRequest.getMessage(), Constants.SDK_PREFIX), + e.getMessage() + ); + } + } + + @Test + public void testMissingFileNameWithBase64Invalid() { + try { + FileUploadRequest request = FileUploadRequest.builder() + .table(table) + .skyflowId(skyflowId) + .columnName(columnName) + .base64(base64Content) + .build(); + + Validations.validateFileUploadRequest(request); + Assert.fail(EXCEPTION_NOT_THROWN); + } catch (SkyflowException e) { + Assert.assertEquals(ErrorCode.INVALID_INPUT.getCode(), e.getHttpCode()); + Assert.assertEquals( + Utils.parameterizedString(ErrorMessage.FileNameMustBeProvidedWithFileObject.getMessage(), Constants.SDK_PREFIX), + e.getMessage() + ); + } + } +} \ No newline at end of file