code: @BetaApi
    public final Operation setTargetGlobalForwardingRule(
        ProjectGlobalForwardingRuleName forwardingRule, TargetReference targetReferenceResource) {
  
      SetTargetGlobalForwardingRuleHttpRequest request =
          SetTargetGlobalForwardingRuleHttpRequest.newBuilder()
              .setForwardingRule(forwardingRule == null ? null : forwardingRule.toString())
              .setTargetReferenceResource(targetReferenceResource)
              .build();
      return setTargetGlobalForwardingRule(request);
    }
docs: Changes target URL for the GlobalForwardingRule resource. The new target should be of the same
  type as the old target.
  
  <p>Sample code:
  
  <pre><code>
  try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
  ProjectGlobalForwardingRuleName forwardingRule = ProjectGlobalForwardingRuleName.of("[PROJECT]", "[FORWARDING_RULE]");
  TargetReference targetReferenceResource = TargetReference.newBuilder().build();
  Operation response = globalForwardingRuleClient.setTargetGlobalForwardingRule(forwardingRule, 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