Class BetaCompactedResponse.Builder
-
- All Implemented Interfaces:
public final class BetaCompactedResponse.BuilderA builder for BetaCompactedResponse.
-
-
Method Summary
Modifier and Type Method Description final BetaCompactedResponse.Builderid(String id)The unique identifier for the compacted response. final BetaCompactedResponse.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final BetaCompactedResponse.BuildercreatedAt(Long createdAt)Unix timestamp (in seconds) when the compacted conversation was created. final BetaCompactedResponse.BuildercreatedAt(JsonField<Long> createdAt)Sets Builder.createdAt to an arbitrary JSON value. final BetaCompactedResponse.Builderobject_(JsonValue object_)Sets the field to an arbitrary JSON value. final BetaCompactedResponse.Builderoutput(List<BetaResponseOutputItem> output)The compacted list of output items. final BetaCompactedResponse.Builderoutput(JsonField<List<BetaResponseOutputItem>> output)Sets Builder.output to an arbitrary JSON value. final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem output)Adds a single BetaResponseOutputItem to Builder.output. final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputMessage message)Alias for calling addOutput with BetaResponseOutputItem.ofMessage(message).final BetaCompactedResponse.BuilderaddOutput(BetaResponseFileSearchToolCall fileSearchCall)Alias for calling addOutput with BetaResponseOutputItem.ofFileSearchCall(fileSearchCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseFunctionToolCall functionCall)Alias for calling addOutput with BetaResponseOutputItem.ofFunctionCall(functionCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseFunctionToolCallOutputItem functionCallOutput)Alias for calling addOutput with BetaResponseOutputItem.ofFunctionCallOutput(functionCallOutput).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.AgentMessage agentMessage)Alias for calling addOutput with BetaResponseOutputItem.ofAgentMessage(agentMessage).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.MultiAgentCall multiAgentCall)Alias for calling addOutput with BetaResponseOutputItem.ofMultiAgentCall(multiAgentCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.MultiAgentCallOutput multiAgentCallOutput)Alias for calling addOutput with BetaResponseOutputItem.ofMultiAgentCallOutput(multiAgentCallOutput).final BetaCompactedResponse.BuilderaddOutput(BetaResponseFunctionWebSearch webSearchCall)Alias for calling addOutput with BetaResponseOutputItem.ofWebSearchCall(webSearchCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseComputerToolCall computerCall)Alias for calling addOutput with BetaResponseOutputItem.ofComputerCall(computerCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseComputerToolCallOutputItem computerCallOutput)Alias for calling addOutput with BetaResponseOutputItem.ofComputerCallOutput(computerCallOutput).final BetaCompactedResponse.BuilderaddOutput(BetaResponseReasoningItem reasoning)Alias for calling addOutput with BetaResponseOutputItem.ofReasoning(reasoning).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.Program program)Alias for calling addOutput with BetaResponseOutputItem.ofProgram(program).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.ProgramOutput programOutput)Alias for calling addOutput with BetaResponseOutputItem.ofProgramOutput(programOutput).final BetaCompactedResponse.BuilderaddOutput(BetaResponseToolSearchCall toolSearchCall)Alias for calling addOutput with BetaResponseOutputItem.ofToolSearchCall(toolSearchCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseToolSearchOutputItem toolSearchOutput)Alias for calling addOutput with BetaResponseOutputItem.ofToolSearchOutput(toolSearchOutput).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.AdditionalTools additionalTools)Alias for calling addOutput with BetaResponseOutputItem.ofAdditionalTools(additionalTools).final BetaCompactedResponse.BuilderaddOutput(BetaResponseCompactionItem compaction)Alias for calling addOutput with BetaResponseOutputItem.ofCompaction(compaction).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.ImageGenerationCall imageGenerationCall)Alias for calling addOutput with BetaResponseOutputItem.ofImageGenerationCall(imageGenerationCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseCodeInterpreterToolCall codeInterpreterCall)Alias for calling addOutput with BetaResponseOutputItem.ofCodeInterpreterCall(codeInterpreterCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.LocalShellCall localShellCall)Alias for calling addOutput with BetaResponseOutputItem.ofLocalShellCall(localShellCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.LocalShellCallOutput localShellCallOutput)Alias for calling addOutput with BetaResponseOutputItem.ofLocalShellCallOutput(localShellCallOutput).final BetaCompactedResponse.BuilderaddOutput(BetaResponseFunctionShellToolCall shellCall)Alias for calling addOutput with BetaResponseOutputItem.ofShellCall(shellCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseFunctionShellToolCallOutput shellCallOutput)Alias for calling addOutput with BetaResponseOutputItem.ofShellCallOutput(shellCallOutput).final BetaCompactedResponse.BuilderaddOutput(BetaResponseApplyPatchToolCall applyPatchCall)Alias for calling addOutput with BetaResponseOutputItem.ofApplyPatchCall(applyPatchCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseApplyPatchToolCallOutput applyPatchCallOutput)Alias for calling addOutput with BetaResponseOutputItem.ofApplyPatchCallOutput(applyPatchCallOutput).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.McpCall mcpCall)Alias for calling addOutput with BetaResponseOutputItem.ofMcpCall(mcpCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.McpListTools mcpListTools)Alias for calling addOutput with BetaResponseOutputItem.ofMcpListTools(mcpListTools).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.McpApprovalRequest mcpApprovalRequest)Alias for calling addOutput with BetaResponseOutputItem.ofMcpApprovalRequest(mcpApprovalRequest).final BetaCompactedResponse.BuilderaddOutput(BetaResponseOutputItem.McpApprovalResponse mcpApprovalResponse)Alias for calling addOutput with BetaResponseOutputItem.ofMcpApprovalResponse(mcpApprovalResponse).final BetaCompactedResponse.BuilderaddOutput(BetaResponseCustomToolCall customToolCall)Alias for calling addOutput with BetaResponseOutputItem.ofCustomToolCall(customToolCall).final BetaCompactedResponse.BuilderaddOutput(BetaResponseCustomToolCallOutputItem customToolCallOutput)Alias for calling addOutput with BetaResponseOutputItem.ofCustomToolCallOutput(customToolCallOutput).final BetaCompactedResponse.Builderusage(BetaResponseUsage usage)Token accounting for the compaction pass, including cached, reasoning, and total tokens. final BetaCompactedResponse.Builderusage(JsonField<BetaResponseUsage> usage)Sets Builder.usage to an arbitrary JSON value. final BetaCompactedResponse.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final BetaCompactedResponse.BuilderputAdditionalProperty(String key, JsonValue value)final BetaCompactedResponse.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final BetaCompactedResponse.BuilderremoveAdditionalProperty(String key)final BetaCompactedResponse.BuilderremoveAllAdditionalProperties(Set<String> keys)final BetaCompactedResponsebuild()Returns an immutable instance of BetaCompactedResponse. -
-
Method Detail
-
id
final BetaCompactedResponse.Builder id(String id)
The unique identifier for the compacted response.
-
id
final BetaCompactedResponse.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
createdAt
final BetaCompactedResponse.Builder createdAt(Long createdAt)
Unix timestamp (in seconds) when the compacted conversation was created.
-
createdAt
final BetaCompactedResponse.Builder createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value.
You should usually call Builder.createdAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
object_
final BetaCompactedResponse.Builder object_(JsonValue object_)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("response.compaction")This method is primarily for setting the field to an undocumented or not yet supported value.
-
output
final BetaCompactedResponse.Builder output(List<BetaResponseOutputItem> output)
The compacted list of output items. This is a list of all user messages, followed by a single compaction item.
-
output
final BetaCompactedResponse.Builder output(JsonField<List<BetaResponseOutputItem>> output)
Sets Builder.output to an arbitrary JSON value.
You should usually call Builder.output with a well-typed
List<BetaResponseOutputItem>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem output)
Adds a single BetaResponseOutputItem to Builder.output.
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputMessage message)
Alias for calling addOutput with
BetaResponseOutputItem.ofMessage(message).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseFileSearchToolCall fileSearchCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofFileSearchCall(fileSearchCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseFunctionToolCall functionCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofFunctionCall(functionCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseFunctionToolCallOutputItem functionCallOutput)
Alias for calling addOutput with
BetaResponseOutputItem.ofFunctionCallOutput(functionCallOutput).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.AgentMessage agentMessage)
Alias for calling addOutput with
BetaResponseOutputItem.ofAgentMessage(agentMessage).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.MultiAgentCall multiAgentCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofMultiAgentCall(multiAgentCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.MultiAgentCallOutput multiAgentCallOutput)
Alias for calling addOutput with
BetaResponseOutputItem.ofMultiAgentCallOutput(multiAgentCallOutput).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseFunctionWebSearch webSearchCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofWebSearchCall(webSearchCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseComputerToolCall computerCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofComputerCall(computerCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseComputerToolCallOutputItem computerCallOutput)
Alias for calling addOutput with
BetaResponseOutputItem.ofComputerCallOutput(computerCallOutput).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseReasoningItem reasoning)
Alias for calling addOutput with
BetaResponseOutputItem.ofReasoning(reasoning).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.Program program)
Alias for calling addOutput with
BetaResponseOutputItem.ofProgram(program).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.ProgramOutput programOutput)
Alias for calling addOutput with
BetaResponseOutputItem.ofProgramOutput(programOutput).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseToolSearchCall toolSearchCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofToolSearchCall(toolSearchCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseToolSearchOutputItem toolSearchOutput)
Alias for calling addOutput with
BetaResponseOutputItem.ofToolSearchOutput(toolSearchOutput).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.AdditionalTools additionalTools)
Alias for calling addOutput with
BetaResponseOutputItem.ofAdditionalTools(additionalTools).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseCompactionItem compaction)
Alias for calling addOutput with
BetaResponseOutputItem.ofCompaction(compaction).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.ImageGenerationCall imageGenerationCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofImageGenerationCall(imageGenerationCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseCodeInterpreterToolCall codeInterpreterCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofCodeInterpreterCall(codeInterpreterCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.LocalShellCall localShellCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofLocalShellCall(localShellCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.LocalShellCallOutput localShellCallOutput)
Alias for calling addOutput with
BetaResponseOutputItem.ofLocalShellCallOutput(localShellCallOutput).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseFunctionShellToolCall shellCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofShellCall(shellCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseFunctionShellToolCallOutput shellCallOutput)
Alias for calling addOutput with
BetaResponseOutputItem.ofShellCallOutput(shellCallOutput).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseApplyPatchToolCall applyPatchCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofApplyPatchCall(applyPatchCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseApplyPatchToolCallOutput applyPatchCallOutput)
Alias for calling addOutput with
BetaResponseOutputItem.ofApplyPatchCallOutput(applyPatchCallOutput).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.McpCall mcpCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofMcpCall(mcpCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.McpListTools mcpListTools)
Alias for calling addOutput with
BetaResponseOutputItem.ofMcpListTools(mcpListTools).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.McpApprovalRequest mcpApprovalRequest)
Alias for calling addOutput with
BetaResponseOutputItem.ofMcpApprovalRequest(mcpApprovalRequest).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseOutputItem.McpApprovalResponse mcpApprovalResponse)
Alias for calling addOutput with
BetaResponseOutputItem.ofMcpApprovalResponse(mcpApprovalResponse).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseCustomToolCall customToolCall)
Alias for calling addOutput with
BetaResponseOutputItem.ofCustomToolCall(customToolCall).
-
addOutput
final BetaCompactedResponse.Builder addOutput(BetaResponseCustomToolCallOutputItem customToolCallOutput)
Alias for calling addOutput with
BetaResponseOutputItem.ofCustomToolCallOutput(customToolCallOutput).
-
usage
final BetaCompactedResponse.Builder usage(BetaResponseUsage usage)
Token accounting for the compaction pass, including cached, reasoning, and total tokens.
-
usage
final BetaCompactedResponse.Builder usage(JsonField<BetaResponseUsage> usage)
Sets Builder.usage to an arbitrary JSON value.
You should usually call Builder.usage with a well-typed BetaResponseUsage value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaCompactedResponse.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaCompactedResponse.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaCompactedResponse.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaCompactedResponse.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaCompactedResponse.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaCompactedResponse build()
Returns an immutable instance of BetaCompactedResponse.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .createdAt() .output() .usage()
-
-
-
-