Package org.javacord.core.util.rest
Class RestRequestResponseInformationImpl
- java.lang.Object
-
- org.javacord.core.util.rest.RestRequestResponseInformationImpl
-
- All Implemented Interfaces:
RestRequestResponseInformation
public class RestRequestResponseInformationImpl extends Object implements RestRequestResponseInformation
The implementation ofRestRequestResponseInformation
.
-
-
Constructor Summary
Constructors Constructor Description RestRequestResponseInformationImpl(RestRequestInformation request, RestRequestResult restRequestResult)
Creates a new rest request response information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiscordApi
getApi()
Optional<String>
getBody()
int
getCode()
RestRequestInformation
getRequest()
RestRequestResult
getRestRequestResult()
Gets the rest request result.
-
-
-
Constructor Detail
-
RestRequestResponseInformationImpl
public RestRequestResponseInformationImpl(RestRequestInformation request, RestRequestResult restRequestResult)
Creates a new rest request response information.- Parameters:
request
- The request which this response answered.restRequestResult
- The result of the response.
-
-
Method Detail
-
getRestRequestResult
public RestRequestResult getRestRequestResult()
Gets the rest request result.- Returns:
- The rest request result.
-
getApi
public DiscordApi getApi()
- Specified by:
getApi
in interfaceRestRequestResponseInformation
-
getRequest
public RestRequestInformation getRequest()
- Specified by:
getRequest
in interfaceRestRequestResponseInformation
-
getCode
public int getCode()
- Specified by:
getCode
in interfaceRestRequestResponseInformation
-
getBody
public Optional<String> getBody()
- Specified by:
getBody
in interfaceRestRequestResponseInformation
-
-