Skip to main content

Class: Label

v1.EventGroupMarker.Label

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

Implements

Constructors

constructor

new Label(properties?): Label

Constructs a new Label.

Parameters

NameTypeDescription
properties?ILabelProperties to set

Returns

Label

Properties

id

id: string

Opaque identifier assigned by the SDK.

Implementation of

ILabel.id


label

Optional label: null | IPayload

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.

Implementation of

ILabel.label

Methods

toJSON

toJSON(): Object

Converts this Label to JSON.

Returns

Object

JSON object


create

create(properties?): Label

Creates a new Label instance using the specified properties.

Parameters

NameTypeDescription
properties?ILabelProperties to set

Returns

Label

Label instance


decode

decode(reader, length?): Label

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

Label

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): Label

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

Label

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
messageILabelLabel 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
messageILabelLabel 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


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for Label

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


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