List of usage examples for com.google.gson.reflect TypeToken TypeToken
@SuppressWarnings("unchecked") protected TypeToken()
From source file:abtlibrary.utils.as24ApiClient.api.AdminApi.java
License:Apache License
/** * (asynchronously)//w w 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 gETpublicV41AdminFeedbacksAsync( 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 = gETpublicV41AdminFeedbacksCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageBoolean>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.AdminApi.java
License:Apache License
/** * //w w w . j a va 2 s .com * * @return ApiResponse<ResponseMessageBoolean> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageBoolean> gETpublicV41AdminRefreshWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = gETpublicV41AdminRefreshCall(null, null); Type localVarReturnType = new TypeToken<ResponseMessageBoolean>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.AdminApi.java
License:Apache License
/** * (asynchronously)/*from ww w . j a v a 2 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 gETpublicV41AdminRefreshAsync( 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 = gETpublicV41AdminRefreshCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageBoolean>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.AdminApi.java
License:Apache License
/** * /*from ww w . j a v a 2 s. c o m*/ * * @param refreshModel (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> pOSTpublicV41AdminRefreshWithHttpInfo(RefreshModel refreshModel) throws ApiException { com.squareup.okhttp.Call call = pOSTpublicV41AdminRefreshCall(refreshModel, null, null); Type localVarReturnType = new TypeToken<ResponseMessageBoolean>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.AdminApi.java
License:Apache License
/** * (asynchronously)//ww w . ja va2 s. c o m * * @param refreshModel (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 pOSTpublicV41AdminRefreshAsync(RefreshModel refreshModel, 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 = pOSTpublicV41AdminRefreshCall(refreshModel, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageBoolean>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.DealerGroupsApi.java
License:Apache License
/** * /*from ww w. j a va 2 s . c o m*/ * * @return ApiResponse<ResponseMessageListDealerGroup> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageListDealerGroup> gETpublicV41DealergroupsWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealergroupsCall(null, null); Type localVarReturnType = new TypeToken<ResponseMessageListDealerGroup>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.DealerGroupsApi.java
License:Apache License
/** * (asynchronously)//w w w . jav a 2 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 gETpublicV41DealergroupsAsync( final ApiCallback<ResponseMessageListDealerGroup> 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 = gETpublicV41DealergroupsCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageListDealerGroup>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.DealerGroupsApi.java
License:Apache License
/** * //from w w w . ja v a 2 s. c o m * * @param dealergroupId (required) * @return ApiResponse<ResponseMessageDealerGroup> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageDealerGroup> gETpublicV41DealergroupsDealergroupidWithHttpInfo( Integer dealergroupId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealergroupsDealergroupidCall(dealergroupId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageDealerGroup>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
From source file:abtlibrary.utils.as24ApiClient.api.DealerGroupsApi.java
License:Apache License
/** * (asynchronously)//from w w w. j a v a 2 s . c o m * * @param dealergroupId (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 gETpublicV41DealergroupsDealergroupidAsync(Integer dealergroupId, final ApiCallback<ResponseMessageDealerGroup> 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 = gETpublicV41DealergroupsDealergroupidCall(dealergroupId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageDealerGroup>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
From source file:abtlibrary.utils.as24ApiClient.api.DealerGroupsApi.java
License:Apache License
/** * //from w w w. j a v a 2 s . com * * @param dealergroupId (required) * @param filter (required) * @return ApiResponse<ResponseMessageListMake> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageListMake> gETpublicV41DealergroupsDealergroupidMakesWithHttpInfo( Integer dealergroupId, String filter) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealergroupsDealergroupidMakesCall(dealergroupId, filter, null, null); Type localVarReturnType = new TypeToken<ResponseMessageListMake>() { }.getType(); return apiClient.execute(call, localVarReturnType); }