Skip to content
Merged
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": "c571efa", "specHash": "f899bf6", "version": "5.9.0" }
{ "engineHash": "c571efa", "specHash": "65c9c57", "version": "5.9.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void testUseAiAgentReferenceInAiAsk() {
new AiItemAsk.Builder(fileToAsk.getId(), AiItemAskTypeField.FILE)
.content("The Sun rises in the east.")
.build()))
.aiAgent(new AiAgentReference.Builder().id(createdAgent.getId()).build())
.aiAgent(new AiAgentReference(createdAgent.getId()))
.build());
assert response.getAnswer().contains("east");
assert response.getCompletionReason().equals("done");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
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;
Expand All @@ -23,10 +24,11 @@ public class AiAgentReference extends SerializableObject {
* Extract
* Agent](https://developer.box.com/guides/box-ai/ai-tutorials/extract-metadata-structured#enhanced-extract-agent)).
*/
protected String id;
protected final String id;

public AiAgentReference() {
public AiAgentReference(@JsonProperty("id") String id) {
super();
this.id = id;
this.type = new EnumWrapper<AiAgentReferenceTypeField>(AiAgentReferenceTypeField.AI_AGENT_ID);
}

Expand Down Expand Up @@ -71,10 +73,11 @@ public static class Builder extends NullableFieldTracker {

protected EnumWrapper<AiAgentReferenceTypeField> type;

protected String id;
protected final String id;

public Builder() {
public Builder(String id) {
super();
this.id = id;
}

public Builder type(AiAgentReferenceTypeField type) {
Expand All @@ -87,11 +90,6 @@ public Builder type(EnumWrapper<AiAgentReferenceTypeField> type) {
return this;
}

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

public AiAgentReference build() {
if (this.type == null) {
this.type =
Expand Down
Loading