Skip to main content

Class: Cancel

coresdk.activity_task.Cancel

Attempt to cancel a running activity

Properties

details

Optional details: null | $Properties

Activity cancellation details, surfaces all cancellation reasons.


reason

reason: ActivityCancelReason

Primary cancellation reason

Methods

toJSON

toJSON(): Object

Converts this Cancel to JSON.

Returns

Object

JSON object


create

create(properties?): Cancel & $Properties

Creates a new Cancel instance using the specified properties.

Parameters

NameTypeDescription
properties?$PropertiesProperties to set

Returns

Cancel & $Properties

Cancel instance

create(properties?): Cancel

Parameters

NameType
properties?$Properties

Returns

Cancel


decode

decode(reader, length?): Cancel & $Properties

Decodes a Cancel message from the specified reader or buffer.

Parameters

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

Returns

Cancel & $Properties

Cancel

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): Cancel & $Properties

Decodes a Cancel message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

Cancel & $Properties

Cancel

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

Parameters

NameTypeDescription
message$PropertiesCancel message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

NameTypeDescription
message$PropertiesCancel message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

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

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageCancelCancel
options?IConversionOptionsConversion options

Returns

Object

Plain object