java.lang.Object
it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage<VideoOrGifMessage>
it.auties.whatsapp.model.message.standard.VideoOrGifMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage
,it.auties.protobuf.model.ProtobufObject
,InteractiveHeaderAttachment
,HighlyStructuredFourRowTemplateTitle
,HydratedFourRowTemplateTitle
,MutableAttachmentProvider<VideoOrGifMessage>
,ButtonsMessageHeader
,ContextualMessage
,MediaMessage<VideoOrGifMessage>
,Message
public final class VideoOrGifMessage
extends it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage<VideoOrGifMessage>
implements MediaMessage<VideoOrGifMessage>, InteractiveHeaderAttachment, ButtonsMessageHeader, HighlyStructuredFourRowTemplateTitle, HydratedFourRowTemplateTitle
A model class that represents a message holding a video inside
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The constants of this enumerated type describe the various sources from where a gif can come fromNested classes/interfaces inherited from interface it.auties.whatsapp.model.message.button.ButtonsMessageHeader
ButtonsMessageHeader.Type
Nested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.hsm.HighlyStructuredFourRowTemplateTitle
HighlyStructuredFourRowTemplateTitle.Type
Nested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.hydrated.HydratedFourRowTemplateTitle
HydratedFourRowTemplateTitle.Type
Nested classes/interfaces inherited from interface it.auties.whatsapp.model.button.interactive.InteractiveHeaderAttachment
InteractiveHeaderAttachment.Type
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final ContextInfo
private final Integer
private final VideoOrGifMessage.Attribution
private final boolean
private final Integer
private final List
<InteractiveLocationAnnotation> private String
private byte[]
private byte[]
private long
private byte[]
private Long
private String
private final String
private final String
private final byte[]
private final byte[]
private final String
private final byte[]
private final byte[]
private final boolean
private final Integer
-
Constructor Summary
ConstructorsConstructorDescriptionVideoOrGifMessage
(String mediaUrl, String mimetype, byte[] mediaSha256, Long mediaSize, Integer duration, byte[] mediaKey, String caption, boolean gifPlayback, Integer height, Integer width, byte[] mediaEncryptedSha256, List<InteractiveLocationAnnotation> interactiveAnnotations, String mediaDirectPath, long mediaKeyTimestampSeconds, byte[] thumbnail, ContextInfo contextInfo, byte[] streamingSidecar, VideoOrGifMessage.Attribution gifAttribution, boolean viewOnce, String thumbnailDirectPath, byte[] thumbnailSha256, byte[] thumbnailEncSha256, String staticUrl) -
Method Summary
Modifier and TypeMethodDescriptioncaption()
duration()
(package private) static VideoOrGifMessage
gifBuilder
(byte[] media, String mimeType, String caption, VideoOrGifMessage.Attribution gifAttribution, byte[] thumbnail, ContextInfo contextInfo) boolean
height()
Return the type of this titleprivate static boolean
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 providerOptional
<byte[]> Optional
<byte[]> Optional
<byte[]> Optional
<byte[]> Return the type of this title(package private) static VideoOrGifMessage
videoBuilder
(byte[] media, String mimeType, String caption, byte[] thumbnail, ContextInfo contextInfo) boolean
viewOnce()
width()
Methods inherited from class it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage
decodedMedia, handle, setDecodedMedia, setHandle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface it.auties.whatsapp.model.message.model.MediaMessage
attachmentType, category, type
-
Field Details
-
mediaUrl
-
mimetype
-
mediaSha256
private byte[] mediaSha256 -
mediaSize
-
duration
-
mediaKey
private byte[] mediaKey -
caption
-
gifPlayback
private final boolean gifPlayback -
height
-
width
-
mediaEncryptedSha256
private byte[] mediaEncryptedSha256 -
interactiveAnnotations
-
mediaDirectPath
-
mediaKeyTimestampSeconds
private long mediaKeyTimestampSeconds -
thumbnail
private final byte[] thumbnail -
contextInfo
-
streamingSidecar
private final byte[] streamingSidecar -
gifAttribution
-
viewOnce
private final boolean viewOnce -
thumbnailDirectPath
-
thumbnailSha256
private final byte[] thumbnailSha256 -
thumbnailEncSha256
private final byte[] thumbnailEncSha256 -
staticUrl
-
-
Constructor Details
-
VideoOrGifMessage
public VideoOrGifMessage(String mediaUrl, String mimetype, byte[] mediaSha256, Long mediaSize, Integer duration, byte[] mediaKey, String caption, boolean gifPlayback, Integer height, Integer width, byte[] mediaEncryptedSha256, List<InteractiveLocationAnnotation> interactiveAnnotations, String mediaDirectPath, long mediaKeyTimestampSeconds, byte[] thumbnail, ContextInfo contextInfo, byte[] streamingSidecar, VideoOrGifMessage.Attribution gifAttribution, boolean viewOnce, String thumbnailDirectPath, byte[] thumbnailSha256, byte[] thumbnailEncSha256, String staticUrl)
-
-
Method Details
-
videoBuilder
static VideoOrGifMessage videoBuilder(byte[] media, String mimeType, String caption, byte[] thumbnail, ContextInfo contextInfo) -
gifBuilder
static VideoOrGifMessage gifBuilder(byte[] media, String mimeType, String caption, VideoOrGifMessage.Attribution gifAttribution, byte[] thumbnail, ContextInfo contextInfo) -
isNotGif
-
mediaUrl
Description copied from interface:MutableAttachmentProvider
Returns the url to the media- Specified by:
mediaUrl
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- a nullable String
-
setMediaUrl
Description copied from interface:MutableAttachmentProvider
Sets the media url of this provider- Specified by:
setMediaUrl
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- the same provider
-
mediaDirectPath
Description copied from interface:MutableAttachmentProvider
Returns the direct path to the media- Specified by:
mediaDirectPath
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- a nullable String
-
setMediaDirectPath
Description copied from interface:MutableAttachmentProvider
Sets the direct path of this provider- Specified by:
setMediaDirectPath
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- the same provider
-
mediaKey
Description copied from interface:MutableAttachmentProvider
Returns the key of this media- Specified by:
mediaKey
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- a non-null array of bytes
-
setMediaKey
Description copied from interface:MutableAttachmentProvider
Sets the media key of this provider- Specified by:
setMediaKey
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- the same provider
-
setMediaKeyTimestamp
Description copied from interface:MutableAttachmentProvider
Sets the timestamp of the media key- Specified by:
setMediaKeyTimestamp
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- the same provider
-
mediaSha256
Description copied from interface:MutableAttachmentProvider
Returns the sha256 of this media- Specified by:
mediaSha256
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- a non-null array of bytes
-
setMediaSha256
Description copied from interface:MutableAttachmentProvider
Sets the sha256 of the media in this provider- Specified by:
setMediaSha256
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- the same provider
-
mediaEncryptedSha256
Description copied from interface:MutableAttachmentProvider
Returns the sha256 of this encrypted media- Specified by:
mediaEncryptedSha256
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- a non-null array of bytes
-
setMediaEncryptedSha256
Description copied from interface:MutableAttachmentProvider
Sets the sha256 of the encrypted media in this provider- Specified by:
setMediaEncryptedSha256
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- the same provider
-
mediaSize
Description copied from interface:MutableAttachmentProvider
Returns the size of this media- Specified by:
mediaSize
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- a long
-
mediaKeyTimestampSeconds
Description copied from interface:MediaMessage
Returns the timestampSeconds, that is the seconds elapsed sinceInstant.EPOCH
, forMutableAttachmentProvider.mediaKey()
- Specified by:
mediaKeyTimestampSeconds
in interfaceMediaMessage<VideoOrGifMessage>
- Returns:
- an unsigned long
-
mediaKeyTimestamp
Description copied from interface:MediaMessage
Returns the timestampSeconds forMutableAttachmentProvider.mediaKey()
- Specified by:
mediaKeyTimestamp
in interfaceMediaMessage<VideoOrGifMessage>
- Returns:
- a zoned date time
-
setMediaSize
Description copied from interface:MutableAttachmentProvider
Sets the size of this media- Specified by:
setMediaSize
in interfaceMutableAttachmentProvider<VideoOrGifMessage>
- Returns:
- a long
-
caption
-
height
-
width
-
gifPlayback
public boolean gifPlayback() -
mediaType
Description copied from interface:MediaMessage
Returns the media type of the media that this object wraps- Specified by:
mediaType
in interfaceMediaMessage<VideoOrGifMessage>
- Returns:
- a non-null
MediaMessageType
-
titleType
Description copied from interface:HighlyStructuredFourRowTemplateTitle
Return the type of this title- Specified by:
titleType
in interfaceHighlyStructuredFourRowTemplateTitle
- Returns:
- a non-null type
-
hydratedTitleType
Description copied from interface:HydratedFourRowTemplateTitle
Return the type of this title- Specified by:
hydratedTitleType
in interfaceHydratedFourRowTemplateTitle
- Returns:
- a non-null type
-
interactiveHeaderType
- Specified by:
interactiveHeaderType
in interfaceInteractiveHeaderAttachment
-
buttonHeaderType
- Specified by:
buttonHeaderType
in interfaceButtonsMessageHeader
-
contextInfo
- Specified by:
contextInfo
in interfaceContextualMessage
-
mimetype
-
duration
-
interactiveAnnotations
-
thumbnail
-
streamingSidecar
-
gifAttribution
-
viewOnce
public boolean viewOnce() -
thumbnailDirectPath
-
thumbnailSha256
-
thumbnailEncSha256
-
staticUrl
-