Package org.localify.city.dto
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 Summary
ConstructorsConstructorDescriptionCityResponseExtended(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) Creates an instance of aCityResponseExtendedrecord class. -
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.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theisFavoriterecord 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 thenumberOfArtistsrecord component.Returns the value of thenumberTotalVenuesrecord component.Returns the value of thenumberUpcomingEventsrecord 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
-
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 aCityResponseExtendedrecord class.- Parameters:
id- the value for theidrecord componentlatitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord componentname- the value for thenamerecord 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 componentisFavorite- the value for theisFavoriterecord componentnumberOfArtists- the value for thenumberOfArtistsrecord componentnumberTotalVenues- the value for thenumberTotalVenuesrecord componentnumberUpcomingEvents- the value for thenumberUpcomingEventsrecord 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
-
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
-
isFavorite
Returns the value of theisFavoriterecord component.- Returns:
- the value of the
isFavoriterecord component
-
numberOfArtists
Returns the value of thenumberOfArtistsrecord component.- Returns:
- the value of the
numberOfArtistsrecord component
-
numberTotalVenues
Returns the value of thenumberTotalVenuesrecord component.- Returns:
- the value of the
numberTotalVenuesrecord component
-
numberUpcomingEvents
Returns the value of thenumberUpcomingEventsrecord component.- Returns:
- the value of the
numberUpcomingEventsrecord component
-