Skip to main content

Class: ActivityOptions

activity.v1.ActivityOptions

Represents an ActivityOptions.

Implements

Constructors

constructor

new ActivityOptions(properties?): ActivityOptions

Constructs a new ActivityOptions.

Parameters

NameTypeDescription
properties?IActivityOptionsProperties to set

Returns

ActivityOptions

Properties

heartbeatTimeout

Optional heartbeatTimeout: null | IDuration

Maximum permitted time between successful worker heartbeats.

Implementation of

IActivityOptions.heartbeatTimeout


retryPolicy

Optional retryPolicy: null | IRetryPolicy

ActivityOptions retryPolicy.

Implementation of

IActivityOptions.retryPolicy


scheduleToCloseTimeout

Optional scheduleToCloseTimeout: null | IDuration

Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted. Either this or start_to_close_timeout must be specified.

(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --)

Implementation of

IActivityOptions.scheduleToCloseTimeout


scheduleToStartTimeout

Optional scheduleToStartTimeout: null | IDuration

Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is to put it back into the same queue. Defaults to schedule_to_close_timeout or workflow execution timeout if not specified.

(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --)

Implementation of

IActivityOptions.scheduleToStartTimeout


startToCloseTimeout

Optional startToCloseTimeout: null | IDuration

Maximum time an activity is allowed to execute after being picked up by a worker. This timeout is always retryable. Either this or schedule_to_close_timeout must be specified.

(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --)

Implementation of

IActivityOptions.startToCloseTimeout


taskQueue

Optional taskQueue: null | ITaskQueue

ActivityOptions taskQueue.

Implementation of

IActivityOptions.taskQueue

Methods

toJSON

toJSON(): Object

Converts this ActivityOptions to JSON.

Returns

Object

JSON object


create

create(properties?): ActivityOptions

Creates a new ActivityOptions instance using the specified properties.

Parameters

NameTypeDescription
properties?IActivityOptionsProperties to set

Returns

ActivityOptions

ActivityOptions instance


decode

decode(reader, length?): ActivityOptions

Decodes an ActivityOptions message from the specified reader or buffer.

Parameters

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

Returns

ActivityOptions

ActivityOptions

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): ActivityOptions

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

ActivityOptions

ActivityOptions

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

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

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

Returns

Writer

Writer


fromObject

fromObject(object): ActivityOptions

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

ActivityOptions

ActivityOptions


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for ActivityOptions

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

Parameters

NameTypeDescription
messageActivityOptionsActivityOptions
options?IConversionOptionsConversion options

Returns

Object

Plain object