public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
    return stub.setIamPolicyCallable();
  }
Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any
existing policy.

<p>Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level
permissions are required to use the Cloud Console.

<p>Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission
on the specified resource parent:

<ul>
  <li>`cloudtasks.queues.setIamPolicy`
</ul>

<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()) {
  SetIamPolicyRequest request =
      SetIamPolicyRequest.newBuilder()
          .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString())
          .setPolicy(Policy.newBuilder().build())
          .setUpdateMask(FieldMask.newBuilder().build())
          .build();
  ApiFuture<Policy> future = cloudTasksClient.setIamPolicyCallable().futureCall(request);
  // Do something.
  Policy response = future.get();
}
}</pre>
java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java