Class: ActivityTask
Represents an ActivityTask.
Properties
cancel?
optionalcancel?:$Properties|null
Attempt to cancel activity execution.
start?
optionalstart?:$Properties|null
Start activity execution.
taskToken
taskToken:
Uint8Array
A unique identifier for this task
variant?
optionalvariant?:"start"|"cancel"
ActivityTask variant.
Methods
toJSON()
toJSON():
object
Converts this ActivityTask to JSON.
Returns
object
JSON object
create()
Call Signature
staticcreate(properties?):ActivityTask&$Shape
Creates a new ActivityTask instance using the specified properties.
Parameters
properties?
Properties to set
Returns
ActivityTask & $Shape
ActivityTask instance
Call Signature
staticcreate(properties?):ActivityTask
Creates a new ActivityTask instance using the specified properties.
Parameters
properties?
Properties to set
Returns
ActivityTask
ActivityTask instance
decode()
staticdecode(reader,length?):ActivityTask&$Shape
Decodes an ActivityTask 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
ActivityTask & $Shape
ActivityTask
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
staticdecodeDelimited(reader):ActivityTask&$Shape
Decodes an ActivityTask message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
Returns
ActivityTask & $Shape
ActivityTask
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 ActivityTask message. Does not implicitly coresdk.activity_task.ActivityTask.verify|verify messages.
Parameters
message
ActivityTask message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified ActivityTask message, length delimited. Does not implicitly coresdk.activity_task.ActivityTask.verify|verify messages.
Parameters
message
ActivityTask message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):ActivityTask
Creates an ActivityTask message from a plain object. Also converts values to their respective internal types.
Parameters
object
{[k: string]: any; }
Plain object
Returns
ActivityTask
ActivityTask
toObject()
statictoObject(message,options?):object
Creates a plain object from an ActivityTask message. Also converts values to other types if specified.
Parameters
message
ActivityTask
ActivityTask
options?
IConversionOptions
Conversion options
Returns
object
Plain object