From f69119ca61a700d5724582a6bb44490382ac5ce0 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Fri, 12 Jun 2026 01:42:49 -0700 Subject: [PATCH 1/4] 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 c647a77ca..b0381d3fe 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "e392e8c", "specHash": "dd7f7a9", "version": "5.13.0" } +{ "engineHash": "b29f419", "specHash": "dd7f7a9", "version": "5.13.0" } From 6f01ceb49eecb31e356c28dbfd6f354352e2428c Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Thu, 25 Jun 2026 12:11:38 -0700 Subject: [PATCH 2/4] 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 b0381d3fe..2360fe3bb 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "b29f419", "specHash": "dd7f7a9", "version": "5.13.0" } +{ "engineHash": "6f9492d", "specHash": "dd7f7a9", "version": "5.13.0" } From c85dce9e478abae28d29c6d3168b6d1efae6e181 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 29 Jun 2026 06:15:16 -0700 Subject: [PATCH 3/4] docs: (DDOC-1751) Surfaced AI Hubs functionality (box/box-openapi#606) --- .codegen.json | 2 +- docs/sdkgen/ai.md | 4 ++ .../com/box/sdkgen/managers/ai/AiManager.java | 16 +++++ .../com/box/sdkgen/schemas/aiask/AiAsk.java | 6 +- .../sdkgen/schemas/aiitemask/AiItemAsk.java | 8 ++- .../schemas/signrequest/SignRequest.java | 13 ++++ .../signrequestbase/SignRequestBase.java | 31 ++++++++- .../SignRequestCreateRequest.java | 13 ++++ .../SignRequestSignerInput.java | 58 +++++++++++++++- .../schemas/signtemplate/SignTemplate.java | 31 ++++++++- .../HubCopyRequestV2025R0.java | 30 ++++++++- .../HubUpdateRequestV2025R0.java | 49 +++++++++++++- ...pdateRequestV2025R0CopyHubAccessField.java | 66 +++++++++++++++++++ .../v2025r0/hubv2025r0/HubV2025R0.java | 39 ++++++++++- .../HubV2025R0CopyHubAccessField.java | 66 +++++++++++++++++++ 15 files changed, 416 insertions(+), 16 deletions(-) create mode 100644 src/main/java/com/box/sdkgen/schemas/v2025r0/hubupdaterequestv2025r0/HubUpdateRequestV2025R0CopyHubAccessField.java create mode 100644 src/main/java/com/box/sdkgen/schemas/v2025r0/hubv2025r0/HubV2025R0CopyHubAccessField.java diff --git a/.codegen.json b/.codegen.json index 2360fe3bb..015201e12 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "6f9492d", "specHash": "dd7f7a9", "version": "5.13.0" } +{ "engineHash": "6f9492d", "specHash": "131c54a", "version": "5.13.0" } diff --git a/docs/sdkgen/ai.md b/docs/sdkgen/ai.md index 32a0c2d1a..d324a5962 100644 --- a/docs/sdkgen/ai.md +++ b/docs/sdkgen/ai.md @@ -11,6 +11,10 @@ Sends an AI request to supported LLMs and returns an answer specifically focused on the user's question given the provided context. +You can ask a question about a single file, several files, or the entire contents of a Box Hub. To search across and ask questions about everything in a Box Hub, send a single item with `type` set to `hubs` and the Hub's ID as the `id`. Box AI answers the question using the indexed content of all files in that Hub. + +Asking questions about a Box Hub requires Box AI for Hubs to be enabled in the Admin Console before the Hub is created, so that its content is indexed. + This operation is performed by calling function `createAiAsk`. See the endpoint docs at diff --git a/src/main/java/com/box/sdkgen/managers/ai/AiManager.java b/src/main/java/com/box/sdkgen/managers/ai/AiManager.java index ee8b542dd..6fe3a32f1 100644 --- a/src/main/java/com/box/sdkgen/managers/ai/AiManager.java +++ b/src/main/java/com/box/sdkgen/managers/ai/AiManager.java @@ -41,6 +41,14 @@ protected AiManager(Builder builder) { * Sends an AI request to supported LLMs and returns an answer specifically focused on the user's * question given the provided context. * + *

You can ask a question about a single file, several files, or the entire contents of a Box + * Hub. To search across and ask questions about everything in a Box Hub, send a single item with + * `type` set to `hubs` and the Hub's ID as the `id`. Box AI answers the question using the + * indexed content of all files in that Hub. + * + *

Asking questions about a Box Hub requires Box AI for Hubs to be enabled in the Admin Console + * before the Hub is created, so that its content is indexed. + * * @param requestBody Request body of createAiAsk method */ public AiResponseFull createAiAsk(AiAsk requestBody) { @@ -51,6 +59,14 @@ public AiResponseFull createAiAsk(AiAsk requestBody) { * Sends an AI request to supported LLMs and returns an answer specifically focused on the user's * question given the provided context. * + *

You can ask a question about a single file, several files, or the entire contents of a Box + * Hub. To search across and ask questions about everything in a Box Hub, send a single item with + * `type` set to `hubs` and the Hub's ID as the `id`. Box AI answers the question using the + * indexed content of all files in that Hub. + * + *

Asking questions about a Box Hub requires Box AI for Hubs to be enabled in the Admin Console + * before the Hub is created, so that its content is indexed. + * * @param requestBody Request body of createAiAsk method * @param headers Headers of createAiAsk method */ diff --git a/src/main/java/com/box/sdkgen/schemas/aiask/AiAsk.java b/src/main/java/com/box/sdkgen/schemas/aiask/AiAsk.java index 1ce74d48b..970b2d5fc 100644 --- a/src/main/java/com/box/sdkgen/schemas/aiask/AiAsk.java +++ b/src/main/java/com/box/sdkgen/schemas/aiask/AiAsk.java @@ -39,7 +39,11 @@ public class AiAsk extends SerializableObject { */ protected final String prompt; - /** The items to be processed by the LLM, often files. */ + /** + * The items to be processed by the LLM, often files. To search across and ask questions about the + * contents of a Box Hub, pass a single item with `type` set to `hubs`. See the item `type` + * property for details. + */ protected final List items; /** diff --git a/src/main/java/com/box/sdkgen/schemas/aiitemask/AiItemAsk.java b/src/main/java/com/box/sdkgen/schemas/aiitemask/AiItemAsk.java index 69f9c367b..dea3e0f89 100644 --- a/src/main/java/com/box/sdkgen/schemas/aiitemask/AiItemAsk.java +++ b/src/main/java/com/box/sdkgen/schemas/aiitemask/AiItemAsk.java @@ -13,10 +13,14 @@ @JsonFilter("nullablePropertyFilter") public class AiItemAsk extends SerializableObject { - /** The ID of the file. */ + /** The ID of the file, or the ID of the Box Hub when `type` is `hubs`. */ protected final String id; - /** The type of the item. A `hubs` item must be used as a single item. */ + /** + * The type of the item. Use `file` to ask a question about a file, or `hubs` to search across and + * ask a question about the entire contents of a Box Hub. A `hubs` item must be the only item in + * the request. + */ @JsonDeserialize(using = AiItemAskTypeField.AiItemAskTypeFieldDeserializer.class) @JsonSerialize(using = AiItemAskTypeField.AiItemAskTypeFieldSerializer.class) protected final EnumWrapper type; diff --git a/src/main/java/com/box/sdkgen/schemas/signrequest/SignRequest.java b/src/main/java/com/box/sdkgen/schemas/signrequest/SignRequest.java index e381b1825..9fa6903f1 100644 --- a/src/main/java/com/box/sdkgen/schemas/signrequest/SignRequest.java +++ b/src/main/java/com/box/sdkgen/schemas/signrequest/SignRequest.java @@ -246,6 +246,7 @@ public boolean equals(Object o) { && Objects.equals(externalId, casted.externalId) && Objects.equals(templateId, casted.templateId) && Objects.equals(externalSystemName, casted.externalSystemName) + && Objects.equals(requestFlow, casted.requestFlow) && Objects.equals(type, casted.type) && Objects.equals(sourceFiles, casted.sourceFiles) && Objects.equals(signers, casted.signers) @@ -282,6 +283,7 @@ public int hashCode() { externalId, templateId, externalSystemName, + requestFlow, type, sourceFiles, signers, @@ -357,6 +359,10 @@ public String toString() { + externalSystemName + '\'' + ", " + + "requestFlow='" + + requestFlow + + '\'' + + ", " + "type='" + type + '\'' @@ -663,6 +669,13 @@ public Builder externalSystemName(String externalSystemName) { return this; } + @Override + public Builder requestFlow(String requestFlow) { + this.requestFlow = requestFlow; + this.markNullableFieldAsSet("request_flow"); + return this; + } + public SignRequest build() { return new SignRequest(this); } diff --git a/src/main/java/com/box/sdkgen/schemas/signrequestbase/SignRequestBase.java b/src/main/java/com/box/sdkgen/schemas/signrequestbase/SignRequestBase.java index 6c20c6c8b..b144af275 100644 --- a/src/main/java/com/box/sdkgen/schemas/signrequestbase/SignRequestBase.java +++ b/src/main/java/com/box/sdkgen/schemas/signrequestbase/SignRequestBase.java @@ -107,6 +107,14 @@ public class SignRequestBase extends SerializableObject { @Nullable protected String externalSystemName; + /** + * The flow type of the sign request. Values can include `standard` or `cfr11`. When not specified + * during creation, a default is chosen based on admin settings. + */ + @JsonProperty("request_flow") + @Nullable + protected String requestFlow; + public SignRequestBase() { super(); } @@ -126,6 +134,7 @@ protected SignRequestBase(Builder builder) { this.externalId = builder.externalId; this.templateId = builder.templateId; this.externalSystemName = builder.externalSystemName; + this.requestFlow = builder.requestFlow; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -181,6 +190,10 @@ public String getExternalSystemName() { return externalSystemName; } + public String getRequestFlow() { + return requestFlow; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -202,7 +215,8 @@ public boolean equals(Object o) { && Objects.equals(daysValid, casted.daysValid) && Objects.equals(externalId, casted.externalId) && Objects.equals(templateId, casted.templateId) - && Objects.equals(externalSystemName, casted.externalSystemName); + && Objects.equals(externalSystemName, casted.externalSystemName) + && Objects.equals(requestFlow, casted.requestFlow); } @Override @@ -220,7 +234,8 @@ public int hashCode() { daysValid, externalId, templateId, - externalSystemName); + externalSystemName, + requestFlow); } @Override @@ -277,6 +292,10 @@ public String toString() { + "externalSystemName='" + externalSystemName + '\'' + + ", " + + "requestFlow='" + + requestFlow + + '\'' + "}"; } @@ -308,6 +327,8 @@ public static class Builder extends NullableFieldTracker { protected String externalSystemName; + protected String requestFlow; + public Builder isDocumentPreparationNeeded(Boolean isDocumentPreparationNeeded) { this.isDocumentPreparationNeeded = isDocumentPreparationNeeded; return this; @@ -381,6 +402,12 @@ public Builder externalSystemName(String externalSystemName) { return this; } + public Builder requestFlow(String requestFlow) { + this.requestFlow = requestFlow; + this.markNullableFieldAsSet("request_flow"); + return this; + } + public SignRequestBase build() { return new SignRequestBase(this); } diff --git a/src/main/java/com/box/sdkgen/schemas/signrequestcreaterequest/SignRequestCreateRequest.java b/src/main/java/com/box/sdkgen/schemas/signrequestcreaterequest/SignRequestCreateRequest.java index 59c0e5663..63368bed5 100644 --- a/src/main/java/com/box/sdkgen/schemas/signrequestcreaterequest/SignRequestCreateRequest.java +++ b/src/main/java/com/box/sdkgen/schemas/signrequestcreaterequest/SignRequestCreateRequest.java @@ -108,6 +108,7 @@ public boolean equals(Object o) { && Objects.equals(externalId, casted.externalId) && Objects.equals(templateId, casted.templateId) && Objects.equals(externalSystemName, casted.externalSystemName) + && Objects.equals(requestFlow, casted.requestFlow) && Objects.equals(sourceFiles, casted.sourceFiles) && Objects.equals(signatureColor, casted.signatureColor) && Objects.equals(signers, casted.signers) @@ -130,6 +131,7 @@ public int hashCode() { externalId, templateId, externalSystemName, + requestFlow, sourceFiles, signatureColor, signers, @@ -191,6 +193,10 @@ public String toString() { + externalSystemName + '\'' + ", " + + "requestFlow='" + + requestFlow + + '\'' + + ", " + "sourceFiles='" + sourceFiles + '\'' @@ -335,6 +341,13 @@ public Builder externalSystemName(String externalSystemName) { return this; } + @Override + public Builder requestFlow(String requestFlow) { + this.requestFlow = requestFlow; + this.markNullableFieldAsSet("request_flow"); + return this; + } + public SignRequestCreateRequest build() { return new SignRequestCreateRequest(this); } diff --git a/src/main/java/com/box/sdkgen/schemas/signrequestsignerinput/SignRequestSignerInput.java b/src/main/java/com/box/sdkgen/schemas/signrequestsignerinput/SignRequestSignerInput.java index 9af6c3971..d5dabd263 100644 --- a/src/main/java/com/box/sdkgen/schemas/signrequestsignerinput/SignRequestSignerInput.java +++ b/src/main/java/com/box/sdkgen/schemas/signrequestsignerinput/SignRequestSignerInput.java @@ -1,5 +1,6 @@ package com.box.sdkgen.schemas.signrequestsignerinput; +import com.box.sdkgen.internal.Nullable; import com.box.sdkgen.schemas.signrequestprefilltag.SignRequestPrefillTag; import com.box.sdkgen.schemas.signrequestsignerinputcustomvalidation.SignRequestSignerInputCustomValidation; import com.box.sdkgen.schemas.signrequestsignerinputdateasiavalidation.SignRequestSignerInputDateAsiaValidation; @@ -58,6 +59,21 @@ public class SignRequestSignerInput extends SignRequestPrefillTag { */ protected SignRequestSignerInputValidation validation; + /** + * The reason for the signer's input, applicable to signature or initial content types in a + * `cfr11` request flow. The value is `null` when not applicable. + */ + @Nullable protected String reason; + + /** + * Indicates whether the signer's input has been validated through re-authentication. Applicable + * only for signature or initial content types in a `cfr11` request flow. The value is `null` for + * standard request flows or non-applicable input types. + */ + @JsonProperty("is_validated") + @Nullable + protected Boolean isValidated; + public SignRequestSignerInput(@JsonProperty("page_index") long pageIndex) { super(); this.pageIndex = pageIndex; @@ -70,6 +86,8 @@ protected SignRequestSignerInput(Builder builder) { this.pageIndex = builder.pageIndex; this.readOnly = builder.readOnly; this.validation = builder.validation; + this.reason = builder.reason; + this.isValidated = builder.isValidated; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -93,6 +111,14 @@ public SignRequestSignerInputValidation getValidation() { return validation; } + public String getReason() { + return reason; + } + + public Boolean getIsValidated() { + return isValidated; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -110,7 +136,9 @@ public boolean equals(Object o) { && Objects.equals(contentType, casted.contentType) && Objects.equals(pageIndex, casted.pageIndex) && Objects.equals(readOnly, casted.readOnly) - && Objects.equals(validation, casted.validation); + && Objects.equals(validation, casted.validation) + && Objects.equals(reason, casted.reason) + && Objects.equals(isValidated, casted.isValidated); } @Override @@ -124,7 +152,9 @@ public int hashCode() { contentType, pageIndex, readOnly, - validation); + validation, + reason, + isValidated); } @Override @@ -165,6 +195,14 @@ public String toString() { + "validation='" + validation + '\'' + + ", " + + "reason='" + + reason + + '\'' + + ", " + + "isValidated='" + + isValidated + + '\'' + "}"; } @@ -180,6 +218,10 @@ public static class Builder extends SignRequestPrefillTag.Builder { protected SignRequestSignerInputValidation validation; + protected String reason; + + protected Boolean isValidated; + public Builder(long pageIndex) { super(); this.pageIndex = pageIndex; @@ -270,6 +312,18 @@ public Builder validation(SignRequestSignerInputValidation validation) { return this; } + public Builder reason(String reason) { + this.reason = reason; + this.markNullableFieldAsSet("reason"); + return this; + } + + public Builder isValidated(Boolean isValidated) { + this.isValidated = isValidated; + this.markNullableFieldAsSet("is_validated"); + return this; + } + @Override public Builder documentTagId(String documentTagId) { this.documentTagId = documentTagId; diff --git a/src/main/java/com/box/sdkgen/schemas/signtemplate/SignTemplate.java b/src/main/java/com/box/sdkgen/schemas/signtemplate/SignTemplate.java index 80d926b10..80f45b1d9 100644 --- a/src/main/java/com/box/sdkgen/schemas/signtemplate/SignTemplate.java +++ b/src/main/java/com/box/sdkgen/schemas/signtemplate/SignTemplate.java @@ -130,6 +130,14 @@ public class SignTemplate extends SerializableObject { @Nullable protected SignTemplateCustomBrandingField customBranding; + /** + * The sign flow of sign requests created from the template. Values can include `standard` or + * `cfr11`. + */ + @JsonProperty("request_flow") + @Nullable + protected String requestFlow; + public SignTemplate() { super(); } @@ -153,6 +161,7 @@ protected SignTemplate(Builder builder) { this.additionalInfo = builder.additionalInfo; this.readySignLink = builder.readySignLink; this.customBranding = builder.customBranding; + this.requestFlow = builder.requestFlow; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -224,6 +233,10 @@ public SignTemplateCustomBrandingField getCustomBranding() { return customBranding; } + public String getRequestFlow() { + return requestFlow; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +262,8 @@ public boolean equals(Object o) { && Objects.equals(signers, casted.signers) && Objects.equals(additionalInfo, casted.additionalInfo) && Objects.equals(readySignLink, casted.readySignLink) - && Objects.equals(customBranding, casted.customBranding); + && Objects.equals(customBranding, casted.customBranding) + && Objects.equals(requestFlow, casted.requestFlow); } @Override @@ -271,7 +285,8 @@ public int hashCode() { signers, additionalInfo, readySignLink, - customBranding); + customBranding, + requestFlow); } @Override @@ -344,6 +359,10 @@ public String toString() { + "customBranding='" + customBranding + '\'' + + ", " + + "requestFlow='" + + requestFlow + + '\'' + "}"; } @@ -383,6 +402,8 @@ public static class Builder extends NullableFieldTracker { protected SignTemplateCustomBrandingField customBranding; + protected String requestFlow; + public Builder type(SignTemplateTypeField type) { this.type = new EnumWrapper(type); return this; @@ -479,6 +500,12 @@ public Builder customBranding(SignTemplateCustomBrandingField customBranding) { return this; } + public Builder requestFlow(String requestFlow) { + this.requestFlow = requestFlow; + this.markNullableFieldAsSet("request_flow"); + return this; + } + public SignTemplate build() { return new SignTemplate(this); } diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/hubcopyrequestv2025r0/HubCopyRequestV2025R0.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/hubcopyrequestv2025r0/HubCopyRequestV2025R0.java index 3ceb1c0a9..61a195989 100644 --- a/src/main/java/com/box/sdkgen/schemas/v2025r0/hubcopyrequestv2025r0/HubCopyRequestV2025R0.java +++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/hubcopyrequestv2025r0/HubCopyRequestV2025R0.java @@ -3,6 +3,7 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; import com.fasterxml.jackson.annotation.JsonFilter; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; /** Request schema for copying a Box Hub. */ @@ -15,6 +16,13 @@ public class HubCopyRequestV2025R0 extends SerializableObject { /** Description of the Box Hub. */ protected String description; + /** + * If true, the items which the user has Editor or Owner access to in the original Box Hub will be + * copied to the new Box Hub. Defaults to false. + */ + @JsonProperty("include_items") + protected Boolean includeItems; + public HubCopyRequestV2025R0() { super(); } @@ -23,6 +31,7 @@ protected HubCopyRequestV2025R0(Builder builder) { super(); this.title = builder.title; this.description = builder.description; + this.includeItems = builder.includeItems; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -34,6 +43,10 @@ public String getDescription() { return description; } + public Boolean getIncludeItems() { + return includeItems; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -43,12 +56,14 @@ public boolean equals(Object o) { return false; } HubCopyRequestV2025R0 casted = (HubCopyRequestV2025R0) o; - return Objects.equals(title, casted.title) && Objects.equals(description, casted.description); + return Objects.equals(title, casted.title) + && Objects.equals(description, casted.description) + && Objects.equals(includeItems, casted.includeItems); } @Override public int hashCode() { - return Objects.hash(title, description); + return Objects.hash(title, description, includeItems); } @Override @@ -61,6 +76,10 @@ public String toString() { + "description='" + description + '\'' + + ", " + + "includeItems='" + + includeItems + + '\'' + "}"; } @@ -70,6 +89,8 @@ public static class Builder extends NullableFieldTracker { protected String description; + protected Boolean includeItems; + public Builder title(String title) { this.title = title; return this; @@ -80,6 +101,11 @@ public Builder description(String description) { return this; } + public Builder includeItems(Boolean includeItems) { + this.includeItems = includeItems; + return this; + } + public HubCopyRequestV2025R0 build() { return new HubCopyRequestV2025R0(this); } diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/hubupdaterequestv2025r0/HubUpdateRequestV2025R0.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/hubupdaterequestv2025r0/HubUpdateRequestV2025R0.java index dad3150c2..f3312e860 100644 --- a/src/main/java/com/box/sdkgen/schemas/v2025r0/hubupdaterequestv2025r0/HubUpdateRequestV2025R0.java +++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/hubupdaterequestv2025r0/HubUpdateRequestV2025R0.java @@ -2,8 +2,11 @@ import com.box.sdkgen.internal.NullableFieldTracker; import com.box.sdkgen.internal.SerializableObject; +import com.box.sdkgen.serialization.json.EnumWrapper; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import java.util.Objects; /** Request schema for updating an existing Box Hub. */ @@ -36,6 +39,23 @@ public class HubUpdateRequestV2025R0 extends SerializableObject { @JsonProperty("can_public_shared_link_be_created") protected Boolean canPublicSharedLinkBeCreated; + /** + * Specifies who is allowed to copy the Box Hub. + * + *

* `all` - Any user with access to the Hub can copy it. * `company` - Only users within the + * same enterprise as the Hub can copy it. * `none` - No one can copy the Hub. + */ + @JsonDeserialize( + using = + HubUpdateRequestV2025R0CopyHubAccessField + .HubUpdateRequestV2025R0CopyHubAccessFieldDeserializer.class) + @JsonSerialize( + using = + HubUpdateRequestV2025R0CopyHubAccessField + .HubUpdateRequestV2025R0CopyHubAccessFieldSerializer.class) + @JsonProperty("copy_hub_access") + protected EnumWrapper copyHubAccess; + public HubUpdateRequestV2025R0() { super(); } @@ -49,6 +69,7 @@ protected HubUpdateRequestV2025R0(Builder builder) { this.canNonOwnersInvite = builder.canNonOwnersInvite; this.canSharedLinkBeCreated = builder.canSharedLinkBeCreated; this.canPublicSharedLinkBeCreated = builder.canPublicSharedLinkBeCreated; + this.copyHubAccess = builder.copyHubAccess; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -80,6 +101,10 @@ public Boolean getCanPublicSharedLinkBeCreated() { return canPublicSharedLinkBeCreated; } + public EnumWrapper getCopyHubAccess() { + return copyHubAccess; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +121,8 @@ public boolean equals(Object o) { isCollaborationRestrictedToEnterprise, casted.isCollaborationRestrictedToEnterprise) && Objects.equals(canNonOwnersInvite, casted.canNonOwnersInvite) && Objects.equals(canSharedLinkBeCreated, casted.canSharedLinkBeCreated) - && Objects.equals(canPublicSharedLinkBeCreated, casted.canPublicSharedLinkBeCreated); + && Objects.equals(canPublicSharedLinkBeCreated, casted.canPublicSharedLinkBeCreated) + && Objects.equals(copyHubAccess, casted.copyHubAccess); } @Override @@ -108,7 +134,8 @@ public int hashCode() { isCollaborationRestrictedToEnterprise, canNonOwnersInvite, canSharedLinkBeCreated, - canPublicSharedLinkBeCreated); + canPublicSharedLinkBeCreated, + copyHubAccess); } @Override @@ -141,6 +168,10 @@ public String toString() { + "canPublicSharedLinkBeCreated='" + canPublicSharedLinkBeCreated + '\'' + + ", " + + "copyHubAccess='" + + copyHubAccess + + '\'' + "}"; } @@ -160,6 +191,8 @@ public static class Builder extends NullableFieldTracker { protected Boolean canPublicSharedLinkBeCreated; + protected EnumWrapper copyHubAccess; + public Builder title(String title) { this.title = title; return this; @@ -196,6 +229,18 @@ public Builder canPublicSharedLinkBeCreated(Boolean canPublicSharedLinkBeCreated return this; } + public Builder copyHubAccess(HubUpdateRequestV2025R0CopyHubAccessField copyHubAccess) { + this.copyHubAccess = + new EnumWrapper(copyHubAccess); + return this; + } + + public Builder copyHubAccess( + EnumWrapper copyHubAccess) { + this.copyHubAccess = copyHubAccess; + return this; + } + public HubUpdateRequestV2025R0 build() { return new HubUpdateRequestV2025R0(this); } diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/hubupdaterequestv2025r0/HubUpdateRequestV2025R0CopyHubAccessField.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/hubupdaterequestv2025r0/HubUpdateRequestV2025R0CopyHubAccessField.java new file mode 100644 index 000000000..669e855ec --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/hubupdaterequestv2025r0/HubUpdateRequestV2025R0CopyHubAccessField.java @@ -0,0 +1,66 @@ +package com.box.sdkgen.schemas.v2025r0.hubupdaterequestv2025r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum HubUpdateRequestV2025R0CopyHubAccessField implements Valuable { + ALL("all"), + COMPANY("company"), + NONE("none"); + + private final String value; + + HubUpdateRequestV2025R0CopyHubAccessField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class HubUpdateRequestV2025R0CopyHubAccessFieldDeserializer + extends JsonDeserializer> { + + public HubUpdateRequestV2025R0CopyHubAccessFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(HubUpdateRequestV2025R0CopyHubAccessField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class HubUpdateRequestV2025R0CopyHubAccessFieldSerializer + extends JsonSerializer> { + + public HubUpdateRequestV2025R0CopyHubAccessFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/hubv2025r0/HubV2025R0.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/hubv2025r0/HubV2025R0.java index c49674bd8..a4fa51f5e 100644 --- a/src/main/java/com/box/sdkgen/schemas/v2025r0/hubv2025r0/HubV2025R0.java +++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/hubv2025r0/HubV2025R0.java @@ -69,6 +69,18 @@ public class HubV2025R0 extends HubBaseV2025R0 { @JsonProperty("can_public_shared_link_be_created") protected Boolean canPublicSharedLinkBeCreated; + /** + * Specifies who is allowed to copy the Box Hub. + * + *

* `all` - Any user with access to the Hub can copy it. * `company` - Only users within the + * same enterprise as the Hub can copy it. * `none` - No one can copy the Hub. + */ + @JsonDeserialize( + using = HubV2025R0CopyHubAccessField.HubV2025R0CopyHubAccessFieldDeserializer.class) + @JsonSerialize(using = HubV2025R0CopyHubAccessField.HubV2025R0CopyHubAccessFieldSerializer.class) + @JsonProperty("copy_hub_access") + protected EnumWrapper copyHubAccess; + public HubV2025R0(@JsonProperty("id") String id) { super(id); } @@ -87,6 +99,7 @@ protected HubV2025R0(Builder builder) { this.canNonOwnersInvite = builder.canNonOwnersInvite; this.canSharedLinkBeCreated = builder.canSharedLinkBeCreated; this.canPublicSharedLinkBeCreated = builder.canPublicSharedLinkBeCreated; + this.copyHubAccess = builder.copyHubAccess; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -138,6 +151,10 @@ public Boolean getCanPublicSharedLinkBeCreated() { return canPublicSharedLinkBeCreated; } + public EnumWrapper getCopyHubAccess() { + return copyHubAccess; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -161,7 +178,8 @@ public boolean equals(Object o) { isCollaborationRestrictedToEnterprise, casted.isCollaborationRestrictedToEnterprise) && Objects.equals(canNonOwnersInvite, casted.canNonOwnersInvite) && Objects.equals(canSharedLinkBeCreated, casted.canSharedLinkBeCreated) - && Objects.equals(canPublicSharedLinkBeCreated, casted.canPublicSharedLinkBeCreated); + && Objects.equals(canPublicSharedLinkBeCreated, casted.canPublicSharedLinkBeCreated) + && Objects.equals(copyHubAccess, casted.copyHubAccess); } @Override @@ -180,7 +198,8 @@ public int hashCode() { isCollaborationRestrictedToEnterprise, canNonOwnersInvite, canSharedLinkBeCreated, - canPublicSharedLinkBeCreated); + canPublicSharedLinkBeCreated, + copyHubAccess); } @Override @@ -241,6 +260,10 @@ public String toString() { + "canPublicSharedLinkBeCreated='" + canPublicSharedLinkBeCreated + '\'' + + ", " + + "copyHubAccess='" + + copyHubAccess + + '\'' + "}"; } @@ -270,6 +293,8 @@ public static class Builder extends HubBaseV2025R0.Builder { protected Boolean canPublicSharedLinkBeCreated; + protected EnumWrapper copyHubAccess; + public Builder(String id) { super(id); } @@ -335,6 +360,16 @@ public Builder canPublicSharedLinkBeCreated(Boolean canPublicSharedLinkBeCreated return this; } + public Builder copyHubAccess(HubV2025R0CopyHubAccessField copyHubAccess) { + this.copyHubAccess = new EnumWrapper(copyHubAccess); + return this; + } + + public Builder copyHubAccess(EnumWrapper copyHubAccess) { + this.copyHubAccess = copyHubAccess; + return this; + } + @Override public Builder type(HubBaseV2025R0TypeField type) { this.type = new EnumWrapper(type); diff --git a/src/main/java/com/box/sdkgen/schemas/v2025r0/hubv2025r0/HubV2025R0CopyHubAccessField.java b/src/main/java/com/box/sdkgen/schemas/v2025r0/hubv2025r0/HubV2025R0CopyHubAccessField.java new file mode 100644 index 000000000..f6927d8f5 --- /dev/null +++ b/src/main/java/com/box/sdkgen/schemas/v2025r0/hubv2025r0/HubV2025R0CopyHubAccessField.java @@ -0,0 +1,66 @@ +package com.box.sdkgen.schemas.v2025r0.hubv2025r0; + +import com.box.sdkgen.serialization.json.EnumWrapper; +import com.box.sdkgen.serialization.json.Valuable; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; +import java.util.Arrays; + +public enum HubV2025R0CopyHubAccessField implements Valuable { + ALL("all"), + COMPANY("company"), + NONE("none"); + + private final String value; + + HubV2025R0CopyHubAccessField(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + public static class HubV2025R0CopyHubAccessFieldDeserializer + extends JsonDeserializer> { + + public HubV2025R0CopyHubAccessFieldDeserializer() { + super(); + } + + @Override + public EnumWrapper deserialize( + JsonParser p, DeserializationContext ctxt) throws IOException { + String value = p.getValueAsString(); + return Arrays.stream(HubV2025R0CopyHubAccessField.values()) + .filter((v) -> v.getValue().equalsIgnoreCase(value)) + .findFirst() + .map(EnumWrapper::new) + .orElse(new EnumWrapper(value)); + } + } + + public static class HubV2025R0CopyHubAccessFieldSerializer + extends JsonSerializer> { + + public HubV2025R0CopyHubAccessFieldSerializer() { + super(); + } + + @Override + public void serialize( + EnumWrapper value, + JsonGenerator gen, + SerializerProvider serializers) + throws IOException { + gen.writeString(value.getStringValue()); + } + } +} From 7c2565fa2bfeb4db5fd56723d872db6448e69572 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 29 Jun 2026 08:45:38 -0700 Subject: [PATCH 4/4] 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 015201e12..2cf471278 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "6f9492d", "specHash": "131c54a", "version": "5.13.0" } +{ "engineHash": "9c2d390", "specHash": "131c54a", "version": "5.13.0" }