Package com.anthropic.models
Class BetaContentBlock
-
- All Implemented Interfaces:
public final class BetaContentBlock
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaContentBlock.VisitorAn interface that defines how to map each variant of BetaContentBlock to a value of type T.
-
Method Summary
Modifier and Type Method Description final BetaContentBlockParamtoParam()final Optional<BetaTextBlock>text()final Optional<BetaToolUseBlock>toolUse()final BooleanisText()final BooleanisToolUse()final BetaTextBlockasText()final BetaToolUseBlockasToolUse()final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaContentBlock.Visitor<T> visitor)final BetaContentBlockvalidate()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaContentBlockofText(BetaTextBlock text)final static BetaContentBlockofToolUse(BetaToolUseBlock toolUse)-
-
Method Detail
-
toParam
final BetaContentBlockParam toParam()
-
text
final Optional<BetaTextBlock> text()
-
toolUse
final Optional<BetaToolUseBlock> toolUse()
-
asText
final BetaTextBlock asText()
-
asToolUse
final BetaToolUseBlock asToolUse()
-
accept
final <T extends Any> T accept(BetaContentBlock.Visitor<T> visitor)
-
validate
final BetaContentBlock validate()
-
ofText
final static BetaContentBlock ofText(BetaTextBlock text)
-
ofToolUse
final static BetaContentBlock ofToolUse(BetaToolUseBlock toolUse)
-
-
-
-