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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "65f6eab", "specHash": "57b3004", "version": "5.5.0" }
{ "engineHash": "65f6eab", "specHash": "ca63e5e", "version": "5.5.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ public class GetHubItemsV2025R0QueryParams {
*/
public final String hubId;

/**
* The unique identifier of an item list block within the Box Hub.
*
* <p>When provided, the response will only include items that belong to the specified item list,
* allowing you to filter results to items on a specific page or section.
*/
public String parentId;

/**
* Defines the position marker at which to begin returning results. This is used when paginating
* using marker-based pagination.
Expand All @@ -28,6 +36,7 @@ public GetHubItemsV2025R0QueryParams(String hubId) {

protected GetHubItemsV2025R0QueryParams(Builder builder) {
this.hubId = builder.hubId;
this.parentId = builder.parentId;
this.marker = builder.marker;
this.limit = builder.limit;
}
Expand All @@ -36,6 +45,10 @@ public String getHubId() {
return hubId;
}

public String getParentId() {
return parentId;
}

public String getMarker() {
return marker;
}
Expand All @@ -48,6 +61,8 @@ public static class Builder {

protected final String hubId;

protected String parentId;

protected String marker;

protected Long limit;
Expand All @@ -56,6 +71,11 @@ public Builder(String hubId) {
this.hubId = hubId;
}

public Builder parentId(String parentId) {
this.parentId = parentId;
return this;
}

public Builder marker(String marker) {
this.marker = marker;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public HubItemsV2025R0 getHubItemsV2025R0(
prepareParams(
mapOf(
entryOf("hub_id", convertToString(queryParams.getHubId())),
entryOf("parent_id", convertToString(queryParams.getParentId())),
entryOf("marker", convertToString(queryParams.getMarker())),
entryOf("limit", convertToString(queryParams.getLimit()))));
Map<String, String> headersMap =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public class AiExtractStructured extends SerializableObject {
@JsonProperty("include_confidence_score")
protected Boolean includeConfidenceScore;

/** A flag to indicate whether references for every extracted field should be returned. */
@JsonProperty("include_reference")
protected Boolean includeReference;

@JsonProperty("ai_agent")
protected AiExtractStructuredAgent aiAgent;

Expand All @@ -49,6 +53,7 @@ protected AiExtractStructured(Builder builder) {
this.metadataTemplate = builder.metadataTemplate;
this.fields = builder.fields;
this.includeConfidenceScore = builder.includeConfidenceScore;
this.includeReference = builder.includeReference;
this.aiAgent = builder.aiAgent;
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
}
Expand All @@ -69,6 +74,10 @@ public Boolean getIncludeConfidenceScore() {
return includeConfidenceScore;
}

public Boolean getIncludeReference() {
return includeReference;
}

public AiExtractStructuredAgent getAiAgent() {
return aiAgent;
}
Expand All @@ -86,12 +95,14 @@ public boolean equals(Object o) {
&& Objects.equals(metadataTemplate, casted.metadataTemplate)
&& Objects.equals(fields, casted.fields)
&& Objects.equals(includeConfidenceScore, casted.includeConfidenceScore)
&& Objects.equals(includeReference, casted.includeReference)
&& Objects.equals(aiAgent, casted.aiAgent);
}

@Override
public int hashCode() {
return Objects.hash(items, metadataTemplate, fields, includeConfidenceScore, aiAgent);
return Objects.hash(
items, metadataTemplate, fields, includeConfidenceScore, includeReference, aiAgent);
}

@Override
Expand All @@ -113,6 +124,10 @@ public String toString() {
+ includeConfidenceScore
+ '\''
+ ", "
+ "includeReference='"
+ includeReference
+ '\''
+ ", "
+ "aiAgent='"
+ aiAgent
+ '\''
Expand All @@ -129,6 +144,8 @@ public static class Builder extends NullableFieldTracker {

protected Boolean includeConfidenceScore;

protected Boolean includeReference;

protected AiExtractStructuredAgent aiAgent;

public Builder(List<AiItemBase> items) {
Expand All @@ -151,6 +168,11 @@ public Builder includeConfidenceScore(Boolean includeConfidenceScore) {
return this;
}

public Builder includeReference(Boolean includeReference) {
this.includeReference = includeReference;
return this;
}

public Builder aiAgent(AiAgentReference aiAgent) {
this.aiAgent = new AiExtractStructuredAgent(aiAgent);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ public class AiExtractStructuredResponse extends SerializableObject {
@JsonProperty("confidence_score")
protected Map<String, Object> confidenceScore;

/**
* The reference for each extracted field as a JSON dictionary. This can be empty if no field
* could be extracted.
*/
protected Map<String, Object> reference;

@JsonProperty("ai_agent_info")
protected AiAgentInfo aiAgentInfo;

Expand All @@ -52,6 +58,7 @@ protected AiExtractStructuredResponse(Builder builder) {
this.createdAt = builder.createdAt;
this.completionReason = builder.completionReason;
this.confidenceScore = builder.confidenceScore;
this.reference = builder.reference;
this.aiAgentInfo = builder.aiAgentInfo;
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
}
Expand All @@ -72,6 +79,10 @@ public Map<String, Object> getConfidenceScore() {
return confidenceScore;
}

public Map<String, Object> getReference() {
return reference;
}

public AiAgentInfo getAiAgentInfo() {
return aiAgentInfo;
}
Expand All @@ -89,12 +100,14 @@ public boolean equals(Object o) {
&& Objects.equals(createdAt, casted.createdAt)
&& Objects.equals(completionReason, casted.completionReason)
&& Objects.equals(confidenceScore, casted.confidenceScore)
&& Objects.equals(reference, casted.reference)
&& Objects.equals(aiAgentInfo, casted.aiAgentInfo);
}

@Override
public int hashCode() {
return Objects.hash(answer, createdAt, completionReason, confidenceScore, aiAgentInfo);
return Objects.hash(
answer, createdAt, completionReason, confidenceScore, reference, aiAgentInfo);
}

@Override
Expand All @@ -116,6 +129,10 @@ public String toString() {
+ confidenceScore
+ '\''
+ ", "
+ "reference='"
+ reference
+ '\''
+ ", "
+ "aiAgentInfo='"
+ aiAgentInfo
+ '\''
Expand All @@ -132,6 +149,8 @@ public static class Builder extends NullableFieldTracker {

protected Map<String, Object> confidenceScore;

protected Map<String, Object> reference;

protected AiAgentInfo aiAgentInfo;

public Builder(Map<String, Object> answer, OffsetDateTime createdAt) {
Expand All @@ -150,6 +169,11 @@ public Builder confidenceScore(Map<String, Object> confidenceScore) {
return this;
}

public Builder reference(Map<String, Object> reference) {
this.reference = reference;
return this;
}

public Builder aiAgentInfo(AiAgentInfo aiAgentInfo) {
this.aiAgentInfo = aiAgentInfo;
return this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.box.sdkgen.schemas.v2025r0.hubitemoperationv2025r0;

import com.box.sdkgen.internal.NullableFieldTracker;
import com.box.sdkgen.internal.SerializableObject;
import com.box.sdkgen.schemas.v2025r0.filereferencev2025r0.FileReferenceV2025R0;
import com.box.sdkgen.schemas.v2025r0.folderreferencev2025r0.FolderReferenceV2025R0;
Expand All @@ -26,6 +27,13 @@ public class HubItemOperationV2025R0 extends SerializableObject {

protected final HubItemReferenceV2025R0 item;

/**
* The ID of the parent block to add the item to. Must be an Item List block. If not provided, the
* item will be added to the first page's first Item List block.
*/
@JsonProperty("parent_id")
protected String parentId;

public HubItemOperationV2025R0(
HubItemOperationV2025R0ActionField action, FileReferenceV2025R0 item) {
super();
Expand Down Expand Up @@ -83,6 +91,14 @@ public HubItemOperationV2025R0(
this.item = item;
}

protected HubItemOperationV2025R0(Builder builder) {
super();
this.action = builder.action;
this.item = builder.item;
this.parentId = builder.parentId;
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
}

public EnumWrapper<HubItemOperationV2025R0ActionField> getAction() {
return action;
}
Expand All @@ -91,6 +107,10 @@ public HubItemReferenceV2025R0 getItem() {
return item;
}

public String getParentId() {
return parentId;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -100,12 +120,14 @@ public boolean equals(Object o) {
return false;
}
HubItemOperationV2025R0 casted = (HubItemOperationV2025R0) o;
return Objects.equals(action, casted.action) && Objects.equals(item, casted.item);
return Objects.equals(action, casted.action)
&& Objects.equals(item, casted.item)
&& Objects.equals(parentId, casted.parentId);
}

@Override
public int hashCode() {
return Objects.hash(action, item);
return Objects.hash(action, item, parentId);
}

@Override
Expand All @@ -118,6 +140,80 @@ public String toString() {
+ "item='"
+ item
+ '\''
+ ", "
+ "parentId='"
+ parentId
+ '\''
+ "}";
}

public static class Builder extends NullableFieldTracker {

protected final EnumWrapper<HubItemOperationV2025R0ActionField> action;

protected final HubItemReferenceV2025R0 item;

protected String parentId;

public Builder(HubItemOperationV2025R0ActionField action, FileReferenceV2025R0 item) {
super();
this.action = new EnumWrapper<HubItemOperationV2025R0ActionField>(action);
this.item = new HubItemReferenceV2025R0(item);
}

public Builder(HubItemOperationV2025R0ActionField action, FolderReferenceV2025R0 item) {
super();
this.action = new EnumWrapper<HubItemOperationV2025R0ActionField>(action);
this.item = new HubItemReferenceV2025R0(item);
}

public Builder(HubItemOperationV2025R0ActionField action, WeblinkReferenceV2025R0 item) {
super();
this.action = new EnumWrapper<HubItemOperationV2025R0ActionField>(action);
this.item = new HubItemReferenceV2025R0(item);
}

public Builder(HubItemOperationV2025R0ActionField action, HubItemReferenceV2025R0 item) {
super();
this.action = new EnumWrapper<HubItemOperationV2025R0ActionField>(action);
this.item = item;
}

public Builder(
EnumWrapper<HubItemOperationV2025R0ActionField> action, FileReferenceV2025R0 item) {
super();
this.action = action;
this.item = new HubItemReferenceV2025R0(item);
}

public Builder(
EnumWrapper<HubItemOperationV2025R0ActionField> action, FolderReferenceV2025R0 item) {
super();
this.action = action;
this.item = new HubItemReferenceV2025R0(item);
}

public Builder(
EnumWrapper<HubItemOperationV2025R0ActionField> action, WeblinkReferenceV2025R0 item) {
super();
this.action = action;
this.item = new HubItemReferenceV2025R0(item);
}

public Builder(
EnumWrapper<HubItemOperationV2025R0ActionField> action, HubItemReferenceV2025R0 item) {
super();
this.action = action;
this.item = item;
}

public Builder parentId(String parentId) {
this.parentId = parentId;
return this;
}

public HubItemOperationV2025R0 build() {
return new HubItemOperationV2025R0(this);
}
}
}
Loading