package io.vertx.groovy.ext.web.api.contract;
public class RouterFactory_GroovyExtension {
public static io.vertx.ext.web.api.contract.RouterFactory setOptions(io.vertx.ext.web.api.contract.RouterFactory<Object> j_receiver, java.util.Map<String, Object> options) {
io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.setOptions(options != null ? new io.vertx.ext.web.api.contract.RouterFactoryOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null));
return j_receiver;
}
public static java.util.Map<String, Object> getOptions(io.vertx.ext.web.api.contract.RouterFactory<Object> j_receiver) {
return j_receiver.getOptions() != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(j_receiver.getOptions().toJson()) : null;
}
public static io.vertx.ext.web.api.contract.RouterFactory setExtraOperationContextPayloadMapper(io.vertx.ext.web.api.contract.RouterFactory<Object> j_receiver, java.util.function.Function<io.vertx.ext.web.RoutingContext, java.util.Map<String, Object>> extraOperationContextPayloadMapper) {
io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.setExtraOperationContextPayloadMapper(extraOperationContextPayloadMapper != null ? new java.util.function.Function<io.vertx.ext.web.RoutingContext, io.vertx.core.json.JsonObject>() {
public io.vertx.core.json.JsonObject apply(io.vertx.ext.web.RoutingContext t) {
io.vertx.ext.web.RoutingContext o = io.vertx.core.impl.ConversionHelper.fromObject(t);
java.util.Map<String, Object> p = extraOperationContextPayloadMapper.apply(o);
return p != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(p) : null;
}
} : null));
return j_receiver;
}
}