Skip to main content

Class: Cancel

coresdk.activity_task.Cancel

Attempt to cancel a running activity

Implements#

Constructors#

constructor#

new Cancel(properties?)

Constructs a new Cancel.

Parameters#

NameType
properties?ICancel

Properties#

reason#

reason: ActivityCancelReason

Cancel reason.

Implementation of#

ICancel.reason

Methods#

toJSON#

toJSON(): Object

Converts this Cancel to JSON.

Returns#

Object

JSON object


decode#

Static decode(reader, length?): Cancel

Decodes a Cancel 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#

Cancel

Cancel


decodeDelimited#

Static decodeDelimited(reader): Cancel

Decodes a Cancel 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#

Cancel

Cancel


encode#

Static encode(message, writer?): Writer

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

Parameters#

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

Returns#

Writer

Writer


encodeDelimited#

Static encodeDelimited(message, writer?): Writer

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

Parameters#

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

Returns#

Writer

Writer


fromObject#

Static fromObject(object): Cancel

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

Parameters#

NameTypeDescription
objectObjectPlain object

Returns#

Cancel

Cancel


toObject#

Static toObject(message, options?): Object

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

Parameters#

NameTypeDescription
messageCancelCancel
options?IConversionOptions-

Returns#

Object

Plain object