Module it.auties.cobalt
Package it.auties.whatsapp.model.media
Interface MutableAttachmentProvider<T extends MutableAttachmentProvider<T>>
- All Superinterfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject
- All Known Subinterfaces:
MediaMessage<T>
- All Known Implementing Classes:
AudioMessage,DocumentMessage,it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage,ExternalBlobReference,HistorySyncNotification,ImageMessage,PaymentInvoiceMessage,StickerMessage,VideoOrGifMessage
public sealed interface MutableAttachmentProvider<T extends MutableAttachmentProvider<T>>
extends it.auties.protobuf.model.ProtobufMessage
permits MediaMessage<T>, ExternalBlobReference, HistorySyncNotification
A sealed interface that represents a class that can provide data about a media
-
Method Summary
Modifier and TypeMethodDescriptionReturns the type of this attachmentReturns the direct path to the mediaOptional<byte[]> Returns the sha256 of this encrypted mediaOptional<byte[]> mediaKey()Returns the key of this mediaOptional<byte[]> Returns the sha256 of this mediaReturns the size of this mediamediaUrl()Returns the url to the mediasetMediaDirectPath(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
-
Method Details
-
mediaUrl
Returns the url to the media- Returns:
- a nullable String
-
setMediaUrl
Sets the media url of this provider- Returns:
- the same provider
-
mediaDirectPath
Returns the direct path to the media- Returns:
- a nullable String
-
setMediaDirectPath
Sets the direct path of this provider- Returns:
- the same provider
-
mediaKey
Optional<byte[]> mediaKey()Returns the key of this media- Returns:
- a non-null array of bytes
-
setMediaKey
Sets the media key of this provider- Returns:
- the same provider
-
setMediaKeyTimestamp
Sets the timestamp of the media key- Returns:
- the same provider
-
mediaSha256
Optional<byte[]> mediaSha256()Returns the sha256 of this media- Returns:
- a non-null array of bytes
-
setMediaSha256
Sets the sha256 of the media in this provider- Returns:
- the same provider
-
mediaEncryptedSha256
Optional<byte[]> mediaEncryptedSha256()Returns the sha256 of this encrypted media- Returns:
- a non-null array of bytes
-
setMediaEncryptedSha256
Sets the sha256 of the encrypted media in this provider- Returns:
- the same provider
-
mediaSize
OptionalLong mediaSize()Returns the size of this media- Returns:
- a long
-
setMediaSize
Sets the size of this media- Returns:
- a long
-
attachmentType
AttachmentType attachmentType()Returns the type of this attachment- Returns:
- a non-null attachment
-