Record Class AdReplyInfo

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.info.AdReplyInfo
All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage, it.auties.protobuf.model.ProtobufObject, Info

public record AdReplyInfo(String advertiserName, AdReplyInfo.MediaType mediaType, Optional<byte[]> thumbnail, Optional<String> caption) extends Record implements Info, it.auties.protobuf.model.ProtobufMessage
A model class that holds the information related to an companion reply.
  • Field Details

    • advertiserName

      private final String advertiserName
      The field for the advertiserName record component.
    • mediaType

      private final AdReplyInfo.MediaType mediaType
      The field for the mediaType record component.
    • thumbnail

      private final Optional<byte[]> thumbnail
      The field for the thumbnail record component.
    • caption

      private final Optional<String> caption
      The field for the caption record component.
  • Constructor Details

    • AdReplyInfo

      public AdReplyInfo(String advertiserName, AdReplyInfo.MediaType mediaType, Optional<byte[]> thumbnail, Optional<String> caption)
      Creates an instance of a AdReplyInfo record class.
      Parameters:
      advertiserName - the value for the advertiserName record component
      mediaType - the value for the mediaType record component
      thumbnail - the value for the thumbnail record component
      caption - the value for the caption 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.
    • advertiserName

      public String advertiserName()
      Returns the value of the advertiserName record component.
      Returns:
      the value of the advertiserName record component
    • mediaType

      public AdReplyInfo.MediaType mediaType()
      Returns the value of the mediaType record component.
      Returns:
      the value of the mediaType record component
    • thumbnail

      public Optional<byte[]> thumbnail()
      Returns the value of the thumbnail record component.
      Returns:
      the value of the thumbnail record component
    • caption

      public Optional<String> caption()
      Returns the value of the caption record component.
      Returns:
      the value of the caption record component