package io.vertx.groovy.servicediscovery.spi;
public class ServicePublisher_GroovyExtension {
  public static void publish(io.vertx.servicediscovery.spi.ServicePublisher j_receiver, java.util.Map<String, Object> record, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    j_receiver.publish(record != null ? new io.vertx.servicediscovery.Record(io.vertx.core.impl.ConversionHelper.toJsonObject(record)) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.servicediscovery.Record>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.servicediscovery.Record> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null);
  }
  public static void update(io.vertx.servicediscovery.spi.ServicePublisher j_receiver, java.util.Map<String, Object> record, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    j_receiver.update(record != null ? new io.vertx.servicediscovery.Record(io.vertx.core.impl.ConversionHelper.toJsonObject(record)) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.servicediscovery.Record>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.servicediscovery.Record> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null);
  }
}