Record Class EnderecoFullRespDto

java.lang.Object
java.lang.Record
br.com.pawsoncloud.dtos.EnderecoFullRespDto

public record EnderecoFullRespDto(String logradouro, String complemento, String cidade, String estado) extends Record
Representa um objeto de transferência de dados (DTO) para informações completas de endereço. Este DTO é usado para fornecer uma versão simplificada de um endereço para a resposta da API. Retorna todos os dados do endereço.
Author:
Edielson Assis
  • Constructor Details

    • EnderecoFullRespDto

      public EnderecoFullRespDto(Endereco endereco)
      Construtor que converte uma instância de Endereco para EnderecoFullRespDto.
      Parameters:
      endereco - A instância de Endereco a ser convertida.
    • EnderecoFullRespDto

      public EnderecoFullRespDto(String logradouro, String complemento, String cidade, String estado)
      Creates an instance of a EnderecoFullRespDto record class.
      Parameters:
      logradouro - the value for the logradouro record component
      complemento - the value for the complemento record component
      cidade - the value for the cidade record component
      estado - the value for the estado 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.
    • logradouro

      public String logradouro()
      Returns the value of the logradouro record component.
      Returns:
      the value of the logradouro record component
    • complemento

      public String complemento()
      Returns the value of the complemento record component.
      Returns:
      the value of the complemento record component
    • cidade

      public String cidade()
      Returns the value of the cidade record component.
      Returns:
      the value of the cidade record component
    • estado

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