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.
tags - 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 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 a LastFmResponse record class.
      Parameters:
      localifyId - the value for the localifyId record component
      listeners - the value for the listeners record component
      similarArtists - the value for the similarArtists record component
      tags - the value for the tags 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • localifyId

      @NotNull public @NotNull UUID localifyId()
      Returns the value of the localifyId record component.
      Returns:
      the value of the localifyId record component
    • listeners

      @NotNull public @jakarta.validation.constraints.NotNull long listeners()
      Returns the value of the listeners record component.
      Returns:
      the value of the listeners record component
    • similarArtists

      @NotNull public @NotNull List<LastFmArtist> similarArtists()
      Returns the value of the similarArtists record component.
      Returns:
      the value of the similarArtists record component
    • tags

      @NotNull public @NotNull List<LastFmTag> tags()
      Returns the value of the tags record component.
      Returns:
      the value of the tags record component