public SummaryConfig.Classes.Builder getSummaryClassConfig() {
        SummaryConfig.Classes.Builder classBuilder = new SummaryConfig.Classes.Builder();
        classBuilder.
            id(id).
            name(getName()).
            omitsummaryfeatures(omitSummaryFeatures);
        for (SummaryClassField field : fields.values() ) {
            classBuilder.fields(new SummaryConfig.Classes.Fields.Builder().
                    name(field.getName()).
                    command(field.getCommand()).
                    source(field.getSource()).
                    elements(convertElementsSelector(field.getElementsSelector())));
        }
        return classBuilder;
    }
MUST be called after all other fields are added
config-model/src/main/java/com/yahoo/schema/derived/SummaryClass.java