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 Details

    • mediaUrl

      Optional<String> mediaUrl()
      Returns the url to the media
      Returns:
      a nullable String
    • setMediaUrl

      T setMediaUrl(String mediaUrl)
      Sets the media url of this provider
      Returns:
      the same provider
    • mediaDirectPath

      Optional<String> mediaDirectPath()
      Returns the direct path to the media
      Returns:
      a nullable String
    • setMediaDirectPath

      T setMediaDirectPath(String mediaDirectPath)
      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

      T setMediaKey(byte[] bytes)
      Sets the media key of this provider
      Returns:
      the same provider
    • setMediaKeyTimestamp

      T setMediaKeyTimestamp(Long timestamp)
      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

      T setMediaSha256(byte[] bytes)
      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

      T setMediaEncryptedSha256(byte[] bytes)
      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

      T setMediaSize(long mediaSize)
      Sets the size of this media
      Returns:
      a long
    • attachmentType

      AttachmentType attachmentType()
      Returns the type of this attachment
      Returns:
      a non-null attachment