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