Skip to main content

Class: Label

v1.EventGroupMarker.Label

A user-defined short-form string value to be used as the group's label.

Properties​

id​

• id: string

Opaque identifier assigned by the SDK.


label​

• Optional label: null | $Properties

This payload should be a "json/plain"-encoded payload that is a single JSON string for use in user interfaces. User interface formatting may not apply to this text when used in "label" situations. The payload data section is limited to 400 bytes by default.

Payload only needs to be set on the first use of a given Marker ID; further references to an existing Marker ID reuse existing attributes of the referenced Marker -- i.e. further label payloads are ignored.

Note that it is valid to have distinct Markers (i.e. distinct Marker IDs) in a given workflow execution that carry the same label, provided that they have the distinct ID.

Methods​

toJSON​

▸ toJSON(): Object

Converts this Label to JSON.

Returns​

Object

JSON object


create​

▸ create(properties?): Label & $Properties

Creates a new Label instance using the specified properties.

Parameters​

NameTypeDescription
properties?$PropertiesProperties to set

Returns​

Label & $Properties

Label instance

▸ create(properties?): Label

Parameters​

NameType
properties?$Properties

Returns​

Label


decode​

▸ decode(reader, length?): Label & $Properties

Decodes a Label message from the specified reader or buffer.

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns​

Label & $Properties

Label

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited​

▸ decodeDelimited(reader): Label & $Properties

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

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns​

Label & $Properties

Label

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode​

▸ encode(message, writer?): Writer

Encodes the specified Label message. Does not implicitly temporal.api.sdk.v1.EventGroupMarker.Label.verify|verify messages.

Parameters​

NameTypeDescription
message$PropertiesLabel message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


encodeDelimited​

▸ encodeDelimited(message, writer?): Writer

Encodes the specified Label message, length delimited. Does not implicitly temporal.api.sdk.v1.EventGroupMarker.Label.verify|verify messages.

Parameters​

NameTypeDescription
message$PropertiesLabel message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


fromObject​

▸ fromObject(object): Label

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

Parameters​

NameTypeDescription
objectObjectPlain object

Returns​

Label

Label


toObject​

▸ toObject(message, options?): Object

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

Parameters​

NameTypeDescription
messageLabelLabel
options?IConversionOptionsConversion options

Returns​

Object

Plain object