Class ApiRequest<U>
java.lang.Object
com.here.platform.data.client.base.ApiRequest<U>
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionApiRequest(ApiRequestExecutor executor, String operationId, HttpMethod method, String path, String contentType, String accept, ApiConfiguration apiConfig, nl.grons.metrics4.scala.MetricName metricName, scala.Option<String> fullURL, scala.Option<String> baseURL, AccessType accessType, scala.collection.immutable.Map<Object, scala.reflect.ClassTag<?>> successResponseCodes, scala.collection.immutable.Map<Object, scala.reflect.ClassTag<?>> errorResponseCodes, scala.reflect.ClassTag<?> errorDefaultResponse, scala.Option<DataPublisher> bodyParam, scala.collection.immutable.Map<String, Object> formParams, scala.collection.immutable.Map<String, Object> pathParams, scala.collection.immutable.Map<String, Object> queryParams, scala.collection.immutable.Map<String, Object> headerParams) -
Method Summary
Modifier and TypeMethodDescriptionaccept()scala.Option<String>baseURL()scala.Option<DataPublisher>scala.reflect.ClassTag<?>scala.collection.immutable.Map<Object,scala.reflect.ClassTag<?>> scala.concurrent.Future<HttpResponse>execute()<T> scala.concurrent.Future<T>executeAndHandle(scala.PartialFunction<ResponseStatusHandler, scala.concurrent.Future<T>> handler) <T> scala.concurrent.Future<T>executeTo(BodyDeserializer<T> deserializer) Execute request and deserialize response to the specified typescala.concurrent.Future<byte[]>scala.concurrent.Future<U>executeToEntity(BodyDeserializer<U> deserializer) Execute request and deserialize response to the predefined response typescala.concurrent.Future<InputStream>scala.concurrent.Future<Object>executor()scala.Option<String>fullURL()<T> Thandle(scala.PartialFunction<ResponseStatusHandler, scala.concurrent.Future<T>> handler) method()nl.grons.metrics4.scala.MetricNamepath()setBaseUrl(scala.Option<String> url) setFullUrl(scala.Option<String> url) scala.collection.immutable.Map<Object,scala.reflect.ClassTag<?>> <T> Tto(BodyDeserializer<T> deserializer) Execute request and deserialize response to the specified typebyte[]toBytes()toEntity(BodyDeserializer<U> deserializer) Execute request and deserialize response to the predefined response typeintwithAccessType(AccessType accessType) <B> ApiRequest<U>withBody(B body, BodySerializer<B> serializer) Add body to the requestwithBodyData(DataPublisher dataPublisher) withConfig(ApiConfiguration apiConfiguration) withContentType(String value) <T> ApiRequest<U>withDefaultErrorResponse(scala.reflect.ClassTag<T> m) <T> ApiRequest<U>withErrorResponse(int code, scala.reflect.ClassTag<T> m) withFormParam(String name, Object value) withHeaderParam(String name, Object value) withMethodName(String methodName) withPathParam(String name, Object value) withQueryParam(Object obj) withQueryParam(String name, Object value) withQueryParam(scala.collection.immutable.Map<String, String> params) <T> ApiRequest<U>withSuccessResponse(int code, scala.reflect.ClassTag<T> m) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface scala.Equals
canEqual, equalsMethods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
ApiRequest
public ApiRequest(ApiRequestExecutor executor, String operationId, HttpMethod method, String path, String contentType, String accept, ApiConfiguration apiConfig, nl.grons.metrics4.scala.MetricName metricName, scala.Option<String> fullURL, scala.Option<String> baseURL, AccessType accessType, scala.collection.immutable.Map<Object, scala.reflect.ClassTag<?>> successResponseCodes, scala.collection.immutable.Map<Object, scala.reflect.ClassTag<?>> errorResponseCodes, scala.reflect.ClassTag<?> errorDefaultResponse, scala.Option<DataPublisher> bodyParam, scala.collection.immutable.Map<String, Object> formParams, scala.collection.immutable.Map<String, Object> pathParams, scala.collection.immutable.Map<String, Object> queryParams, scala.collection.immutable.Map<String, Object> headerParams)
-
-
Method Details
-
executor
-
operationId
-
method
-
path
-
contentType
-
accept
-
apiConfig
-
metricName
public nl.grons.metrics4.scala.MetricName metricName() -
fullURL
-
baseURL
-
accessType
-
successResponseCodes
-
errorResponseCodes
-
errorDefaultResponse
public scala.reflect.ClassTag<?> errorDefaultResponse() -
bodyParam
-
formParams
-
pathParams
-
queryParams
-
headerParams
-
withMethodName
-
withSuccessResponse
-
withErrorResponse
-
withDefaultErrorResponse
-
withoutBody
-
withBody
Add body to the request- Parameters:
body- Entity, which should be used as request bodyserializer- Serializer for request type. To provide this implicit, add next import to your file:import com.here.platform.data.client.base.generated.codecs.JsonSupport._- Returns:
-
withBodyData
-
withFormParam
-
withPathParam
-
withQueryParam
-
withQueryParam
-
withQueryParam
-
withHeaderParam
-
withContentType
-
withAccessType
-
withConfig
-
setFullUrl
-
setBaseUrl
-
toHttpRequest
-
toResponse
-
execute
-
handle
public <T> T handle(scala.PartialFunction<ResponseStatusHandler, scala.concurrent.Future<T>> handler) -
executeAndHandle
public <T> scala.concurrent.Future<T> executeAndHandle(scala.PartialFunction<ResponseStatusHandler, scala.concurrent.Future<T>> handler) -
to
Execute request and deserialize response to the specified type- Parameters:
deserializer- Deserializer for predefined response type. For custom types implement your own deserializer. To deserialize to the predefined types please usetoEntity- Type Parameters:
- T The custom type which the response will be deserialized to
-
executeTo
Execute request and deserialize response to the specified type- Parameters:
deserializer- Deserializer for predefined response type. For custom types implement your own deserializer. To deserialize to the predefined types please useexecuteToEntity- Type Parameters:
- T The custom type which the response will be deserialized to
-
toEntity
Execute request and deserialize response to the predefined response type- Parameters:
deserializer- Deserializer for predefined response type. To provide this implicit, add next import to your file:import com.here.platform.data.client.base.generated.codecs.JsonSupport._
-
executeToEntity
Execute request and deserialize response to the predefined response type- Parameters:
deserializer- Deserializer for predefined response type. To provide this implicit, add next import to your file:import com.here.platform.data.client.base.generated.codecs.JsonSupport._
-
toBytes
public byte[] toBytes() -
executeToBytes
public scala.concurrent.Future<byte[]> executeToBytes() -
toStatusCode
public int toStatusCode() -
executeToStatusCode
-
toInputStream
-
executeToInputStream
-