java.lang.Object
java.lang.Record
it.auties.whatsapp.model.action.StickerAction
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,Action
public record StickerAction(String url, byte[] fileEncSha256, byte[] mediaKey, String mimetype, int height, int width, String directPath, long fileLength, boolean favorite, Integer deviceIdHint)
extends Record
implements Action
A model clas that represents a sticker
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IntegerThe field for thedeviceIdHintrecord component.private final StringThe field for thedirectPathrecord component.private final booleanThe field for thefavoriterecord component.private final byte[]The field for thefileEncSha256record component.private final longThe field for thefileLengthrecord component.private final intThe field for theheightrecord component.private final byte[]The field for themediaKeyrecord component.private final StringThe field for themimetyperecord component.private final StringThe field for theurlrecord component.private final intThe field for thewidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStickerAction(String url, byte[] fileEncSha256, byte[] mediaKey, String mimetype, int height, int width, String directPath, long fileLength, boolean favorite, Integer deviceIdHint) Creates an instance of aStickerActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionAlways throws an exception as this action cannot be serializedintAlways throws an exception as this action cannot be serializedReturns the value of thedeviceIdHintrecord component.Returns the value of thedirectPathrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfavorite()Returns the value of thefavoriterecord component.byte[]Returns the value of thefileEncSha256record component.longReturns the value of thefileLengthrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.Always throws an exception as this action cannot be serializedbyte[]mediaKey()Returns the value of themediaKeyrecord component.mimetype()Returns the value of themimetyperecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
url
The field for theurlrecord component. -
fileEncSha256
private final byte[] fileEncSha256The field for thefileEncSha256record component. -
mediaKey
private final byte[] mediaKeyThe field for themediaKeyrecord component. -
mimetype
The field for themimetyperecord component. -
height
private final int heightThe field for theheightrecord component. -
width
private final int widthThe field for thewidthrecord component. -
directPath
The field for thedirectPathrecord component. -
fileLength
private final long fileLengthThe field for thefileLengthrecord component. -
favorite
private final boolean favoriteThe field for thefavoriterecord component. -
deviceIdHint
The field for thedeviceIdHintrecord component.
-
-
Constructor Details
-
StickerAction
public StickerAction(String url, byte[] fileEncSha256, byte[] mediaKey, String mimetype, int height, int width, String directPath, long fileLength, boolean favorite, Integer deviceIdHint) Creates an instance of aStickerActionrecord class.- Parameters:
url- the value for theurlrecord componentfileEncSha256- the value for thefileEncSha256record componentmediaKey- the value for themediaKeyrecord componentmimetype- the value for themimetyperecord componentheight- the value for theheightrecord componentwidth- the value for thewidthrecord componentdirectPath- the value for thedirectPathrecord componentfileLength- the value for thefileLengthrecord componentfavorite- the value for thefavoriterecord componentdeviceIdHint- the value for thedeviceIdHintrecord component
-
-
Method Details
-
indexName
Always throws an exception as this action cannot be serialized -
actionVersion
public int actionVersion()Always throws an exception as this action cannot be serialized- Specified by:
actionVersionin interfaceAction- Returns:
- an exception
-
actionType
Always throws an exception as this action cannot be serialized- Specified by:
actionTypein interfaceAction- Returns:
- an exception
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
fileEncSha256
public byte[] fileEncSha256()Returns the value of thefileEncSha256record component.- Returns:
- the value of the
fileEncSha256record component
-
mediaKey
public byte[] mediaKey()Returns the value of themediaKeyrecord component.- Returns:
- the value of the
mediaKeyrecord component
-
mimetype
Returns the value of themimetyperecord component.- Returns:
- the value of the
mimetyperecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
directPath
Returns the value of thedirectPathrecord component.- Returns:
- the value of the
directPathrecord component
-
fileLength
public long fileLength()Returns the value of thefileLengthrecord component.- Returns:
- the value of the
fileLengthrecord component
-
favorite
public boolean favorite()Returns the value of thefavoriterecord component.- Returns:
- the value of the
favoriterecord component
-
deviceIdHint
Returns the value of thedeviceIdHintrecord component.- Returns:
- the value of the
deviceIdHintrecord component
-