Package org.localify.city.dto
Record Class CityResponse
java.lang.Object
java.lang.Record
org.localify.city.dto.CityResponse
- Record Components:
id- The ID of the city.latitude- The latitude of the city.longitude- The longitude of the city.name- The name of the city.friendlyName- The friendly name of the city (e.g., "Ithaca, NY").zoneCode- The zone code of the city.countryCode- The country code of the city.applePlaylistId- The Apple Music playlist ID for the city.spotifyPlaylistId- The Spotify playlist ID for the city.lastQueuedAt- The timestamp when the city was last queued for processing.
public record CityResponse(UUID id, Double latitude, Double longitude, String name, String friendlyName, String zoneCode, String countryCode, String applePlaylistId, String spotifyPlaylistId, Instant lastQueuedAt)
extends Record
Represents a response for a city.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapplePlaylistIdrecord component.Returns the value of thecountryCoderecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefriendlyNamerecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thelastQueuedAtrecord component.latitude()Returns the value of thelatituderecord component.Returns the value of thelongituderecord component.name()Returns the value of thenamerecord component.Returns the value of thespotifyPlaylistIdrecord component.final StringtoString()Returns a string representation of this record class.zoneCode()Returns the value of thezoneCoderecord component.
-
Constructor Details
-
CityResponse
public CityResponse(UUID id, Double latitude, Double longitude, String name, String friendlyName, @Nullable String zoneCode, String countryCode, @Nullable String applePlaylistId, @Nullable String spotifyPlaylistId, @Nullable Instant lastQueuedAt) Creates an instance of aCityResponserecord class.- Parameters:
id- the value for theidrecord componentlatitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord componentname- the value for thenamerecord componentfriendlyName- the value for thefriendlyNamerecord componentzoneCode- the value for thezoneCoderecord componentcountryCode- the value for thecountryCoderecord componentapplePlaylistId- the value for theapplePlaylistIdrecord componentspotifyPlaylistId- the value for thespotifyPlaylistIdrecord componentlastQueuedAt- the value for thelastQueuedAtrecord component
-
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
latitude
Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
friendlyName
Returns the value of thefriendlyNamerecord component.- Returns:
- the value of the
friendlyNamerecord component
-
zoneCode
Returns the value of thezoneCoderecord component.- Returns:
- the value of the
zoneCoderecord component
-
countryCode
Returns the value of thecountryCoderecord component.- Returns:
- the value of the
countryCoderecord component
-
applePlaylistId
Returns the value of theapplePlaylistIdrecord component.- Returns:
- the value of the
applePlaylistIdrecord component
-
spotifyPlaylistId
Returns the value of thespotifyPlaylistIdrecord component.- Returns:
- the value of the
spotifyPlaylistIdrecord component
-
lastQueuedAt
Returns the value of thelastQueuedAtrecord component.- Returns:
- the value of the
lastQueuedAtrecord component
-