code: @BetaApi
    public final Operation abandonInstancesRegionInstanceGroupManager(
        String instanceGroupManager,
        RegionInstanceGroupManagersAbandonInstancesRequest
            regionInstanceGroupManagersAbandonInstancesRequestResource) {
  
      AbandonInstancesRegionInstanceGroupManagerHttpRequest request =
          AbandonInstancesRegionInstanceGroupManagerHttpRequest.newBuilder()
              .setInstanceGroupManager(instanceGroupManager)
              .setRegionInstanceGroupManagersAbandonInstancesRequestResource(
                  regionInstanceGroupManagersAbandonInstancesRequestResource)
              .build();
      return abandonInstancesRegionInstanceGroupManager(request);
    }
docs: Flags the specified instances to be immediately removed from the managed instance group.
  Abandoning an instance does not delete the instance, but it does remove the instance from any
  target pools that are applied by the managed instance group. This method reduces the targetSize
  of the managed instance group by the number of instances that you abandon. This operation is
  marked as DONE when the action is scheduled even if the instances have not yet been removed
  from the group. You must separately verify the status of the abandoning action with the
  listmanagedinstances method.
  
  <p>If the group is part of a backend service that has enabled connection draining, it can take
  up to 60 seconds after the connection draining duration has elapsed before the VM instance is
  removed or deleted.
  
  <p>You can specify a maximum of 1000 instances with this method per request.
  
  <p>Sample code:
  
  <pre><code>
  try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
  ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
  RegionInstanceGroupManagersAbandonInstancesRequest regionInstanceGroupManagersAbandonInstancesRequestResource = RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build();
  Operation response = regionInstanceGroupManagerClient.abandonInstancesRegionInstanceGroupManager(instanceGroupManager.toString(), regionInstanceGroupManagersAbandonInstancesRequestResource);
  }
  </code></pre>
  
  @param instanceGroupManager Name of the managed instance group.
  @param regionInstanceGroupManagersAbandonInstancesRequestResource
  @throws com.google.api.gax.rpc.ApiException if the remote call fails