public final Queue purgeQueue(QueueName name) {
    PurgeQueueRequest request =
        PurgeQueueRequest.newBuilder().setName(name == null ? null : name.toString()).build();
    return purgeQueue(request);
  }
Purges a queue by deleting all of its tasks.

<p>All tasks created before this method is called are permanently deleted.

<p>Purge operations can take up to one minute to take effect. Tasks might be dispatched before
the purge takes effect. A purge is irreversible.

<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()) {
  QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
  Queue response = cloudTasksClient.purgeQueue(name);
}
}</pre>

@param name Required. The queue name. For example:
    `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
@throws com.google.api.gax.rpc.ApiException if the remote call fails
java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java