public com.google.protobuf.Duration.Builder getLeaseDurationBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getLeaseDurationFieldBuilder().getBuilder();
    }
<pre>
Required. The duration of the lease.

Each task returned in the
[response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its
[schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the
current time plus the `lease_duration`. The task is leased until its
[schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the
task will not be returned to another
[LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before
its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].


After the worker has successfully finished the work associated
with the task, the worker must call via
[AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask]
before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
Otherwise the task will be returned to a later
[LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that
another worker can retry it.

The maximum lease duration is 1 week.
`lease_duration` will be truncated to the nearest second.
</pre>

<code>.google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED];
</code>
java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequest.java