Record Class CityResponseExtended

java.lang.Object
java.lang.Record
org.localify.city.dto.CityResponseExtended
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.
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.
isFavorite - Whether the city is a favorite of the user.
numberOfArtists - The total number of artists in the city.
numberTotalVenues - The total number of venues in the city.
numberUpcomingEvents - The number of upcoming events in the city.

public record CityResponseExtended(UUID id, Double latitude, Double longitude, String name, String zoneCode, String countryCode, String applePlaylistId, String spotifyPlaylistId, Instant lastQueuedAt, Boolean isFavorite, Integer numberOfArtists, Integer numberTotalVenues, Integer numberUpcomingEvents) extends Record
Represents an extended response for a city, including additional details like favorite status and counts.
  • Constructor Details

    • CityResponseExtended

      public CityResponseExtended(UUID id, Double latitude, Double longitude, String name, String zoneCode, String countryCode, @Nullable String applePlaylistId, @Nullable String spotifyPlaylistId, @Nullable Instant lastQueuedAt, Boolean isFavorite, Integer numberOfArtists, Integer numberTotalVenues, Integer numberUpcomingEvents)
      Creates an instance of a CityResponseExtended 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
      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
      isFavorite - the value for the isFavorite record component
      numberOfArtists - the value for the numberOfArtists record component
      numberTotalVenues - the value for the numberTotalVenues record component
      numberUpcomingEvents - the value for the numberUpcomingEvents 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
    • zoneCode

      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
    • isFavorite

      public Boolean isFavorite()
      Returns the value of the isFavorite record component.
      Returns:
      the value of the isFavorite record component
    • numberOfArtists

      public Integer numberOfArtists()
      Returns the value of the numberOfArtists record component.
      Returns:
      the value of the numberOfArtists record component
    • numberTotalVenues

      public Integer numberTotalVenues()
      Returns the value of the numberTotalVenues record component.
      Returns:
      the value of the numberTotalVenues record component
    • numberUpcomingEvents

      public Integer numberUpcomingEvents()
      Returns the value of the numberUpcomingEvents record component.
      Returns:
      the value of the numberUpcomingEvents record component