Interface BetaContentBlockParam.Visitor
-
- All Implemented Interfaces:
public interface BetaContentBlockParam.Visitor<T extends Object>An interface that defines how to map each variant of BetaContentBlockParam to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitServerToolUse(BetaServerToolUseBlockParam serverToolUse)abstract TvisitWebSearchToolResult(BetaWebSearchToolResultBlockParam webSearchToolResult)abstract TvisitCodeExecutionToolResult(BetaCodeExecutionToolResultBlockParam codeExecutionToolResult)abstract TvisitMcpToolUse(BetaMcpToolUseBlockParam mcpToolUse)abstract TvisitMcpToolResult(BetaRequestMcpToolResultBlockParam mcpToolResult)abstract TvisitText(BetaTextBlockParam text)Regular text content. abstract TvisitImage(BetaImageBlockParam image)Image content specified directly as base64 data or as a reference via a URL. abstract TvisitToolUse(BetaToolUseBlockParam toolUse)A block indicating a tool use by the model. abstract TvisitToolResult(BetaToolResultBlockParam toolResult)A block specifying the results of a tool use by the model. abstract TvisitDocument(BetaRequestDocumentBlock document)Document content, either specified directly as base64 data, as text, or as a reference via a URL. abstract TvisitThinking(BetaThinkingBlockParam thinking)A block specifying internal thinking by the model. abstract TvisitRedactedThinking(BetaRedactedThinkingBlockParam redactedThinking)A block specifying internal, redacted thinking by the model. abstract TvisitContainerUpload(BetaContainerUploadBlockParam containerUpload)A content block that represents a file to be uploaded to the container Files uploaded via this block will be available in the container's input directory. Tunknown(JsonValue json)Maps an unknown variant of BetaContentBlockParam to a value of type T. -
-
Method Detail
-
visitServerToolUse
abstract T visitServerToolUse(BetaServerToolUseBlockParam serverToolUse)
-
visitWebSearchToolResult
abstract T visitWebSearchToolResult(BetaWebSearchToolResultBlockParam webSearchToolResult)
-
visitCodeExecutionToolResult
abstract T visitCodeExecutionToolResult(BetaCodeExecutionToolResultBlockParam codeExecutionToolResult)
-
visitMcpToolUse
abstract T visitMcpToolUse(BetaMcpToolUseBlockParam mcpToolUse)
-
visitMcpToolResult
abstract T visitMcpToolResult(BetaRequestMcpToolResultBlockParam mcpToolResult)
-
visitText
abstract T visitText(BetaTextBlockParam text)
Regular text content.
-
visitImage
abstract T visitImage(BetaImageBlockParam image)
Image content specified directly as base64 data or as a reference via a URL.
-
visitToolUse
abstract T visitToolUse(BetaToolUseBlockParam toolUse)
A block indicating a tool use by the model.
-
visitToolResult
abstract T visitToolResult(BetaToolResultBlockParam toolResult)
A block specifying the results of a tool use by the model.
-
visitDocument
abstract T visitDocument(BetaRequestDocumentBlock document)
Document content, either specified directly as base64 data, as text, or as a reference via a URL.
-
visitThinking
abstract T visitThinking(BetaThinkingBlockParam thinking)
A block specifying internal thinking by the model.
-
visitRedactedThinking
abstract T visitRedactedThinking(BetaRedactedThinkingBlockParam redactedThinking)
A block specifying internal, redacted thinking by the model.
-
visitContainerUpload
abstract T visitContainerUpload(BetaContainerUploadBlockParam containerUpload)
A content block that represents a file to be uploaded to the container Files uploaded via this block will be available in the container's input directory.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of BetaContentBlockParam to a value of type T.
An instance of BetaContentBlockParam can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-