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 address
zipcode - postal code of the address
street - street name
number - street number
complement - optional additional address details
neighborhood - neighborhood name
city - city name
state - two-letter state code
userId - 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 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 a AddressResponseDTO record class.
      Parameters:
      id - the value for the id record component
      zipcode - the value for the zipcode record component
      street - the value for the street record component
      number - the value for the number record component
      complement - the value for the complement record component
      neighborhood - the value for the neighborhood record component
      city - the value for the city record component
      state - the value for the state record component
      userId - the value for the userId record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • zipcode

      public String zipcode()
      Returns the value of the zipcode record component.
      Returns:
      the value of the zipcode record component
    • street

      public String street()
      Returns the value of the street record component.
      Returns:
      the value of the street record component
    • number

      public Integer number()
      Returns the value of the number record component.
      Returns:
      the value of the number record component
    • complement

      public String complement()
      Returns the value of the complement record component.
      Returns:
      the value of the complement record component
    • neighborhood

      public String neighborhood()
      Returns the value of the neighborhood record component.
      Returns:
      the value of the neighborhood record component
    • city

      public String city()
      Returns the value of the city record component.
      Returns:
      the value of the city record component
    • state

      public String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • userId

      public String userId()
      Returns the value of the userId record component.
      Returns:
      the value of the userId record component