code: private static <L> Map<Name, TypeSet<ResourceType<L>>> buildTypeMapForConstructor(
              Collection<ResourceType<L>> allTypes) {
          TypeSetBuilder<ResourceType<L>> bldr = TypeSet.<ResourceType<L>> builder();
          bldr.enabled(true);
          bldr.name(new Name("all"));
          for (ResourceType<L> type : allTypes) {
              bldr.type(type);
          }
          TypeSet<ResourceType<L>> typeSet = bldr.build();
  
          return Collections.singletonMap(typeSet.getName(), typeSet);
      }
docs: for use by the above constructor