Record Class Tool.ComputerUse
java.lang.Object
java.lang.Record
io.github.glaforge.gemini.interactions.model.Tool.ComputerUse
- Record Components:
type- The type of tool (must be "computer_use").environment- The environment (e.g., "browser").excludedPredefinedFunctions- List of excluded predefined functions.
- All Implemented Interfaces:
Tool
- Enclosing interface:
Tool
public static record Tool.ComputerUse(String type, String environment, List<String> excludedPredefinedFunctions)
extends Record
implements Tool
Tool definition for Computer Use.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.glaforge.gemini.interactions.model.Tool
Tool.AllowedTools, Tool.CodeExecution, Tool.ComputerUse, Tool.FileSearch, Tool.Function, Tool.GoogleSearch, Tool.McpServer, Tool.Mode, Tool.ToolChoiceConfig, Tool.UrlContext -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ComputerUse tool (defaults to browser environment).ComputerUse(String type, String environment, List<String> excludedPredefinedFunctions) Creates an instance of aComputerUserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theenvironmentrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexcludedPredefinedFunctionsrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ComputerUse
public ComputerUse()Creates a new ComputerUse tool (defaults to browser environment). -
ComputerUse
Creates an instance of aComputerUserecord class.- Parameters:
type- the value for thetyperecord componentenvironment- the value for theenvironmentrecord componentexcludedPredefinedFunctions- the value for theexcludedPredefinedFunctionsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
type
Returns the value of thetyperecord component. -
environment
Returns the value of theenvironmentrecord component.- Returns:
- the value of the
environmentrecord component
-
excludedPredefinedFunctions
Returns the value of theexcludedPredefinedFunctionsrecord component.- Returns:
- the value of the
excludedPredefinedFunctionsrecord component
-