Class protos.google.cloud.tasks.v2.Task (5.5.2)

Represents a Task.

Package

@google-cloud/tasks

Constructors

(constructor)(properties)

constructor(properties?:google.cloud.tasks.v2.ITask);

Constructs a new Task.

Parameter
NameDescription
propertiesITask

Properties to set

Properties

appEngineHttpRequest

publicappEngineHttpRequest?:(google.cloud.tasks.v2.IAppEngineHttpRequest|null);

Task appEngineHttpRequest.

createTime

publiccreateTime?:(google.protobuf.ITimestamp|null);

Task createTime.

dispatchCount

publicdispatchCount:number;

Task dispatchCount.

dispatchDeadline

publicdispatchDeadline?:(google.protobuf.IDuration|null);

Task dispatchDeadline.

firstAttempt

publicfirstAttempt?:(google.cloud.tasks.v2.IAttempt|null);

Task firstAttempt.

httpRequest

publichttpRequest?:(google.cloud.tasks.v2.IHttpRequest|null);

Task httpRequest.

lastAttempt

publiclastAttempt?:(google.cloud.tasks.v2.IAttempt|null);

Task lastAttempt.

messageType

publicmessageType?:("appEngineHttpRequest"|"httpRequest");

Task messageType.

name

publicname:string;

Task name.

responseCount

publicresponseCount:number;

Task responseCount.

scheduleTime

publicscheduleTime?:(google.protobuf.ITimestamp|null);

Task scheduleTime.

view

publicview:(google.cloud.tasks.v2.Task.View|keyoftypeofgoogle.cloud.tasks.v2.Task.View);

Task view.

Methods

create(properties)

publicstaticcreate(properties?:google.cloud.tasks.v2.ITask):google.cloud.tasks.v2.Task;

Creates a new Task instance using the specified properties.

Parameter
NameDescription
propertiesITask

Properties to set

Returns
TypeDescription
Task

Task instance

decode(reader, length)

publicstaticdecode(reader:($protobuf.Reader|Uint8Array),length?:number):google.cloud.tasks.v2.Task;

Decodes a Task message from the specified reader or buffer.

Parameters
NameDescription
reader(Reader|Uint8Array)

Reader or buffer to decode from

lengthnumber

Message length if known beforehand

Returns
TypeDescription
Task

Task

decodeDelimited(reader)

publicstaticdecodeDelimited(reader:($protobuf.Reader|Uint8Array)):google.cloud.tasks.v2.Task;

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

Parameter
NameDescription
reader(Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
Task

Task

encode(message, writer)

publicstaticencode(message:google.cloud.tasks.v2.ITask,writer?:$protobuf.Writer):$protobuf.Writer;

Encodes the specified Task message. Does not implicitly messages.

Parameters
NameDescription
messageITask

Task message or plain object to encode

writer$protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

encodeDelimited(message, writer)

publicstaticencodeDelimited(message:google.cloud.tasks.v2.ITask,writer?:$protobuf.Writer):$protobuf.Writer;

Encodes the specified Task message, length delimited. Does not implicitly messages.

Parameters
NameDescription
messageITask

Task message or plain object to encode

writer$protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

fromObject(object)

publicstaticfromObject(object:{[k:string]:any}):google.cloud.tasks.v2.Task;

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

Parameter
NameDescription
object{ [k: string]: any }

Plain object

Returns
TypeDescription
Task

Task

getTypeUrl(typeUrlPrefix)

publicstaticgetTypeUrl(typeUrlPrefix?:string):string;

Gets the default type url for Task

Parameter
NameDescription
typeUrlPrefixstring

your custom typeUrlPrefix(default "type.googleapis.com")

Returns
TypeDescription
string

The default type url

toJSON()

publictoJSON():{[k:string]:any};

Converts this Task to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

publicstatictoObject(message:google.cloud.tasks.v2.Task,options?:$protobuf.IConversionOptions):{[k:string]:any};

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

Parameters
NameDescription
messageTask

Task

options$protobuf.IConversionOptions

Conversion options

Returns
TypeDescription
{ [k: string]: any }

Plain object

verify(message)

publicstaticverify(message:{[k:string]:any}):(string|null);

Verifies a Task message.

Parameter
NameDescription
message{ [k: string]: any }

Plain object to verify

Returns
TypeDescription
(string|null)

null if valid, otherwise the reason why it is not