Record Class GoogleCityRequest
java.lang.Object
java.lang.Record
org.localify.data.dispatch.request.GoogleCityRequest
- Record Components:
localifyCityId- The ID of the city in the Localify database.location- A string representing the location of the city (e.g., "Ithaca, NY, US").
- All Implemented Interfaces:
Serializable
public record GoogleCityRequest(UUID localifyCityId, String location)
extends Record
implements Serializable
Represents a request to get a city from Google.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGoogleCityRequest(UUID localifyCityId, String location) Creates an instance of aGoogleCityRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static GoogleCityRequestCreates a new GoogleCityRequest from a city.final inthashCode()Returns a hash code value for this object.Returns the value of thelocalifyCityIdrecord component.location()Returns the value of thelocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GoogleCityRequest
Creates an instance of aGoogleCityRequestrecord class.- Parameters:
localifyCityId- the value for thelocalifyCityIdrecord componentlocation- the value for thelocationrecord component
-
-
Method Details
-
fromCity
Creates a new GoogleCityRequest from a city.- Parameters:
city- The city.- Returns:
- The new GoogleCityRequest.
-
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). -
localifyCityId
Returns the value of thelocalifyCityIdrecord component.- Returns:
- the value of the
localifyCityIdrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-