Package org.localify.user.dto
Record Class UserPatchRequest
java.lang.Object
java.lang.Record
org.localify.user.dto.UserPatchRequest
- Record Components:
name- The user's name.emailOptIn- Whether the user has opted in to emails.playlistsIncludeLocalOnly- Whether the user's playlists should include only local artists.generateSpotifyPlaylists- Whether to generate Spotify playlists for the user.
public record UserPatchRequest(String name, Boolean emailOptIn, Boolean playlistsIncludeLocalOnly, Boolean generateSpotifyPlaylists)
extends Record
Represents a request to patch a user's details.
-
Constructor Summary
ConstructorsConstructorDescriptionUserPatchRequest(String name, Boolean emailOptIn, Boolean playlistsIncludeLocalOnly, Boolean generateSpotifyPlaylists) Creates an instance of aUserPatchRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theemailOptInrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegenerateSpotifyPlaylistsrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of theplaylistsIncludeLocalOnlyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UserPatchRequest
public UserPatchRequest(String name, Boolean emailOptIn, Boolean playlistsIncludeLocalOnly, Boolean generateSpotifyPlaylists) Creates an instance of aUserPatchRequestrecord class.- Parameters:
name- the value for thenamerecord componentemailOptIn- the value for theemailOptInrecord componentplaylistsIncludeLocalOnly- the value for theplaylistsIncludeLocalOnlyrecord componentgenerateSpotifyPlaylists- the value for thegenerateSpotifyPlaylistsrecord 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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
emailOptIn
Returns the value of theemailOptInrecord component.- Returns:
- the value of the
emailOptInrecord component
-
playlistsIncludeLocalOnly
Returns the value of theplaylistsIncludeLocalOnlyrecord component.- Returns:
- the value of the
playlistsIncludeLocalOnlyrecord component
-
generateSpotifyPlaylists
Returns the value of thegenerateSpotifyPlaylistsrecord component.- Returns:
- the value of the
generateSpotifyPlaylistsrecord component
-