List of usage examples for com.google.gson.reflect TypeToken TypeToken
@SuppressWarnings("unchecked") protected TypeToken()
From source file:abtlibrary.utils.as24ApiClient.api.SearchJobsApi.java
License:Apache License
/** * (asynchronously)//from w w w.j ava 2 s. c o m * * @param searchJobIds (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 pUTpublicV41SearchjobsExtendAsync(List<Integer> searchJobIds, final ApiCallback<ResponseMessageCollectionListSearchJob> 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 = pUTpublicV41SearchjobsExtendCall(searchJobIds, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListSearchJob>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.SearchJobsApi.java
License:Apache License
/** * //ww w.j av a 2 s. c om * * @param searchJobId (required) * @return ApiResponse<ResponseMessageSearchJob> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageSearchJob> pUTpublicV41SearchjobsSearchjobidExtendWithHttpInfo( Integer searchJobId) throws ApiException { com.squareup.okhttp.Call call = pUTpublicV41SearchjobsSearchjobidExtendCall(searchJobId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageSearchJob>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.SearchJobsApi.java
License:Apache License
/** * (asynchronously)/*from ww w . ja v a 2 s. co m*/ * * @param searchJobId (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 pUTpublicV41SearchjobsSearchjobidExtendAsync(Integer searchJobId, final ApiCallback<ResponseMessageSearchJob> 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 = pUTpublicV41SearchjobsSearchjobidExtendCall(searchJobId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageSearchJob>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.SharingApi.java
License:Apache License
/** * //from w ww. j av a2s. c o m * * @param sharingType (required) * @param vehicleId (required) * @return ApiResponse<ResponseMessageSharingVehicle> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageSharingVehicle> gETpublicV41SharingVehiclesharingmessagesVehicleidWithHttpInfo( Integer sharingType, Integer vehicleId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41SharingVehiclesharingmessagesVehicleidCall(sharingType, vehicleId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageSharingVehicle>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.SharingApi.java
License:Apache License
/** * (asynchronously)/*from w w w. jav a2s.co m*/ * * @param sharingType (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 gETpublicV41SharingVehiclesharingmessagesVehicleidAsync(Integer sharingType, Integer vehicleId, final ApiCallback<ResponseMessageSharingVehicle> 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 = gETpublicV41SharingVehiclesharingmessagesVehicleidCall(sharingType, vehicleId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageSharingVehicle>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.SharingApi.java
License:Apache License
/** * //from w ww . j a v a2 s .com * * @param vehicleId (required) * @return ApiResponse<ResponseMessageSharingObject> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageSharingObject> gETpublicV41SharingVehiclesharingoptionsVehicleidWithHttpInfo( Integer vehicleId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41SharingVehiclesharingoptionsVehicleidCall(vehicleId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageSharingObject>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.SharingApi.java
License:Apache License
/** * (asynchronously)/* w w w.ja 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 gETpublicV41SharingVehiclesharingoptionsVehicleidAsync(Integer vehicleId, final ApiCallback<ResponseMessageSharingObject> 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 = gETpublicV41SharingVehiclesharingoptionsVehicleidCall(vehicleId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageSharingObject>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.SharingApi.java
License:Apache License
/** * /*from www . j a va 2 s . c om*/ * * @param sharingType (required) * @param vehicleId (required) * @return ApiResponse<ResponseMessageSharingVehicle> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageSharingVehicle> pOSTpublicV41SharingVehiclesharingmessagesVehicleidWithHttpInfo( Integer sharingType, Integer vehicleId) throws ApiException { com.squareup.okhttp.Call call = pOSTpublicV41SharingVehiclesharingmessagesVehicleidCall(sharingType, vehicleId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageSharingVehicle>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.SharingApi.java
License:Apache License
/** * (asynchronously)// www.j a va 2 s.c o m * * @param sharingType (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 pOSTpublicV41SharingVehiclesharingmessagesVehicleidAsync(Integer sharingType, Integer vehicleId, final ApiCallback<ResponseMessageSharingVehicle> 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 = pOSTpublicV41SharingVehiclesharingmessagesVehicleidCall(sharingType, vehicleId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageSharingVehicle>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.UsersApi.java
License:Apache License
/** * /*from ww w .java2s .c o m*/ * * @return ApiResponse<ResponseMessageUser> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageUser> gETpublicV41UsersAuthorizedWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = gETpublicV41UsersAuthorizedCall(null, null); Type localVarReturnType = new TypeToken<ResponseMessageUser>() { }.getType(); return apiClient.execute(call, localVarReturnType); }