Constructs a new DocumentMessage.
Optional
properties:
IDocumentMessage
Properties to set
DocumentMessage caption.
DocumentMessage contactVcard.
Optional
contextDocumentMessage contextInfo.
DocumentMessage directPath.
DocumentMessage fileEncSha256.
DocumentMessage fileLength.
DocumentMessage fileName.
DocumentMessage fileSha256.
DocumentMessage jpegThumbnail.
DocumentMessage mediaKey.
DocumentMessage mediaKeyTimestamp.
DocumentMessage mimetype.
DocumentMessage pageCount.
DocumentMessage thumbnailDirectPath.
DocumentMessage thumbnailEncSha256.
DocumentMessage thumbnailHeight.
DocumentMessage thumbnailSha256.
DocumentMessage thumbnailWidth.
DocumentMessage title.
DocumentMessage url.
Static
create
Creates a new DocumentMessage instance using the specified properties.
Optional
properties:
IDocumentMessage
Properties to set
DocumentMessage instance
Static
decode
Decodes a DocumentMessage message from the specified reader or buffer.
Reader or buffer to decode from
Optional
length:
number
Message length if known beforehand
DocumentMessage
If the payload is not a reader or valid buffer
If required fields are missing
Static
decodeDecodes a DocumentMessage message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
DocumentMessage
If the payload is not a reader or valid buffer
If required fields are missing
Static
encode
Encodes the specified DocumentMessage message. Does not implicitly verify messages.
DocumentMessage message or plain object to encode
Optional
writer:
Writer
Writer to encode to
Writer
Static
encodeEncodes the specified DocumentMessage message, length delimited. Does not implicitly verify messages.
DocumentMessage message or plain object to encode
Optional
writer:
Writer
Writer to encode to
Writer
Static
fromCreates a DocumentMessage message from a plain object. Also converts values to their respective internal types.
Plain object
DocumentMessage
Static
toCreates a plain object from a DocumentMessage message. Also converts values to other types if specified.
DocumentMessage
Optional
options:
IConversionOptions
Conversion options
Plain object
Static
verify
Generated using TypeDoc
Represents a DocumentMessage.