Skip to main content

Class: Cancellation

coresdk.child_workflow.Cancellation

Used in ChildWorkflowResult to report cancellation. Failure should be ChildWorkflowFailure with a CanceledFailure cause.

Implements

Constructors

constructor

new Cancellation(properties?): Cancellation

Constructs a new Cancellation.

Parameters

NameTypeDescription
properties?ICancellationProperties to set

Returns

Cancellation

Properties

failure

Optional failure: null | IFailure

Cancellation failure.

Implementation of

ICancellation.failure

Methods

toJSON

toJSON(): Object

Converts this Cancellation to JSON.

Returns

Object

JSON object


create

create(properties?): Cancellation

Creates a new Cancellation instance using the specified properties.

Parameters

NameTypeDescription
properties?ICancellationProperties to set

Returns

Cancellation

Cancellation instance


decode

decode(reader, length?): Cancellation

Decodes a Cancellation message from the specified reader or buffer.

Parameters

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

Returns

Cancellation

Cancellation

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): Cancellation

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

Cancellation

Cancellation

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

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified Cancellation message, length delimited. Does not implicitly coresdk.child_workflow.Cancellation.verify|verify messages.

Parameters

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

Returns

Writer

Writer


fromObject

fromObject(object): Cancellation

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

Cancellation

Cancellation


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for Cancellation

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

Parameters

NameTypeDescription
messageCancellationCancellation
options?IConversionOptionsConversion options

Returns

Object

Plain object