Skip to content

Commit d600645

Browse files
committed
docs: modify can_view_path description and add confidence scores for structured extract (box/box-openapi#566)
1 parent b3c46bb commit d600645

File tree

5 files changed

+52
-5
lines changed

5 files changed

+52
-5
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "49f3695", "specHash": "7e4908e", "version": "10.2.0" }
1+
{ "engineHash": "49f3695", "specHash": "5183b65", "version": "10.2.0" }

src/main/java/com/box/sdkgen/managers/usercollaborations/CreateCollaborationRequestBody.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public class CreateCollaborationRequestBody extends SerializableObject {
4949
* Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled
5050
* to 1,000 per user.
5151
*
52-
* <p>Only owner or co-owners can invite collaborators with a `can_view_path` of `true`.
52+
* <p>Only an owner or co-owners can invite collaborators with a `can_view_path` of `true`. Only
53+
* an owner can update `can_view_path` on existing collaborations.
5354
*
5455
* <p>`can_view_path` can only be used for folder collaborations.
5556
*/

src/main/java/com/box/sdkgen/managers/usercollaborations/UpdateCollaborationByIdRequestBody.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ public class UpdateCollaborationByIdRequestBody extends SerializableObject {
6565
* Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled
6666
* to 1,000 per user.
6767
*
68-
* <p>Only owner or co-owners can invite collaborators with a `can_view_path` of `true`.
68+
* <p>Only an owner or co-owners can invite collaborators with a `can_view_path` of `true`. Only
69+
* an owner can update `can_view_path` on existing collaborations.
6970
*
7071
* <p>`can_view_path` can only be used for folder collaborations.
7172
*/

src/main/java/com/box/sdkgen/schemas/aiextractstructured/AiExtractStructured.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ public class AiExtractStructured extends SerializableObject {
3131
*/
3232
protected List<AiExtractStructuredFieldsField> fields;
3333

34+
/** A flag to indicate whether confidence scores for every extracted field should be returned. */
35+
@JsonProperty("include_confidence_score")
36+
protected Boolean includeConfidenceScore;
37+
3438
@JsonProperty("ai_agent")
3539
protected AiExtractStructuredAgent aiAgent;
3640

@@ -44,6 +48,7 @@ protected AiExtractStructured(Builder builder) {
4448
this.items = builder.items;
4549
this.metadataTemplate = builder.metadataTemplate;
4650
this.fields = builder.fields;
51+
this.includeConfidenceScore = builder.includeConfidenceScore;
4752
this.aiAgent = builder.aiAgent;
4853
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
4954
}
@@ -60,6 +65,10 @@ public List<AiExtractStructuredFieldsField> getFields() {
6065
return fields;
6166
}
6267

68+
public Boolean getIncludeConfidenceScore() {
69+
return includeConfidenceScore;
70+
}
71+
6372
public AiExtractStructuredAgent getAiAgent() {
6473
return aiAgent;
6574
}
@@ -76,12 +85,13 @@ public boolean equals(Object o) {
7685
return Objects.equals(items, casted.items)
7786
&& Objects.equals(metadataTemplate, casted.metadataTemplate)
7887
&& Objects.equals(fields, casted.fields)
88+
&& Objects.equals(includeConfidenceScore, casted.includeConfidenceScore)
7989
&& Objects.equals(aiAgent, casted.aiAgent);
8090
}
8191

8292
@Override
8393
public int hashCode() {
84-
return Objects.hash(items, metadataTemplate, fields, aiAgent);
94+
return Objects.hash(items, metadataTemplate, fields, includeConfidenceScore, aiAgent);
8595
}
8696

8797
@Override
@@ -99,6 +109,10 @@ public String toString() {
99109
+ fields
100110
+ '\''
101111
+ ", "
112+
+ "includeConfidenceScore='"
113+
+ includeConfidenceScore
114+
+ '\''
115+
+ ", "
102116
+ "aiAgent='"
103117
+ aiAgent
104118
+ '\''
@@ -113,6 +127,8 @@ public static class Builder extends NullableFieldTracker {
113127

114128
protected List<AiExtractStructuredFieldsField> fields;
115129

130+
protected Boolean includeConfidenceScore;
131+
116132
protected AiExtractStructuredAgent aiAgent;
117133

118134
public Builder(List<AiItemBase> items) {
@@ -130,6 +146,11 @@ public Builder fields(List<AiExtractStructuredFieldsField> fields) {
130146
return this;
131147
}
132148

149+
public Builder includeConfidenceScore(Boolean includeConfidenceScore) {
150+
this.includeConfidenceScore = includeConfidenceScore;
151+
return this;
152+
}
153+
133154
public Builder aiAgent(AiAgentReference aiAgent) {
134155
this.aiAgent = new AiExtractStructuredAgent(aiAgent);
135156
return this;

src/main/java/com/box/sdkgen/schemas/aiextractstructuredresponse/AiExtractStructuredResponse.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ public class AiExtractStructuredResponse extends SerializableObject {
2828
@JsonProperty("completion_reason")
2929
protected String completionReason;
3030

31+
/**
32+
* The confidence score numeric values for each extracted field as a JSON dictionary. This can be
33+
* empty if no field could be extracted.
34+
*/
35+
@JsonProperty("confidence_score")
36+
protected Map<String, Object> confidenceScore;
37+
3138
@JsonProperty("ai_agent_info")
3239
protected AiAgentInfo aiAgentInfo;
3340

@@ -44,6 +51,7 @@ protected AiExtractStructuredResponse(Builder builder) {
4451
this.answer = builder.answer;
4552
this.createdAt = builder.createdAt;
4653
this.completionReason = builder.completionReason;
54+
this.confidenceScore = builder.confidenceScore;
4755
this.aiAgentInfo = builder.aiAgentInfo;
4856
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
4957
}
@@ -60,6 +68,10 @@ public String getCompletionReason() {
6068
return completionReason;
6169
}
6270

71+
public Map<String, Object> getConfidenceScore() {
72+
return confidenceScore;
73+
}
74+
6375
public AiAgentInfo getAiAgentInfo() {
6476
return aiAgentInfo;
6577
}
@@ -76,12 +88,13 @@ public boolean equals(Object o) {
7688
return Objects.equals(answer, casted.answer)
7789
&& Objects.equals(createdAt, casted.createdAt)
7890
&& Objects.equals(completionReason, casted.completionReason)
91+
&& Objects.equals(confidenceScore, casted.confidenceScore)
7992
&& Objects.equals(aiAgentInfo, casted.aiAgentInfo);
8093
}
8194

8295
@Override
8396
public int hashCode() {
84-
return Objects.hash(answer, createdAt, completionReason, aiAgentInfo);
97+
return Objects.hash(answer, createdAt, completionReason, confidenceScore, aiAgentInfo);
8598
}
8699

87100
@Override
@@ -99,6 +112,10 @@ public String toString() {
99112
+ completionReason
100113
+ '\''
101114
+ ", "
115+
+ "confidenceScore='"
116+
+ confidenceScore
117+
+ '\''
118+
+ ", "
102119
+ "aiAgentInfo='"
103120
+ aiAgentInfo
104121
+ '\''
@@ -113,6 +130,8 @@ public static class Builder extends NullableFieldTracker {
113130

114131
protected String completionReason;
115132

133+
protected Map<String, Object> confidenceScore;
134+
116135
protected AiAgentInfo aiAgentInfo;
117136

118137
public Builder(Map<String, Object> answer, OffsetDateTime createdAt) {
@@ -126,6 +145,11 @@ public Builder completionReason(String completionReason) {
126145
return this;
127146
}
128147

148+
public Builder confidenceScore(Map<String, Object> confidenceScore) {
149+
this.confidenceScore = confidenceScore;
150+
return this;
151+
}
152+
129153
public Builder aiAgentInfo(AiAgentInfo aiAgentInfo) {
130154
this.aiAgentInfo = aiAgentInfo;
131155
return this;

0 commit comments

Comments
 (0)