Package org.localify.dto
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordData Transfer Object for a similar artist. -
Constructor Summary
ConstructorsConstructorDescriptionRecommendedArtistDto(UUID id, String name, String image, List<GenreResponse> genres, Boolean isSeed, Double score, boolean isFavorite, List<RecommendedArtistDto.SimilarArtistDto> similar, List<ArtistCityResponse> localCity, String spotifyTopTrackPreview) Creates an instance of aRecommendedArtistDtorecord class.RecommendedArtistDto(RecommendedFestivalArtistDto festivalArtistDto) Constructs a RecommendedArtistDto from a RecommendedFestivalArtistDto. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.genres()Returns the value of thegenresrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.image()Returns the value of theimagerecord component.booleanReturns the value of theisFavoriterecord component.isSeed()Returns the value of theisSeedrecord component.Returns the value of thelocalCityrecord component.name()Returns the value of thenamerecord component.score()Returns the value of thescorerecord component.similar()Returns the value of thesimilarrecord component.Returns the value of thespotifyTopTrackPreviewrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RecommendedArtistDto
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 aRecommendedArtistDtorecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentimage- the value for theimagerecord componentgenres- the value for thegenresrecord componentisSeed- the value for theisSeedrecord componentscore- the value for thescorerecord componentisFavorite- the value for theisFavoriterecord componentsimilar- the value for thesimilarrecord componentlocalCity- the value for thelocalCityrecord componentspotifyTopTrackPreview- the value for thespotifyTopTrackPreviewrecord 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
genres
Returns the value of thegenresrecord component.- Returns:
- the value of the
genresrecord component
-
isSeed
Returns the value of theisSeedrecord component.- Returns:
- the value of the
isSeedrecord component
-
score
Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
isFavorite
public boolean isFavorite()Returns the value of theisFavoriterecord component.- Returns:
- the value of the
isFavoriterecord component
-
similar
Returns the value of thesimilarrecord component.- Returns:
- the value of the
similarrecord component
-
localCity
Returns the value of thelocalCityrecord component.- Returns:
- the value of the
localCityrecord component
-
spotifyTopTrackPreview
Returns the value of thespotifyTopTrackPreviewrecord component.- Returns:
- the value of the
spotifyTopTrackPreviewrecord component
-