private static List<Phases.Builder> getPhases(Collection<Phase> phases) {
        List<Phases.Builder> builders = new ArrayList<>();
        for (Phase phase : phases) {
            builders.add(
                    new Phases.Builder()
                            .id(phase.getName())
                            .before(phase.before())
                            .after(phase.after()));
        }
        return builders;
    }
@author Tony Vaagenes
@author gjoranv

Generates config for a all the chains.
config-model/src/main/java/com/yahoo/vespa/model/container/component/chain/ChainsConfigGenerator.java