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
| Name | Type | Description |
|---|---|---|
properties? | ILabel | Properties to set |
Returns
Properties
id
• id: string
Opaque identifier assigned by the SDK.
Implementation of
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
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
| Name | Type | Description |
|---|---|---|
properties? | ILabel | Properties to set |
Returns
Label instance
decode
▸ decode(reader, length?): Label
Decodes a Label message from the specified reader or buffer.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
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
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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
| Name | Type | Description |
|---|---|---|
message | ILabel | Label message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
message | ILabel | Label message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
Label
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for Label
Parameters
| Name | Type | Description |
|---|---|---|
typeUrlPrefix? | string | your 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
| Name | Type | Description |
|---|---|---|
message | Label | Label |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object