java.lang.Object
it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage<StickerMessage>
it.auties.whatsapp.model.message.standard.StickerMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,MutableAttachmentProvider<StickerMessage>,ContextualMessage,MediaMessage<StickerMessage>,Message
public final class StickerMessage
extends it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage<StickerMessage>
implements MediaMessage<StickerMessage>
A model class that represents a message holding a sticker inside
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final booleanprivate final ContextInfoprivate final Integerprivate final byte[]private final Integerprivate Stringprivate byte[]private byte[]private Longprivate byte[]private Longprivate Stringprivate final Stringprivate final Longprivate final byte[]private final Integer -
Constructor Summary
ConstructorsConstructorDescriptionStickerMessage(String mediaUrl, byte[] mediaSha256, byte[] mediaEncryptedSha256, byte[] mediaKey, String mimetype, Integer height, Integer width, String mediaDirectPath, Long mediaSize, Long mediaKeyTimestampSeconds, Integer firstFrameLength, byte[] firstFrameSidecar, boolean animated, byte[] thumbnail, ContextInfo contextInfo, Long stickerSentTimestamp, boolean avatar) -
Method Summary
Modifier and TypeMethodDescriptionbooleananimated()booleanavatar()Optional<byte[]> height()Returns the direct path to the mediaOptional<byte[]> Returns the sha256 of this encrypted mediaOptional<byte[]> mediaKey()Returns the key of this mediaReturns the timestampSeconds forMutableAttachmentProvider.mediaKey()Returns the timestampSeconds, that is the seconds elapsed sinceInstant.EPOCH, forMutableAttachmentProvider.mediaKey()Optional<byte[]> Returns the sha256 of this mediaReturns the size of this mediaReturns the media type of the media that this object wrapsmediaUrl()Returns the url to the mediamimetype()setMediaDirectPath(String mediaDirectPath) Sets the direct path of this providersetMediaEncryptedSha256(byte[] bytes) Sets the sha256 of the encrypted media in this providersetMediaKey(byte[] bytes) Sets the media key of this providersetMediaKeyTimestamp(Long timestamp) Sets the timestamp of the media keysetMediaSha256(byte[] bytes) Sets the sha256 of the media in this providersetMediaSize(long mediaSize) Sets the size of this mediasetMediaUrl(String mediaUrl) Sets the media url of this provider(package private) static StickerMessagesimpleBuilder(byte[] media, String mimeType, byte[] thumbnail, boolean animated, ContextInfo contextInfo) Optional<byte[]> width()Methods inherited from class it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage
decodedMedia, handle, setDecodedMedia, setHandleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.auties.whatsapp.model.message.model.MediaMessage
attachmentType, category, type
-
Field Details
-
mediaUrl
-
mediaSha256
private byte[] mediaSha256 -
mediaEncryptedSha256
private byte[] mediaEncryptedSha256 -
mediaKey
private byte[] mediaKey -
mimetype
-
height
-
width
-
mediaDirectPath
-
mediaSize
-
mediaKeyTimestampSeconds
-
firstFrameLength
-
firstFrameSidecar
private final byte[] firstFrameSidecar -
animated
private final boolean animated -
thumbnail
private final byte[] thumbnail -
contextInfo
-
stickerSentTimestamp
-
avatar
private final boolean avatar
-
-
Constructor Details
-
StickerMessage
public StickerMessage(String mediaUrl, byte[] mediaSha256, byte[] mediaEncryptedSha256, byte[] mediaKey, String mimetype, Integer height, Integer width, String mediaDirectPath, Long mediaSize, Long mediaKeyTimestampSeconds, Integer firstFrameLength, byte[] firstFrameSidecar, boolean animated, byte[] thumbnail, ContextInfo contextInfo, Long stickerSentTimestamp, boolean avatar)
-
-
Method Details
-
simpleBuilder
static StickerMessage simpleBuilder(byte[] media, String mimeType, byte[] thumbnail, boolean animated, ContextInfo contextInfo) -
height
-
width
-
animated
public boolean animated() -
avatar
public boolean avatar() -
mediaUrl
Description copied from interface:MutableAttachmentProviderReturns the url to the media- Specified by:
mediaUrlin interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- a nullable String
-
setMediaUrl
Description copied from interface:MutableAttachmentProviderSets the media url of this provider- Specified by:
setMediaUrlin interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- the same provider
-
mediaDirectPath
Description copied from interface:MutableAttachmentProviderReturns the direct path to the media- Specified by:
mediaDirectPathin interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- a nullable String
-
setMediaDirectPath
Description copied from interface:MutableAttachmentProviderSets the direct path of this provider- Specified by:
setMediaDirectPathin interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- the same provider
-
mediaKey
Description copied from interface:MutableAttachmentProviderReturns the key of this media- Specified by:
mediaKeyin interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- a non-null array of bytes
-
setMediaKey
Description copied from interface:MutableAttachmentProviderSets the media key of this provider- Specified by:
setMediaKeyin interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- the same provider
-
setMediaKeyTimestamp
Description copied from interface:MutableAttachmentProviderSets the timestamp of the media key- Specified by:
setMediaKeyTimestampin interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- the same provider
-
mediaSha256
Description copied from interface:MutableAttachmentProviderReturns the sha256 of this media- Specified by:
mediaSha256in interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- a non-null array of bytes
-
setMediaSha256
Description copied from interface:MutableAttachmentProviderSets the sha256 of the media in this provider- Specified by:
setMediaSha256in interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- the same provider
-
mediaEncryptedSha256
Description copied from interface:MutableAttachmentProviderReturns the sha256 of this encrypted media- Specified by:
mediaEncryptedSha256in interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- a non-null array of bytes
-
setMediaEncryptedSha256
Description copied from interface:MutableAttachmentProviderSets the sha256 of the encrypted media in this provider- Specified by:
setMediaEncryptedSha256in interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- the same provider
-
mediaSize
Description copied from interface:MutableAttachmentProviderReturns the size of this media- Specified by:
mediaSizein interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- a long
-
mediaKeyTimestampSeconds
Description copied from interface:MediaMessageReturns the timestampSeconds, that is the seconds elapsed sinceInstant.EPOCH, forMutableAttachmentProvider.mediaKey()- Specified by:
mediaKeyTimestampSecondsin interfaceMediaMessage<StickerMessage>- Returns:
- an unsigned long
-
mediaKeyTimestamp
Description copied from interface:MediaMessageReturns the timestampSeconds forMutableAttachmentProvider.mediaKey()- Specified by:
mediaKeyTimestampin interfaceMediaMessage<StickerMessage>- Returns:
- a zoned date time
-
setMediaSize
Description copied from interface:MutableAttachmentProviderSets the size of this media- Specified by:
setMediaSizein interfaceMutableAttachmentProvider<StickerMessage>- Returns:
- a long
-
mediaType
Description copied from interface:MediaMessageReturns the media type of the media that this object wraps- Specified by:
mediaTypein interfaceMediaMessage<StickerMessage>- Returns:
- a non-null
MediaMessageType
-
contextInfo
- Specified by:
contextInfoin interfaceContextualMessage
-
mimetype
-
firstFrameLength
-
firstFrameSidecar
-
thumbnail
-
stickerSentTimestamp
-