Package com.google.genai.types
Class ToolResponse.Builder
-
- All Implemented Interfaces:
public abstract class ToolResponse.BuilderBuilder for ToolResponse.
-
-
Constructor Summary
Constructors Constructor Description ToolResponse.Builder()
-
Method Summary
Modifier and Type Method Description abstract ToolResponse.Builderid(String id)Setter for id. ToolResponse.BuilderclearId()Clears the value of id field. abstract ToolResponse.BuildertoolType(ToolType toolType)Setter for toolType. ToolResponse.BuilderclearToolType()Clears the value of toolType field. ToolResponse.BuildertoolType(ToolType.Known knownType)Setter for toolType given a known enum. ToolResponse.BuildertoolType(String toolType)Setter for toolType given a string. abstract ToolResponse.Builderresponse(Map<String, Object> response)Setter for response. ToolResponse.BuilderclearResponse()Clears the value of response field. abstract ToolResponsebuild()-
-
Method Detail
-
id
abstract ToolResponse.Builder id(String id)
Setter for id.
id: The identifier of the tool call this response is for.
-
clearId
@CanIgnoreReturnValue() ToolResponse.Builder clearId()
Clears the value of id field.
-
toolType
abstract ToolResponse.Builder toolType(ToolType toolType)
Setter for toolType.
toolType: The type of tool that was called, matching the tool_type in the corresponding ToolCall.
-
clearToolType
@CanIgnoreReturnValue() ToolResponse.Builder clearToolType()
Clears the value of toolType field.
-
toolType
@CanIgnoreReturnValue() ToolResponse.Builder toolType(ToolType.Known knownType)
Setter for toolType given a known enum.
toolType: The type of tool that was called, matching the tool_type in the corresponding ToolCall.
-
toolType
@CanIgnoreReturnValue() ToolResponse.Builder toolType(String toolType)
Setter for toolType given a string.
toolType: The type of tool that was called, matching the tool_type in the corresponding ToolCall.
-
response
abstract ToolResponse.Builder response(Map<String, Object> response)
Setter for response.
response: The tool response.
-
clearResponse
@CanIgnoreReturnValue() ToolResponse.Builder clearResponse()
Clears the value of response field.
-
build
abstract ToolResponse build()
-
-
-
-