Class: NexusTask
Represents a NexusTask.
Properties
cancelTask?
optionalcancelTask?:$Properties|null
A request by Core to notify an in-progress operation handler that it should cancel. This
is distinct from a CancelOperationRequest from the server, which results from the user
requesting the cancellation of an operation. Handling this variant should result in
something like cancelling a cancellation token given to the user's operation handler.
These do not count as a separate task for the purposes of completing all issued tasks, but rather count as a sort of modification to the already-issued task which is being cancelled.
EX: Core knows the nexus operation has timed out, and it does not make sense for the user's operation handler to continue doing work.
endpoint
endpoint:
string
The endpoint this request was addressed to. Extracted from the request for convenient access.
Only set when variant is task.
requestDeadline?
optionalrequestDeadline?:$Properties|null
The deadline for this request, parsed from the "Request-Timeout" header.
Only set when variant is task and the header was present with a valid value.
Represented as an absolute timestamp.
task?
optionaltask?:$Properties|null
A nexus task from server
variant?
optionalvariant?:"task"|"cancelTask"
NexusTask variant.
Methods
toJSON()
toJSON():
object
Converts this NexusTask to JSON.
Returns
object
JSON object
create()
Call Signature
staticcreate(properties?):NexusTask&$Shape
Creates a new NexusTask instance using the specified properties.
Parameters
properties?
Properties to set
Returns
NexusTask & $Shape
NexusTask instance
Call Signature
staticcreate(properties?):NexusTask
Creates a new NexusTask instance using the specified properties.
Parameters
properties?
Properties to set
Returns
NexusTask
NexusTask instance
decode()
staticdecode(reader,length?):NexusTask&$Shape
Decodes a NexusTask 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
NexusTask & $Shape
NexusTask
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
staticdecodeDelimited(reader):NexusTask&$Shape
Decodes a NexusTask message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
Returns
NexusTask & $Shape
NexusTask
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode()
staticencode(message,writer?):Writer
Encodes the specified NexusTask message. Does not implicitly coresdk.nexus.NexusTask.verify|verify messages.
Parameters
message
NexusTask message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified NexusTask message, length delimited. Does not implicitly coresdk.nexus.NexusTask.verify|verify messages.
Parameters
message
NexusTask message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):NexusTask
Creates a NexusTask message from a plain object. Also converts values to their respective internal types.
Parameters
object
{[k: string]: any; }
Plain object
Returns
NexusTask
NexusTask
toObject()
statictoObject(message,options?):object
Creates a plain object from a NexusTask message. Also converts values to other types if specified.
Parameters
message
NexusTask
NexusTask
options?
IConversionOptions
Conversion options
Returns
object
Plain object