Class WebSearchTool20250305.UserLocation
-
- All Implemented Interfaces:
public final class WebSearchTool20250305.UserLocationParameters for the user's location. Used to provide more relevant search results.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classWebSearchTool20250305.UserLocation.BuilderA builder for UserLocation.
-
Method Summary
Modifier and Type Method Description final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("approximate")final Optional<String>city()The city of the user. final Optional<String>country()The two letter ISO country code of the user. final Optional<String>region()The region of the user. final Optional<String>timezone()The IANA timezone of the user. final JsonField<String>_city()Returns the raw JSON value of city. final JsonField<String>_country()Returns the raw JSON value of country. final JsonField<String>_region()Returns the raw JSON value of region. final JsonField<String>_timezone()Returns the raw JSON value of timezone. final Map<String, JsonValue>_additionalProperties()final WebSearchTool20250305.UserLocation.BuildertoBuilder()final WebSearchTool20250305.UserLocationvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static WebSearchTool20250305.UserLocation.Builderbuilder()Returns a mutable builder for constructing an instance of UserLocation. -
-
Method Detail
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("approximate")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
country
final Optional<String> country()
The two letter ISO country code of the user.
-
timezone
final Optional<String> timezone()
The IANA timezone of the user.
-
_city
final JsonField<String> _city()
Returns the raw JSON value of city.
Unlike city, this method doesn't throw if the JSON field has an unexpected type.
-
_country
final JsonField<String> _country()
Returns the raw JSON value of country.
Unlike country, this method doesn't throw if the JSON field has an unexpected type.
-
_region
final JsonField<String> _region()
Returns the raw JSON value of region.
Unlike region, this method doesn't throw if the JSON field has an unexpected type.
-
_timezone
final JsonField<String> _timezone()
Returns the raw JSON value of timezone.
Unlike timezone, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final WebSearchTool20250305.UserLocation.Builder toBuilder()
-
validate
final WebSearchTool20250305.UserLocation validate()
-
builder
final static WebSearchTool20250305.UserLocation.Builder builder()
Returns a mutable builder for constructing an instance of UserLocation.
-
-
-
-