List of usage examples for com.google.gson.reflect TypeToken TypeToken
@SuppressWarnings("unchecked") protected TypeToken()
From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java
License:Apache License
/** * (asynchronously)/* w w w. j a v a2 s .c o m*/ * * @param accountId (required) * @param skip (required) * @param take (required) * @param filter (optional) * @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 gETpublicV41DealersAccountidVehiclesAsync(Integer accountId, Integer skip, Integer take, String filter, final ApiCallback<ResponseMessageCollectionListAdDealer> 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 = gETpublicV41DealersAccountidVehiclesCall(accountId, skip, take, filter, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListAdDealer>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java
License:Apache License
/** * //w w w . j a v a2 s .co m * * @param accountId (required) * @param filter (optional) * @return ApiResponse<ResponseMessageCount> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCount> gETpublicV41DealersAccountidVehiclesCountWithHttpInfo( Integer accountId, String filter) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealersAccountidVehiclesCountCall(accountId, filter, null, null); Type localVarReturnType = new TypeToken<ResponseMessageCount>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java
License:Apache License
/** * (asynchronously)/*from ww w .j ava2 s . c o m*/ * * @param accountId (required) * @param filter (optional) * @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 gETpublicV41DealersAccountidVehiclesCountAsync(Integer accountId, String filter, final ApiCallback<ResponseMessageCount> 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 = gETpublicV41DealersAccountidVehiclesCountCall(accountId, filter, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCount>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java
License:Apache License
/** * //from w ww. ja v a 2 s . co m * * @param accountId (required) * @param vehicleId (required) * @return ApiResponse<ResponseMessageVehicle> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageVehicle> gETpublicV41DealersAccountidVehiclesVehicleidWithHttpInfo( Integer accountId, Integer vehicleId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealersAccountidVehiclesVehicleidCall(accountId, vehicleId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageVehicle>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java
License:Apache License
/** * (asynchronously)// w w w .ja v a2 s . c o m * * @param accountId (required) * @param vehicleId (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 gETpublicV41DealersAccountidVehiclesVehicleidAsync(Integer accountId, Integer vehicleId, final ApiCallback<ResponseMessageVehicle> 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 = gETpublicV41DealersAccountidVehiclesVehicleidCall(accountId, vehicleId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageVehicle>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java
License:Apache License
/** * /*from www.j a v a 2 s .co m*/ * * @param filter (optional) * @return ApiResponse<ResponseMessageCount> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCount> gETpublicV41DealersCountWithHttpInfo(String filter) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealersCountCall(filter, null, null); Type localVarReturnType = new TypeToken<ResponseMessageCount>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java
License:Apache License
/** * (asynchronously)//from www . j av a 2s.c o m * * @param filter (optional) * @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 gETpublicV41DealersCountAsync(String filter, final ApiCallback<ResponseMessageCount> 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 = gETpublicV41DealersCountCall(filter, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCount>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java
License:Apache License
/** * //from w w w.java 2 s .c om * * @param accountId (required) * @param vehicle (required) * @return ApiResponse<ResponseMessageVehicle> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageVehicle> pOSTpublicV41DealersAccountidVehiclesWithHttpInfo(Integer accountId, Vehicle vehicle) throws ApiException { com.squareup.okhttp.Call call = pOSTpublicV41DealersAccountidVehiclesCall(accountId, vehicle, null, null); Type localVarReturnType = new TypeToken<ResponseMessageVehicle>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java
License:Apache License
/** * (asynchronously)//ww w .j av a 2 s .c o m * * @param accountId (required) * @param vehicle (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 pOSTpublicV41DealersAccountidVehiclesAsync(Integer accountId, Vehicle vehicle, final ApiCallback<ResponseMessageVehicle> 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 = pOSTpublicV41DealersAccountidVehiclesCall(accountId, vehicle, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageVehicle>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java
License:Apache License
/** * // w w w.j a v a 2 s .com * * @param dealerPageRequest (required) * @return ApiResponse<ResponseMessageDealerPageRequest> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageDealerPageRequest> pOSTpublicV41DealersDealerpagerequestWithHttpInfo( DealerPageRequest dealerPageRequest) throws ApiException { com.squareup.okhttp.Call call = pOSTpublicV41DealersDealerpagerequestCall(dealerPageRequest, null, null); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageRequest>() { }.getType(); return apiClient.execute(call, localVarReturnType); }