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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe constants of this enumerated type describe the various types of companion that aAdReplyInfocan link to -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theadvertiserNamerecord component.The field for thecaptionrecord component.private final AdReplyInfo.MediaTypeThe field for themediaTyperecord component.private final Optional<byte[]> The field for thethumbnailrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAdReplyInfo(String advertiserName, AdReplyInfo.MediaType mediaType, Optional<byte[]> thumbnail, Optional<String> caption) Creates an instance of aAdReplyInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadvertiserNamerecord component.caption()Returns the value of thecaptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themediaTyperecord component.Optional<byte[]> Returns the value of thethumbnailrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
advertiserName
The field for theadvertiserNamerecord component. -
mediaType
The field for themediaTyperecord component. -
thumbnail
The field for thethumbnailrecord component. -
caption
The field for thecaptionrecord component.
-
-
Constructor Details
-
AdReplyInfo
public AdReplyInfo(String advertiserName, AdReplyInfo.MediaType mediaType, Optional<byte[]> thumbnail, Optional<String> caption) Creates an instance of aAdReplyInforecord class.- Parameters:
advertiserName- the value for theadvertiserNamerecord componentmediaType- the value for themediaTyperecord componentthumbnail- the value for thethumbnailrecord componentcaption- the value for thecaptionrecord 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). -
advertiserName
Returns the value of theadvertiserNamerecord component.- Returns:
- the value of the
advertiserNamerecord component
-
mediaType
Returns the value of themediaTyperecord component.- Returns:
- the value of the
mediaTyperecord component
-
thumbnail
Returns the value of thethumbnailrecord component.- Returns:
- the value of the
thumbnailrecord component
-
caption
Returns the value of thecaptionrecord component.- Returns:
- the value of the
captionrecord component
-