code: @BetaApi
    public final Operation setNamedPortsInstanceGroup(
        String instanceGroup,
        InstanceGroupsSetNamedPortsRequest instanceGroupsSetNamedPortsRequestResource) {
  
      SetNamedPortsInstanceGroupHttpRequest request =
          SetNamedPortsInstanceGroupHttpRequest.newBuilder()
              .setInstanceGroup(instanceGroup)
              .setInstanceGroupsSetNamedPortsRequestResource(
                  instanceGroupsSetNamedPortsRequestResource)
              .build();
      return setNamedPortsInstanceGroup(request);
    }
docs: Sets the named ports for the specified instance group.
  
  <p>Sample code:
  
  <pre><code>
  try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
  ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
  InstanceGroupsSetNamedPortsRequest instanceGroupsSetNamedPortsRequestResource = InstanceGroupsSetNamedPortsRequest.newBuilder().build();
  Operation response = instanceGroupClient.setNamedPortsInstanceGroup(instanceGroup.toString(), instanceGroupsSetNamedPortsRequestResource);
  }
  </code></pre>
  
  @param instanceGroup The name of the instance group where the named ports are updated.
  @param instanceGroupsSetNamedPortsRequestResource
  @throws com.google.api.gax.rpc.ApiException if the remote call fails