package io.vertx.groovy.servicediscovery.types;
public class JDBCDataSource_GroovyStaticExtension {
  public static java.util.Map<String, Object> createRecord(io.vertx.servicediscovery.types.JDBCDataSource j_receiver, java.lang.String name, java.util.Map<String, Object> location, java.util.Map<String, Object> metadata) {
    return io.vertx.servicediscovery.types.JDBCDataSource.createRecord(name,
      location != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(location) : null,
      metadata != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(metadata) : null) != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(io.vertx.servicediscovery.types.JDBCDataSource.createRecord(name,
      location != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(location) : null,
      metadata != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(metadata) : null).toJson()) : null;
  }
  public static void getJDBCClient(io.vertx.servicediscovery.types.JDBCDataSource j_receiver, io.vertx.servicediscovery.ServiceDiscovery discovery, java.util.Map<String, Object> filter, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient>> resultHandler) {
    io.vertx.servicediscovery.types.JDBCDataSource.getJDBCClient(discovery,
      filter != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(filter) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null);
  }
  public static void getJDBCClient(io.vertx.servicediscovery.types.JDBCDataSource j_receiver, io.vertx.servicediscovery.ServiceDiscovery discovery, java.util.function.Function<java.util.Map<String, Object>, java.lang.Boolean> filter, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient>> resultHandler) {
    io.vertx.servicediscovery.types.JDBCDataSource.getJDBCClient(discovery,
      filter != null ? new java.util.function.Function<io.vertx.servicediscovery.Record, java.lang.Boolean>() {
      public java.lang.Boolean apply(io.vertx.servicediscovery.Record t) {
        java.util.Map<String, Object> o = t != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(t.toJson()) : null;
        java.lang.Boolean p = filter.apply(o);
        return p;
      }
    } : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null);
  }
  public static void getJDBCClient(io.vertx.servicediscovery.types.JDBCDataSource j_receiver, io.vertx.servicediscovery.ServiceDiscovery discovery, java.util.Map<String, Object> filter, java.util.Map<String, Object> consumerConfiguration, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient>> resultHandler) {
    io.vertx.servicediscovery.types.JDBCDataSource.getJDBCClient(discovery,
      filter != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(filter) : null,
      consumerConfiguration != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(consumerConfiguration) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null);
  }
  public static void getJDBCClient(io.vertx.servicediscovery.types.JDBCDataSource j_receiver, io.vertx.servicediscovery.ServiceDiscovery discovery, java.util.function.Function<java.util.Map<String, Object>, java.lang.Boolean> filter, java.util.Map<String, Object> consumerConfiguration, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient>> resultHandler) {
    io.vertx.servicediscovery.types.JDBCDataSource.getJDBCClient(discovery,
      filter != null ? new java.util.function.Function<io.vertx.servicediscovery.Record, java.lang.Boolean>() {
      public java.lang.Boolean apply(io.vertx.servicediscovery.Record t) {
        java.util.Map<String, Object> o = t != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(t.toJson()) : null;
        java.lang.Boolean p = filter.apply(o);
        return p;
      }
    } : null,
      consumerConfiguration != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(consumerConfiguration) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.jdbc.JDBCClient> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null);
  }
}