List of usage examples for com.google.gson.reflect TypeToken TypeToken
@SuppressWarnings("unchecked") protected TypeToken()
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * (asynchronously)//from w w w .j a va 2 s .co 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 gETpublicV41MylistingVehiclesCountAsync(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 = gETpublicV41MylistingVehiclesCountCall(filter, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCount>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * /* w ww.j a v a 2 s .co m*/ * * @return ApiResponse<ResponseMessageListMyListingVehicleStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageListMyListingVehicleStatus> gETpublicV41MylistingVehiclesStatusoverviewWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = gETpublicV41MylistingVehiclesStatusoverviewCall(null, null); Type localVarReturnType = new TypeToken<ResponseMessageListMyListingVehicleStatus>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * (asynchronously)//from w ww.j a va2 s.c o m * * @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 gETpublicV41MylistingVehiclesStatusoverviewAsync( final ApiCallback<ResponseMessageListMyListingVehicleStatus> 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 = gETpublicV41MylistingVehiclesStatusoverviewCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageListMyListingVehicleStatus>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * //from w ww . j a v a2 s .co m * * @param vehicleId (required) * @return ApiResponse<ResponseMessageMyListingVehicleReadOnly> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageMyListingVehicleReadOnly> gETpublicV41MylistingVehiclesVehicleidWithHttpInfo( Integer vehicleId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41MylistingVehiclesVehicleidCall(vehicleId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageMyListingVehicleReadOnly>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * (asynchronously)//from w w w. j a v a 2 s . c o m * * @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 gETpublicV41MylistingVehiclesVehicleidAsync(Integer vehicleId, final ApiCallback<ResponseMessageMyListingVehicleReadOnly> 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 = gETpublicV41MylistingVehiclesVehicleidCall(vehicleId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageMyListingVehicleReadOnly>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * /*from w w w. j av a 2 s .c o m*/ * * @param vehicleId (required) * @param myListingVehicle (required) * @return ApiResponse<ResponseMessageMyListingVehicleReadOnly> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageMyListingVehicleReadOnly> pUTpublicV41MylistingVehiclesVehicleidWithHttpInfo( Integer vehicleId, MyListingVehicle myListingVehicle) throws ApiException { com.squareup.okhttp.Call call = pUTpublicV41MylistingVehiclesVehicleidCall(vehicleId, myListingVehicle, null, null); Type localVarReturnType = new TypeToken<ResponseMessageMyListingVehicleReadOnly>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * (asynchronously)/*from w w w.j ava2s . com*/ * * @param vehicleId (required) * @param myListingVehicle (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 pUTpublicV41MylistingVehiclesVehicleidAsync(Integer vehicleId, MyListingVehicle myListingVehicle, final ApiCallback<ResponseMessageMyListingVehicleReadOnly> 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 = pUTpublicV41MylistingVehiclesVehicleidCall(vehicleId, myListingVehicle, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageMyListingVehicleReadOnly>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * //w ww. j a v a2 s .c o m * * @param vehicleId (required) * @return ApiResponse<ResponseMessageMyListingVehicleReadOnly> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageMyListingVehicleReadOnly> pUTpublicV41MylistingVehiclesVehicleidActivateWithHttpInfo( Integer vehicleId) throws ApiException { com.squareup.okhttp.Call call = pUTpublicV41MylistingVehiclesVehicleidActivateCall(vehicleId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageMyListingVehicleReadOnly>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * (asynchronously)//from ww w. jav a2 s .c om * * @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 pUTpublicV41MylistingVehiclesVehicleidActivateAsync(Integer vehicleId, final ApiCallback<ResponseMessageMyListingVehicleReadOnly> 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 = pUTpublicV41MylistingVehiclesVehicleidActivateCall(vehicleId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageMyListingVehicleReadOnly>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * /* w ww. jav a2s. c o m*/ * * @param vehicleId (required) * @return ApiResponse<ResponseMessageMyListingVehicleReadOnly> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageMyListingVehicleReadOnly> pUTpublicV41MylistingVehiclesVehicleidDeactivateWithHttpInfo( Integer vehicleId) throws ApiException { com.squareup.okhttp.Call call = pUTpublicV41MylistingVehiclesVehicleidDeactivateCall(vehicleId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageMyListingVehicleReadOnly>() { }.getType(); return apiClient.execute(call, localVarReturnType); }