io.vertx.mutiny.ext.web.openapi.SecurityScheme Maven / Gradle / Ivy
package io.vertx.mutiny.ext.web.openapi;
import java.util.Map;
import java.util.stream.Collectors;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.smallrye.mutiny.vertx.TypeArg;
import io.vertx.codegen.annotations.Fluent;
import io.smallrye.common.annotation.CheckReturnValue;
import io.vertx.core.json.JsonObject;
import java.util.function.Function;
import io.vertx.core.Future;
/**
* An authentication handler factory. This class will hold factories for creating
* objects.
*
*
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.web.openapi.SecurityScheme original} non Mutiny-ified interface using Vert.x codegen.
*/
@io.smallrye.mutiny.vertx.MutinyGen(io.vertx.ext.web.openapi.SecurityScheme.class)
public class SecurityScheme {
public static final io.smallrye.mutiny.vertx.TypeArg __TYPE_ARG = new io.smallrye.mutiny.vertx.TypeArg<>( obj -> new SecurityScheme((io.vertx.ext.web.openapi.SecurityScheme) obj),
SecurityScheme::getDelegate
);
private final io.vertx.ext.web.openapi.SecurityScheme delegate;
public SecurityScheme(io.vertx.ext.web.openapi.SecurityScheme delegate) {
this.delegate = delegate;
}
public SecurityScheme(Object delegate) {
this.delegate = (io.vertx.ext.web.openapi.SecurityScheme)delegate;
}
/**
* Empty constructor used by CDI, do not use this constructor directly.
**/
SecurityScheme() {
this.delegate = null;
}
public io.vertx.ext.web.openapi.SecurityScheme getDelegate() {
return delegate;
}
static final io.smallrye.mutiny.vertx.TypeArg TYPE_ARG_0 = new TypeArg(o1 -> io.vertx.mutiny.ext.web.openapi.RouterBuilder.newInstance((io.vertx.ext.web.openapi.RouterBuilder)o1), o1 -> o1.getDelegate());
@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;
SecurityScheme that = (SecurityScheme) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
public io.vertx.mutiny.ext.web.openapi.RouterBuilder bindBlocking(Function factory) {
io.vertx.mutiny.ext.web.openapi.RouterBuilder ret = io.vertx.mutiny.ext.web.openapi.RouterBuilder.newInstance((io.vertx.ext.web.openapi.RouterBuilder)delegate.bindBlocking(new java.util.function.Function() {
public io.vertx.ext.web.handler.AuthenticationHandler apply(JsonObject arg) {
io.vertx.mutiny.ext.web.handler.AuthenticationHandler ret = factory.apply(arg);
return ret.getDelegate();
}
}));
return ret;
}
@CheckReturnValue
public io.smallrye.mutiny.Uni bind(Function> factory) {
return io.smallrye.mutiny.vertx.UniHelper.toUni(delegate.bind(
factory.andThen(u -> io.smallrye.mutiny.vertx.UniHelper.toFuture(u).map(h -> h.getDelegate()))
).map(x -> RouterBuilder.newInstance(x)));}
public io.vertx.mutiny.ext.web.openapi.RouterBuilder bindAndAwait(Function> factory) {
return bind(factory).await().indefinitely();
}
public void bindAndForget(Function> factory) {
bind(factory).subscribe().with(io.smallrye.mutiny.vertx.UniHelper.NOOP);
}
public static SecurityScheme newInstance(io.vertx.ext.web.openapi.SecurityScheme arg) {
return arg != null ? new SecurityScheme(arg) : null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy