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 Details

    • AnimaisRespDto

      public AnimaisRespDto(Animais animais)
      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 a AnimaisRespDto record class.
      Parameters:
      id - the value for the id record component
      nome - the value for the nome record component
      porte - the value for the porte record component
      idade - the value for the idade record component
      especie - the value for the especie record component
      pelagem - the value for the pelagem record component
      peso - the value for the peso record component
      imgUrl - the value for the imgUrl record component
      status - the value for the status record component
      proprietario - the value for the proprietario 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 Long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • nome

      public String nome()
      Returns the value of the nome record component.
      Returns:
      the value of the nome record component
    • porte

      public String porte()
      Returns the value of the porte record component.
      Returns:
      the value of the porte record component
    • idade

      public Integer idade()
      Returns the value of the idade record component.
      Returns:
      the value of the idade record component
    • especie

      public String especie()
      Returns the value of the especie record component.
      Returns:
      the value of the especie record component
    • pelagem

      public String pelagem()
      Returns the value of the pelagem record component.
      Returns:
      the value of the pelagem record component
    • peso

      public Double peso()
      Returns the value of the peso record component.
      Returns:
      the value of the peso record component
    • imgUrl

      public String imgUrl()
      Returns the value of the imgUrl record component.
      Returns:
      the value of the imgUrl record component
    • status

      public StatusAdocao status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • proprietario

      public UsuarioRespDto proprietario()
      Returns the value of the proprietario record component.
      Returns:
      the value of the proprietario record component