Skip to main content

Class: ActivityTask

coresdk.activity_task.ActivityTask

Represents an ActivityTask.

Implements#

Constructors#

constructor#

new ActivityTask(properties?)

Constructs a new ActivityTask.

Parameters#

NameType
properties?IActivityTask

Properties#

activityId#

activityId: string

The activity's ID

Implementation of#

IActivityTask.activityId


cancel#

Optional cancel: null | ICancel

Attempt to cancel activity execution.

Implementation of#

IActivityTask.cancel


start#

Optional start: null | IStart

Start activity execution.

Implementation of#

IActivityTask.start


taskToken#

taskToken: Uint8Array

A unique identifier for this task

Implementation of#

IActivityTask.taskToken


variant#

Optional variant: "start" | "cancel"

ActivityTask variant.

Methods#

toJSON#

toJSON(): Object

Converts this ActivityTask to JSON.

Returns#

Object

JSON object


decode#

Static decode(reader, length?): ActivityTask

Decodes an ActivityTask 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#

ActivityTask

ActivityTask


decodeDelimited#

Static decodeDelimited(reader): ActivityTask

Decodes an ActivityTask 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#

ActivityTask

ActivityTask


encode#

Static encode(message, writer?): Writer

Encodes the specified ActivityTask message. Does not implicitly {@link coresdk.activity_task.ActivityTask.verify|verify} messages.

Parameters#

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

Returns#

Writer

Writer


encodeDelimited#

Static encodeDelimited(message, writer?): Writer

Encodes the specified ActivityTask message, length delimited. Does not implicitly {@link coresdk.activity_task.ActivityTask.verify|verify} messages.

Parameters#

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

Returns#

Writer

Writer


fromObject#

Static fromObject(object): ActivityTask

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

Parameters#

NameTypeDescription
objectObjectPlain object

Returns#

ActivityTask

ActivityTask


toObject#

Static toObject(message, options?): Object

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

Parameters#

NameTypeDescription
messageActivityTaskActivityTask
options?IConversionOptions-

Returns#

Object

Plain object