Skip to main content

Class: NexusTaskCompletion

A response to a Nexus task

Properties​

ackCancel?​

optional ackCancel?: boolean | null

The lang SDK acknowledges that it is responding to a CancelNexusTask and thus the response is irrelevant. This is not the only way to respond to a cancel, the other variants can still be used, but this variant should be used when the handler was aborted by cancellation.


completed?​

optional completed?: $Properties | null

The handler completed (successfully or not). Note that the response kind must match the request kind (start or cancel).


error?​

optional error?: $Properties | null

The handler could not complete the request for some reason. Deprecated, use failure.


failure?​

optional failure?: $Properties | null

The handler could not complete the request for some reason.


status?​

optional status?: "completed" | "error" | "ackCancel" | "failure"

NexusTaskCompletion status.


taskToken​

taskToken: Uint8Array

The unique identifier for this task provided in the poll response

Methods​

toJSON()​

toJSON(): object

Converts this NexusTaskCompletion to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): NexusTaskCompletion & $Shape

Creates a new NexusTaskCompletion instance using the specified properties.

Parameters​
properties?​

$Shape

Properties to set

Returns​

NexusTaskCompletion & $Shape

NexusTaskCompletion instance

Call Signature​

static create(properties?): NexusTaskCompletion

Creates a new NexusTaskCompletion instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

NexusTaskCompletion

NexusTaskCompletion instance


decode()​

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

Decodes a NexusTaskCompletion 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​

NexusTaskCompletion & $Shape

NexusTaskCompletion

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): NexusTaskCompletion & $Shape

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

NexusTaskCompletion & $Shape

NexusTaskCompletion

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

Parameters​

message​

$Properties

NexusTaskCompletion message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified NexusTaskCompletion message, length delimited. Does not implicitly coresdk.nexus.NexusTaskCompletion.verify|verify messages.

Parameters​

message​

$Properties

NexusTaskCompletion message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): NexusTaskCompletion

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

NexusTaskCompletion

NexusTaskCompletion


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

NexusTaskCompletion

NexusTaskCompletion

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object