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 thecityrecord component.Returns the value of thecomplementrecord 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.Returns the value of theneighborhoodrecord component.number()Returns the value of thenumberrecord component.state()Returns the value of thestaterecord component.street()Returns the value of thestreetrecord component.final StringtoString()Returns a string representation of this record class.userId()Returns the value of theuserIdrecord component.zipcode()Returns the value of thezipcoderecord 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 aAddressResponseDTOrecord class.- Parameters:
id- the value for theidrecord componentzipcode- the value for thezipcoderecord componentstreet- the value for thestreetrecord componentnumber- the value for thenumberrecord componentcomplement- the value for thecomplementrecord componentneighborhood- the value for theneighborhoodrecord componentcity- the value for thecityrecord componentstate- the value for thestaterecord componentuserId- the value for theuserIdrecord 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 theidrecord component.- Returns:
- the value of the
idrecord component
-
zipcode
Returns the value of thezipcoderecord component.- Returns:
- the value of the
zipcoderecord component
-
street
Returns the value of thestreetrecord component.- Returns:
- the value of the
streetrecord component
-
number
Returns the value of thenumberrecord component.- Returns:
- the value of the
numberrecord component
-
complement
Returns the value of thecomplementrecord component.- Returns:
- the value of the
complementrecord component
-
neighborhood
Returns the value of theneighborhoodrecord component.- Returns:
- the value of the
neighborhoodrecord component
-
city
Returns the value of thecityrecord component.- Returns:
- the value of the
cityrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
userId
Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-