Skip to main content

Class: ActivityTask

coresdk.activity_task.ActivityTask

Represents an ActivityTask.

Implements

Constructors

constructor

new ActivityTask(properties?): ActivityTask

Constructs a new ActivityTask.

Parameters

NameTypeDescription
properties?IActivityTaskProperties to set

Returns

ActivityTask

Properties

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


create

create(properties?): ActivityTask

Creates a new ActivityTask instance using the specified properties.

Parameters

NameTypeDescription
properties?IActivityTaskProperties to set

Returns

ActivityTask

ActivityTask instance


decode

decode(reader, length?): ActivityTask

Decodes an ActivityTask message from the specified reader or buffer.

Parameters

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

Returns

ActivityTask

ActivityTask

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): ActivityTask

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

ActivityTask

ActivityTask

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 ActivityTask message. Does not implicitly coresdk.activity_task.ActivityTask.verify|verify messages.

Parameters

NameTypeDescription
messageIActivityTaskActivityTask message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

NameTypeDescription
messageIActivityTaskActivityTask message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

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


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for ActivityTask

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 an ActivityTask message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageActivityTaskActivityTask
options?IConversionOptionsConversion options

Returns

Object

Plain object