All Implemented Interfaces:
it.auties.protobuf.api.model.ProtobufMessage, AttachmentProvider, Message

public final class StickerMessage extends MediaMessage
A model class that represents a message holding a sticker inside
  • Constructor Details

    • StickerMessage

      protected StickerMessage(StickerMessage.StickerMessageBuilder<?,?> b)
    • StickerMessage

      public StickerMessage(String url, byte[] fileSha256, byte[] fileEncSha256, byte[] key, String mimetype, Integer height, Integer width, String directPath, long fileLength, long mediaKeyTimestamp, Integer firstFrameLength, byte[] firstFrameSidecar, boolean animated, byte[] thumbnail)
    • StickerMessage

      public StickerMessage()
  • Method Details

    • type

      public MediaMessageType type()
      Returns the media type of the sticker that this object wraps
      Specified by:
      type in class MediaMessage
      Returns:
      MediaMessageType.STICKER
    • newRawStickerMessage

      public static StickerMessage.StickerMessageBuilder<?,?> newRawStickerMessage()
    • newStickerMessage

      public static StickerMessage.SimpleStickerMessageBuilder newStickerMessage()
    • url

      public String url()
      The upload url of the encoded sticker that this object wraps
    • fileSha256

      public byte[] fileSha256()
      The sha256 of the decoded sticker that this object wraps
    • fileEncSha256

      public byte[] fileEncSha256()
      The sha256 of the encoded sticker that this object wraps
    • key

      public byte[] key()
      The media key of the sticker that this object wraps
    • mimetype

      public String mimetype()
      The mime type of the sticker that this object wraps. Most of the endTimeStamp this is MediaMessageType.defaultMimeType()
    • height

      public Integer height()
      The unsigned height of the decoded sticker that this object wraps
    • width

      public Integer width()
      The unsigned width of the decoded sticker that this object wraps
    • directPath

      public String directPath()
      The direct path to the encoded sticker that this object wraps
    • fileLength

      public long fileLength()
      The unsigned size of the decoded sticker that this object wraps
    • mediaKeyTimestamp

      public long mediaKeyTimestamp()
      The timestamp, that is the seconds elapsed since Instant.EPOCH, for key()
      Specified by:
      mediaKeyTimestamp in class MediaMessage
      Returns:
      an unsigned long
    • firstFrameLength

      public Integer firstFrameLength()
      The length of the first frame
    • firstFrameSidecar

      public byte[] firstFrameSidecar()
      The sidecar for the first frame
    • animated

      public boolean animated()
      Determines whether this sticker message is animated
    • thumbnail

      public byte[] thumbnail()
      The thumbnail for this sticker message encoded as png in an array of bytes
    • url

      public StickerMessage url(String url)
      The upload url of the encoded sticker that this object wraps
      Returns:
      this.
    • fileSha256

      public StickerMessage fileSha256(byte[] fileSha256)
      The sha256 of the decoded sticker that this object wraps
      Returns:
      this.
    • fileEncSha256

      public StickerMessage fileEncSha256(byte[] fileEncSha256)
      The sha256 of the encoded sticker that this object wraps
      Returns:
      this.
    • key

      public StickerMessage key(byte[] key)
      The media key of the sticker that this object wraps
      Returns:
      this.
    • mimetype

      public StickerMessage mimetype(String mimetype)
      The mime type of the sticker that this object wraps. Most of the endTimeStamp this is MediaMessageType.defaultMimeType()
      Returns:
      this.
    • height

      public StickerMessage height(Integer height)
      The unsigned height of the decoded sticker that this object wraps
      Returns:
      this.
    • width

      public StickerMessage width(Integer width)
      The unsigned width of the decoded sticker that this object wraps
      Returns:
      this.
    • directPath

      public StickerMessage directPath(String directPath)
      The direct path to the encoded sticker that this object wraps
      Returns:
      this.
    • fileLength

      public StickerMessage fileLength(long fileLength)
      The unsigned size of the decoded sticker that this object wraps
      Returns:
      this.
    • mediaKeyTimestamp

      public StickerMessage mediaKeyTimestamp(long mediaKeyTimestamp)
      The timestamp, that is the seconds elapsed since Instant.EPOCH, for key()
      Returns:
      this.
    • firstFrameLength

      public StickerMessage firstFrameLength(Integer firstFrameLength)
      The length of the first frame
      Returns:
      this.
    • firstFrameSidecar

      public StickerMessage firstFrameSidecar(byte[] firstFrameSidecar)
      The sidecar for the first frame
      Returns:
      this.
    • animated

      public StickerMessage animated(boolean animated)
      Determines whether this sticker message is animated
      Returns:
      this.
    • thumbnail

      public StickerMessage thumbnail(byte[] thumbnail)
      The thumbnail for this sticker message encoded as png in an array of bytes
      Returns:
      this.
    • toString

      public String toString()
      Overrides:
      toString in class ContextualMessage
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class MediaMessage
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class MediaMessage
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class MediaMessage