Example usage for com.google.gson.reflect TypeToken TypeToken

List of usage examples for com.google.gson.reflect TypeToken TypeToken

Introduction

In this page you can find the example usage for com.google.gson.reflect TypeToken TypeToken.

Prototype

@SuppressWarnings("unchecked")
protected TypeToken() 

Source Link

Document

Constructs a new type literal.

Usage

From source file:abtlibrary.utils.as24ApiClient.api.DealerPagesApi.java

License:Apache License

/**
 *  (asynchronously)/*  w w w.j a va2 s .  c o m*/
 * 
 * @param accountId  (required)
 * @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 gETpublicV41DealerpagesAccountidVehiclesAsync(Integer accountId, Integer skip,
        Integer take, String filter, final ApiCallback<ResponseMessageCollectionListAd> 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 = gETpublicV41DealerpagesAccountidVehiclesCall(accountId, skip, take, filter,
            progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListAd>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

From source file:abtlibrary.utils.as24ApiClient.api.DealerPagesApi.java

License:Apache License

/**
 * /*w  ww.ja  v  a 2 s.  com*/
 * 
 * @param accountId  (required)
 * @return ApiResponse&lt;ResponseMessageDealerPageVideo&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
public ApiResponse<ResponseMessageDealerPageVideo> gETpublicV41DealerpagesAccountidVideoWithHttpInfo(
        Integer accountId) throws ApiException {
    com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidVideoCall(accountId, null, null);
    Type localVarReturnType = new TypeToken<ResponseMessageDealerPageVideo>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType);
}

From source file:abtlibrary.utils.as24ApiClient.api.DealerPagesApi.java

License:Apache License

/**
 *  (asynchronously)//ww w  .j  ava  2 s  .com
 * 
 * @param accountId  (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 gETpublicV41DealerpagesAccountidVideoAsync(Integer accountId,
        final ApiCallback<ResponseMessageDealerPageVideo> 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 = gETpublicV41DealerpagesAccountidVideoCall(accountId, progressListener,
            progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageDealerPageVideo>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

From source file:abtlibrary.utils.as24ApiClient.api.DealerPagesApi.java

License:Apache License

/**
 * /*from   w ww .  ja v  a 2s .c  om*/
 * 
 * @param skip  (required)
 * @param take  (required)
 * @param filter  (optional)
 * @return ApiResponse&lt;ResponseMessageCollectionListDealerPageDealer&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
public ApiResponse<ResponseMessageCollectionListDealerPageDealer> gETpublicV41DealerpagesDealersWithHttpInfo(
        Integer skip, Integer take, String filter) throws ApiException {
    com.squareup.okhttp.Call call = gETpublicV41DealerpagesDealersCall(skip, take, filter, null, null);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListDealerPageDealer>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType);
}

From source file:abtlibrary.utils.as24ApiClient.api.DealerPagesApi.java

License:Apache License

/**
 *  (asynchronously)// ww w  .j  a va2 s  .  c o 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 gETpublicV41DealerpagesDealersAsync(Integer skip, Integer take, String filter,
        final ApiCallback<ResponseMessageCollectionListDealerPageDealer> 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 = gETpublicV41DealerpagesDealersCall(skip, take, filter, progressListener,
            progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListDealerPageDealer>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

From source file:abtlibrary.utils.as24ApiClient.api.DealerPagesApi.java

License:Apache License

/**
 * // w  w  w .jav  a2  s .c  om
 * 
 * @return ApiResponse&lt;ResponseMessageCollectionListMake&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
public ApiResponse<ResponseMessageCollectionListMake> gETpublicV41DealerpagesMakesWithHttpInfo()
        throws ApiException {
    com.squareup.okhttp.Call call = gETpublicV41DealerpagesMakesCall(null, null);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListMake>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType);
}

From source file:abtlibrary.utils.as24ApiClient.api.DealerPagesApi.java

License:Apache License

/**
 *  (asynchronously)//  w ww .  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 gETpublicV41DealerpagesMakesAsync(
        final ApiCallback<ResponseMessageCollectionListMake> 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 = gETpublicV41DealerpagesMakesCall(progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListMake>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java

License:Apache License

/**
 * //  w ww  . j  ava2s  .  c o  m
 * 
 * @param skip  (required)
 * @param take  (required)
 * @param filter  (optional)
 * @return ApiResponse&lt;ResponseMessageCollectionListDealer&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
public ApiResponse<ResponseMessageCollectionListDealer> gETpublicV41DealersWithHttpInfo(Integer skip,
        Integer take, String filter) throws ApiException {
    com.squareup.okhttp.Call call = gETpublicV41DealersCall(skip, take, filter, null, null);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListDealer>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType);
}

From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java

License:Apache License

/**
 *  (asynchronously)/*  ww  w.j  a v a  2s . 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 gETpublicV41DealersAsync(Integer skip, Integer take, String filter,
        final ApiCallback<ResponseMessageCollectionListDealer> 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 = gETpublicV41DealersCall(skip, take, filter, progressListener,
            progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListDealer>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

From source file:abtlibrary.utils.as24ApiClient.api.DealersApi.java

License:Apache License

/**
 * //from   ww  w  .j  av  a2 s  .c o  m
 * 
 * @param accountId  (required)
 * @return ApiResponse&lt;ResponseMessageDealer&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
public ApiResponse<ResponseMessageDealer> gETpublicV41DealersAccountidWithHttpInfo(Integer accountId)
        throws ApiException {
    com.squareup.okhttp.Call call = gETpublicV41DealersAccountidCall(accountId, null, null);
    Type localVarReturnType = new TypeToken<ResponseMessageDealer>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType);
}