package io.vertx.reactivex.ext.web.client.predicate;
import java.util.Map;
import io.reactivex.Observable;
import io.reactivex.Flowable;
import io.reactivex.Single;
import io.reactivex.Completable;
import io.reactivex.Maybe;
import java.util.List;
import java.util.function.Function;
@io.vertx.lang.rx.RxGen(io.vertx.ext.web.client.predicate.ResponsePredicate.class)
public class ResponsePredicate implements java.util.function.Function<io.vertx.reactivex.ext.web.client.HttpResponse<Void>, io.vertx.reactivex.ext.web.client.predicate.ResponsePredicateResult> {
@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;
ResponsePredicate that = (ResponsePredicate) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
@Override
public io.vertx.reactivex.ext.web.client.predicate.ResponsePredicateResult apply(io.vertx.reactivex.ext.web.client.HttpResponse<Void> in) {
io.vertx.ext.web.client.predicate.ResponsePredicateResult ret;
ret = getDelegate().apply(in.getDelegate());
java.util.function.Function<io.vertx.ext.web.client.predicate.ResponsePredicateResult, io.vertx.reactivex.ext.web.client.predicate.ResponsePredicateResult> outConv = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicateResult::newInstance;
return outConv.apply(ret);
}
public static final io.vertx.lang.rx.TypeArg<ResponsePredicate> __TYPE_ARG = new io.vertx.lang.rx.TypeArg<>( obj -> new ResponsePredicate((io.vertx.ext.web.client.predicate.ResponsePredicate) obj),
ResponsePredicate::getDelegate
);
private final io.vertx.ext.web.client.predicate.ResponsePredicate delegate;
public ResponsePredicate(io.vertx.ext.web.client.predicate.ResponsePredicate delegate) {
this.delegate = delegate;
}
public io.vertx.ext.web.client.predicate.ResponsePredicate getDelegate() {
return delegate;
}
public static io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate status(int statusCode) {
io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate ret = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.status(statusCode));
return ret;
}
public static io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate status(int min, int max) {
io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate ret = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.status(min, max));
return ret;
}
public static io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate contentType(String mimeType) {
io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate ret = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.contentType(mimeType));
return ret;
}
public static io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate contentType(List<String> mimeTypes) {
io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate ret = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.contentType(mimeTypes));
return ret;
}
public static io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate create(Function<io.vertx.reactivex.ext.web.client.HttpResponse<Void>, io.vertx.reactivex.ext.web.client.predicate.ResponsePredicateResult> test) {
io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate ret = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.create(new java.util.function.Function<io.vertx.ext.web.client.HttpResponse<java.lang.Void>,io.vertx.ext.web.client.predicate.ResponsePredicateResult>() {
public io.vertx.ext.web.client.predicate.ResponsePredicateResult apply(io.vertx.ext.web.client.HttpResponse<java.lang.Void> arg) {
io.vertx.reactivex.ext.web.client.predicate.ResponsePredicateResult ret = test.apply(io.vertx.reactivex.ext.web.client.HttpResponse.newInstance(arg, io.vertx.lang.rx.TypeArg.unknown()));
return ret.getDelegate();
}
}));
return ret;
}
public static io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate create(Function<io.vertx.reactivex.ext.web.client.HttpResponse<Void>, io.vertx.reactivex.ext.web.client.predicate.ResponsePredicateResult> test, io.vertx.reactivex.ext.web.client.predicate.ErrorConverter errorConverter) {
io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate ret = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.create(new java.util.function.Function<io.vertx.ext.web.client.HttpResponse<java.lang.Void>,io.vertx.ext.web.client.predicate.ResponsePredicateResult>() {
public io.vertx.ext.web.client.predicate.ResponsePredicateResult apply(io.vertx.ext.web.client.HttpResponse<java.lang.Void> arg) {
io.vertx.reactivex.ext.web.client.predicate.ResponsePredicateResult ret = test.apply(io.vertx.reactivex.ext.web.client.HttpResponse.newInstance(arg, io.vertx.lang.rx.TypeArg.unknown()));
return ret.getDelegate();
}
}, errorConverter.getDelegate()));
return ret;
}
public io.vertx.reactivex.ext.web.client.predicate.ErrorConverter errorConverter() {
io.vertx.reactivex.ext.web.client.predicate.ErrorConverter ret = io.vertx.reactivex.ext.web.client.predicate.ErrorConverter.newInstance(delegate.errorConverter());
return ret;
}
public static final ResponsePredicate SC_INFORMATIONAL_RESPONSE = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_INFORMATIONAL_RESPONSE);
public static final ResponsePredicate SC_CONTINUE = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_CONTINUE);
public static final ResponsePredicate SC_SWITCHING_PROTOCOLS = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_SWITCHING_PROTOCOLS);
public static final ResponsePredicate SC_PROCESSING = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PROCESSING);
public static final ResponsePredicate SC_EARLY_HINTS = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_EARLY_HINTS);
public static final ResponsePredicate SC_SUCCESS = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_SUCCESS);
public static final ResponsePredicate SC_OK = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_OK);
public static final ResponsePredicate SC_CREATED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_CREATED);
public static final ResponsePredicate SC_ACCEPTED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_ACCEPTED);
public static final ResponsePredicate SC_NON_AUTHORITATIVE_INFORMATION = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NON_AUTHORITATIVE_INFORMATION);
public static final ResponsePredicate SC_NO_CONTENT = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NO_CONTENT);
public static final ResponsePredicate SC_RESET_CONTENT = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_RESET_CONTENT);
public static final ResponsePredicate SC_PARTIAL_CONTENT = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PARTIAL_CONTENT);
public static final ResponsePredicate SC_MULTI_STATUS = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_MULTI_STATUS);
public static final ResponsePredicate SC_REDIRECTION = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REDIRECTION);
public static final ResponsePredicate SC_MULTIPLE_CHOICES = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_MULTIPLE_CHOICES);
public static final ResponsePredicate SC_MOVED_PERMANENTLY = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_MOVED_PERMANENTLY);
public static final ResponsePredicate SC_FOUND = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_FOUND);
public static final ResponsePredicate SC_SEE_OTHER = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_SEE_OTHER);
public static final ResponsePredicate SC_NOT_MODIFIED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NOT_MODIFIED);
public static final ResponsePredicate SC_USE_PROXY = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_USE_PROXY);
public static final ResponsePredicate SC_TEMPORARY_REDIRECT = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_TEMPORARY_REDIRECT);
public static final ResponsePredicate SC_PERMANENT_REDIRECT = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PERMANENT_REDIRECT);
public static final ResponsePredicate SC_CLIENT_ERRORS = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_CLIENT_ERRORS);
public static final ResponsePredicate SC_BAD_REQUEST = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_BAD_REQUEST);
public static final ResponsePredicate SC_UNAUTHORIZED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_UNAUTHORIZED);
public static final ResponsePredicate SC_PAYMENT_REQUIRED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PAYMENT_REQUIRED);
public static final ResponsePredicate SC_FORBIDDEN = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_FORBIDDEN);
public static final ResponsePredicate SC_NOT_FOUND = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NOT_FOUND);
public static final ResponsePredicate SC_METHOD_NOT_ALLOWED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_METHOD_NOT_ALLOWED);
public static final ResponsePredicate SC_NOT_ACCEPTABLE = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NOT_ACCEPTABLE);
public static final ResponsePredicate SC_PROXY_AUTHENTICATION_REQUIRED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PROXY_AUTHENTICATION_REQUIRED);
public static final ResponsePredicate SC_REQUEST_TIMEOUT = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REQUEST_TIMEOUT);
public static final ResponsePredicate SC_CONFLICT = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_CONFLICT);
public static final ResponsePredicate SC_GONE = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_GONE);
public static final ResponsePredicate SC_LENGTH_REQUIRED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_LENGTH_REQUIRED);
public static final ResponsePredicate SC_PRECONDITION_FAILED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PRECONDITION_FAILED);
public static final ResponsePredicate SC_REQUEST_ENTITY_TOO_LARGE = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REQUEST_ENTITY_TOO_LARGE);
public static final ResponsePredicate SC_REQUEST_URI_TOO_LONG = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REQUEST_URI_TOO_LONG);
public static final ResponsePredicate SC_UNSUPPORTED_MEDIA_TYPE = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_UNSUPPORTED_MEDIA_TYPE);
public static final ResponsePredicate SC_REQUESTED_RANGE_NOT_SATISFIABLE = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REQUESTED_RANGE_NOT_SATISFIABLE);
public static final ResponsePredicate SC_EXPECTATION_FAILED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_EXPECTATION_FAILED);
public static final ResponsePredicate SC_MISDIRECTED_REQUEST = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_MISDIRECTED_REQUEST);
public static final ResponsePredicate SC_UNPROCESSABLE_ENTITY = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_UNPROCESSABLE_ENTITY);
public static final ResponsePredicate SC_LOCKED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_LOCKED);
public static final ResponsePredicate SC_FAILED_DEPENDENCY = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_FAILED_DEPENDENCY);
public static final ResponsePredicate SC_UNORDERED_COLLECTION = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_UNORDERED_COLLECTION);
public static final ResponsePredicate SC_UPGRADE_REQUIRED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_UPGRADE_REQUIRED);
public static final ResponsePredicate SC_PRECONDITION_REQUIRED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_PRECONDITION_REQUIRED);
public static final ResponsePredicate SC_TOO_MANY_REQUESTS = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_TOO_MANY_REQUESTS);
public static final ResponsePredicate = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_REQUEST_HEADER_FIELDS_TOO_LARGE);
public static final ResponsePredicate SC_SERVER_ERRORS = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_SERVER_ERRORS);
public static final ResponsePredicate SC_INTERNAL_SERVER_ERROR = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_INTERNAL_SERVER_ERROR);
public static final ResponsePredicate SC_NOT_IMPLEMENTED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NOT_IMPLEMENTED);
public static final ResponsePredicate SC_BAD_GATEWAY = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_BAD_GATEWAY);
public static final ResponsePredicate SC_SERVICE_UNAVAILABLE = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_SERVICE_UNAVAILABLE);
public static final ResponsePredicate SC_GATEWAY_TIMEOUT = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_GATEWAY_TIMEOUT);
public static final ResponsePredicate SC_HTTP_VERSION_NOT_SUPPORTED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_HTTP_VERSION_NOT_SUPPORTED);
public static final ResponsePredicate SC_VARIANT_ALSO_NEGOTIATES = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_VARIANT_ALSO_NEGOTIATES);
public static final ResponsePredicate SC_INSUFFICIENT_STORAGE = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_INSUFFICIENT_STORAGE);
public static final ResponsePredicate SC_NOT_EXTENDED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NOT_EXTENDED);
public static final ResponsePredicate SC_NETWORK_AUTHENTICATION_REQUIRED = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.SC_NETWORK_AUTHENTICATION_REQUIRED);
public static final ResponsePredicate JSON = io.vertx.reactivex.ext.web.client.predicate.ResponsePredicate.newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate.JSON);
public static ResponsePredicate newInstance(io.vertx.ext.web.client.predicate.ResponsePredicate arg) {
return arg != null ? new ResponsePredicate(arg) : null;
}
}