Record Class AddressResponseDTO
java.lang.Object
java.lang.Record
com.fiap.tech_challenge.parte1.ms_users.dtos.AddressResponseDTO
- Record Components:
id
- unique identifier of the addresszipcode
- postal code of the addressstreet
- street namenumber
- street numbercomplement
- optional additional address detailsneighborhood
- neighborhood namecity
- city namestate
- two-letter state codeuserId
- identifier of the user owning the address
public record AddressResponseDTO(UUID id, String zipcode, String street, Integer number, String complement, String neighborhood, String city, String state, String userId)
extends Record
Data Transfer Object for address responses.
This DTO is used to send address data from the server to the client,
typically after creating or retrieving an address.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncity()
Returns the value of thecity
record component.Returns the value of thecomplement
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.Returns the value of theneighborhood
record component.number()
Returns the value of thenumber
record component.state()
Returns the value of thestate
record component.street()
Returns the value of thestreet
record component.final String
toString()
Returns a string representation of this record class.userId()
Returns the value of theuserId
record component.zipcode()
Returns the value of thezipcode
record component.
-
Constructor Details
-
AddressResponseDTO
public AddressResponseDTO(UUID id, String zipcode, String street, Integer number, String complement, String neighborhood, String city, String state, String userId) Creates an instance of aAddressResponseDTO
record class.- Parameters:
id
- the value for theid
record componentzipcode
- the value for thezipcode
record componentstreet
- the value for thestreet
record componentnumber
- the value for thenumber
record componentcomplement
- the value for thecomplement
record componentneighborhood
- the value for theneighborhood
record componentcity
- the value for thecity
record componentstate
- the value for thestate
record componentuserId
- the value for theuserId
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
-
zipcode
Returns the value of thezipcode
record component.- Returns:
- the value of the
zipcode
record component
-
street
Returns the value of thestreet
record component.- Returns:
- the value of the
street
record component
-
number
Returns the value of thenumber
record component.- Returns:
- the value of the
number
record component
-
complement
Returns the value of thecomplement
record component.- Returns:
- the value of the
complement
record component
-
neighborhood
Returns the value of theneighborhood
record component.- Returns:
- the value of the
neighborhood
record component
-
city
Returns the value of thecity
record component.- Returns:
- the value of the
city
record component
-
state
Returns the value of thestate
record component.- Returns:
- the value of the
state
record component
-
userId
Returns the value of theuserId
record component.- Returns:
- the value of the
userId
record component
-