static Configuration toConfiguration(Map<String, RecommendationResponse.BlueprintConfigurations> configs) {
    Map<String, Map<String, String>> properties = configs.entrySet().stream()
      .filter( e -> e.getValue().getProperties() != null && !e.getValue().getProperties().isEmpty())
      .map(e -> Pair.of(e.getKey(), e.getValue().getProperties()))
      .collect(toMap(Pair::getKey, Pair::getValue));

    Map<String, Map<String, Map<String, String>>> propertyAttributes = configs.entrySet().stream()
        .filter( e -> e.getValue().getPropertyAttributes() != null && !e.getValue().getPropertyAttributes().isEmpty())
        .map(e -> Pair.of(e.getKey(), e.getValue().getPropertyAttributesAsMap()))
        .collect(toMap(Pair::getKey, Pair::getValue));

    return new Configuration(properties, propertyAttributes);
  }
Reuse information from layout recommendation if it happened
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/StackAdvisorAdapter.java