Class ContentBlockParam
-
- All Implemented Interfaces:
public final class ContentBlockParamRegular text content.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceContentBlockParam.VisitorAn interface that defines how to map each variant of ContentBlockParam to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<ServerToolUseBlockParam>serverToolUse()final Optional<WebSearchToolResultBlockParam>webSearchToolResult()final Optional<TextBlockParam>text()Regular text content. final Optional<ImageBlockParam>image()Image content specified directly as base64 data or as a reference via a URL. final Optional<ToolUseBlockParam>toolUse()A block indicating a tool use by the model. final Optional<ToolResultBlockParam>toolResult()A block specifying the results of a tool use by the model. final Optional<DocumentBlockParam>document()Document content, either specified directly as base64 data, as text, or as a reference via a URL. final Optional<ThinkingBlockParam>thinking()A block specifying internal thinking by the model. final Optional<RedactedThinkingBlockParam>redactedThinking()A block specifying internal, redacted thinking by the model. final BooleanisServerToolUse()final BooleanisWebSearchToolResult()final BooleanisText()final BooleanisImage()final BooleanisToolUse()final BooleanisToolResult()final BooleanisDocument()final BooleanisThinking()final BooleanisRedactedThinking()final ServerToolUseBlockParamasServerToolUse()final WebSearchToolResultBlockParamasWebSearchToolResult()final TextBlockParamasText()Regular text content. final ImageBlockParamasImage()Image content specified directly as base64 data or as a reference via a URL. final ToolUseBlockParamasToolUse()A block indicating a tool use by the model. final ToolResultBlockParamasToolResult()A block specifying the results of a tool use by the model. final DocumentBlockParamasDocument()Document content, either specified directly as base64 data, as text, or as a reference via a URL. final ThinkingBlockParamasThinking()A block specifying internal thinking by the model. final RedactedThinkingBlockParamasRedactedThinking()A block specifying internal, redacted thinking by the model. final Optional<JsonValue>_json()final <T extends Any> Taccept(ContentBlockParam.Visitor<T> visitor)final ContentBlockParamvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ContentBlockParamofServerToolUse(ServerToolUseBlockParam serverToolUse)final static ContentBlockParamofWebSearchToolResult(WebSearchToolResultBlockParam webSearchToolResult)final static ContentBlockParamofText(TextBlockParam text)Regular text content. final static ContentBlockParamofImage(ImageBlockParam image)Image content specified directly as base64 data or as a reference via a URL. final static ContentBlockParamofToolUse(ToolUseBlockParam toolUse)A block indicating a tool use by the model. final static ContentBlockParamofToolResult(ToolResultBlockParam toolResult)A block specifying the results of a tool use by the model. final static ContentBlockParamofDocument(DocumentBlockParam document)Document content, either specified directly as base64 data, as text, or as a reference via a URL. final static ContentBlockParamofThinking(ThinkingBlockParam thinking)A block specifying internal thinking by the model. final static ContentBlockParamofRedactedThinking(RedactedThinkingBlockParam redactedThinking)A block specifying internal, redacted thinking by the model. -
-
Method Detail
-
serverToolUse
final Optional<ServerToolUseBlockParam> serverToolUse()
-
webSearchToolResult
final Optional<WebSearchToolResultBlockParam> webSearchToolResult()
-
text
final Optional<TextBlockParam> text()
Regular text content.
-
image
final Optional<ImageBlockParam> image()
Image content specified directly as base64 data or as a reference via a URL.
-
toolUse
final Optional<ToolUseBlockParam> toolUse()
A block indicating a tool use by the model.
-
toolResult
final Optional<ToolResultBlockParam> toolResult()
A block specifying the results of a tool use by the model.
-
document
final Optional<DocumentBlockParam> document()
Document content, either specified directly as base64 data, as text, or as a reference via a URL.
-
thinking
final Optional<ThinkingBlockParam> thinking()
A block specifying internal thinking by the model.
-
redactedThinking
final Optional<RedactedThinkingBlockParam> redactedThinking()
A block specifying internal, redacted thinking by the model.
-
isServerToolUse
final Boolean isServerToolUse()
-
isWebSearchToolResult
final Boolean isWebSearchToolResult()
-
isToolResult
final Boolean isToolResult()
-
isDocument
final Boolean isDocument()
-
isThinking
final Boolean isThinking()
-
isRedactedThinking
final Boolean isRedactedThinking()
-
asServerToolUse
final ServerToolUseBlockParam asServerToolUse()
-
asWebSearchToolResult
final WebSearchToolResultBlockParam asWebSearchToolResult()
-
asText
final TextBlockParam asText()
Regular text content.
-
asImage
final ImageBlockParam asImage()
Image content specified directly as base64 data or as a reference via a URL.
-
asToolUse
final ToolUseBlockParam asToolUse()
A block indicating a tool use by the model.
-
asToolResult
final ToolResultBlockParam asToolResult()
A block specifying the results of a tool use by the model.
-
asDocument
final DocumentBlockParam asDocument()
Document content, either specified directly as base64 data, as text, or as a reference via a URL.
-
asThinking
final ThinkingBlockParam asThinking()
A block specifying internal thinking by the model.
-
asRedactedThinking
final RedactedThinkingBlockParam asRedactedThinking()
A block specifying internal, redacted thinking by the model.
-
accept
final <T extends Any> T accept(ContentBlockParam.Visitor<T> visitor)
-
validate
final ContentBlockParam validate()
-
ofServerToolUse
final static ContentBlockParam ofServerToolUse(ServerToolUseBlockParam serverToolUse)
-
ofWebSearchToolResult
final static ContentBlockParam ofWebSearchToolResult(WebSearchToolResultBlockParam webSearchToolResult)
-
ofText
final static ContentBlockParam ofText(TextBlockParam text)
Regular text content.
-
ofImage
final static ContentBlockParam ofImage(ImageBlockParam image)
Image content specified directly as base64 data or as a reference via a URL.
-
ofToolUse
final static ContentBlockParam ofToolUse(ToolUseBlockParam toolUse)
A block indicating a tool use by the model.
-
ofToolResult
final static ContentBlockParam ofToolResult(ToolResultBlockParam toolResult)
A block specifying the results of a tool use by the model.
-
ofDocument
final static ContentBlockParam ofDocument(DocumentBlockParam document)
Document content, either specified directly as base64 data, as text, or as a reference via a URL.
-
ofThinking
final static ContentBlockParam ofThinking(ThinkingBlockParam thinking)
A block specifying internal thinking by the model.
-
ofRedactedThinking
final static ContentBlockParam ofRedactedThinking(RedactedThinkingBlockParam redactedThinking)
A block specifying internal, redacted thinking by the model.
-
-
-
-