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 Details

    • UserPatchRequest

      public UserPatchRequest(String name, Boolean emailOptIn, Boolean playlistsIncludeLocalOnly, Boolean generateSpotifyPlaylists)
      Creates an instance of a UserPatchRequest record class.
      Parameters:
      name - the value for the name record component
      emailOptIn - the value for the emailOptIn record component
      playlistsIncludeLocalOnly - the value for the playlistsIncludeLocalOnly record component
      generateSpotifyPlaylists - the value for the generateSpotifyPlaylists 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • name

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

      public Boolean emailOptIn()
      Returns the value of the emailOptIn record component.
      Returns:
      the value of the emailOptIn record component
    • playlistsIncludeLocalOnly

      public Boolean playlistsIncludeLocalOnly()
      Returns the value of the playlistsIncludeLocalOnly record component.
      Returns:
      the value of the playlistsIncludeLocalOnly record component
    • generateSpotifyPlaylists

      public Boolean generateSpotifyPlaylists()
      Returns the value of the generateSpotifyPlaylists record component.
      Returns:
      the value of the generateSpotifyPlaylists record component