Reference documentation and code samples for the Google Cloud Tasks V2beta2 Client class Task.
A unit of scheduled work.
Generated from protobuf message google.cloud.tasks.v2beta2.Task
Namespace
Google \ Cloud \ Tasks \ V2beta2Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Optionally caller-specified in CreateTask
. The task name. The task name must have the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID
* PROJECT_ID
can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects
* LOCATION_ID
is the canonical ID for the task's location. The list of available locations can be obtained by calling ListLocations
. For more information, see https://cloud.google.com/about/locations/
. * QUEUE_ID
can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters. * TASK_ID
can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters.
↳ app_engine_http_request
Google\Cloud\Tasks\V2beta2\AppEngineHttpRequest
App Engine HTTP request that is sent to the task's target. Can be set only if app_engine_http_target is set on the queue. An App Engine task is a task that has AppEngineHttpRequest set.
↳ pull_message
Google\Cloud\Tasks\V2beta2\PullMessage
LeaseTasks to process the task. Can be set only if pull_target is set on the queue. A pull task is a task that has PullMessage set.
↳ http_request
Google\Cloud\Tasks\V2beta2\HttpRequest
HTTP request that is sent to the task's target. An HTTP task is a task that has HttpRequest set.
↳ schedule_time
Google\Protobuf\Timestamp
The time when the task is scheduled to be attempted. For App Engine queues, this is when the task will be attempted or retried. For pull queues, this is the time when the task is available to be leased; if a task is currently leased, this is the time when the current lease expires, that is, the time that the task was leased plus the lease_duration
. schedule_time
will be truncated to the nearest microsecond.
↳ create_time
Google\Protobuf\Timestamp
Output only. The time that the task was created. create_time
will be truncated to the nearest second.
↳ status
↳ view
getName
Optionally caller-specified in CreateTask .
The task name.
The task name must have the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID
-
PROJECT_ID
can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects -
LOCATION_ID
is the canonical ID for the task's location. The list of available locations can be obtained by calling ListLocations . For more information, see https://cloud.google.com/about/locations/ . -
QUEUE_ID
can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters. -
TASK_ID
can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters.
string
setName
Optionally caller-specified in CreateTask .
The task name.
The task name must have the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID
-
PROJECT_ID
can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects -
LOCATION_ID
is the canonical ID for the task's location. The list of available locations can be obtained by calling ListLocations . For more information, see https://cloud.google.com/about/locations/ . -
QUEUE_ID
can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters. -
TASK_ID
can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters.
var
string
$this
getAppEngineHttpRequest
App Engine HTTP request that is sent to the task's target. Can be set only if app_engine_http_target is set on the queue.
An App Engine task is a task that has AppEngineHttpRequest set.
hasAppEngineHttpRequest
setAppEngineHttpRequest
App Engine HTTP request that is sent to the task's target. Can be set only if app_engine_http_target is set on the queue.
An App Engine task is a task that has AppEngineHttpRequest set.
$this
getPullMessage
LeaseTasks to process the task. Can be set only if pull_target is set on the queue.
A pull task is a task that has PullMessage set.
hasPullMessage
setPullMessage
LeaseTasks to process the task. Can be set only if pull_target is set on the queue.
A pull task is a task that has PullMessage set.
$this
getHttpRequest
HTTP request that is sent to the task's target.
An HTTP task is a task that has HttpRequest set.
hasHttpRequest
setHttpRequest
HTTP request that is sent to the task's target.
An HTTP task is a task that has HttpRequest set.
$this
getScheduleTime
The time when the task is scheduled to be attempted.
For App Engine queues, this is when the task will be attempted or retried.
For pull queues, this is the time when the task is available to
be leased; if a task is currently leased, this is the time when
the current lease expires, that is, the time that the task was
leased plus the lease_duration
. schedule_time
will be truncated to the nearest microsecond.
hasScheduleTime
clearScheduleTime
setScheduleTime
The time when the task is scheduled to be attempted.
For App Engine queues, this is when the task will be attempted or retried.
For pull queues, this is the time when the task is available to
be leased; if a task is currently leased, this is the time when
the current lease expires, that is, the time that the task was
leased plus the lease_duration
. schedule_time
will be truncated to the nearest microsecond.
$this
getCreateTime
Output only. The time that the task was created.
create_time
will be truncated to the nearest second.
hasCreateTime
clearCreateTime
setCreateTime
Output only. The time that the task was created.
create_time
will be truncated to the nearest second.
$this
getStatus
Output only. The task status.
hasStatus
clearStatus
setStatus
Output only. The task status.
$this
getView
Output only. The view specifies which subset of the Task has been returned.
int
setView
Output only. The view specifies which subset of the Task has been returned.
var
int
$this
getPayloadType
string