Class ToolUseBlock.Builder
-
- All Implemented Interfaces:
public final class ToolUseBlock.BuilderA builder for ToolUseBlock.
-
-
Method Summary
Modifier and Type Method Description final ToolUseBlock.Builderid(String id)final ToolUseBlock.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final ToolUseBlock.Buildercaller(ToolUseBlock.Caller caller)Tool invocation directly from the model. final ToolUseBlock.Buildercaller(JsonField<ToolUseBlock.Caller> caller)Sets Builder.caller to an arbitrary JSON value. final ToolUseBlock.Buildercaller(DirectCaller direct)Alias for calling caller with Caller.ofDirect(direct).final ToolUseBlock.Buildercaller(ServerToolCaller codeExecution20250825)Alias for calling caller with Caller.ofCodeExecution20250825(codeExecution20250825).final ToolUseBlock.Buildercaller(ServerToolCaller20260120 codeExecution20260120)Alias for calling caller with Caller.ofCodeExecution20260120(codeExecution20260120).final ToolUseBlock.BuildercodeExecution20250825Caller(String toolId)Alias for calling caller with the following: ServerToolCaller.builder() .toolId(toolId) .build()final ToolUseBlock.BuildercodeExecution20260120Caller(String toolId)Alias for calling caller with the following: ServerToolCaller20260120.builder() .toolId(toolId) .build()final ToolUseBlock.Builderinput(JsonValue input)Sets Builder.input to an arbitrary JSON value. final ToolUseBlock.Buildername(String name)final ToolUseBlock.Buildername(JsonField<String> name)Sets Builder.name to an arbitrary JSON value. final ToolUseBlock.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final ToolUseBlock.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final ToolUseBlock.BuilderputAdditionalProperty(String key, JsonValue value)final ToolUseBlock.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final ToolUseBlock.BuilderremoveAdditionalProperty(String key)final ToolUseBlock.BuilderremoveAllAdditionalProperties(Set<String> keys)final ToolUseBlockbuild()Returns an immutable instance of ToolUseBlock. -
-
Method Detail
-
id
final ToolUseBlock.Builder id(String id)
-
id
final ToolUseBlock.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
caller
final ToolUseBlock.Builder caller(ToolUseBlock.Caller caller)
Tool invocation directly from the model.
-
caller
final ToolUseBlock.Builder caller(JsonField<ToolUseBlock.Caller> caller)
Sets Builder.caller to an arbitrary JSON value.
You should usually call Builder.caller with a well-typed Caller value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
caller
final ToolUseBlock.Builder caller(DirectCaller direct)
Alias for calling caller with
Caller.ofDirect(direct).
-
caller
final ToolUseBlock.Builder caller(ServerToolCaller codeExecution20250825)
Alias for calling caller with
Caller.ofCodeExecution20250825(codeExecution20250825).
-
caller
final ToolUseBlock.Builder caller(ServerToolCaller20260120 codeExecution20260120)
Alias for calling caller with
Caller.ofCodeExecution20260120(codeExecution20260120).
-
codeExecution20250825Caller
final ToolUseBlock.Builder codeExecution20250825Caller(String toolId)
Alias for calling caller with the following:
ServerToolCaller.builder() .toolId(toolId) .build()
-
codeExecution20260120Caller
final ToolUseBlock.Builder codeExecution20260120Caller(String toolId)
Alias for calling caller with the following:
ServerToolCaller20260120.builder() .toolId(toolId) .build()
-
input
final ToolUseBlock.Builder input(JsonValue input)
Sets Builder.input to an arbitrary JSON value.
You should usually call Builder.input with a well-typed value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
name
final ToolUseBlock.Builder name(String name)
-
name
final ToolUseBlock.Builder name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value.
You should usually call Builder.name with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final ToolUseBlock.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("tool_use")This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final ToolUseBlock.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ToolUseBlock.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ToolUseBlock.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ToolUseBlock.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ToolUseBlock.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ToolUseBlock build()
Returns an immutable instance of ToolUseBlock.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .caller() .input() .name()
-
-
-
-