code: public static List<String> getReadGroupSetIds(String datasetId, OfflineAuth auth) throws IOException {
      List<String> output = Lists.newArrayList();
      Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
      Iterable<ReadGroupSet> rgs = Paginator.ReadGroupSets.create(genomics)
          .search(new SearchReadGroupSetsRequest().setDatasetIds(Lists.newArrayList(datasetId)),
              "readGroupSets(id),nextPageToken");
      for (ReadGroupSet r : rgs) {
        output.add(r.getId());
      }
      if (output.isEmpty()) {
        throw new IOException("Dataset " + datasetId + " does not contain any ReadGroupSets");
      }
      return output;
    }
docs: Gets ReadGroupSetIds from a given datasetId using the Genomics API.
  
  @param datasetId The id of the dataset to query.
  @param auth The OfflineAuth for the API request.
  @return The list of readGroupSetIds in the dataset.
  @throws IOException If dataset does not contain any readGroupSets.