Table of Contents

Class Message

Namespace
Temporalio.Api.Protocol.V1
Assembly
Temporalio.dll

(-- api-linter: core::0146::any=disabled aip.dev/not-precedent: We want runtime extensibility for the body field --)

public sealed class Message : IMessage<Message>, IEquatable<Message>, IDeepCloneable<Message>, IBufferMessage, IMessage
Inheritance
Message
Implements
IMessage<Message>
IDeepCloneable<Message>
IBufferMessage
IMessage
Inherited Members

Constructors

Message()

public Message()

Message(Message)

public Message(Message other)

Parameters

other Message

Fields

BodyFieldNumber

Field number for the "body" field.

public const int BodyFieldNumber = 5

Field Value

int

CommandIndexFieldNumber

Field number for the "command_index" field.

public const int CommandIndexFieldNumber = 4

Field Value

int

EventIdFieldNumber

Field number for the "event_id" field.

public const int EventIdFieldNumber = 3

Field Value

int

IdFieldNumber

Field number for the "id" field.

public const int IdFieldNumber = 1

Field Value

int

ProtocolInstanceIdFieldNumber

Field number for the "protocol_instance_id" field.

public const int ProtocolInstanceIdFieldNumber = 2

Field Value

int

Properties

Body

The opaque data carried by this message. The protocol type can be extracted from the package name of the message carried inside the Any.

public Any Body { get; set; }

Property Value

Any

CommandIndex

public long CommandIndex { get; set; }

Property Value

long

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

EventId

public long EventId { get; set; }

Property Value

long

HasCommandIndex

Gets whether the "command_index" field is set

public bool HasCommandIndex { get; }

Property Value

bool

HasEventId

Gets whether the "event_id" field is set

public bool HasEventId { get; }

Property Value

bool

Id

An ID for this specific message.

public string Id { get; set; }

Property Value

string

Parser

public static MessageParser<Message> Parser { get; }

Property Value

MessageParser<Message>

ProtocolInstanceId

Identifies the specific instance of a protocol to which this message belongs.

public string ProtocolInstanceId { get; set; }

Property Value

string

SequencingIdCase

public Message.SequencingIdOneofCase SequencingIdCase { get; }

Property Value

Message.SequencingIdOneofCase

Methods

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

ClearCommandIndex()

Clears the value of the oneof if it's currently set to "command_index"

public void ClearCommandIndex()

ClearEventId()

Clears the value of the oneof if it's currently set to "event_id"

public void ClearEventId()

ClearSequencingId()

public void ClearSequencingId()

Clone()

Creates a deep clone of this object.

public Message Clone()

Returns

Message

A deep clone of this object.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(Message)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Message other)

Parameters

other Message

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(Message)

Merges the given message into this one.

public void MergeFrom(Message other)

Parameters

other Message

Remarks

See the user guide for precise merge semantics.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.