code: @BetaApi
    public final Policy setIamPolicySubnetwork(
        String resource, RegionSetPolicyRequest regionSetPolicyRequestResource) {
  
      SetIamPolicySubnetworkHttpRequest request =
          SetIamPolicySubnetworkHttpRequest.newBuilder()
              .setResource(resource)
              .setRegionSetPolicyRequestResource(regionSetPolicyRequestResource)
              .build();
      return setIamPolicySubnetwork(request);
    }
docs: Sets the access control policy on the specified resource. Replaces any existing policy.
  
  <p>Sample code:
  
  <pre><code>
  try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
  ProjectRegionSubnetworkResourceName resource = ProjectRegionSubnetworkResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
  RegionSetPolicyRequest regionSetPolicyRequestResource = RegionSetPolicyRequest.newBuilder().build();
  Policy response = subnetworkClient.setIamPolicySubnetwork(resource.toString(), regionSetPolicyRequestResource);
  }
  </code></pre>
  
  @param resource Name or id of the resource for this request.
  @param regionSetPolicyRequestResource
  @throws com.google.api.gax.rpc.ApiException if the remote call fails