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

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

<p>Sample code:

<pre><code>
try (ImageClient imageClient = ImageClient.create()) {
ProjectGlobalImageResourceName resource = ProjectGlobalImageResourceName.of("[PROJECT]", "[RESOURCE]");
TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
TestPermissionsResponse response = imageClient.testIamPermissionsImage(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