public final UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
      testIamPermissionsCallable() {
    return stub.testIamPermissionsCallable();
  }
Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.Queue]. If the
resource does not exist, this will return an empty set of permissions, not a
[NOT_FOUND][google.rpc.Code.NOT_FOUND] error.

<p>Note: This operation is designed to be used for building permission-aware UIs and
command-line tools, not for authorization checking. This operation may "fail open" without
warning.

<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()) {
  TestIamPermissionsRequest request =
      TestIamPermissionsRequest.newBuilder()
          .setResource(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString())
          .addAllPermissions(new ArrayList<String>())
          .build();
  ApiFuture<TestIamPermissionsResponse> future =
      cloudTasksClient.testIamPermissionsCallable().futureCall(request);
  // Do something.
  TestIamPermissionsResponse response = future.get();
}
}</pre>
java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksClient.java