Record Class UsersResponseDTO
java.lang.Object
java.lang.Record
com.fiap.tech_challenge.parte1.ms_users.dtos.UsersResponseDTO
- Record Components:
id
- the unique identifier of the username
- the full name of the useremail
- the user's email addresslogin
- the unique login identifier of the userrole
- the user's role (e.g., OWNER or CLIENT)address
- the list of addresses associated with the user
public record UsersResponseDTO(UUID id, String name, String email, String login, String role, List<AddressResponseDTO> address)
extends Record
Data Transfer Object representing a user response.
Contains user information returned from the system, including user identifiers, contact details, role, and associated addresses.
-
Constructor Summary
ConstructorsConstructorDescriptionUsersResponseDTO
(UUID id, String name, String email, String login, String role, List<AddressResponseDTO> address) Creates an instance of aUsersResponseDTO
record class. -
Method Summary
Modifier and TypeMethodDescriptionaddress()
Returns the value of theaddress
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.login()
Returns the value of thelogin
record component.name()
Returns the value of thename
record component.role()
Returns the value of therole
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
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
-
email
Returns the value of theemail
record component.- Returns:
- the value of the
email
record component
-
login
Returns the value of thelogin
record component.- Returns:
- the value of the
login
record component
-
role
Returns the value of therole
record component.- Returns:
- the value of the
role
record component
-
address
Returns the value of theaddress
record component.- Returns:
- the value of the
address
record component
-