package io.vertx.groovy.servicediscovery.types;
public class EventBusService_GroovyStaticExtension {
  public static java.util.Map<String, Object> createRecord(io.vertx.servicediscovery.types.EventBusService j_receiver, java.lang.String name, java.lang.String address, java.lang.String itf, java.util.Map<String, Object> metadata) {
    return io.vertx.servicediscovery.types.EventBusService.createRecord(name,
      address,
      itf,
      metadata != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(metadata) : null) != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(io.vertx.servicediscovery.types.EventBusService.createRecord(name,
      address,
      itf,
      metadata != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(metadata) : null).toJson()) : null;
  }
  public static <T>java.lang.Object getServiceProxy(io.vertx.servicediscovery.types.EventBusService j_receiver, io.vertx.servicediscovery.ServiceDiscovery discovery, java.util.function.Function<java.util.Map<String, Object>, java.lang.Boolean> filter, java.lang.Class<java.lang.Object> clientClass, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>> resultHandler) {
    return io.vertx.core.impl.ConversionHelper.fromObject(io.vertx.servicediscovery.types.EventBusService.getServiceProxy(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,
      clientClass,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Object> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
  }
  public static <T>java.lang.Object getServiceProxyWithJsonFilter(io.vertx.servicediscovery.types.EventBusService j_receiver, io.vertx.servicediscovery.ServiceDiscovery discovery, java.util.Map<String, Object> filter, java.lang.Class<java.lang.Object> clientClass, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>> resultHandler) {
    return io.vertx.core.impl.ConversionHelper.fromObject(io.vertx.servicediscovery.types.EventBusService.getServiceProxyWithJsonFilter(discovery,
      filter != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(filter) : null,
      clientClass,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Object> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
  }
  public static java.util.Map<String, Object> createRecord(io.vertx.servicediscovery.types.EventBusService j_receiver, java.lang.String name, java.lang.String address, java.lang.String classname) {
    return io.vertx.servicediscovery.types.EventBusService.createRecord(name,
      address,
      classname) != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(io.vertx.servicediscovery.types.EventBusService.createRecord(name,
      address,
      classname).toJson()) : null;
  }
}