public final Queue pauseQueue(PauseQueueRequest request) {
    return pauseQueueCallable().call(request);
  }
Pauses the queue.

<p>If a queue is paused then the system will stop dispatching tasks until the queue is resumed
via [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added
when the queue is paused. A queue is paused if its
[state][google.cloud.tasks.v2beta3.Queue.state] is
[PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].

<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()) {
  PauseQueueRequest request =
      PauseQueueRequest.newBuilder()
          .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString())
          .build();
  Queue response = cloudTasksClient.pauseQueue(request);
}
}</pre>

@param request The request object containing all of the parameters for the API call.
@throws com.google.api.gax.rpc.ApiException if the remote call fails
java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksClient.java