-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update /ai/extract_structured response schema (box/box-openapi#505
- Loading branch information
1 parent
c2e3a60
commit d6ad69f
Showing
5 changed files
with
133 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ "engineHash": "cf82faa", "specHash": "3dc3f1e", "version": "0.3.0" } | ||
{ "engineHash": "cf82faa", "specHash": "1fdcbef", "version": "0.3.0" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 124 additions & 0 deletions
124
.../java/com/box/sdkgen/schemas/aiextractstructuredresponse/AiExtractStructuredResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
package com.box.sdkgen.schemas.aiextractstructuredresponse; | ||
|
||
import com.box.sdkgen.internal.SerializableObject; | ||
import com.box.sdkgen.schemas.aiagentinfo.AiAgentInfo; | ||
import com.box.sdkgen.schemas.aiextractresponse.AiExtractResponse; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.Objects; | ||
|
||
public class AiExtractStructuredResponse extends SerializableObject { | ||
|
||
protected final AiExtractResponse answer; | ||
|
||
@JsonProperty("created_at") | ||
protected final String createdAt; | ||
|
||
@JsonProperty("completion_reason") | ||
protected String completionReason; | ||
|
||
@JsonProperty("ai_agent_info") | ||
protected AiAgentInfo aiAgentInfo; | ||
|
||
public AiExtractStructuredResponse( | ||
@JsonProperty("answer") AiExtractResponse answer, | ||
@JsonProperty("created_at") String createdAt) { | ||
super(); | ||
this.answer = answer; | ||
this.createdAt = createdAt; | ||
} | ||
|
||
protected AiExtractStructuredResponse(AiExtractStructuredResponseBuilder builder) { | ||
super(); | ||
this.answer = builder.answer; | ||
this.createdAt = builder.createdAt; | ||
this.completionReason = builder.completionReason; | ||
this.aiAgentInfo = builder.aiAgentInfo; | ||
} | ||
|
||
public AiExtractResponse getAnswer() { | ||
return answer; | ||
} | ||
|
||
public String getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public String getCompletionReason() { | ||
return completionReason; | ||
} | ||
|
||
public AiAgentInfo getAiAgentInfo() { | ||
return aiAgentInfo; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
AiExtractStructuredResponse casted = (AiExtractStructuredResponse) o; | ||
return Objects.equals(answer, casted.answer) | ||
&& Objects.equals(createdAt, casted.createdAt) | ||
&& Objects.equals(completionReason, casted.completionReason) | ||
&& Objects.equals(aiAgentInfo, casted.aiAgentInfo); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(answer, createdAt, completionReason, aiAgentInfo); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "AiExtractStructuredResponse{" | ||
+ "answer='" | ||
+ answer | ||
+ '\'' | ||
+ ", " | ||
+ "createdAt='" | ||
+ createdAt | ||
+ '\'' | ||
+ ", " | ||
+ "completionReason='" | ||
+ completionReason | ||
+ '\'' | ||
+ ", " | ||
+ "aiAgentInfo='" | ||
+ aiAgentInfo | ||
+ '\'' | ||
+ "}"; | ||
} | ||
|
||
public static class AiExtractStructuredResponseBuilder { | ||
|
||
protected final AiExtractResponse answer; | ||
|
||
protected final String createdAt; | ||
|
||
protected String completionReason; | ||
|
||
protected AiAgentInfo aiAgentInfo; | ||
|
||
public AiExtractStructuredResponseBuilder(AiExtractResponse answer, String createdAt) { | ||
this.answer = answer; | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public AiExtractStructuredResponseBuilder completionReason(String completionReason) { | ||
this.completionReason = completionReason; | ||
return this; | ||
} | ||
|
||
public AiExtractStructuredResponseBuilder aiAgentInfo(AiAgentInfo aiAgentInfo) { | ||
this.aiAgentInfo = aiAgentInfo; | ||
return this; | ||
} | ||
|
||
public AiExtractStructuredResponse build() { | ||
return new AiExtractStructuredResponse(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters