@BetaApi
  public final TestPermissionsResponse testIamPermissionsDisk(
      String resource, TestPermissionsRequest testPermissionsRequestResource) {

    TestIamPermissionsDiskHttpRequest request =
        TestIamPermissionsDiskHttpRequest.newBuilder()
            .setResource(resource)
            .setTestPermissionsRequestResource(testPermissionsRequestResource)
            .build();
    return testIamPermissionsDisk(request);
  }
@ BetaApi public final TestPermissionsResponse testIamPermissionsDisk ( String resource , TestPermissionsRequest testPermissionsRequestResource ) { TestIamPermissionsDiskHttpRequest request = TestIamPermissionsDiskHttpRequest . newBuilder ( ) . setResource ( resource ) . setTestPermissionsRequestResource ( testPermissionsRequestResource ) . build ( ) ; return testIamPermissionsDisk ( request ) ; }
Returns permissions that a caller has on the specified resource.

<p>Sample code:

<pre><code>
try (DiskClient diskClient = DiskClient.create()) {
ProjectZoneDiskResourceName resource = ProjectZoneDiskResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
TestPermissionsResponse response = diskClient.testIamPermissionsDisk(resource.toString(), testPermissionsRequestResource);
}
</code></pre>

@param resource Name or id of the resource for this request.
@param testPermissionsRequestResource
@throws com.google.api.gax.rpc.ApiException if the remote call fails