Package api.mpba.rastvdmy.dto.response
Record Class UserProfileResponse
java.lang.Object
java.lang.Record
api.mpba.rastvdmy.dto.response.UserProfileResponse
- Record Components:
id
- The unique identifier of the user.name
- The name of the user.surname
- The surname of the user.dateOfBirth
- The date of birth of the user.countryOfOrigin
- The country of origin of the user.email
- The email address of the user.password
- The password of the user.phoneNumber
- The phone number of the user.avatar
- The avatar of the user.status
- The status of the user.role
- The role of the user in the system.
public record UserProfileResponse(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 response for a user profile in the banking 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
-
UserProfileResponse
public UserProfileResponse(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 aUserProfileResponse
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
-