Skip to main content

Class: OnCompleteRequest

OnCompleteRequest is the request type to the NotificationService's OnComplete operation, allowing for defining completion handlers for arbitrary operations.

Information about the source operation will be available in the form of a commonpb.Link, which will be available separately from this OnCompleteRequest. e.g. a link to the source standalone Nexus operation would be found in the nexuspb.StartOperationRequest parameter sent to the worker callback. (In addition to this OnCompleteRequest.)

Properties​

failure?​

optional failure?: $Properties | null

The operation failed. Includes timeout, cancellation, and application errors.


result?​

optional result?: "failure" | "success"

The result of the source operation.


sourceContext?​

optional sourceContext?: $Properties | null

User-supplied data which was added to the source invocation. (As applicable.)


success?​

optional success?: $Properties | null

The operation was successful, and resulted in the given payload.

Methods​

toJSON()​

toJSON(): object

Converts this OnCompleteRequest to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): OnCompleteRequest & $Shape

Creates a new OnCompleteRequest instance using the specified properties.

Parameters​
properties?​

$Shape

Properties to set

Returns​

OnCompleteRequest & $Shape

OnCompleteRequest instance

Call Signature​

static create(properties?): OnCompleteRequest

Creates a new OnCompleteRequest instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

OnCompleteRequest

OnCompleteRequest instance


decode()​

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

Decodes an OnCompleteRequest 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​

OnCompleteRequest & $Shape

OnCompleteRequest

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): OnCompleteRequest & $Shape

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

OnCompleteRequest & $Shape

OnCompleteRequest

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 OnCompleteRequest message. Does not implicitly temporal.api.notificationservice.v1.OnCompleteRequest.verify|verify messages.

Parameters​

message​

$Properties

OnCompleteRequest message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified OnCompleteRequest message, length delimited. Does not implicitly temporal.api.notificationservice.v1.OnCompleteRequest.verify|verify messages.

Parameters​

message​

$Properties

OnCompleteRequest message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): OnCompleteRequest

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

OnCompleteRequest

OnCompleteRequest


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

OnCompleteRequest

OnCompleteRequest

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object