Interface BetaSystemMessageParam.Content.SystemMessageContentBlock.Visitor
-
- All Implemented Interfaces:
public interface BetaSystemMessageParam.Content.SystemMessageContentBlock.Visitor<T extends Object>An interface that defines how to map each variant of SystemMessageContentBlock to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitText(BetaTextBlockParam text)abstract TvisitToolAddition(BetaRequestToolAdditionBlock toolAddition)Mid-conversation directive to make a tool available. abstract TvisitToolRemoval(BetaRequestToolRemovalBlock toolRemoval)Mid-conversation directive to withdraw a tool. Tunknown(JsonValue json)Maps an unknown variant of SystemMessageContentBlock to a value of type T. -
-
Method Detail
-
visitText
abstract T visitText(BetaTextBlockParam text)
-
visitToolAddition
abstract T visitToolAddition(BetaRequestToolAdditionBlock toolAddition)
Mid-conversation directive to make a tool available.
`tool`is a reference to a tool (or MCP toolset) declared in the request's`tools`. Under the`inline-tools-2026-09-15`beta it may instead be a reference to a tool defined earlier in`messages`, or a`tool_definition`object that carries an inline tool definition in`definition`(the same object a`tools`entry holds). An`mcp_toolset`definition also requires the`mcp-client-2026-09-15`beta. The tool is offered to the model from this point in the conversation onward.
-
visitToolRemoval
abstract T visitToolRemoval(BetaRequestToolRemovalBlock toolRemoval)
Mid-conversation directive to withdraw a tool.
`tool`references a tool (or MCP toolset) by name: one declared in the request's`tools`or defined earlier in`messages`. It is no longer offered to the model from this point in the conversation onward.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of SystemMessageContentBlock to a value of type T.
An instance of SystemMessageContentBlock 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.
-
-
-
-