package io.vertx.reactivex.ext.web.validation;
import io.vertx.reactivex.RxHelper;
import io.vertx.reactivex.ObservableHelper;
import io.vertx.reactivex.FlowableHelper;
import io.vertx.reactivex.impl.AsyncResultMaybe;
import io.vertx.reactivex.impl.AsyncResultSingle;
import io.vertx.reactivex.impl.AsyncResultCompletable;
import io.vertx.reactivex.WriteStreamObserver;
import io.vertx.reactivex.WriteStreamSubscriber;
import java.util.Map;
import java.util.Set;
import java.util.List;
import java.util.Iterator;
import java.util.function.Function;
import java.util.stream.Collectors;
import io.vertx.core.Handler;
import io.vertx.core.AsyncResult;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import io.vertx.lang.rx.RxGen;
import io.vertx.lang.rx.TypeArg;
import io.vertx.lang.rx.MappingIterator;
@RxGen(io.vertx.ext.web.validation.RequestPredicate.class)
public class RequestPredicate implements Function<io.vertx.reactivex.ext.web.RoutingContext, io.vertx.reactivex.ext.web.validation.RequestPredicateResult> {
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RequestPredicate that = (RequestPredicate) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
@Override
public io.vertx.reactivex.ext.web.validation.RequestPredicateResult apply(io.vertx.reactivex.ext.web.RoutingContext in) {
io.vertx.ext.web.validation.RequestPredicateResult ret;
ret = getDelegate().apply(in.getDelegate());
Function<io.vertx.ext.web.validation.RequestPredicateResult, io.vertx.reactivex.ext.web.validation.RequestPredicateResult> outConv = io.vertx.reactivex.ext.web.validation.RequestPredicateResult::newInstance;
return outConv.apply(ret);
}
public static final TypeArg<RequestPredicate> __TYPE_ARG = new TypeArg<>( obj -> new RequestPredicate((io.vertx.ext.web.validation.RequestPredicate) obj),
RequestPredicate::getDelegate
);
private final io.vertx.ext.web.validation.RequestPredicate delegate;
public RequestPredicate(io.vertx.ext.web.validation.RequestPredicate delegate) {
this.delegate = delegate;
}
public RequestPredicate(Object delegate) {
this.delegate = (io.vertx.ext.web.validation.RequestPredicate)delegate;
}
public io.vertx.ext.web.validation.RequestPredicate getDelegate() {
return delegate;
}
public static io.vertx.reactivex.ext.web.validation.RequestPredicate multipartFileUploadExists(String propertyName, String contentTypePattern) {
io.vertx.reactivex.ext.web.validation.RequestPredicate ret = io.vertx.reactivex.ext.web.validation.RequestPredicate.newInstance((io.vertx.ext.web.validation.RequestPredicate)io.vertx.ext.web.validation.RequestPredicate.multipartFileUploadExists(propertyName, contentTypePattern));
return ret;
}
public static final io.vertx.reactivex.ext.web.validation.RequestPredicate BODY_REQUIRED = io.vertx.reactivex.ext.web.validation.RequestPredicate.newInstance((io.vertx.ext.web.validation.RequestPredicate)io.vertx.ext.web.validation.RequestPredicate.BODY_REQUIRED);
public static RequestPredicate newInstance(io.vertx.ext.web.validation.RequestPredicate arg) {
return arg != null ? new RequestPredicate(arg) : null;
}
}