Class WebSearchTool20250305.Builder
-
- All Implemented Interfaces:
public final class WebSearchTool20250305.BuilderA builder for WebSearchTool20250305.
-
-
Method Summary
-
-
Method Detail
-
name
final WebSearchTool20250305.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("web_search")This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final WebSearchTool20250305.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("web_search_20250305")This method is primarily for setting the field to an undocumented or not yet supported value.
-
allowedDomains
final WebSearchTool20250305.Builder allowedDomains(List<String> allowedDomains)
If provided, only these domains will be included in results. Cannot be used alongside
blocked_domains.
-
allowedDomains
final WebSearchTool20250305.Builder allowedDomains(Optional<List<String>> allowedDomains)
Alias for calling Builder.allowedDomains with
allowedDomains.orElse(null).
-
allowedDomains
final WebSearchTool20250305.Builder allowedDomains(JsonField<List<String>> allowedDomains)
Sets Builder.allowedDomains to an arbitrary JSON value.
You should usually call Builder.allowedDomains with a well-typed
List<String>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addAllowedDomain
final WebSearchTool20250305.Builder addAllowedDomain(String allowedDomain)
Adds a single String to allowedDomains.
-
blockedDomains
final WebSearchTool20250305.Builder blockedDomains(List<String> blockedDomains)
If provided, these domains will never appear in results. Cannot be used alongside
allowed_domains.
-
blockedDomains
final WebSearchTool20250305.Builder blockedDomains(Optional<List<String>> blockedDomains)
Alias for calling Builder.blockedDomains with
blockedDomains.orElse(null).
-
blockedDomains
final WebSearchTool20250305.Builder blockedDomains(JsonField<List<String>> blockedDomains)
Sets Builder.blockedDomains to an arbitrary JSON value.
You should usually call Builder.blockedDomains with a well-typed
List<String>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addBlockedDomain
final WebSearchTool20250305.Builder addBlockedDomain(String blockedDomain)
Adds a single String to blockedDomains.
-
cacheControl
final WebSearchTool20250305.Builder cacheControl(CacheControlEphemeral cacheControl)
Create a cache control breakpoint at this content block.
-
cacheControl
final WebSearchTool20250305.Builder cacheControl(Optional<CacheControlEphemeral> cacheControl)
Alias for calling Builder.cacheControl with
cacheControl.orElse(null).
-
cacheControl
final WebSearchTool20250305.Builder cacheControl(JsonField<CacheControlEphemeral> cacheControl)
Sets Builder.cacheControl to an arbitrary JSON value.
You should usually call Builder.cacheControl with a well-typed CacheControlEphemeral value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
maxUses
final WebSearchTool20250305.Builder maxUses(Long maxUses)
Maximum number of times the tool can be used in the API request.
-
maxUses
final WebSearchTool20250305.Builder maxUses(Long maxUses)
Alias for Builder.maxUses.
This unboxed primitive overload exists for backwards compatibility.
-
maxUses
final WebSearchTool20250305.Builder maxUses(Optional<Long> maxUses)
Alias for calling Builder.maxUses with
maxUses.orElse(null).
-
maxUses
final WebSearchTool20250305.Builder maxUses(JsonField<Long> maxUses)
Sets Builder.maxUses to an arbitrary JSON value.
You should usually call Builder.maxUses with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
userLocation
final WebSearchTool20250305.Builder userLocation(WebSearchTool20250305.UserLocation userLocation)
Parameters for the user's location. Used to provide more relevant search results.
-
userLocation
final WebSearchTool20250305.Builder userLocation(Optional<WebSearchTool20250305.UserLocation> userLocation)
Alias for calling Builder.userLocation with
userLocation.orElse(null).
-
userLocation
final WebSearchTool20250305.Builder userLocation(JsonField<WebSearchTool20250305.UserLocation> userLocation)
Sets Builder.userLocation to an arbitrary JSON value.
You should usually call Builder.userLocation with a well-typed UserLocation value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final WebSearchTool20250305.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final WebSearchTool20250305.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final WebSearchTool20250305.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final WebSearchTool20250305.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final WebSearchTool20250305.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final WebSearchTool20250305 build()
Returns an immutable instance of WebSearchTool20250305.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-