Package com.anthropic.models.messages
Class ContentBlock
-
- All Implemented Interfaces:
public final class ContentBlock
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceContentBlock.VisitorAn interface that defines how to map each variant of ContentBlock to a value of type T.
-
Method Summary
-
-
Method Detail
-
toParam
final ContentBlockParam toParam()
-
toolUse
final Optional<ToolUseBlock> toolUse()
-
serverToolUse
final Optional<ServerToolUseBlock> serverToolUse()
-
webSearchToolResult
final Optional<WebSearchToolResultBlock> webSearchToolResult()
-
thinking
final Optional<ThinkingBlock> thinking()
-
redactedThinking
final Optional<RedactedThinkingBlock> redactedThinking()
-
isServerToolUse
final Boolean isServerToolUse()
-
isWebSearchToolResult
final Boolean isWebSearchToolResult()
-
isThinking
final Boolean isThinking()
-
isRedactedThinking
final Boolean isRedactedThinking()
-
asToolUse
final ToolUseBlock asToolUse()
-
asServerToolUse
final ServerToolUseBlock asServerToolUse()
-
asWebSearchToolResult
final WebSearchToolResultBlock asWebSearchToolResult()
-
asThinking
final ThinkingBlock asThinking()
-
asRedactedThinking
final RedactedThinkingBlock asRedactedThinking()
-
accept
final <T extends Any> T accept(ContentBlock.Visitor<T> visitor)
-
validate
final ContentBlock validate()
-
ofText
final static ContentBlock ofText(TextBlock text)
-
ofToolUse
final static ContentBlock ofToolUse(ToolUseBlock toolUse)
-
ofServerToolUse
final static ContentBlock ofServerToolUse(ServerToolUseBlock serverToolUse)
-
ofWebSearchToolResult
final static ContentBlock ofWebSearchToolResult(WebSearchToolResultBlock webSearchToolResult)
-
ofThinking
final static ContentBlock ofThinking(ThinkingBlock thinking)
-
ofRedactedThinking
final static ContentBlock ofRedactedThinking(RedactedThinkingBlock redactedThinking)
-
-
-
-