Record Class UserProfileRequest

java.lang.Object
java.lang.Record
api.mpba.rastvdmy.dto.request.UserProfileRequest
Record Components:
id - The unique identifier for the user.
name - The user's first name.
surname - The user's surname.
dateOfBirth - The user's date of birth, formatted as a string.
countryOfOrigin - The user's country of origin.
email - The user's email address.
password - The user's password.
phoneNumber - The user's phone number.
avatar - The URL or path to the user's avatar image.
status - The current status of the user (active, inactive, etc.).
role - The user's assigned role within the system.

public record UserProfileRequest(UUID id, String name, String surname, String dateOfBirth, String countryOfOrigin, String email, String password, String phoneNumber, String avatar, UserStatus status, UserRole role) extends Record
This class represents a request to create or update a user's profile in the system.
  • Constructor Details

    • UserProfileRequest

      public UserProfileRequest(UUID id, String name, String surname, String dateOfBirth, String countryOfOrigin, String email, String password, String phoneNumber, String avatar, UserStatus status, UserRole role)
      Creates an instance of a UserProfileRequest record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      surname - the value for the surname record component
      dateOfBirth - the value for the dateOfBirth record component
      countryOfOrigin - the value for the countryOfOrigin record component
      email - the value for the email record component
      password - the value for the password record component
      phoneNumber - the value for the phoneNumber record component
      avatar - the value for the avatar record component
      status - the value for the status record component
      role - the value for the role 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.
    • 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
    • surname

      public String surname()
      Returns the value of the surname record component.
      Returns:
      the value of the surname record component
    • dateOfBirth

      public String dateOfBirth()
      Returns the value of the dateOfBirth record component.
      Returns:
      the value of the dateOfBirth record component
    • countryOfOrigin

      public String countryOfOrigin()
      Returns the value of the countryOfOrigin record component.
      Returns:
      the value of the countryOfOrigin record component
    • email

      public String email()
      Returns the value of the email record component.
      Returns:
      the value of the email record component
    • password

      public String password()
      Returns the value of the password record component.
      Returns:
      the value of the password record component
    • phoneNumber

      public String phoneNumber()
      Returns the value of the phoneNumber record component.
      Returns:
      the value of the phoneNumber record component
    • avatar

      public String avatar()
      Returns the value of the avatar record component.
      Returns:
      the value of the avatar record component
    • status

      public UserStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • role

      public UserRole role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component