package io.vertx.groovy.ext.mongo;
public class MongoClient_GroovyExtension {
  public static io.vertx.ext.mongo.MongoClient save(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> document, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.save(collection,
      document != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(document) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.String> ar) {
        resultHandler.handle(ar.map(event -> event));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient saveWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> document, io.vertx.ext.mongo.WriteOption writeOption, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.saveWithOptions(collection,
      document != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(document) : null,
      writeOption,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.String> ar) {
        resultHandler.handle(ar.map(event -> event));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient insert(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> document, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.insert(collection,
      document != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(document) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.String> ar) {
        resultHandler.handle(ar.map(event -> event));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient insertWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> document, io.vertx.ext.mongo.WriteOption writeOption, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.insertWithOptions(collection,
      document != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(document) : null,
      writeOption,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.String> ar) {
        resultHandler.handle(ar.map(event -> event));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient update(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> update, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.update(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      update != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(update) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient updateCollection(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> update, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.updateCollection(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      update != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(update) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientUpdateResult>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientUpdateResult> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient updateWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> update, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.updateWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      update != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(update) : null,
      options != null ? new io.vertx.ext.mongo.UpdateOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient updateCollectionWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> update, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.updateCollectionWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      update != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(update) : null,
      options != null ? new io.vertx.ext.mongo.UpdateOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientUpdateResult>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientUpdateResult> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient replace(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> replace, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.replace(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      replace != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(replace) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient replaceDocuments(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> replace, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.replaceDocuments(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      replace != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(replace) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientUpdateResult>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientUpdateResult> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient replaceWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> replace, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.replaceWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      replace != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(replace) : null,
      options != null ? new io.vertx.ext.mongo.UpdateOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient replaceDocumentsWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> replace, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.replaceDocumentsWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      replace != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(replace) : null,
      options != null ? new io.vertx.ext.mongo.UpdateOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientUpdateResult>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientUpdateResult> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient bulkWrite(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.List<java.util.Map<String, Object>> operations, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.bulkWrite(collection,
      operations != null ? operations.stream().map(elt -> elt != null ? new io.vertx.ext.mongo.BulkOperation(io.vertx.core.impl.ConversionHelper.toJsonObject(elt)) : null).collect(java.util.stream.Collectors.toList()) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientBulkWriteResult>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientBulkWriteResult> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient bulkWriteWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.List<java.util.Map<String, Object>> operations, java.util.Map<String, Object> bulkWriteOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.bulkWriteWithOptions(collection,
      operations != null ? operations.stream().map(elt -> elt != null ? new io.vertx.ext.mongo.BulkOperation(io.vertx.core.impl.ConversionHelper.toJsonObject(elt)) : null).collect(java.util.stream.Collectors.toList()) : null,
      bulkWriteOptions != null ? new io.vertx.ext.mongo.BulkWriteOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(bulkWriteOptions)) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientBulkWriteResult>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientBulkWriteResult> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient find(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.util.Map<String, Object>>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.find(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<io.vertx.core.json.JsonObject>>>() {
      public void handle(io.vertx.core.AsyncResult<java.util.List<io.vertx.core.json.JsonObject>> ar) {
        resultHandler.handle(ar.map(event -> event != null ? event.stream().map(elt -> io.vertx.core.impl.ConversionHelper.fromJsonObject(elt)).collect(java.util.stream.Collectors.toList()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.core.streams.ReadStream<io.vertx.core.json.JsonObject> findBatch(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findBatch(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null));
  }
  public static io.vertx.ext.mongo.MongoClient findWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.util.Map<String, Object>>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      options != null ? new io.vertx.ext.mongo.FindOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<io.vertx.core.json.JsonObject>>>() {
      public void handle(io.vertx.core.AsyncResult<java.util.List<io.vertx.core.json.JsonObject>> ar) {
        resultHandler.handle(ar.map(event -> event != null ? event.stream().map(elt -> io.vertx.core.impl.ConversionHelper.fromJsonObject(elt)).collect(java.util.stream.Collectors.toList()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.core.streams.ReadStream<io.vertx.core.json.JsonObject> findBatchWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> options) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findBatchWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      options != null ? new io.vertx.ext.mongo.FindOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null));
  }
  public static io.vertx.ext.mongo.MongoClient findOne(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> fields, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findOne(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      fields != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(fields) : null,
      resultHandler != 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) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient findOneAndUpdate(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> update, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findOneAndUpdate(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      update != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(update) : null,
      resultHandler != 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) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient findOneAndUpdateWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> update, java.util.Map<String, Object> findOptions, java.util.Map<String, Object> updateOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findOneAndUpdateWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      update != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(update) : null,
      findOptions != null ? new io.vertx.ext.mongo.FindOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(findOptions)) : null,
      updateOptions != null ? new io.vertx.ext.mongo.UpdateOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(updateOptions)) : null,
      resultHandler != 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) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient findOneAndReplace(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> replace, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findOneAndReplace(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      replace != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(replace) : null,
      resultHandler != 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) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient findOneAndReplaceWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> replace, java.util.Map<String, Object> findOptions, java.util.Map<String, Object> updateOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findOneAndReplaceWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      replace != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(replace) : null,
      findOptions != null ? new io.vertx.ext.mongo.FindOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(findOptions)) : null,
      updateOptions != null ? new io.vertx.ext.mongo.UpdateOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(updateOptions)) : null,
      resultHandler != 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) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient findOneAndDelete(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findOneAndDelete(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      resultHandler != 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) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient findOneAndDeleteWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> findOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findOneAndDeleteWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      findOptions != null ? new io.vertx.ext.mongo.FindOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(findOptions)) : null,
      resultHandler != 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) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient count(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Long>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.count(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Long>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Long> ar) {
        resultHandler.handle(ar.map(event -> event));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient remove(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.remove(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient removeDocuments(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.removeDocuments(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientDeleteResult>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientDeleteResult> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient removeWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.ext.mongo.WriteOption writeOption, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.removeWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      writeOption,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient removeDocumentsWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.ext.mongo.WriteOption writeOption, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.removeDocumentsWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      writeOption,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientDeleteResult>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientDeleteResult> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient removeOne(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.removeOne(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient removeDocument(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.removeDocument(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientDeleteResult>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientDeleteResult> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient removeOneWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.ext.mongo.WriteOption writeOption, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.removeOneWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      writeOption,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient removeDocumentWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.ext.mongo.WriteOption writeOption, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.removeDocumentWithOptions(collection,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      writeOption,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientDeleteResult>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientDeleteResult> ar) {
        resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient createIndex(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> key, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.createIndex(collection,
      key != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(key) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient createIndexWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> key, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.createIndexWithOptions(collection,
      key != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(key) : null,
      options != null ? new io.vertx.ext.mongo.IndexOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient listIndexes(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.listIndexes(collection,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonArray>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.core.json.JsonArray> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonArray(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient runCommand(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String commandName, java.util.Map<String, Object> command, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.runCommand(commandName,
      command != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(command) : null,
      resultHandler != 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) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonObject(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient distinct(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.lang.String fieldName, java.lang.String resultClassname, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.distinct(collection,
      fieldName,
      resultClassname,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonArray>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.core.json.JsonArray> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonArray(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.ext.mongo.MongoClient distinctWithQuery(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.lang.String fieldName, java.lang.String resultClassname, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<Object>>> resultHandler) {
    io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.distinctWithQuery(collection,
      fieldName,
      resultClassname,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonArray>>() {
      public void handle(io.vertx.core.AsyncResult<io.vertx.core.json.JsonArray> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonArray(event)));
      }
    } : null));
    return j_receiver;
  }
  public static io.vertx.core.streams.ReadStream<io.vertx.core.json.JsonObject> distinctBatchWithQuery(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.lang.String fieldName, java.lang.String resultClassname, java.util.Map<String, Object> query) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.distinctBatchWithQuery(collection,
      fieldName,
      resultClassname,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null));
  }
  public static io.vertx.core.streams.ReadStream<io.vertx.core.json.JsonObject> distinctBatchWithQuery(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.lang.String fieldName, java.lang.String resultClassname, java.util.Map<String, Object> query, int batchSize) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.distinctBatchWithQuery(collection,
      fieldName,
      resultClassname,
      query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null,
      batchSize));
  }
  public static io.vertx.core.streams.ReadStream<io.vertx.core.json.JsonObject> aggregate(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.List<Object> pipeline) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.aggregate(collection,
      pipeline != null ? io.vertx.core.impl.ConversionHelper.toJsonArray(pipeline) : null));
  }
  public static io.vertx.core.streams.ReadStream<io.vertx.core.json.JsonObject> aggregateWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.List<Object> pipeline, java.util.Map<String, Object> options) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.aggregateWithOptions(collection,
      pipeline != null ? io.vertx.core.impl.ConversionHelper.toJsonArray(pipeline) : null,
      options != null ? new io.vertx.ext.mongo.AggregateOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null));
  }
}