public static ApiFuture<ListUsableWorkstationsPagedResponse> createAsync(
        PageContext<ListUsableWorkstationsRequest, ListUsableWorkstationsResponse, Workstation>
            context,
        ApiFuture<ListUsableWorkstationsResponse> futureResponse) {
      ApiFuture<ListUsableWorkstationsPage> futurePage =
          ListUsableWorkstationsPage.createEmptyPage().createPageAsync(context, futureResponse);
      return ApiFutures.transform(
          futurePage,
          input -> new ListUsableWorkstationsPagedResponse(input),
          MoreExecutors.directExecutor());
    }
Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a `NOT_FOUND` error.

<p>Note: This operation is designed to be used for buildingpermission-aware UIs and
command-line tools, not for authorizationchecking. 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 (WorkstationsClient workstationsClient = WorkstationsClient.create()) {
  TestIamPermissionsRequest request =
      TestIamPermissionsRequest.newBuilder()
          .setResource(
              WorkstationName.of(
                      "[PROJECT]",
                      "[LOCATION]",
                      "[WORKSTATION_CLUSTER]",
                      "[WORKSTATION_CONFIG]",
                      "[WORKSTATION]")
                  .toString())
          .addAllPermissions(new ArrayList<String>())
          .build();
  ApiFuture<TestIamPermissionsResponse> future =
      workstationsClient.testIamPermissionsCallable().futureCall(request);
  // Do something.
  TestIamPermissionsResponse response = future.get();
}
}</pre>
java-workstations/google-cloud-workstations/src/main/java/com/google/cloud/workstations/v1/WorkstationsClient.java