code: @BetaApi
    public final Operation setTargetForwardingRule(
        String forwardingRule, TargetReference targetReferenceResource) {
  
      SetTargetForwardingRuleHttpRequest request =
          SetTargetForwardingRuleHttpRequest.newBuilder()
              .setForwardingRule(forwardingRule)
              .setTargetReferenceResource(targetReferenceResource)
              .build();
      return setTargetForwardingRule(request);
    }
docs: Changes target URL for forwarding rule. The new target should be of the same type as the old
  target.
  
  <p>Sample code:
  
  <pre><code>
  try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
  ProjectRegionForwardingRuleName forwardingRule = ProjectRegionForwardingRuleName.of("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
  TargetReference targetReferenceResource = TargetReference.newBuilder().build();
  Operation response = forwardingRuleClient.setTargetForwardingRule(forwardingRule.toString(), targetReferenceResource);
  }
  </code></pre>
  
  @param forwardingRule Name of the ForwardingRule resource in which target is to be set.
  @param targetReferenceResource
  @throws com.google.api.gax.rpc.ApiException if the remote call fails