Package com.google.genai.types
Class ToolCall.Builder
-
- All Implemented Interfaces:
public abstract class ToolCall.BuilderBuilder for ToolCall.
-
-
Constructor Summary
Constructors Constructor Description ToolCall.Builder()
-
Method Summary
Modifier and Type Method Description abstract ToolCall.Builderid(String id)Setter for id. ToolCall.BuilderclearId()Clears the value of id field. abstract ToolCall.BuildertoolType(ToolType toolType)Setter for toolType. ToolCall.BuilderclearToolType()Clears the value of toolType field. ToolCall.BuildertoolType(ToolType.Known knownType)Setter for toolType given a known enum. ToolCall.BuildertoolType(String toolType)Setter for toolType given a string. abstract ToolCall.Builderargs(Map<String, Object> args)Setter for args. ToolCall.BuilderclearArgs()Clears the value of args field. abstract ToolCallbuild()-
-
Method Detail
-
id
abstract ToolCall.Builder id(String id)
Setter for id.
id: Unique identifier of the tool call. The server returns the tool response with the matching `id`.
-
clearId
@CanIgnoreReturnValue() ToolCall.Builder clearId()
Clears the value of id field.
-
toolType
abstract ToolCall.Builder toolType(ToolType toolType)
Setter for toolType.
toolType: The type of tool that was called.
-
clearToolType
@CanIgnoreReturnValue() ToolCall.Builder clearToolType()
Clears the value of toolType field.
-
toolType
@CanIgnoreReturnValue() ToolCall.Builder toolType(ToolType.Known knownType)
Setter for toolType given a known enum.
toolType: The type of tool that was called.
-
toolType
@CanIgnoreReturnValue() ToolCall.Builder toolType(String toolType)
Setter for toolType given a string.
toolType: The type of tool that was called.
-
args
abstract ToolCall.Builder args(Map<String, Object> args)
Setter for args.
args: The tool call arguments. Example: {"arg1": "value1", "arg2": "value2"}.
-
clearArgs
@CanIgnoreReturnValue() ToolCall.Builder clearArgs()
Clears the value of args field.
-
-
-
-