From 0a3f0e9a3a30c12772c8abddd10a560e4cbc40a4 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Tue, 6 Oct 2026 03:13:42 -0700 Subject: [PATCH 1/3] chore: Update `.codegen.json` with commit hash of `codegen` and `openapi` spec [skip ci] --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 8e40828a3..9ec434233 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "12fa0b7", "specHash": "c5a35a6", "version": "5.18.0" } +{ "engineHash": "fd56d95", "specHash": "c5a35a6", "version": "5.18.0" } From 6e8590f0e766a774298e2ee61147b81301fb24c0 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Tue, 6 Oct 2026 06:19:50 -0700 Subject: [PATCH 2/3] chore: Update `.codegen.json` with commit hash of `codegen` and `openapi` spec [skip ci] --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 9ec434233..2b13511fc 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "fd56d95", "specHash": "c5a35a6", "version": "5.18.0" } +{ "engineHash": "d55532c", "specHash": "c5a35a6", "version": "5.18.0" } From 986f5f843c57de816eef6a4e5b48424278b8f187 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 12 Oct 2026 04:47:15 -0700 Subject: [PATCH 3/3] docs: Chunked upload SHA512 (box/box-openapi#620) --- .codegen.json | 2 +- docs/sdkgen/chunkeduploads.md | 20 +++++-- docs/sdkgen/query.md | 27 +++++++--- docs/sdkgen/search.md | 4 ++ .../chunkeduploads/ChunkedUploadsManager.java | 16 +++--- ...teFileUploadSessionCommitByUrlHeaders.java | 3 ++ ...leUploadSessionCommitByUrlRequestBody.java | 13 ++++- .../CreateFileUploadSessionCommitHeaders.java | 3 ++ ...ateFileUploadSessionCommitRequestBody.java | 13 ++++- .../UploadFilePartByUrlHeaders.java | 12 +++-- .../chunkeduploads/UploadFilePartHeaders.java | 12 +++-- .../sdkgen/managers/query/QueryManager.java | 38 ++++++++++--- .../sdkgen/managers/search/SearchManager.java | 14 ++++- .../clienterror/ClientErrorCodeField.java | 1 + .../sdkgen/schemas/uploadpart/UploadPart.java | 24 ++++++++- .../uploadpartplan/UploadPartPlan.java | 2 +- .../uploadpartplanhit/UploadPartPlanHit.java | 2 +- .../DocGenDocumentGenerationDataV2025R0.java | 54 ++++++++++++++++++- .../DocGenJobFullV2025R0.java | 12 +++++ .../docgenjobv2025r0/DocGenJobV2025R0.java | 26 +++++++++ 20 files changed, 253 insertions(+), 45 deletions(-) diff --git a/.codegen.json b/.codegen.json index 2b13511fc..6be4a43f8 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "d55532c", "specHash": "c5a35a6", "version": "5.18.0" } +{ "engineHash": "d55532c", "specHash": "e21eebc", "version": "5.18.0" } diff --git a/docs/sdkgen/chunkeduploads.md b/docs/sdkgen/chunkeduploads.md index 77bffd1eb..024dc2ef7 100644 --- a/docs/sdkgen/chunkeduploads.md +++ b/docs/sdkgen/chunkeduploads.md @@ -174,6 +174,9 @@ This function returns a value of type `UploadedPart`. Chunk has been uploaded successfully. +The response always includes `sha512`. It also includes +`sha1` if the `Digest` header used `SHA-1`. + ## Upload part of file @@ -208,6 +211,9 @@ This function returns a value of type `UploadedPart`. Chunk has been uploaded successfully. +The response always includes `sha512`. It also includes +`sha1` if the `Digest` header used `SHA-1`. + ## Remove upload session by URL @@ -312,6 +318,9 @@ This function returns a value of type `UploadParts`. Returns a list of parts that have been uploaded. +Each part includes the hash type used to upload it. Parts +uploaded with a `SHA-512` `Digest` header don't include `sha1`. + ## List parts @@ -346,6 +355,9 @@ This function returns a value of type `UploadParts`. Returns a list of parts that have been uploaded. +Each part includes the hash type used to upload it. Parts +uploaded with a `SHA-512` `Digest` header don't include `sha1`. + ## Plan upload session by URL @@ -353,8 +365,8 @@ Plan an upload session by checking which parts already exist on the server. This endpoint allows clients to optimize uploads by skipping parts that have already been uploaded (cache hits) and only uploading missing parts. -The actual endpoint URL is returned by the [`Create upload session`](e://post-files-upload-sessions) -and [`Get upload session`](e://get-files-upload-sessions-id) endpoints. +The actual endpoint URL is returned by the [`Create upload session`](https://developer.box.com/reference/post-files-upload-sessions) +and [`Get upload session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints. This operation is performed by calling function `createFileUploadSessionPlanByUrl`. @@ -390,8 +402,8 @@ Plan an upload session by checking which parts already exist on the server. This endpoint allows clients to optimize uploads by skipping parts that have already been uploaded (cache hits) and only uploading missing parts. -The actual endpoint URL is returned by the [`Create upload session`](e://post-files-upload-sessions) -and [`Get upload session`](e://get-files-upload-sessions-id) endpoints. +The actual endpoint URL is returned by the [`Create upload session`](https://developer.box.com/reference/post-files-upload-sessions) +and [`Get upload session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints. This operation is performed by calling function `createFileUploadSessionPlan`. diff --git a/docs/sdkgen/query.md b/docs/sdkgen/query.md index f5f73a3f4..bc4ac13b8 100644 --- a/docs/sdkgen/query.md +++ b/docs/sdkgen/query.md @@ -1,14 +1,29 @@ # QueryManager -- [Query for Box items](#query-for-box-items) +- [Box Query](#box-query) - [Create insights for Box items](#create-insights-for-box-items) -## Query for Box items - -Runs a query to discover Box items using a logical predicate that can filter -across item fields and metadata templates. Results can be sorted, paginated, -and shaped to include additional item or metadata fields. +## Box Query + +Runs a query to discover Box items using a logical predicate, similar to a SQL +WHERE clause. The predicate can filter across multiple metadata templates and +item fields in a single request. Results can be sorted, paginated with markers, +and shaped with fields so each entry includes additional item or metadata +attributes. + +This is the item-retrieval endpoint in the Query API (version 2026.0). Unlike +the [Metadata Query API](https://developer.box.com/reference/post-metadata-queries-execute-read), +it is not limited to a single metadata template or to files and folders. For +totals and grouped metrics over the same predicates, use +[Query Insights](https://developer.box.com/reference/v2026.0/post-query-insights) +instead of paging through every matching item. + +For predicate syntax, parameters, examples, pagination behavior, and error +codes, see the +[Box Query guide](https://developer.box.com/guides/query/box-query). For shared +response schemas, including Query results and result entries, see +[Query resources](https://developer.box.com/reference/v2026.0/query-resources). This operation is performed by calling function `createQueryV2026R0`. diff --git a/docs/sdkgen/search.md b/docs/sdkgen/search.md index be7116fff..19f63713f 100644 --- a/docs/sdkgen/search.md +++ b/docs/sdkgen/search.md @@ -6,6 +6,10 @@ ## Query files/folders by metadata +For new integrations, use the [v2026.0 Query API](https://developer.box.com/reference/v2026.0/query-resources). +This is the latest version of the Query API, with advanced capabilities including multi-template queries and +Query Insights, and is the API we will continue to enhance with new Query capabilities. + Create a search using SQL-like syntax to return items that match specific metadata. diff --git a/src/main/java/com/box/sdkgen/managers/chunkeduploads/ChunkedUploadsManager.java b/src/main/java/com/box/sdkgen/managers/chunkeduploads/ChunkedUploadsManager.java index c368a70bb..de28d9e0b 100644 --- a/src/main/java/com/box/sdkgen/managers/chunkeduploads/ChunkedUploadsManager.java +++ b/src/main/java/com/box/sdkgen/managers/chunkeduploads/ChunkedUploadsManager.java @@ -599,8 +599,8 @@ public UploadParts getFileUploadSessionParts( * only uploading missing parts. * *

The actual endpoint URL is returned by the [`Create upload - * session`](e://post-files-upload-sessions) and [`Get upload - * session`](e://get-files-upload-sessions-id) endpoints. + * session`](https://developer.box.com/reference/post-files-upload-sessions) and [`Get upload + * session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints. * * @param url URL of createFileUploadSessionPlan method * @param requestBody Request body of createFileUploadSessionPlan method @@ -620,8 +620,8 @@ public UploadSessionPlanResponse createFileUploadSessionPlanByUrl( * only uploading missing parts. * *

The actual endpoint URL is returned by the [`Create upload - * session`](e://post-files-upload-sessions) and [`Get upload - * session`](e://get-files-upload-sessions-id) endpoints. + * session`](https://developer.box.com/reference/post-files-upload-sessions) and [`Get upload + * session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints. * * @param url URL of createFileUploadSessionPlan method * @param requestBody Request body of createFileUploadSessionPlan method @@ -653,8 +653,8 @@ public UploadSessionPlanResponse createFileUploadSessionPlanByUrl( * hits) and only uploading missing parts. * *

The actual endpoint URL is returned by the [`Create upload - * session`](e://post-files-upload-sessions) and [`Get upload - * session`](e://get-files-upload-sessions-id) endpoints. + * session`](https://developer.box.com/reference/post-files-upload-sessions) and [`Get upload + * session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints. * * @param uploadSessionId The ID of the upload session. Example: "D5E3F7A" * @param requestBody Request body of createFileUploadSessionPlan method @@ -671,8 +671,8 @@ public UploadSessionPlanResponse createFileUploadSessionPlan( * hits) and only uploading missing parts. * *

The actual endpoint URL is returned by the [`Create upload - * session`](e://post-files-upload-sessions) and [`Get upload - * session`](e://get-files-upload-sessions-id) endpoints. + * session`](https://developer.box.com/reference/post-files-upload-sessions) and [`Get upload + * session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints. * * @param uploadSessionId The ID of the upload session. Example: "D5E3F7A" * @param requestBody Request body of createFileUploadSessionPlan method diff --git a/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitByUrlHeaders.java b/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitByUrlHeaders.java index 1b245e526..1b167fee7 100644 --- a/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitByUrlHeaders.java +++ b/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitByUrlHeaders.java @@ -12,6 +12,9 @@ public class CreateFileUploadSessionCommitByUrlHeaders { *

Only SHA1 is supported. The SHA1 digest must be Base64 encoded. The format of this header is * as `sha=BASE64_ENCODED_DIGEST`. * + *

`SHA-512` is not supported for the whole-file digest, even if the parts were uploaded with + * `SHA-512` digests. + * *

[1]: https://tools.ietf.org/html/rfc3230 */ public final String digest; diff --git a/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitByUrlRequestBody.java b/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitByUrlRequestBody.java index 7a9733e7c..fdffca842 100644 --- a/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitByUrlRequestBody.java +++ b/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitByUrlRequestBody.java @@ -10,7 +10,18 @@ @JsonFilter("nullablePropertyFilter") public class CreateFileUploadSessionCommitByUrlRequestBody extends SerializableObject { - /** The list details for the uploaded parts. */ + /** + * The list details for the uploaded parts. + * + *

Each entry can include `sha1` or `sha512`. Include `sha512` on every entry or on none of + * them. A request where only some entries include `sha512` is rejected. + * + *

Include parts that the server already has, returned as `hits` by the [`Plan upload + * session`](https://developer.box.com/reference/post-files-upload-sessions-id-plan) endpoint. Use + * the `part_id`, `offset`, and `size` from the plan response. If the other entries include + * `sha512`, include the `sha512` value from the plan response. Otherwise, leave the hash out of + * these entries. + */ protected final List parts; public CreateFileUploadSessionCommitByUrlRequestBody( diff --git a/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitHeaders.java b/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitHeaders.java index 4fb8c32e2..462fa9ebb 100644 --- a/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitHeaders.java +++ b/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitHeaders.java @@ -12,6 +12,9 @@ public class CreateFileUploadSessionCommitHeaders { *

Only SHA1 is supported. The SHA1 digest must be Base64 encoded. The format of this header is * as `sha=BASE64_ENCODED_DIGEST`. * + *

`SHA-512` is not supported for the whole-file digest, even if the parts were uploaded with + * `SHA-512` digests. + * *

[1]: https://tools.ietf.org/html/rfc3230 */ public final String digest; diff --git a/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitRequestBody.java b/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitRequestBody.java index f6e2b8765..abf11bf02 100644 --- a/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitRequestBody.java +++ b/src/main/java/com/box/sdkgen/managers/chunkeduploads/CreateFileUploadSessionCommitRequestBody.java @@ -10,7 +10,18 @@ @JsonFilter("nullablePropertyFilter") public class CreateFileUploadSessionCommitRequestBody extends SerializableObject { - /** The list details for the uploaded parts. */ + /** + * The list details for the uploaded parts. + * + *

Each entry can include `sha1` or `sha512`. Include `sha512` on every entry or on none of + * them. A request where only some entries include `sha512` is rejected. + * + *

Include parts that the server already has, returned as `hits` by the [`Plan upload + * session`](https://developer.box.com/reference/post-files-upload-sessions-id-plan) endpoint. Use + * the `part_id`, `offset`, and `size` from the plan response. If the other entries include + * `sha512`, include the `sha512` value from the plan response. Otherwise, leave the hash out of + * these entries. + */ protected final List parts; public CreateFileUploadSessionCommitRequestBody(@JsonProperty("parts") List parts) { diff --git a/src/main/java/com/box/sdkgen/managers/chunkeduploads/UploadFilePartByUrlHeaders.java b/src/main/java/com/box/sdkgen/managers/chunkeduploads/UploadFilePartByUrlHeaders.java index 266e958d1..9381902e9 100644 --- a/src/main/java/com/box/sdkgen/managers/chunkeduploads/UploadFilePartByUrlHeaders.java +++ b/src/main/java/com/box/sdkgen/managers/chunkeduploads/UploadFilePartByUrlHeaders.java @@ -9,13 +9,15 @@ public class UploadFilePartByUrlHeaders { /** * The [RFC3230][1] message digest of the chunk uploaded. * - *

Only SHA1 is supported. The SHA1 digest must be base64 encoded. The format of this header is - * as `sha=BASE64_ENCODED_DIGEST`. + *

`SHA-1` and `SHA-512` ([RFC5843][2]) are supported. The digest must be base64 encoded. The + * format of this header is as `sha=BASE64_ENCODED_DIGEST` for `SHA-1`, or + * `sha-512=BASE64_ENCODED_DIGEST` for `SHA-512`. * - *

To get the value for the `SHA` digest, use the openSSL command to encode the file part: - * `openssl sha1 -binary <FILE_PART_NAME> | base64`. + *

To get the value for the digest, use the openSSL command to encode the file part: `openssl + * sha1 -binary <FILE_PART_NAME> | base64` for `SHA-1`, or `openssl sha512 -binary + * <FILE_PART_NAME> | base64` for `SHA-512`. * - *

[1]: https://tools.ietf.org/html/rfc3230 + *

[1]: https://tools.ietf.org/html/rfc3230 [2]: https://tools.ietf.org/html/rfc5843 */ public final String digest; diff --git a/src/main/java/com/box/sdkgen/managers/chunkeduploads/UploadFilePartHeaders.java b/src/main/java/com/box/sdkgen/managers/chunkeduploads/UploadFilePartHeaders.java index eeae2b1cf..33b08f688 100644 --- a/src/main/java/com/box/sdkgen/managers/chunkeduploads/UploadFilePartHeaders.java +++ b/src/main/java/com/box/sdkgen/managers/chunkeduploads/UploadFilePartHeaders.java @@ -9,13 +9,15 @@ public class UploadFilePartHeaders { /** * The [RFC3230][1] message digest of the chunk uploaded. * - *

Only SHA1 is supported. The SHA1 digest must be base64 encoded. The format of this header is - * as `sha=BASE64_ENCODED_DIGEST`. + *

`SHA-1` and `SHA-512` ([RFC5843][2]) are supported. The digest must be base64 encoded. The + * format of this header is as `sha=BASE64_ENCODED_DIGEST` for `SHA-1`, or + * `sha-512=BASE64_ENCODED_DIGEST` for `SHA-512`. * - *

To get the value for the `SHA` digest, use the openSSL command to encode the file part: - * `openssl sha1 -binary <FILE_PART_NAME> | base64`. + *

To get the value for the digest, use the openSSL command to encode the file part: `openssl + * sha1 -binary <FILE_PART_NAME> | base64` for `SHA-1`, or `openssl sha512 -binary + * <FILE_PART_NAME> | base64` for `SHA-512`. * - *

[1]: https://tools.ietf.org/html/rfc3230 + *

[1]: https://tools.ietf.org/html/rfc3230 [2]: https://tools.ietf.org/html/rfc5843 */ public final String digest; diff --git a/src/main/java/com/box/sdkgen/managers/query/QueryManager.java b/src/main/java/com/box/sdkgen/managers/query/QueryManager.java index 843443118..72861d79e 100644 --- a/src/main/java/com/box/sdkgen/managers/query/QueryManager.java +++ b/src/main/java/com/box/sdkgen/managers/query/QueryManager.java @@ -34,9 +34,22 @@ protected QueryManager(Builder builder) { } /** - * Runs a query to discover Box items using a logical predicate that can filter across item fields - * and metadata templates. Results can be sorted, paginated, and shaped to include additional item - * or metadata fields. + * Runs a query to discover Box items using a logical predicate, similar to a SQL WHERE clause. + * The predicate can filter across multiple metadata templates and item fields in a single + * request. Results can be sorted, paginated with markers, and shaped with fields so each entry + * includes additional item or metadata attributes. + * + *

This is the item-retrieval endpoint in the Query API (version 2026.0). Unlike the [Metadata + * Query API](https://developer.box.com/reference/post-metadata-queries-execute-read), it is not + * limited to a single metadata template or to files and folders. For totals and grouped metrics + * over the same predicates, use [Query + * Insights](https://developer.box.com/reference/v2026.0/post-query-insights) instead of paging + * through every matching item. + * + *

For predicate syntax, parameters, examples, pagination behavior, and error codes, see the + * [Box Query guide](https://developer.box.com/guides/query/box-query). For shared response + * schemas, including Query results and result entries, see [Query + * resources](https://developer.box.com/reference/v2026.0/query-resources). * * @param requestBody Request body of createQueryV2026R0 method */ @@ -45,9 +58,22 @@ public QueryResultsV2026R0 createQueryV2026R0(QueryRequestBodyV2026R0 requestBod } /** - * Runs a query to discover Box items using a logical predicate that can filter across item fields - * and metadata templates. Results can be sorted, paginated, and shaped to include additional item - * or metadata fields. + * Runs a query to discover Box items using a logical predicate, similar to a SQL WHERE clause. + * The predicate can filter across multiple metadata templates and item fields in a single + * request. Results can be sorted, paginated with markers, and shaped with fields so each entry + * includes additional item or metadata attributes. + * + *

This is the item-retrieval endpoint in the Query API (version 2026.0). Unlike the [Metadata + * Query API](https://developer.box.com/reference/post-metadata-queries-execute-read), it is not + * limited to a single metadata template or to files and folders. For totals and grouped metrics + * over the same predicates, use [Query + * Insights](https://developer.box.com/reference/v2026.0/post-query-insights) instead of paging + * through every matching item. + * + *

For predicate syntax, parameters, examples, pagination behavior, and error codes, see the + * [Box Query guide](https://developer.box.com/guides/query/box-query). For shared response + * schemas, including Query results and result entries, see [Query + * resources](https://developer.box.com/reference/v2026.0/query-resources). * * @param requestBody Request body of createQueryV2026R0 method * @param headers Headers of createQueryV2026R0 method diff --git a/src/main/java/com/box/sdkgen/managers/search/SearchManager.java b/src/main/java/com/box/sdkgen/managers/search/SearchManager.java index 3a04b3809..a5112a3d3 100644 --- a/src/main/java/com/box/sdkgen/managers/search/SearchManager.java +++ b/src/main/java/com/box/sdkgen/managers/search/SearchManager.java @@ -33,7 +33,12 @@ protected SearchManager(Builder builder) { } /** - * Create a search using SQL-like syntax to return items that match specific metadata. + * For new integrations, use the [v2026.0 Query + * API](https://developer.box.com/reference/v2026.0/query-resources). This is the latest version + * of the Query API, with advanced capabilities including multi-template queries and Query + * Insights, and is the API we will continue to enhance with new Query capabilities. + * + *

Create a search using SQL-like syntax to return items that match specific metadata. * *

By default, this endpoint returns only the most basic info about the items for which the * query matches. To get additional fields for each item, including any of the metadata, use the @@ -46,7 +51,12 @@ public MetadataQueryResults searchByMetadataQuery(MetadataQuery requestBody) { } /** - * Create a search using SQL-like syntax to return items that match specific metadata. + * For new integrations, use the [v2026.0 Query + * API](https://developer.box.com/reference/v2026.0/query-resources). This is the latest version + * of the Query API, with advanced capabilities including multi-template queries and Query + * Insights, and is the API we will continue to enhance with new Query capabilities. + * + *

Create a search using SQL-like syntax to return items that match specific metadata. * *

By default, this endpoint returns only the most basic info about the items for which the * query matches. To get additional fields for each item, including any of the metadata, use the diff --git a/src/main/java/com/box/sdkgen/schemas/clienterror/ClientErrorCodeField.java b/src/main/java/com/box/sdkgen/schemas/clienterror/ClientErrorCodeField.java index 3ef846052..bd7b8cbbd 100644 --- a/src/main/java/com/box/sdkgen/schemas/clienterror/ClientErrorCodeField.java +++ b/src/main/java/com/box/sdkgen/schemas/clienterror/ClientErrorCodeField.java @@ -25,6 +25,7 @@ public enum ClientErrorCodeField implements Valuable { METHOD_NOT_ALLOWED("method_not_allowed"), CONFLICT("conflict"), PRECONDITION_FAILED("precondition_failed"), + UNPROCESSABLE_ENTITY("unprocessable_entity"), TOO_MANY_REQUESTS("too_many_requests"), INTERNAL_SERVER_ERROR("internal_server_error"), UNAVAILABLE("unavailable"), diff --git a/src/main/java/com/box/sdkgen/schemas/uploadpart/UploadPart.java b/src/main/java/com/box/sdkgen/schemas/uploadpart/UploadPart.java index a026779e5..22a655cc0 100644 --- a/src/main/java/com/box/sdkgen/schemas/uploadpart/UploadPart.java +++ b/src/main/java/com/box/sdkgen/schemas/uploadpart/UploadPart.java @@ -11,6 +11,9 @@ public class UploadPart extends UploadPartMini { /** The SHA1 hash of the chunk. */ protected String sha1; + /** The `SHA-512` hash of the chunk, as a hex string of 128 lower case characters. */ + protected String sha512; + public UploadPart() { super(); } @@ -18,6 +21,7 @@ public UploadPart() { protected UploadPart(Builder builder) { super(builder); this.sha1 = builder.sha1; + this.sha512 = builder.sha512; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -25,6 +29,10 @@ public String getSha1() { return sha1; } + public String getSha512() { + return sha512; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -37,12 +45,13 @@ public boolean equals(Object o) { return Objects.equals(partId, casted.partId) && Objects.equals(offset, casted.offset) && Objects.equals(size, casted.size) - && Objects.equals(sha1, casted.sha1); + && Objects.equals(sha1, casted.sha1) + && Objects.equals(sha512, casted.sha512); } @Override public int hashCode() { - return Objects.hash(partId, offset, size, sha1); + return Objects.hash(partId, offset, size, sha1, sha512); } @Override @@ -63,6 +72,10 @@ public String toString() { + "sha1='" + sha1 + '\'' + + ", " + + "sha512='" + + sha512 + + '\'' + "}"; } @@ -70,11 +83,18 @@ public static class Builder extends UploadPartMini.Builder { protected String sha1; + protected String sha512; + public Builder sha1(String sha1) { this.sha1 = sha1; return this; } + public Builder sha512(String sha512) { + this.sha512 = sha512; + return this; + } + @Override public Builder partId(String partId) { this.partId = partId; diff --git a/src/main/java/com/box/sdkgen/schemas/uploadpartplan/UploadPartPlan.java b/src/main/java/com/box/sdkgen/schemas/uploadpartplan/UploadPartPlan.java index 40ac5fe0b..b64341662 100644 --- a/src/main/java/com/box/sdkgen/schemas/uploadpartplan/UploadPartPlan.java +++ b/src/main/java/com/box/sdkgen/schemas/uploadpartplan/UploadPartPlan.java @@ -18,7 +18,7 @@ public class UploadPartPlan extends SerializableObject { /** The size of the chunk in bytes. */ protected final long size; - /** The `SHA-512` hash of the chunk. */ + /** The `SHA-512` hash of the chunk, as a hex string of 128 lower case characters. */ protected final String sha512; public UploadPartPlan( diff --git a/src/main/java/com/box/sdkgen/schemas/uploadpartplanhit/UploadPartPlanHit.java b/src/main/java/com/box/sdkgen/schemas/uploadpartplanhit/UploadPartPlanHit.java index ba04991a5..c1bcc5a66 100644 --- a/src/main/java/com/box/sdkgen/schemas/uploadpartplanhit/UploadPartPlanHit.java +++ b/src/main/java/com/box/sdkgen/schemas/uploadpartplanhit/UploadPartPlanHit.java @@ -18,7 +18,7 @@ public class UploadPartPlanHit extends SerializableObject { /** The size of the chunk in bytes. */ protected final long size; - /** The `SHA-512` hash of the chunk. */ + /** The `SHA-512` hash of the chunk, as a hex string of 128 lower case characters. */ protected final String sha512; /** The unique ID of the chunk. */ diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/docgendocumentgenerationdatav2025r0/DocGenDocumentGenerationDataV2025R0.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/docgendocumentgenerationdatav2025r0/DocGenDocumentGenerationDataV2025R0.java index b6bd784aa..f8422f810 100644 --- a/src/main/java/com/box/sdkgen/schemas/v2025r0/docgendocumentgenerationdatav2025r0/DocGenDocumentGenerationDataV2025R0.java +++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/docgendocumentgenerationdatav2025r0/DocGenDocumentGenerationDataV2025R0.java @@ -1,5 +1,6 @@ package com.box.sdkgen.schemas.v2025r0.docgendocumentgenerationdatav2025r0; +import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,6 +18,14 @@ public class DocGenDocumentGenerationDataV2025R0 extends SerializableObject { @JsonProperty("user_input") protected final Map userInput; + /** + * An optional identifier supplied by the caller for this Box Doc Gen job. The value is returned + * on job responses for correlation only. It is not a Box resource ID, is not required to be + * unique, and cannot be used to look up the job. + */ + @JsonProperty("external_id") + protected String externalId; + public DocGenDocumentGenerationDataV2025R0( @JsonProperty("generated_file_name") String generatedFileName, @JsonProperty("user_input") Map userInput) { @@ -25,6 +34,14 @@ public DocGenDocumentGenerationDataV2025R0( this.userInput = userInput; } + protected DocGenDocumentGenerationDataV2025R0(Builder builder) { + super(); + this.generatedFileName = builder.generatedFileName; + this.userInput = builder.userInput; + this.externalId = builder.externalId; + markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); + } + public String getGeneratedFileName() { return generatedFileName; } @@ -33,6 +50,10 @@ public Map getUserInput() { return userInput; } + public String getExternalId() { + return externalId; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -43,12 +64,13 @@ public boolean equals(Object o) { } DocGenDocumentGenerationDataV2025R0 casted = (DocGenDocumentGenerationDataV2025R0) o; return Objects.equals(generatedFileName, casted.generatedFileName) - && Objects.equals(userInput, casted.userInput); + && Objects.equals(userInput, casted.userInput) + && Objects.equals(externalId, casted.externalId); } @Override public int hashCode() { - return Objects.hash(generatedFileName, userInput); + return Objects.hash(generatedFileName, userInput, externalId); } @Override @@ -61,6 +83,34 @@ public String toString() { + "userInput='" + userInput + '\'' + + ", " + + "externalId='" + + externalId + + '\'' + "}"; } + + public static class Builder extends NullableFieldTracker { + + protected final String generatedFileName; + + protected final Map userInput; + + protected String externalId; + + public Builder(String generatedFileName, Map userInput) { + super(); + this.generatedFileName = generatedFileName; + this.userInput = userInput; + } + + public Builder externalId(String externalId) { + this.externalId = externalId; + return this; + } + + public DocGenDocumentGenerationDataV2025R0 build() { + return new DocGenDocumentGenerationDataV2025R0(this); + } + } } diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/docgenjobfullv2025r0/DocGenJobFullV2025R0.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/docgenjobfullv2025r0/DocGenJobFullV2025R0.java index 926e73476..2d03dae27 100644 --- a/src/main/java/com/box/sdkgen/schemas/v2025r0/docgenjobfullv2025r0/DocGenJobFullV2025R0.java +++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/docgenjobfullv2025r0/DocGenJobFullV2025R0.java @@ -98,6 +98,7 @@ public boolean equals(Object o) { DocGenJobFullV2025R0 casted = (DocGenJobFullV2025R0) o; return Objects.equals(id, casted.id) && Objects.equals(type, casted.type) + && Objects.equals(externalId, casted.externalId) && Objects.equals(batch, casted.batch) && Objects.equals(templateFile, casted.templateFile) && Objects.equals(templateFileVersion, casted.templateFileVersion) @@ -117,6 +118,7 @@ public int hashCode() { return Objects.hash( id, type, + externalId, batch, templateFile, templateFileVersion, @@ -142,6 +144,10 @@ public String toString() { + type + '\'' + ", " + + "externalId='" + + externalId + + '\'' + + ", " + "batch='" + batch + '\'' @@ -251,6 +257,12 @@ public Builder type(EnumWrapper type) { return this; } + @Override + public Builder externalId(String externalId) { + this.externalId = externalId; + return this; + } + @Override public Builder outputFile(FileReferenceV2025R0 outputFile) { this.outputFile = outputFile; diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/docgenjobv2025r0/DocGenJobV2025R0.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/docgenjobv2025r0/DocGenJobV2025R0.java index 3d275553c..7b6887c28 100644 --- a/src/main/java/com/box/sdkgen/schemas/v2025r0/docgenjobv2025r0/DocGenJobV2025R0.java +++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/docgenjobv2025r0/DocGenJobV2025R0.java @@ -17,6 +17,14 @@ @JsonFilter("nullablePropertyFilter") public class DocGenJobV2025R0 extends DocGenJobBaseV2025R0 { + /** + * An optional identifier supplied by the caller when the Box Doc Gen job was created. Returned + * for correlation only. It is not a Box resource ID, is not required to be unique, and cannot be + * used to look up the job. + */ + @JsonProperty("external_id") + protected String externalId; + protected final DocGenBatchBaseV2025R0 batch; @JsonProperty("template_file") @@ -76,6 +84,7 @@ public DocGenJobV2025R0( protected DocGenJobV2025R0(Builder builder) { super(builder); + this.externalId = builder.externalId; this.batch = builder.batch; this.templateFile = builder.templateFile; this.templateFileVersion = builder.templateFileVersion; @@ -87,6 +96,10 @@ protected DocGenJobV2025R0(Builder builder) { markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } + public String getExternalId() { + return externalId; + } + public DocGenBatchBaseV2025R0 getBatch() { return batch; } @@ -130,6 +143,7 @@ public boolean equals(Object o) { DocGenJobV2025R0 casted = (DocGenJobV2025R0) o; return Objects.equals(id, casted.id) && Objects.equals(type, casted.type) + && Objects.equals(externalId, casted.externalId) && Objects.equals(batch, casted.batch) && Objects.equals(templateFile, casted.templateFile) && Objects.equals(templateFileVersion, casted.templateFileVersion) @@ -145,6 +159,7 @@ public int hashCode() { return Objects.hash( id, type, + externalId, batch, templateFile, templateFileVersion, @@ -166,6 +181,10 @@ public String toString() { + type + '\'' + ", " + + "externalId='" + + externalId + + '\'' + + ", " + "batch='" + batch + '\'' @@ -202,6 +221,8 @@ public String toString() { public static class Builder extends DocGenJobBaseV2025R0.Builder { + protected String externalId; + protected final DocGenBatchBaseV2025R0 batch; protected final FileReferenceV2025R0 templateFile; @@ -248,6 +269,11 @@ public Builder( this.outputType = outputType; } + public Builder externalId(String externalId) { + this.externalId = externalId; + return this; + } + public Builder outputFile(FileReferenceV2025R0 outputFile) { this.outputFile = outputFile; return this;