Record Class RecommendedArtistDto

java.lang.Object
java.lang.Record
org.localify.dto.RecommendedArtistDto
Record Components:
id - The ID of the artist.
name - The name of the artist.
image - The URL of the artist's image.
genres - A list of genres associated with the artist.
isSeed - Whether the artist is a seed artist for recommendations.
score - The recommendation score.
isFavorite - Whether the artist is a favorite of the user.
similar - A list of similar artists.
localCity - A list of local cities for the artist.
spotifyTopTrackPreview - The URL of the artist's top track preview on Spotify.
All Implemented Interfaces:
Serializable

public record RecommendedArtistDto(UUID id, String name, String image, List<GenreResponse> genres, Boolean isSeed, Double score, boolean isFavorite, List<RecommendedArtistDto.SimilarArtistDto> similar, List<ArtistCityResponse> localCity, String spotifyTopTrackPreview) extends Record implements Serializable
Data Transfer Object for a recommended artist.
See Also:
  • Constructor Details

    • RecommendedArtistDto

      public RecommendedArtistDto(RecommendedFestivalArtistDto festivalArtistDto)
      Constructs a RecommendedArtistDto from a RecommendedFestivalArtistDto.
      Parameters:
      festivalArtistDto - The DTO for a recommended festival artist.
    • RecommendedArtistDto

      public RecommendedArtistDto(UUID id, String name, String image, List<GenreResponse> genres, Boolean isSeed, Double score, boolean isFavorite, @NonNull List<RecommendedArtistDto.SimilarArtistDto> similar, List<ArtistCityResponse> localCity, String spotifyTopTrackPreview)
      Creates an instance of a RecommendedArtistDto record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      image - the value for the image record component
      genres - the value for the genres record component
      isSeed - the value for the isSeed record component
      score - the value for the score record component
      isFavorite - the value for the isFavorite record component
      similar - the value for the similar record component
      localCity - the value for the localCity record component
      spotifyTopTrackPreview - the value for the spotifyTopTrackPreview 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.
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

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

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

      public List<GenreResponse> genres()
      Returns the value of the genres record component.
      Returns:
      the value of the genres record component
    • isSeed

      public Boolean isSeed()
      Returns the value of the isSeed record component.
      Returns:
      the value of the isSeed record component
    • score

      public Double score()
      Returns the value of the score record component.
      Returns:
      the value of the score record component
    • isFavorite

      public boolean isFavorite()
      Returns the value of the isFavorite record component.
      Returns:
      the value of the isFavorite record component
    • similar

      @NonNull public List<RecommendedArtistDto.SimilarArtistDto> similar()
      Returns the value of the similar record component.
      Returns:
      the value of the similar record component
    • localCity

      public List<ArtistCityResponse> localCity()
      Returns the value of the localCity record component.
      Returns:
      the value of the localCity record component
    • spotifyTopTrackPreview

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