Record Class CityArtistsResponse

java.lang.Object
java.lang.Record
org.localify.city.dto.CityArtistsResponse
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.
isUserLocalCity - Whether the city is the user's local city.
topArtists - A page of the top artists in the city.
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.
image - The image URL for the city.

public record CityArtistsResponse(UUID id, Double latitude, Double longitude, String name, String zoneCode, String countryCode, String applePlaylistId, String spotifyPlaylistId, Boolean isUserLocalCity, org.springframework.data.domain.Page<City.CityArtistApiResponse> topArtists, Integer numberOfArtists, Integer numberTotalVenues, Integer numberUpcomingEvents, String image) extends Record
Represents a response for a city with a list of artists.
  • Constructor Details

    • CityArtistsResponse

      public CityArtistsResponse(UUID id, Double latitude, Double longitude, String name, String zoneCode, String countryCode, @Nullable String applePlaylistId, @Nullable String spotifyPlaylistId, Boolean isUserLocalCity, org.springframework.data.domain.Page<City.CityArtistApiResponse> topArtists, Integer numberOfArtists, Integer numberTotalVenues, Integer numberUpcomingEvents, String image)
      Creates an instance of a CityArtistsResponse 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
      isUserLocalCity - the value for the isUserLocalCity record component
      topArtists - the value for the topArtists 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
      image - the value for the image 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
    • isUserLocalCity

      public Boolean isUserLocalCity()
      Returns the value of the isUserLocalCity record component.
      Returns:
      the value of the isUserLocalCity record component
    • topArtists

      public org.springframework.data.domain.Page<City.CityArtistApiResponse> topArtists()
      Returns the value of the topArtists record component.
      Returns:
      the value of the topArtists 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
    • image

      public String image()
      Returns the value of the image record component.
      Returns:
      the value of the image record component