List of usage examples for com.google.gson.reflect TypeToken TypeToken
@SuppressWarnings("unchecked") protected TypeToken()
From source file:abtlibrary.utils.as24ApiClient.api.UsersApi.java
License:Apache License
/** * (asynchronously)//from w w w. j a v a2 s. c o m * * @param ru (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pOSTpublicV41UsersRegistrationAsync(RegisterUser ru, final ApiCallback<ResponseMessageUser> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pOSTpublicV41UsersRegistrationCall(ru, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageUser>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.UsersApi.java
License:Apache License
/** * // w ww . ja v a 2 s .com * * @param userId (required) * @param address (required) * @return ApiResponse<ResponseMessageAddress> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageAddress> pOSTpublicV41UsersUseridBillingaddressWithHttpInfo(Integer userId, Address address) throws ApiException { com.squareup.okhttp.Call call = pOSTpublicV41UsersUseridBillingaddressCall(userId, address, null, null); Type localVarReturnType = new TypeToken<ResponseMessageAddress>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.UsersApi.java
License:Apache License
/** * (asynchronously)/*from ww w . j a v a 2 s. c o m*/ * * @param userId (required) * @param address (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pOSTpublicV41UsersUseridBillingaddressAsync(Integer userId, Address address, final ApiCallback<ResponseMessageAddress> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pOSTpublicV41UsersUseridBillingaddressCall(userId, address, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageAddress>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.UsersApi.java
License:Apache License
/** * /* www .j a va2 s. c om*/ * * @param userId (required) * @param address (required) * @return ApiResponse<ResponseMessageAddress> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageAddress> pOSTpublicV41UsersUseridPublicationaddressWithHttpInfo( Integer userId, Address address) throws ApiException { com.squareup.okhttp.Call call = pOSTpublicV41UsersUseridPublicationaddressCall(userId, address, null, null); Type localVarReturnType = new TypeToken<ResponseMessageAddress>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.UsersApi.java
License:Apache License
/** * (asynchronously)/*w w w .j a v a 2 s . co m*/ * * @param userId (required) * @param address (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pOSTpublicV41UsersUseridPublicationaddressAsync(Integer userId, Address address, final ApiCallback<ResponseMessageAddress> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pOSTpublicV41UsersUseridPublicationaddressCall(userId, address, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageAddress>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.UsersApi.java
License:Apache License
/** * /*from ww w .j a v a 2 s . c om*/ * * @param user (required) * @return ApiResponse<ResponseMessageUser> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageUser> pUTpublicV41UsersWithHttpInfo(User user) throws ApiException { com.squareup.okhttp.Call call = pUTpublicV41UsersCall(user, null, null); Type localVarReturnType = new TypeToken<ResponseMessageUser>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.UsersApi.java
License:Apache License
/** * (asynchronously)//from ww w. j av a2 s. c om * * @param user (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pUTpublicV41UsersAsync(User user, final ApiCallback<ResponseMessageUser> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pUTpublicV41UsersCall(user, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageUser>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.UsersApi.java
License:Apache License
/** * // w w w . j av a2s . co m * * @param userId (required) * @param address (required) * @return ApiResponse<ResponseMessageAddress> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageAddress> pUTpublicV41UsersUseridAddressWithHttpInfo(Integer userId, Address address) throws ApiException { com.squareup.okhttp.Call call = pUTpublicV41UsersUseridAddressCall(userId, address, null, null); Type localVarReturnType = new TypeToken<ResponseMessageAddress>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.UsersApi.java
License:Apache License
/** * (asynchronously)/*from w ww. j a va 2s .c om*/ * * @param userId (required) * @param address (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pUTpublicV41UsersUseridAddressAsync(Integer userId, Address address, final ApiCallback<ResponseMessageAddress> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pUTpublicV41UsersUseridAddressCall(userId, address, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageAddress>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.VehiclesApi.java
License:Apache License
/** * // w ww. j a va 2 s .c o m * * @param skip (required) * @param take (required) * @param filter (optional) * @return ApiResponse<ResponseMessageCollectionListAd> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCollectionListAd> gETpublicV41VehiclesWithHttpInfo(Integer skip, Integer take, String filter) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41VehiclesCall(skip, take, filter, null, null); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListAd>() { }.getType(); return apiClient.execute(call, localVarReturnType); }