Module it.auties.cobalt
Interface MediaMessage<T extends MediaMessage<T>>
- All Superinterfaces:
ContextualMessage,Message,MutableAttachmentProvider<T>,it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject
- All Known Implementing Classes:
AudioMessage,DocumentMessage,it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage,ImageMessage,PaymentInvoiceMessage,StickerMessage,VideoOrGifMessage
public sealed interface MediaMessage<T extends MediaMessage<T>>
extends ContextualMessage, MutableAttachmentProvider<T>
permits PaymentInvoiceMessage, AudioMessage, DocumentMessage, ImageMessage, StickerMessage, VideoOrGifMessage (not exhaustive)
A media message
Read its content using
Whatsapp.downloadMedia(ChatMessageInfo)-
Method Summary
Modifier and TypeMethodDescriptiondefault AttachmentTypeReturns the type of this attachmentdefault MessageCategorycategory()Return message categoryReturns the timestampSeconds forMutableAttachmentProvider.mediaKey()Returns the timestampSeconds, that is the seconds elapsed sinceInstant.EPOCH, forMutableAttachmentProvider.mediaKey()Returns the media type of the media that this object wrapsdefault MessageTypetype()Return message typeMethods inherited from interface it.auties.whatsapp.model.message.model.ContextualMessage
contextInfoMethods inherited from interface it.auties.whatsapp.model.media.MutableAttachmentProvider
mediaDirectPath, mediaEncryptedSha256, mediaKey, mediaSha256, mediaSize, mediaUrl, setMediaDirectPath, setMediaEncryptedSha256, setMediaKey, setMediaKeyTimestamp, setMediaSha256, setMediaSize, setMediaUrl
-
Method Details
-
mediaKeyTimestampSeconds
OptionalLong mediaKeyTimestampSeconds()Returns the timestampSeconds, that is the seconds elapsed sinceInstant.EPOCH, forMutableAttachmentProvider.mediaKey()- Returns:
- an unsigned long
-
mediaKeyTimestamp
Optional<ZonedDateTime> mediaKeyTimestamp()Returns the timestampSeconds forMutableAttachmentProvider.mediaKey()- Returns:
- a zoned date time
-
mediaType
MediaMessageType mediaType()Returns the media type of the media that this object wraps- Returns:
- a non-null
MediaMessageType
-
category
Description copied from interface:MessageReturn message category -
type
Description copied from interface:MessageReturn message type -
attachmentType
Description copied from interface:MutableAttachmentProviderReturns the type of this attachment- Specified by:
attachmentTypein interfaceMutableAttachmentProvider<T extends MediaMessage<T>>- Returns:
- a non-null attachment
-