| Package | Description |
|---|---|
| com.microsoft.rest |
The package contains the runtime classes required for AutoRest generated
clients to compile and function.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ServiceResponseBuilder<T,E extends RestException>
The builder for building a
ServiceResponse. |
| Modifier and Type | Class and Description |
|---|---|
class |
ServiceException
Exception thrown for an invalid response with custom error information.
|
| Modifier and Type | Field and Description |
|---|---|
protected Class<? extends RestException> |
ServiceResponseBuilder.exceptionType
The exception type to thrown in case of error.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceResponseBuilder<T,E> |
ServiceResponseBuilder.registerError(Class<? extends RestException> type)
Register a destination type for errors with models.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceResponse<T> |
ServiceResponseBuilder.build(retrofit2.Response<okhttp3.ResponseBody> response)
Build a ServiceResponse instance from a REST call response and a
possible error.
|
ServiceResponse<T> |
ServiceResponseBuilder.buildEmpty(retrofit2.Response<Void> response)
Build a ServiceResponse instance from a REST call response and a
possible error, which does not have a response body.
|
<THeader> ServiceResponseWithHeaders<T,THeader> |
ServiceResponseBuilder.buildEmptyWithHeaders(retrofit2.Response<Void> response,
Class<THeader> headerType)
Build a ServiceResponseWithHeaders instance from a REST call response, a header
in JSON format, and a possible error, which does not have a response body.
|
<THeader> ServiceResponseWithHeaders<T,THeader> |
ServiceResponseBuilder.buildWithHeaders(retrofit2.Response<okhttp3.ResponseBody> response,
Class<THeader> headerType)
Build a ServiceResponseWithHeaders instance from a REST call response, a header
in JSON format, and a possible error.
|
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/