Class ComputerKeyToolUseBlock.Builder
-
- All Implemented Interfaces:
public final class ComputerKeyToolUseBlock.BuilderA builder for ComputerKeyToolUseBlock.
-
-
Method Summary
Modifier and Type Method Description final ComputerKeyToolUseBlock.Builderid(String id)final ComputerKeyToolUseBlock.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final ComputerKeyToolUseBlock.Buildercaller(ToolUseCaller caller)Which party invoked the tool call: the model directly, or a server tool on its behalf. final ComputerKeyToolUseBlock.Buildercaller(JsonField<ToolUseCaller> caller)Sets Builder.caller to an arbitrary JSON value. final ComputerKeyToolUseBlock.Buildercaller(DirectCaller direct)Alias for calling caller with ToolUseCaller.ofDirect(direct).final ComputerKeyToolUseBlock.Buildercaller(ServerToolCaller codeExecution20250825)Alias for calling caller with ToolUseCaller.ofCodeExecution20250825(codeExecution20250825).final ComputerKeyToolUseBlock.Buildercaller(ServerToolCaller20260120 codeExecution20260120)Alias for calling caller with ToolUseCaller.ofCodeExecution20260120(codeExecution20260120).final ComputerKeyToolUseBlock.Builderinput(ComputerKeyInput input)Press a key or key-combination on the keyboard. final ComputerKeyToolUseBlock.Builderinput(JsonField<ComputerKeyInput> input)Sets Builder.input to an arbitrary JSON value. final ComputerKeyToolUseBlock.Buildername(JsonValue name)Sets the field to an arbitrary JSON value. final ComputerKeyToolUseBlock.BuildertoolsetName(JsonValue toolsetName)Sets the field to an arbitrary JSON value. final ComputerKeyToolUseBlock.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final ComputerKeyToolUseBlock.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final ComputerKeyToolUseBlock.BuildercodeExecution20250825Caller(String toolId)Alias for calling caller with the following: ServerToolCaller.builder() .toolId(toolId) .build()final ComputerKeyToolUseBlock.BuildercodeExecution20260120Caller(String toolId)Alias for calling caller with the following: ServerToolCaller20260120.builder() .toolId(toolId) .build()final ComputerKeyToolUseBlock.BuilderputAdditionalProperty(String key, JsonValue value)final ComputerKeyToolUseBlock.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final ComputerKeyToolUseBlock.BuilderremoveAdditionalProperty(String key)final ComputerKeyToolUseBlock.BuilderremoveAllAdditionalProperties(Set<String> keys)final ComputerKeyToolUseBlockbuild()Returns an immutable instance of ComputerKeyToolUseBlock. -
-
Method Detail
-
id
final ComputerKeyToolUseBlock.Builder id(String id)
-
id
final ComputerKeyToolUseBlock.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 ComputerKeyToolUseBlock.Builder caller(ToolUseCaller caller)
Which party invoked the tool call: the model directly, or a server tool on its behalf.
-
caller
final ComputerKeyToolUseBlock.Builder caller(JsonField<ToolUseCaller> caller)
Sets Builder.caller to an arbitrary JSON value.
You should usually call Builder.caller with a well-typed ToolUseCaller value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
caller
final ComputerKeyToolUseBlock.Builder caller(DirectCaller direct)
Alias for calling caller with
ToolUseCaller.ofDirect(direct).
-
caller
final ComputerKeyToolUseBlock.Builder caller(ServerToolCaller codeExecution20250825)
Alias for calling caller with
ToolUseCaller.ofCodeExecution20250825(codeExecution20250825).
-
caller
final ComputerKeyToolUseBlock.Builder caller(ServerToolCaller20260120 codeExecution20260120)
Alias for calling caller with
ToolUseCaller.ofCodeExecution20260120(codeExecution20260120).
-
input
final ComputerKeyToolUseBlock.Builder input(ComputerKeyInput input)
Press a key or key-combination on the keyboard. Use "+" to combine modifiers with a key (e.g. "ctrl+s", "alt+Tab", "ctrl+shift+Escape"). Key names are case-insensitive; common names like "Return", "Tab", "Escape", "Up", "Down", "Left", "Right", "Home", "End", "Page_Up", "Page_Down", "Delete", "BackSpace" are supported.
-
input
final ComputerKeyToolUseBlock.Builder input(JsonField<ComputerKeyInput> input)
Sets Builder.input to an arbitrary JSON value.
You should usually call Builder.input with a well-typed ComputerKeyInput value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
name
final ComputerKeyToolUseBlock.Builder name(JsonValue name)
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("key")This method is primarily for setting the field to an undocumented or not yet supported value.
-
toolsetName
final ComputerKeyToolUseBlock.Builder toolsetName(JsonValue toolsetName)
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("computer")This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final ComputerKeyToolUseBlock.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 ComputerKeyToolUseBlock.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
codeExecution20250825Caller
final ComputerKeyToolUseBlock.Builder codeExecution20250825Caller(String toolId)
Alias for calling caller with the following:
ServerToolCaller.builder() .toolId(toolId) .build()
-
codeExecution20260120Caller
final ComputerKeyToolUseBlock.Builder codeExecution20260120Caller(String toolId)
Alias for calling caller with the following:
ServerToolCaller20260120.builder() .toolId(toolId) .build()
-
putAdditionalProperty
final ComputerKeyToolUseBlock.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ComputerKeyToolUseBlock.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ComputerKeyToolUseBlock.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ComputerKeyToolUseBlock.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ComputerKeyToolUseBlock build()
Returns an immutable instance of ComputerKeyToolUseBlock.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .caller() .input()
-
-
-
-