Package br.com.pawsoncloud.dtos
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 Summary
ConstructorsConstructorDescriptionEnderecoFullRespDto
(Endereco endereco) Construtor que converte uma instância de Endereco para EnderecoFullRespDto.EnderecoFullRespDto
(String logradouro, String complemento, String cidade, String estado) Creates an instance of aEnderecoFullRespDto
record class. -
Method Summary
Modifier and TypeMethodDescriptioncidade()
Returns the value of thecidade
record component.Returns the value of thecomplemento
record component.final boolean
Indicates whether some other object is "equal to" this one.estado()
Returns the value of theestado
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of thelogradouro
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
EnderecoFullRespDto
Construtor que converte uma instância de Endereco para EnderecoFullRespDto.- Parameters:
endereco
- A instância de Endereco a ser convertida.
-
EnderecoFullRespDto
Creates an instance of aEnderecoFullRespDto
record class.- Parameters:
logradouro
- the value for thelogradouro
record componentcomplemento
- the value for thecomplemento
record componentcidade
- the value for thecidade
record componentestado
- the value for theestado
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)
. -
logradouro
Returns the value of thelogradouro
record component.- Returns:
- the value of the
logradouro
record component
-
complemento
Returns the value of thecomplemento
record component.- Returns:
- the value of the
complemento
record component
-
cidade
Returns the value of thecidade
record component.- Returns:
- the value of the
cidade
record component
-
estado
Returns the value of theestado
record component.- Returns:
- the value of the
estado
record component
-