Record Class LastFmResponse
java.lang.Object
java.lang.Record
org.localify.data.queue.dto.lastfm.LastFmResponse
- Record Components:
localifyId- The Localify ID of the artist.listeners- The number of listeners for the artist.similarArtists- A list of similar artists.- A list of tags associated with the artist.
public record LastFmResponse(@NotNull UUID localifyId, @jakarta.validation.constraints.NotNull long listeners, @NotNull List<LastFmArtist> similarArtists, @NotNull List<LastFmTag> tags)
extends Record
Represents a response from the Last.fm API.
-
Constructor Summary
ConstructorsConstructorDescriptionLastFmResponse(@NotNull UUID localifyId, @jakarta.validation.constraints.NotNull long listeners, @NotNull List<LastFmArtist> similarArtists, @NotNull List<LastFmTag> tags) Creates an instance of aLastFmResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@jakarta.validation.constraints.NotNull longReturns the value of thelistenersrecord component.@NotNull UUIDReturns the value of thelocalifyIdrecord component.@NotNull List<LastFmArtist>Returns the value of thesimilarArtistsrecord component.tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LastFmResponse
public LastFmResponse(@NotNull @NotNull UUID localifyId, @NotNull @jakarta.validation.constraints.NotNull long listeners, @NotNull @NotNull List<LastFmArtist> similarArtists, @NotNull @NotNull List<LastFmTag> tags) Creates an instance of aLastFmResponserecord class.- Parameters:
localifyId- the value for thelocalifyIdrecord componentlisteners- the value for thelistenersrecord componentsimilarArtists- the value for thesimilarArtistsrecord componenttags- the value for thetagsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
localifyId
Returns the value of thelocalifyIdrecord component.- Returns:
- the value of the
localifyIdrecord component
-
listeners
@NotNull public @jakarta.validation.constraints.NotNull long listeners()Returns the value of thelistenersrecord component.- Returns:
- the value of the
listenersrecord component
-
similarArtists
Returns the value of thesimilarArtistsrecord component.- Returns:
- the value of the
similarArtistsrecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-