io.vertx.mutiny.ext.auth.oauth2.OAuth2Response Maven / Gradle / Ivy
package io.vertx.mutiny.ext.auth.oauth2;
import java.util.Map;
import java.util.stream.Collectors;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import java.util.function.Consumer;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Publisher;
import io.smallrye.mutiny.vertx.TypeArg;
import io.vertx.codegen.annotations.Fluent;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
/**
* A response from a fetch request.
*
* This class represents a secure response from a Oauth2 fetch call.
*
* A fetch is a simplified HTTP response from a protected resource.
*
*
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.auth.oauth2.OAuth2Response original} non Mutiny-ified interface using Vert.x codegen.
*/
@io.smallrye.mutiny.vertx.MutinyGen(io.vertx.ext.auth.oauth2.OAuth2Response.class)
public class OAuth2Response {
public static final io.smallrye.mutiny.vertx.TypeArg __TYPE_ARG = new io.smallrye.mutiny.vertx.TypeArg<>( obj -> new OAuth2Response((io.vertx.ext.auth.oauth2.OAuth2Response) obj),
OAuth2Response::getDelegate
);
private final io.vertx.ext.auth.oauth2.OAuth2Response delegate;
public OAuth2Response(io.vertx.ext.auth.oauth2.OAuth2Response delegate) {
this.delegate = delegate;
}
public OAuth2Response(Object delegate) {
this.delegate = (io.vertx.ext.auth.oauth2.OAuth2Response)delegate;
}
/**
* Empty constructor used by CDI, do not use this constructor directly.
**/
OAuth2Response() {
this.delegate = null;
}
public io.vertx.ext.auth.oauth2.OAuth2Response getDelegate() {
return delegate;
}
@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;
OAuth2Response that = (OAuth2Response) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
/**
* @return HTTP status code
* @deprecated */
@Deprecated
public int statusCode() {
int ret = delegate.statusCode();
return ret;
}
/**
* @return the HTTP headers
* @deprecated */
@Deprecated
public io.vertx.mutiny.core.MultiMap headers() {
io.vertx.mutiny.core.MultiMap ret = io.vertx.mutiny.core.MultiMap.newInstance((io.vertx.core.MultiMap)delegate.headers());
return ret;
}
/**
* @param name of the header to look up
* @return the single value for the header.
* @deprecated */
@Deprecated
public String getHeader(String name) {
String ret = delegate.getHeader(name);
return ret;
}
/**
* @return a buffer with the HTTP response body
* @deprecated */
@Deprecated
public io.vertx.mutiny.core.buffer.Buffer body() {
io.vertx.mutiny.core.buffer.Buffer ret = io.vertx.mutiny.core.buffer.Buffer.newInstance((io.vertx.core.buffer.Buffer)delegate.body());
return ret;
}
/**
* @return a JsonObject from the HTTP response body
* @deprecated */
@Deprecated
public JsonObject jsonObject() {
JsonObject ret = delegate.jsonObject();
return ret;
}
/**
* @return a JsonArray from the HTTP response body
* @deprecated */
@Deprecated
public JsonArray jsonArray() {
JsonArray ret = delegate.jsonArray();
return ret;
}
/**
* @param contentType a content type to test, e.g.: application/json
* @return true if the header matches
* @deprecated */
@Deprecated
public boolean is(String contentType) {
boolean ret = delegate.is(contentType);
return ret;
}
public static OAuth2Response newInstance(io.vertx.ext.auth.oauth2.OAuth2Response arg) {
return arg != null ? new OAuth2Response(arg) : null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy