Skip to main content

Class: ActivityTask

Represents an ActivityTask.

Properties​

cancel?​

optional cancel?: $Properties | null

Attempt to cancel activity execution.


start?​

optional start?: $Properties | null

Start activity execution.


taskToken​

taskToken: Uint8Array

A unique identifier for this task


variant?​

optional variant?: "start" | "cancel"

ActivityTask variant.

Methods​

toJSON()​

toJSON(): object

Converts this ActivityTask to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): ActivityTask & $Shape

Creates a new ActivityTask instance using the specified properties.

Parameters​
properties?​

$Shape

Properties to set

Returns​

ActivityTask & $Shape

ActivityTask instance

Call Signature​

static create(properties?): ActivityTask

Creates a new ActivityTask instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

ActivityTask

ActivityTask instance


decode()​

static decode(reader, length?): ActivityTask & $Shape

Decodes an ActivityTask message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

ActivityTask & $Shape

ActivityTask

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): ActivityTask & $Shape

Decodes an ActivityTask message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

ActivityTask & $Shape

ActivityTask

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified ActivityTask message. Does not implicitly coresdk.activity_task.ActivityTask.verify|verify messages.

Parameters​

message​

$Properties

ActivityTask message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

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

Parameters​

message​

$Properties

ActivityTask message or plain object to encode

writer?​

Writer

Writer to encode to

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​

object​

{[k: string]: any; }

Plain 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​

message​

ActivityTask

ActivityTask

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object