class ConfigureInstanceParamsForVfModule {

    public void populateInstanceParams(JsonObject jsonObject, List<Map<String, Object>> userParamsFromRequest,
            String vnfCustomizationUuid, String vfModuleCustomizationUuid) throws PayloadGenerationException {
        try {
            Service service = extractServiceFromUserParameters.getServiceFromRequestUserParams(userParamsFromRequest);

            List<Map<String, String>> instanceParamsList =
                    getInstanceParams(service, vnfCustomizationUuid, vfModuleCustomizationUuid);

            instanceParamsList.stream().flatMap(instanceParamsMap -> instanceParamsMap.entrySet().stream())
                    .forEachOrdered(entry -> jsonObject.addProperty(entry.getKey(), entry.getValue()));
        } catch (Exception e) {
            throw new PayloadGenerationException("Couldn't able to resolve instance parameters", e);
        }
    }

}