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 www. j a v a2s .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 dELETEpublicV41MylistingVehiclesVehicleidAsync(Integer vehicleId, final ApiCallback<ResponseMessageBoolean> 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 = dELETEpublicV41MylistingVehiclesVehicleidCall(vehicleId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageBoolean>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * /*from ww w .j a va 2 s. c om*/ * * @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> dELETEpublicV41MylistingVehiclesVehicleidImagesWithHttpInfo( Integer vehicleId) throws ApiException { com.squareup.okhttp.Call call = dELETEpublicV41MylistingVehiclesVehicleidImagesCall(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)// w w w . j a v a 2 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 dELETEpublicV41MylistingVehiclesVehicleidImagesAsync(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 = dELETEpublicV41MylistingVehiclesVehicleidImagesCall(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
/** * /* www . ja va 2 s . c o m*/ * * @param vehicleId (required) * @param filename (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> dELETEpublicV41MylistingVehiclesVehicleidImagesFilenameWithHttpInfo( Integer vehicleId, String filename) throws ApiException { com.squareup.okhttp.Call call = dELETEpublicV41MylistingVehiclesVehicleidImagesFilenameCall(vehicleId, filename, 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 . ja v a2s. c o m * * @param vehicleId (required) * @param filename (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 dELETEpublicV41MylistingVehiclesVehicleidImagesFilenameAsync(Integer vehicleId, String filename, 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 = dELETEpublicV41MylistingVehiclesVehicleidImagesFilenameCall(vehicleId, filename, 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 ww . j av a2 s . c o m * * @return ApiResponse<ResponseMessageCount> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCount> gETpublicV41MylistingFreeslotsWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = gETpublicV41MylistingFreeslotsCall(null, null); Type localVarReturnType = new TypeToken<ResponseMessageCount>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * (asynchronously)/*ww w. j a v a 2s. 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 gETpublicV41MylistingFreeslotsAsync( 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 = gETpublicV41MylistingFreeslotsCall(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
/** * /* ww w . ja v a 2s . c o m*/ * * @param skip (required) * @param take (required) * @param filter (optional) * @return ApiResponse<ResponseMessageCollectionMyListingVehicle> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCollectionMyListingVehicle> gETpublicV41MylistingVehiclesWithHttpInfo( Integer skip, Integer take, String filter) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41MylistingVehiclesCall(skip, take, filter, null, null); Type localVarReturnType = new TypeToken<ResponseMessageCollectionMyListingVehicle>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.MyListingApi.java
License:Apache License
/** * (asynchronously)// w ww . j a v a2s. co m * * @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 gETpublicV41MylistingVehiclesAsync(Integer skip, Integer take, String filter, final ApiCallback<ResponseMessageCollectionMyListingVehicle> 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 = gETpublicV41MylistingVehiclesCall(skip, take, filter, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCollectionMyListingVehicle>() { }.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 a v a 2 s . c o 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> gETpublicV41MylistingVehiclesCountWithHttpInfo(String filter) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41MylistingVehiclesCountCall(filter, null, null); Type localVarReturnType = new TypeToken<ResponseMessageCount>() { }.getType(); return apiClient.execute(call, localVarReturnType); }