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 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 a CityResponse record class.
      Parameters:
      id - the value for the id record component
      latitude - the value for the latitude record component
      longitude - the value for the longitude record component
      name - the value for the name record component
      friendlyName - the value for the friendlyName record component
      zoneCode - the value for the zoneCode record component
      countryCode - the value for the countryCode record component
      applePlaylistId - the value for the applePlaylistId record component
      spotifyPlaylistId - the value for the spotifyPlaylistId record component
      lastQueuedAt - the value for the lastQueuedAt record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • latitude

      public Double latitude()
      Returns the value of the latitude record component.
      Returns:
      the value of the latitude record component
    • longitude

      public Double longitude()
      Returns the value of the longitude record component.
      Returns:
      the value of the longitude record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • friendlyName

      public String friendlyName()
      Returns the value of the friendlyName record component.
      Returns:
      the value of the friendlyName record component
    • zoneCode

      @Nullable public String zoneCode()
      Returns the value of the zoneCode record component.
      Returns:
      the value of the zoneCode record component
    • countryCode

      public String countryCode()
      Returns the value of the countryCode record component.
      Returns:
      the value of the countryCode record component
    • applePlaylistId

      @Nullable public String applePlaylistId()
      Returns the value of the applePlaylistId record component.
      Returns:
      the value of the applePlaylistId record component
    • spotifyPlaylistId

      @Nullable public String spotifyPlaylistId()
      Returns the value of the spotifyPlaylistId record component.
      Returns:
      the value of the spotifyPlaylistId record component
    • lastQueuedAt

      @Nullable public Instant lastQueuedAt()
      Returns the value of the lastQueuedAt record component.
      Returns:
      the value of the lastQueuedAt record component