code: @BetaApi
    public final Operation setNamedPortsRegionInstanceGroup(
        ProjectRegionInstanceGroupName instanceGroup,
        RegionInstanceGroupsSetNamedPortsRequest regionInstanceGroupsSetNamedPortsRequestResource) {
  
      SetNamedPortsRegionInstanceGroupHttpRequest request =
          SetNamedPortsRegionInstanceGroupHttpRequest.newBuilder()
              .setInstanceGroup(instanceGroup == null ? null : instanceGroup.toString())
              .setRegionInstanceGroupsSetNamedPortsRequestResource(
                  regionInstanceGroupsSetNamedPortsRequestResource)
              .build();
      return setNamedPortsRegionInstanceGroup(request);
    }
docs: Sets the named ports for the specified regional instance group.
  
  <p>Sample code:
  
  <pre><code>
  try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
  ProjectRegionInstanceGroupName instanceGroup = ProjectRegionInstanceGroupName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
  RegionInstanceGroupsSetNamedPortsRequest regionInstanceGroupsSetNamedPortsRequestResource = RegionInstanceGroupsSetNamedPortsRequest.newBuilder().build();
  Operation response = regionInstanceGroupClient.setNamedPortsRegionInstanceGroup(instanceGroup, regionInstanceGroupsSetNamedPortsRequestResource);
  }
  </code></pre>
  
  @param instanceGroup The name of the regional instance group where the named ports are updated.
  @param regionInstanceGroupsSetNamedPortsRequestResource
  @throws com.google.api.gax.rpc.ApiException if the remote call fails