Package br.com.pawsoncloud.dtos
Record Class AnimaisRespDto
java.lang.Object
java.lang.Record
br.com.pawsoncloud.dtos.AnimaisRespDto
public record AnimaisRespDto(Long id, String nome, String porte, Integer idade, String especie, String pelagem, Double peso, String imgUrl, StatusAdocao status, UsuarioRespDto proprietario)
extends Record
Representa um objeto de transferência de dados (DTO) para informações de animais.
Este DTO é usado para fornecer uma versão simplificada de um animal para a resposta da API.
Retorna todos os dados do pet mais o nome e email do proprietário.
- Author:
- Edielson Assis
-
Constructor Summary
ConstructorsConstructorDescriptionAnimaisRespDto
(Animais animais) Construtor que converte uma instância de Animais para AnimaisRespDto.AnimaisRespDto
(Long id, String nome, String porte, Integer idade, String especie, String pelagem, Double peso, String imgUrl, StatusAdocao status, UsuarioRespDto proprietario) Creates an instance of aAnimaisRespDto
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.especie()
Returns the value of theespecie
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.idade()
Returns the value of theidade
record component.imgUrl()
Returns the value of theimgUrl
record component.nome()
Returns the value of thenome
record component.pelagem()
Returns the value of thepelagem
record component.peso()
Returns the value of thepeso
record component.porte()
Returns the value of theporte
record component.Returns the value of theproprietario
record component.status()
Returns the value of thestatus
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
AnimaisRespDto
Construtor que converte uma instância de Animais para AnimaisRespDto.- Parameters:
animais
- A instância de Animais a ser convertida.
-
AnimaisRespDto
public AnimaisRespDto(Long id, String nome, String porte, Integer idade, String especie, String pelagem, Double peso, String imgUrl, StatusAdocao status, UsuarioRespDto proprietario) Creates an instance of aAnimaisRespDto
record class.- Parameters:
id
- the value for theid
record componentnome
- the value for thenome
record componentporte
- the value for theporte
record componentidade
- the value for theidade
record componentespecie
- the value for theespecie
record componentpelagem
- the value for thepelagem
record componentpeso
- the value for thepeso
record componentimgUrl
- the value for theimgUrl
record componentstatus
- the value for thestatus
record componentproprietario
- the value for theproprietario
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
-
nome
Returns the value of thenome
record component.- Returns:
- the value of the
nome
record component
-
porte
Returns the value of theporte
record component.- Returns:
- the value of the
porte
record component
-
idade
Returns the value of theidade
record component.- Returns:
- the value of the
idade
record component
-
especie
Returns the value of theespecie
record component.- Returns:
- the value of the
especie
record component
-
pelagem
Returns the value of thepelagem
record component.- Returns:
- the value of the
pelagem
record component
-
peso
Returns the value of thepeso
record component.- Returns:
- the value of the
peso
record component
-
imgUrl
Returns the value of theimgUrl
record component.- Returns:
- the value of the
imgUrl
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
proprietario
Returns the value of theproprietario
record component.- Returns:
- the value of the
proprietario
record component
-