# Cloud Tasks V2beta2 API - Class Google::Cloud::Tasks::V2beta2::RenewLeaseRequest (v0.18.0)

0.18.0 (latest) 0.17.0 0.16.1 0.15.0 0.14.1 0.13.0 0.12.1 0.11.3 0.10.0 0.9.2 0.8.0 0.7.0 0.6.0 0.5.5 Reference documentation and code samples for the Cloud Tasks V2beta2 API class Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.

Request message for renewing a lease using
[RenewLease](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_renew_lease_instance_ "Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease (method)").

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #lease_duration

    def lease_duration() -> ::Google::Protobuf::Duration

**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/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.

### #lease_duration=

    def lease_duration=(value) -> ::Google::Protobuf::Duration

**Parameter**

- **value** ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/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.
**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/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.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
**Returns**

- (::String) --- Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`

### #response_view

    def response_view() -> ::Google::Cloud::Tasks::V2beta2::Task::View

**Returns**

- ([::Google::Cloud::Tasks::V2beta2::Task::View](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task-View)) --- The response_view specifies which subset of the [Task](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task "Google::Cloud::Tasks::V2beta2::Task (class)") will be returned.


  By default response_view is
  [BASIC](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task-View#Google__Cloud__Tasks__V2beta2__Task__View__BASIC "Google::Cloud::Tasks::V2beta2::Task::View::BASIC (constant)"); 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task-View#Google__Cloud__Tasks__V2beta2__Task__View__FULL "Google::Cloud::Tasks::V2beta2::Task::View::FULL (constant)")
  requires `cloudtasks.tasks.fullView` [Google
  IAM](https://cloud.google.com/iam/) permission on the
  [Task](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task "Google::Cloud::Tasks::V2beta2::Task (class)") resource.

### #response_view=

    def response_view=(value) -> ::Google::Cloud::Tasks::V2beta2::Task::View

**Parameter**

- **value** ([::Google::Cloud::Tasks::V2beta2::Task::View](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task-View)) --- The response_view specifies which subset of the [Task](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task "Google::Cloud::Tasks::V2beta2::Task (class)") will be returned.


  By default response_view is
  [BASIC](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task-View#Google__Cloud__Tasks__V2beta2__Task__View__BASIC "Google::Cloud::Tasks::V2beta2::Task::View::BASIC (constant)"); 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task-View#Google__Cloud__Tasks__V2beta2__Task__View__FULL "Google::Cloud::Tasks::V2beta2::Task::View::FULL (constant)")
  requires `cloudtasks.tasks.fullView` [Google
  IAM](https://cloud.google.com/iam/) permission on the
  [Task](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task "Google::Cloud::Tasks::V2beta2::Task (class)") resource.
**Returns**

- ([::Google::Cloud::Tasks::V2beta2::Task::View](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task-View)) --- The response_view specifies which subset of the [Task](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task "Google::Cloud::Tasks::V2beta2::Task (class)") will be returned.


  By default response_view is
  [BASIC](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task-View#Google__Cloud__Tasks__V2beta2__Task__View__BASIC "Google::Cloud::Tasks::V2beta2::Task::View::BASIC (constant)"); 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task-View#Google__Cloud__Tasks__V2beta2__Task__View__FULL "Google::Cloud::Tasks::V2beta2::Task::View::FULL (constant)")
  requires `cloudtasks.tasks.fullView` [Google
  IAM](https://cloud.google.com/iam/) permission on the
  [Task](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task "Google::Cloud::Tasks::V2beta2::Task (class)") resource.

### #schedule_time

    def schedule_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Protobuf-Timestamp)) --- Required. The task's current schedule time, available in the [schedule_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task#Google__Cloud__Tasks__V2beta2__Task_schedule_time_instance_ "Google::Cloud::Tasks::V2beta2::Task#schedule_time (method)") returned by [LeaseTasks](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_lease_tasks_instance_ "Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks (method)") response or [RenewLease](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_renew_lease_instance_ "Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease (method)") response. This restriction is to ensure that your worker currently holds the lease.

### #schedule_time=

    def schedule_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Protobuf-Timestamp)) --- Required. The task's current schedule time, available in the [schedule_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task#Google__Cloud__Tasks__V2beta2__Task_schedule_time_instance_ "Google::Cloud::Tasks::V2beta2::Task#schedule_time (method)") returned by [LeaseTasks](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_lease_tasks_instance_ "Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks (method)") response or [RenewLease](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_renew_lease_instance_ "Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease (method)") response. This restriction is to ensure that your worker currently holds the lease.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Protobuf-Timestamp)) --- Required. The task's current schedule time, available in the [schedule_time](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Task#Google__Cloud__Tasks__V2beta2__Task_schedule_time_instance_ "Google::Cloud::Tasks::V2beta2::Task#schedule_time (method)") returned by [LeaseTasks](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_lease_tasks_instance_ "Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks (method)") response or [RenewLease](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_renew_lease_instance_ "Google::Cloud::Tasks::V2beta2::CloudTasks::Client#renew_lease (method)") response. This restriction is to ensure that your worker currently holds the lease.