public final UnaryCallable<AcknowledgeTaskRequest, Empty> acknowledgeTaskCallable() {
    return stub.acknowledgeTaskCallable();
  }
Acknowledges a pull task.

<p>The worker, that is, the entity that
[leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method to
indicate that the work associated with the task has finished.

<p>The worker must acknowledge a task within the
[lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease will
expire and the task will become available to be leased again. After the task is acknowledged,
it will not be returned by a later
[LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
[GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
[ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].

<p>Sample code:

<pre>{@code
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
  AcknowledgeTaskRequest request =
      AcknowledgeTaskRequest.newBuilder()
          .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString())
          .setScheduleTime(Timestamp.newBuilder().build())
          .build();
  ApiFuture<Empty> future = cloudTasksClient.acknowledgeTaskCallable().futureCall(request);
  // Do something.
  future.get();
}
}</pre>
java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java