class KeyConfiguration extends ConfigItem {

    public Optional<DefaultKeyVaultConfig> getKeyVaultConfig(KeyVaultType type) {
        if (type == null) {
            return Optional.empty();
        }

        if (KeyVaultType.AZURE.equals(type) && azureKeyVaultConfig != null) {
            return Optional.of(KeyVaultConfigConverter.convert(azureKeyVaultConfig));
        }

        if (KeyVaultType.HASHICORP.equals(type) && hashicorpKeyVaultConfig != null) {
            return Optional.of(KeyVaultConfigConverter.convert(hashicorpKeyVaultConfig));
        }

        if (keyVaultConfigs == null) {
            return Optional.empty();
        }

        return keyVaultConfigs.stream().filter(c -> type.equals(c.getKeyVaultType())).findFirst();
    }

    public  KeyConfiguration(
            final Path passwordFile,
            final List<String> passwords,
            final List<KeyData> keyData,
            final AzureKeyVaultConfig azureKeyVaultConfig,
            final HashicorpKeyVaultConfig hashicorpKeyVaultConfig);
    public  KeyConfiguration();

}