Skip to main content

Class: Header

common.v1.Header

Represents a Header.

Implements#

Constructors#

constructor#

new Header(properties?)

Constructs a new Header.

Parameters#

NameType
properties?IHeader

Properties#

fields#

fields: Object

Header fields.

Index signature#

▪ [k: string]: IPayload

Implementation of#

IHeader.fields

Methods#

toJSON#

toJSON(): Object

Converts this Header to JSON.

Returns#

Object

JSON object


decode#

Static decode(reader, length?): Header

Decodes a Header message from the specified reader or buffer.

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters#

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?number-

Returns#

Header

Header


decodeDelimited#

Static decodeDelimited(reader): Header

Decodes a Header message from the specified reader or buffer, length delimited.

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters#

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns#

Header

Header


encode#

Static encode(message, writer?): Writer

Encodes the specified Header message. Does not implicitly {@link temporal.api.common.v1.Header.verify|verify} messages.

Parameters#

NameTypeDescription
messageIHeaderHeader message or plain object to encode
writer?Writer-

Returns#

Writer

Writer


encodeDelimited#

Static encodeDelimited(message, writer?): Writer

Encodes the specified Header message, length delimited. Does not implicitly {@link temporal.api.common.v1.Header.verify|verify} messages.

Parameters#

NameTypeDescription
messageIHeaderHeader message or plain object to encode
writer?Writer-

Returns#

Writer

Writer


fromObject#

Static fromObject(object): Header

Creates a Header message from a plain object. Also converts values to their respective internal types.

Parameters#

NameTypeDescription
objectObjectPlain object

Returns#

Header

Header


toObject#

Static toObject(message, options?): Object

Creates a plain object from a Header message. Also converts values to other types if specified.

Parameters#

NameTypeDescription
messageHeaderHeader
options?IConversionOptions-

Returns#

Object

Plain object