private static Map<String, MetricSet> toMapById(MetricSet... metricSets) {
        Map<String, MetricSet> availableMetricSets = new LinkedHashMap<>();
        for (MetricSet metricSet : metricSets) {
            var existing = availableMetricSets.put(metricSet.getId(), metricSet);
            if (existing != null)
                throw new IllegalArgumentException("There are two predefined metric sets with id " + existing.getId());
        }
        return Collections.unmodifiableMap(availableMetricSets);
    }
A data object for predefined metric sets.

@author gjoranv
config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/builder/PredefinedMetricSets.java