Class BetaToolUseBlock
-
- All Implemented Interfaces:
public final class BetaToolUseBlock
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaToolUseBlock.BuilderA builder for BetaToolUseBlock.
public final classBetaToolUseBlock.Inputpublic final classBetaToolUseBlock.Caller
-
Method Summary
Modifier and Type Method Description final Stringid()final <T extends Any> Tinput(Class<T> parametersType)Gets the input parameters to the tool use invocation, converting the values from the model in JSON format to an instance of a class that holds those values. final Stringname()final Optional<BetaToolUseBlock.Caller>caller()final Optional<String>toolsetName()For a toolset member tool_use, the toolset family. final BetaToolUseBlockParamtoParam()final JsonValue_input()final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("tool_use")final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<BetaToolUseBlock.Caller>_caller()Returns the raw JSON value of caller. final JsonField<String>_toolsetName()Returns the raw JSON value of toolsetName. final Map<String, JsonValue>_additionalProperties()final BetaToolUseBlock.BuildertoBuilder()final BetaToolUseBlockvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaToolUseBlock.Builderbuilder()Returns a mutable builder for constructing an instance of BetaToolUseBlock. -
-
Method Detail
-
input
final <T extends Any> T input(Class<T> parametersType)
Gets the input parameters to the tool use invocation, converting the values from the model in JSON format to an instance of a class that holds those values. The class must previously have been used to define the JSON schema for the tool use definition, so that the JSON corresponds to the structure of the given class.
-
caller
final Optional<BetaToolUseBlock.Caller> caller()
-
toolsetName
final Optional<String> toolsetName()
For a toolset member tool_use, the toolset family.
-
toParam
final BetaToolUseBlockParam toParam()
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("tool_use")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_caller
final JsonField<BetaToolUseBlock.Caller> _caller()
Returns the raw JSON value of caller.
Unlike caller, this method doesn't throw if the JSON field has an unexpected type.
-
_toolsetName
final JsonField<String> _toolsetName()
Returns the raw JSON value of toolsetName.
Unlike toolsetName, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaToolUseBlock.Builder toBuilder()
-
validate
final BetaToolUseBlock validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaToolUseBlock.Builder builder()
Returns a mutable builder for constructing an instance of BetaToolUseBlock.
The following fields are required:
.id() .input() .name()
-
-
-
-