Google Cloud Tasks V2beta2 Client - Class RenewLeaseRequest (1.12.2)

Reference documentation and code samples for the Google Cloud Tasks V2beta2 Client class RenewLeaseRequest.

Request message for renewing a lease using RenewLease.

Generated from protobuf message google.cloud.tasks.v2beta2.RenewLeaseRequest

Namespace

Google \ Cloud \ Tasks \ V2beta2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Required. The task name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

↳ schedule_time Google\Protobuf\Timestamp

Required. The task's current schedule time, available in the schedule_time returned by LeaseTasks response or RenewLease response. This restriction is to ensure that your worker currently holds the lease.

↳ lease_duration Google\Protobuf\Duration

Required. The desired new lease duration, starting from now. The maximum lease duration is 1 week. lease_duration will be truncated to the nearest second.

↳ response_view int

The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires cloudtasks.tasks.fullView Google IAM permission on the Task resource.

getName

Required. The task name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

Returns
TypeDescription
string

setName

Required. The task name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getScheduleTime

Required. The task's current schedule time, available in the schedule_time returned by LeaseTasks response or RenewLease response.

This restriction is to ensure that your worker currently holds the lease.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasScheduleTime

clearScheduleTime

setScheduleTime

Required. The task's current schedule time, available in the schedule_time returned by LeaseTasks response or RenewLease response.

This restriction is to ensure that your worker currently holds the lease.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getLeaseDuration

Required. The desired new lease duration, starting from now.

The maximum lease duration is 1 week. lease_duration will be truncated to the nearest second.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasLeaseDuration

clearLeaseDuration

setLeaseDuration

Required. The desired new lease duration, starting from now.

The maximum lease duration is 1 week. lease_duration will be truncated to the nearest second.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getResponseView

The response_view specifies which subset of the Task will be returned.

By default response_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires cloudtasks.tasks.fullView Google IAM permission on the Task resource.

Returns
TypeDescription
int

setResponseView

The response_view specifies which subset of the Task will be returned.

By default response_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires cloudtasks.tasks.fullView Google IAM permission on the Task resource.

Parameter
NameDescription
var int
Returns
TypeDescription
$this