List of usage examples for com.google.gson.reflect TypeToken TypeToken
@SuppressWarnings("unchecked") protected TypeToken()
From source file:abtlibrary.utils.as24ApiClient.api.MasterDataApi.java
License:Apache License
/** * (asynchronously)/*w w w. j av 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 gETpublicV41MasterdataSettingsAsync( final ApiCallback<ResponseMessageDictionaryStringObject> 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 = gETpublicV41MasterdataSettingsCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageDictionaryStringObject>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.MasterDataApi.java
License:Apache License
/** * //from w w w .j av a2 s . c o m * * @param take (optional) * @return ApiResponse<ResponseMessageCollectionListLocation> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCollectionListLocation> gETpublicV41MasterdataSuggestlocationsWithHttpInfo( Integer take) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41MasterdataSuggestlocationsCall(take, null, null); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListLocation>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.MasterDataApi.java
License:Apache License
/** * (asynchronously)/* ww w . j a v a 2 s. c o m*/ * * @param take (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 gETpublicV41MasterdataSuggestlocationsAsync(Integer take, final ApiCallback<ResponseMessageCollectionListLocation> 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 = gETpublicV41MasterdataSuggestlocationsCall(take, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListLocation>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.MasterDataApi.java
License:Apache License
/** * /* w w w . j av a 2s .c o m*/ * * @return ApiResponse<ResponseMessageTranslations> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageTranslations> gETpublicV41MasterdataTranslationsWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = gETpublicV41MasterdataTranslationsCall(null, null); Type localVarReturnType = new TypeToken<ResponseMessageTranslations>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.MasterDataApi.java
License:Apache License
/** * (asynchronously)//from ww w . j av a 2s . c om * * @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 gETpublicV41MasterdataTranslationsAsync( final ApiCallback<ResponseMessageTranslations> 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 = gETpublicV41MasterdataTranslationsCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageTranslations>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.MasterDataApi.java
License:Apache License
/** * //from w w w . j a v a 2 s . co m * * @return ApiResponse<ResponseMessageListVehicleType> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageListVehicleType> gETpublicV41MasterdataVehicletypesWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = gETpublicV41MasterdataVehicletypesCall(null, null); Type localVarReturnType = new TypeToken<ResponseMessageListVehicleType>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.MasterDataApi.java
License:Apache License
/** * (asynchronously)//from ww w.ja v a2 s .co 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 gETpublicV41MasterdataVehicletypesAsync( final ApiCallback<ResponseMessageListVehicleType> 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 = gETpublicV41MasterdataVehicletypesCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageListVehicleType>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.MasterDataApi.java
License:Apache License
/** * /*from w w w . j a va2 s . c om*/ * * @return ApiResponse<ResponseMessageMetaData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageMetaData> hEADpublicV41MasterdataMetadataWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = hEADpublicV41MasterdataMetadataCall(null, null); Type localVarReturnType = new TypeToken<ResponseMessageMetaData>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.MasterDataApi.java
License:Apache License
/** * (asynchronously)/* w w w.ja 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 hEADpublicV41MasterdataMetadataAsync( final ApiCallback<ResponseMessageMetaData> 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 = hEADpublicV41MasterdataMetadataCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageMetaData>() { }.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 om * * @param vehicleId (required) * @return ApiResponse<ResponseMessageBoolean> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageBoolean> dELETEpublicV41MylistingVehiclesVehicleidWithHttpInfo( Integer vehicleId) throws ApiException { com.squareup.okhttp.Call call = dELETEpublicV41MylistingVehiclesVehicleidCall(vehicleId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageBoolean>() { }.getType(); return apiClient.execute(call, localVarReturnType); }