Class: Message
(-- api-linter: core::0146::any=disabled aip.dev/not-precedent: We want runtime extensibility for the body field --)
Properties
body?
optionalbody?:$Properties|null
The opaque data carried by this message. The protocol type can be extracted from the package name of the message carried inside the Any.
commandIndex?
optionalcommandIndex?:Long|null
Message commandIndex.
eventId?
optionaleventId?:Long|null
Message eventId.
id
id:
string
An ID for this specific message.
protocolInstanceId
protocolInstanceId:
string
Identifies the specific instance of a protocol to which this message belongs.
sequencingId?
optionalsequencingId?:"eventId"|"commandIndex"
The event ID or command ID after which this message can be delivered. The effects of history up to and including this event ID should be visible to the code that handles this message. Omit to opt out of sequencing.
Methods
toJSON()
toJSON():
object
Converts this Message to JSON.
Returns
object
JSON object
create()
Call Signature
staticcreate(properties?):Message&$Shape
Creates a new Message instance using the specified properties.
Parameters
properties?
Properties to set
Returns
Message & $Shape
Message instance
Call Signature
staticcreate(properties?):Message
Creates a new Message instance using the specified properties.
Parameters
properties?
Properties to set
Returns
Message
Message instance
decode()
staticdecode(reader,length?):Message&$Shape
Decodes a Message message from the specified reader or buffer.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
length?
number
Message length if known beforehand
Returns
Message & $Shape
Message
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
staticdecodeDelimited(reader):Message&$Shape
Decodes a Message message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
Returns
Message & $Shape
Message
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode()
staticencode(message,writer?):Writer
Encodes the specified Message message. Does not implicitly temporal.api.protocol.v1.Message.verify|verify messages.
Parameters
message
Message message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified Message message, length delimited. Does not implicitly temporal.api.protocol.v1.Message.verify|verify messages.
Parameters
message
Message message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):Message
Creates a Message message from a plain object. Also converts values to their respective internal types.
Parameters
object
Plain object
Returns
Message
Message
toObject()
statictoObject(message,options?):object
Creates a plain object from a Message message. Also converts values to other types if specified.
Parameters
message
Message
Message
options?
IConversionOptions
Conversion options
Returns
object
Plain object