private static Map translateBindingPropertiesFromSDKToCFN()

in aws-amplifyuibuilder-component/src/main/java/software/amazon/amplifyuibuilder/component/Translator.java [477:503]


  private static Map<String, software.amazon.amplifyuibuilder.component.ComponentBindingPropertiesValue> translateBindingPropertiesFromSDKToCFN(Map<String, ComponentBindingPropertiesValue> bindingProperties) {
    if (bindingProperties == null) {
      return null;
    }
    Map<String, software.amazon.amplifyuibuilder.component.ComponentBindingPropertiesValue> translated = new HashMap<>();
    bindingProperties.forEach((k, v) -> {
      software.amazon.amplifyuibuilder.component.ComponentBindingPropertiesValue.ComponentBindingPropertiesValueBuilder bindingPropertiesValue = software.amazon.amplifyuibuilder.component.ComponentBindingPropertiesValue.builder();
      bindingPropertiesValue.type(v.type());
      bindingPropertiesValue.defaultValue(v.defaultValue());

      if (v.bindingProperties() != null) {
        software.amazon.amplifyuibuilder.component.ComponentBindingPropertiesValueProperties.ComponentBindingPropertiesValuePropertiesBuilder bindingPropertiesValueProperties = software.amazon.amplifyuibuilder.component.ComponentBindingPropertiesValueProperties.builder();
        bindingPropertiesValueProperties.field(v.bindingProperties().field());
        bindingPropertiesValueProperties.bucket(v.bindingProperties().bucket());
        bindingPropertiesValueProperties.userAttribute(v.bindingProperties().userAttribute());
        bindingPropertiesValueProperties.model(v.bindingProperties().model());
        bindingPropertiesValueProperties.key(v.bindingProperties().key());
        bindingPropertiesValueProperties.defaultValue(v.bindingProperties().defaultValue());
        if (v.bindingProperties().predicates() != null) {
          bindingPropertiesValueProperties.predicates(translatePredicatesFromSDKToCFN(v.bindingProperties().predicates()));
        }
        bindingPropertiesValue.bindingProperties(bindingPropertiesValueProperties.build());
      }
      translated.put(k, bindingPropertiesValue.build());
    });
    return translated;
  }