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 aUsersResponseDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.email()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.login()Returns the value of theloginrecord component.name()Returns the value of thenamerecord component.role()Returns the value of therolerecord component.final StringtoString()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 theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
email
Returns the value of theemailrecord component.- Returns:
- the value of the
emailrecord component
-
login
Returns the value of theloginrecord component.- Returns:
- the value of the
loginrecord component
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-