class GovernanceConfigurationYamlSwapper implements YamlSwapper<YamlGovernanceConfiguration, GovernanceConfiguration> {

    @Override
    public YamlGovernanceConfiguration swapToYamlConfiguration(final GovernanceConfiguration data) {
        YamlGovernanceConfiguration result = new YamlGovernanceConfiguration();
        result.setName(data.getName());
        result.setRegistryCenter(governanceCenterConfigurationSwapper.swapToYamlConfiguration(data.getRegistryCenterConfiguration()));
        if (data.getAdditionalConfigCenterConfiguration().isPresent()) {
            result.setAdditionalConfigCenter(governanceCenterConfigurationSwapper.swapToYamlConfiguration(data.getAdditionalConfigCenterConfiguration().get()));
        }
        return result;
    }

}