File tree Expand file tree Collapse file tree
intTest/java/com/box/sdkgen/aistudio
main/java/com/box/sdkgen/schemas/aiagentreference Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- { "engineHash" : " c571efa" , "specHash" : " f899bf6 " , "version" : " 5.9.0" }
1+ { "engineHash" : " c571efa" , "specHash" : " 65c9c57 " , "version" : " 5.9.0" }
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ public void testUseAiAgentReferenceInAiAsk() {
8787 new AiItemAsk .Builder (fileToAsk .getId (), AiItemAskTypeField .FILE )
8888 .content ("The Sun rises in the east." )
8989 .build ()))
90- .aiAgent (new AiAgentReference . Builder (). id ( createdAgent .getId ()). build ( ))
90+ .aiAgent (new AiAgentReference ( createdAgent .getId ()))
9191 .build ());
9292 assert response .getAnswer ().contains ("east" );
9393 assert response .getCompletionReason ().equals ("done" );
Original file line number Diff line number Diff line change 44import com .box .sdkgen .internal .SerializableObject ;
55import com .box .sdkgen .serialization .json .EnumWrapper ;
66import com .fasterxml .jackson .annotation .JsonFilter ;
7+ import com .fasterxml .jackson .annotation .JsonProperty ;
78import com .fasterxml .jackson .databind .annotation .JsonDeserialize ;
89import com .fasterxml .jackson .databind .annotation .JsonSerialize ;
910import java .util .Objects ;
@@ -23,10 +24,11 @@ public class AiAgentReference extends SerializableObject {
2324 * Extract
2425 * Agent](https://developer.box.com/guides/box-ai/ai-tutorials/extract-metadata-structured#enhanced-extract-agent)).
2526 */
26- protected String id ;
27+ protected final String id ;
2728
28- public AiAgentReference () {
29+ public AiAgentReference (@ JsonProperty ( "id" ) String id ) {
2930 super ();
31+ this .id = id ;
3032 this .type = new EnumWrapper <AiAgentReferenceTypeField >(AiAgentReferenceTypeField .AI_AGENT_ID );
3133 }
3234
@@ -71,10 +73,11 @@ public static class Builder extends NullableFieldTracker {
7173
7274 protected EnumWrapper <AiAgentReferenceTypeField > type ;
7375
74- protected String id ;
76+ protected final String id ;
7577
76- public Builder () {
78+ public Builder (String id ) {
7779 super ();
80+ this .id = id ;
7881 }
7982
8083 public Builder type (AiAgentReferenceTypeField type ) {
@@ -87,11 +90,6 @@ public Builder type(EnumWrapper<AiAgentReferenceTypeField> type) {
8790 return this ;
8891 }
8992
90- public Builder id (String id ) {
91- this .id = id ;
92- return this ;
93- }
94-
9593 public AiAgentReference build () {
9694 if (this .type == null ) {
9795 this .type =
You can’t perform that action at this time.
0 commit comments