Constructs a new DraftMessage.
Optional
properties:
IDraftMessage
Properties to set
Optional
ctwaDraftMessage ctwaContext.
Optional
ctwaDraftMessage ctwaContextLinkData.
DraftMessage omittedUrl.
DraftMessage text.
DraftMessage timestamp.
Static
create
Creates a new DraftMessage instance using the specified properties.
Optional
properties:
IDraftMessage
Properties to set
DraftMessage instance
Static
decode
Decodes a DraftMessage message from the specified reader or buffer.
Reader or buffer to decode from
Optional
length:
number
Message length if known beforehand
DraftMessage
If the payload is not a reader or valid buffer
If required fields are missing
Static
decodeDecodes a DraftMessage message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
DraftMessage
If the payload is not a reader or valid buffer
If required fields are missing
Static
encode
Encodes the specified DraftMessage message. Does not implicitly verify messages.
DraftMessage message or plain object to encode
Optional
writer:
Writer
Writer to encode to
Writer
Static
encodeEncodes the specified DraftMessage message, length delimited. Does not implicitly verify messages.
DraftMessage message or plain object to encode
Optional
writer:
Writer
Writer to encode to
Writer
Static
fromCreates a DraftMessage message from a plain object. Also converts values to their respective internal types.
Plain object
DraftMessage
Static
toCreates a plain object from a DraftMessage message. Also converts values to other types if specified.
DraftMessage
Optional
options:
IConversionOptions
Conversion options
Plain object
Static
verify
Generated using TypeDoc
Represents a DraftMessage.