Package org.springframework.ai.anthropic
Record Class AnthropicWebSearchTool.UserLocation
java.lang.Object
java.lang.Record
org.springframework.ai.anthropic.AnthropicWebSearchTool.UserLocation
- Record Components:
city- the city namecountry- the ISO 3166-1 alpha-2 country coderegion- the region or statetimezone- the IANA timezone identifier
- Enclosing class:
- AnthropicWebSearchTool
public static record AnthropicWebSearchTool.UserLocation(@Nullable String city, @Nullable String country, @Nullable String region, @Nullable String timezone)
extends Record
Approximate user location for localizing web search results.
-
Constructor Summary
ConstructorsConstructorDescriptionUserLocation(@Nullable String city, @Nullable String country, @Nullable String region, @Nullable String timezone) Creates an instance of aUserLocationrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringcity()Returns the value of thecityrecord component.@Nullable Stringcountry()Returns the value of thecountryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringregion()Returns the value of theregionrecord component.@Nullable Stringtimezone()Returns the value of thetimezonerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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). -
city
Returns the value of thecityrecord component.- Returns:
- the value of the
cityrecord component
-
country
Returns the value of thecountryrecord component.- Returns:
- the value of the
countryrecord component
-
region
Returns the value of theregionrecord component.- Returns:
- the value of the
regionrecord component
-
timezone
Returns the value of thetimezonerecord component.- Returns:
- the value of the
timezonerecord component
-