Class BetaWebSearchTool20260209
-
- All Implemented Interfaces:
public final class BetaWebSearchTool20260209
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaWebSearchTool20260209.BuilderA builder for BetaWebSearchTool20260209.
public final classBetaWebSearchTool20260209.AllowedCallerSpecifies who can invoke a tool.
Values: direct: The model can call this tool directly. code_execution_20250825: The tool can be called from the code execution environment (v1). code_execution_20260120: The tool can be called from the code execution environment (v2 with persistence).
-
Method Summary
Modifier and Type Method Description final JsonValue_name()Name of the tool. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("web_search_20260209")final Optional<List<BetaWebSearchTool20260209.AllowedCaller>>allowedCallers()final Optional<List<String>>allowedDomains()If provided, only these domains will be included in results. final Optional<List<String>>blockedDomains()If provided, these domains will never appear in results. final Optional<BetaCacheControlEphemeral>cacheControl()Create a cache control breakpoint at this content block. final Optional<Boolean>deferLoading()If true, tool will not be included in initial system prompt. final Optional<Long>maxUses()Maximum number of times the tool can be used in the API request. final Optional<Boolean>strict()When true, guarantees schema validation on tool names and inputs final Optional<BetaUserLocation>userLocation()Parameters for the user's location. final JsonField<List<BetaWebSearchTool20260209.AllowedCaller>>_allowedCallers()Returns the raw JSON value of allowedCallers. final JsonField<List<String>>_allowedDomains()Returns the raw JSON value of allowedDomains. final JsonField<List<String>>_blockedDomains()Returns the raw JSON value of blockedDomains. final JsonField<BetaCacheControlEphemeral>_cacheControl()Returns the raw JSON value of cacheControl. final JsonField<Boolean>_deferLoading()Returns the raw JSON value of deferLoading. final JsonField<Long>_maxUses()Returns the raw JSON value of maxUses. final JsonField<Boolean>_strict()Returns the raw JSON value of strict. final JsonField<BetaUserLocation>_userLocation()Returns the raw JSON value of userLocation. final Map<String, JsonValue>_additionalProperties()final BetaWebSearchTool20260209.BuildertoBuilder()final BetaWebSearchTool20260209validate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaWebSearchTool20260209.Builderbuilder()Returns a mutable builder for constructing an instance of BetaWebSearchTool20260209. -
-
Method Detail
-
_name
final JsonValue _name()
Name of the tool.
This is how the tool will be called by the model and in
tool_useblocks.Expected to always return the following:
JsonValue.from("web_search")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("web_search_20260209")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
allowedCallers
final Optional<List<BetaWebSearchTool20260209.AllowedCaller>> allowedCallers()
-
allowedDomains
final Optional<List<String>> allowedDomains()
If provided, only these domains will be included in results. Cannot be used alongside
blocked_domains.
-
blockedDomains
final Optional<List<String>> blockedDomains()
If provided, these domains will never appear in results. Cannot be used alongside
allowed_domains.
-
cacheControl
final Optional<BetaCacheControlEphemeral> cacheControl()
Create a cache control breakpoint at this content block.
-
deferLoading
final Optional<Boolean> deferLoading()
If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
-
maxUses
final Optional<Long> maxUses()
Maximum number of times the tool can be used in the API request.
-
strict
final Optional<Boolean> strict()
When true, guarantees schema validation on tool names and inputs
-
userLocation
final Optional<BetaUserLocation> userLocation()
Parameters for the user's location. Used to provide more relevant search results.
-
_allowedCallers
final JsonField<List<BetaWebSearchTool20260209.AllowedCaller>> _allowedCallers()
Returns the raw JSON value of allowedCallers.
Unlike allowedCallers, this method doesn't throw if the JSON field has an unexpected type.
-
_allowedDomains
final JsonField<List<String>> _allowedDomains()
Returns the raw JSON value of allowedDomains.
Unlike allowedDomains, this method doesn't throw if the JSON field has an unexpected type.
-
_blockedDomains
final JsonField<List<String>> _blockedDomains()
Returns the raw JSON value of blockedDomains.
Unlike blockedDomains, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheControl
final JsonField<BetaCacheControlEphemeral> _cacheControl()
Returns the raw JSON value of cacheControl.
Unlike cacheControl, this method doesn't throw if the JSON field has an unexpected type.
-
_deferLoading
final JsonField<Boolean> _deferLoading()
Returns the raw JSON value of deferLoading.
Unlike deferLoading, this method doesn't throw if the JSON field has an unexpected type.
-
_maxUses
final JsonField<Long> _maxUses()
Returns the raw JSON value of maxUses.
Unlike maxUses, this method doesn't throw if the JSON field has an unexpected type.
-
_strict
final JsonField<Boolean> _strict()
Returns the raw JSON value of strict.
Unlike strict, this method doesn't throw if the JSON field has an unexpected type.
-
_userLocation
final JsonField<BetaUserLocation> _userLocation()
Returns the raw JSON value of userLocation.
Unlike userLocation, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaWebSearchTool20260209.Builder toBuilder()
-
validate
final BetaWebSearchTool20260209 validate()
-
builder
final static BetaWebSearchTool20260209.Builder builder()
Returns a mutable builder for constructing an instance of BetaWebSearchTool20260209.
-
-
-
-