Package dev.openfga.sdk.api.client.model
Class ClientBatchCheckResponse
- java.lang.Object
-
- dev.openfga.sdk.api.model.CheckResponse
-
- dev.openfga.sdk.api.client.model.ClientBatchCheckResponse
-
public class ClientBatchCheckResponse extends CheckResponse
-
-
Field Summary
-
Fields inherited from class dev.openfga.sdk.api.model.CheckResponse
JSON_PROPERTY_ALLOWED, JSON_PROPERTY_RESOLUTION
-
-
Constructor Summary
Constructors Constructor Description ClientBatchCheckResponse(ClientCheckRequest request, ClientCheckResponse clientCheckResponse, java.lang.Throwable throwable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.function.BiFunction<ClientCheckResponse,java.lang.Throwable,ClientBatchCheckResponse>asyncHandler(ClientCheckRequest request)java.lang.BooleangetAllowed()Returns the result of the check.java.util.Map<java.lang.String,java.util.List<java.lang.String>>getHeaders()java.lang.StringgetRawResponse()java.lang.StringgetRelation()ClientCheckRequestgetRequest()intgetStatusCode()java.lang.ThrowablegetThrowable()Returns the caught exception if the HTTP request was unsuccessful.-
Methods inherited from class dev.openfga.sdk.api.model.CheckResponse
allowed, equals, getResolution, hashCode, resolution, setAllowed, setResolution, toString, toUrlQueryString, toUrlQueryString
-
-
-
-
Constructor Detail
-
ClientBatchCheckResponse
public ClientBatchCheckResponse(ClientCheckRequest request, ClientCheckResponse clientCheckResponse, java.lang.Throwable throwable)
-
-
Method Detail
-
getRequest
public ClientCheckRequest getRequest()
-
getAllowed
public java.lang.Boolean getAllowed()
Returns the result of the check.If the HTTP request was unsuccessful, this result will be null. If this is the case, you can examine the original request with
getRequest()and the exception withgetThrowable().- Overrides:
getAllowedin classCheckResponse- Returns:
- the check result. Is null if the HTTP request was unsuccessful.
-
getThrowable
public java.lang.Throwable getThrowable()
Returns the caught exception if the HTTP request was unsuccessful.If the HTTP request was unsuccessful, this result will be null. If this is the case, you can examine the original request with
getRequest()and the exception withgetThrowable().- Returns:
- the caught exception. Is null if the HTTP request was successful.
-
getStatusCode
public int getStatusCode()
-
getHeaders
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
-
getRawResponse
public java.lang.String getRawResponse()
-
getRelation
public java.lang.String getRelation()
-
asyncHandler
public static java.util.function.BiFunction<ClientCheckResponse,java.lang.Throwable,ClientBatchCheckResponse> asyncHandler(ClientCheckRequest request)
-
-