package io.vertx.groovy.config;
public class ConfigRetriever_GroovyExtension {
  public static void getConfig(io.vertx.config.ConfigRetriever j_receiver, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> completionHandler) {
    j_receiver.getConfig(completionHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject> ar) {
        completionHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonObject(event)));
      }
    } : null);
  }
  public static java.util.Map<String, Object> getCachedConfig(io.vertx.config.ConfigRetriever j_receiver) {
    return io.vertx.core.impl.ConversionHelper.fromJsonObject(j_receiver.getCachedConfig());
  }
  public static void listen(io.vertx.config.ConfigRetriever j_receiver, io.vertx.core.Handler<java.util.Map<String, Object>> listener) {
    j_receiver.listen(listener != null ? event -> listener.handle(event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null) : null);
  }
  public static io.vertx.config.ConfigRetriever setConfigurationProcessor(io.vertx.config.ConfigRetriever j_receiver, java.util.function.Function<java.util.Map<String, Object>, java.util.Map<String, Object>> processor) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.setConfigurationProcessor(processor != null ? new java.util.function.Function<io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject>() {
      public io.vertx.core.json.JsonObject apply(io.vertx.core.json.JsonObject t) {
        java.util.Map<String, Object> o = io.vertx.core.impl.ConversionHelper.fromJsonObject(t);
        java.util.Map<String, Object> p = processor.apply(o);
        return p != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(p) : null;
      }
    } : null));
    return j_receiver;
  }
}