Class WebSearchTool.UserLocation.Builder
-
- All Implemented Interfaces:
public final class WebSearchTool.UserLocation.Builder
A builder for UserLocation.
-
-
Method Summary
-
-
Method Detail
-
type
final WebSearchTool.UserLocation.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("approximate")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
city
final WebSearchTool.UserLocation.Builder city(String city)
Free text input for the city of the user, e.g.
San Francisco
.
-
city
final WebSearchTool.UserLocation.Builder city(Optional<String> city)
Alias for calling Builder.city with
city.orElse(null)
.
-
city
final WebSearchTool.UserLocation.Builder city(JsonField<String> city)
Sets Builder.city to an arbitrary JSON value.
You should usually call Builder.city with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
country
final WebSearchTool.UserLocation.Builder country(String country)
The two-letter ISO country code of the user, e.g.
US
.
-
country
final WebSearchTool.UserLocation.Builder country(Optional<String> country)
Alias for calling Builder.country with
country.orElse(null)
.
-
country
final WebSearchTool.UserLocation.Builder country(JsonField<String> country)
Sets Builder.country to an arbitrary JSON value.
You should usually call Builder.country with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
region
final WebSearchTool.UserLocation.Builder region(String region)
Free text input for the region of the user, e.g.
California
.
-
region
final WebSearchTool.UserLocation.Builder region(Optional<String> region)
Alias for calling Builder.region with
region.orElse(null)
.
-
region
final WebSearchTool.UserLocation.Builder region(JsonField<String> region)
Sets Builder.region to an arbitrary JSON value.
You should usually call Builder.region with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
timezone
final WebSearchTool.UserLocation.Builder timezone(String timezone)
The IANA timezone of the user, e.g.
America/Los_Angeles
.
-
timezone
final WebSearchTool.UserLocation.Builder timezone(Optional<String> timezone)
Alias for calling Builder.timezone with
timezone.orElse(null)
.
-
timezone
final WebSearchTool.UserLocation.Builder timezone(JsonField<String> timezone)
Sets Builder.timezone to an arbitrary JSON value.
You should usually call Builder.timezone with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final WebSearchTool.UserLocation.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final WebSearchTool.UserLocation.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final WebSearchTool.UserLocation.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final WebSearchTool.UserLocation.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final WebSearchTool.UserLocation.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final WebSearchTool.UserLocation build()
Returns an immutable instance of UserLocation.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-