Package api.mpba.rastvdmy.dto.request
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionavatar()
Returns the value of theavatar
record component.Returns the value of thecountryOfOrigin
record component.Returns the value of thedateOfBirth
record component.email()
Returns the value of theemail
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.name()
Returns the value of thename
record component.password()
Returns the value of thepassword
record component.Returns the value of thephoneNumber
record component.role()
Returns the value of therole
record component.status()
Returns the value of thestatus
record component.surname()
Returns the value of thesurname
record component.final String
toString()
Returns a string representation of this record class.
-
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 aUserProfileRequest
record class.- Parameters:
id
- the value for theid
record componentname
- the value for thename
record componentsurname
- the value for thesurname
record componentdateOfBirth
- the value for thedateOfBirth
record componentcountryOfOrigin
- the value for thecountryOfOrigin
record componentemail
- the value for theemail
record componentpassword
- the value for thepassword
record componentphoneNumber
- the value for thephoneNumber
record componentavatar
- the value for theavatar
record componentstatus
- the value for thestatus
record componentrole
- the value for therole
record 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)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
surname
Returns the value of thesurname
record component.- Returns:
- the value of the
surname
record component
-
dateOfBirth
Returns the value of thedateOfBirth
record component.- Returns:
- the value of the
dateOfBirth
record component
-
countryOfOrigin
Returns the value of thecountryOfOrigin
record component.- Returns:
- the value of the
countryOfOrigin
record component
-
email
Returns the value of theemail
record component.- Returns:
- the value of the
email
record component
-
password
Returns the value of thepassword
record component.- Returns:
- the value of the
password
record component
-
phoneNumber
Returns the value of thephoneNumber
record component.- Returns:
- the value of the
phoneNumber
record component
-
avatar
Returns the value of theavatar
record component.- Returns:
- the value of the
avatar
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
role
Returns the value of therole
record component.- Returns:
- the value of the
role
record component
-