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)//from w  w w .  j a va  2 s  .  co m
 * 
 * @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 gETpublicV41DealerpagesAccountidContactAsync(Integer accountId,
        final ApiCallback<ResponseMessageDealerPageContact> 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 = gETpublicV41DealerpagesAccountidContactCall(accountId, progressListener,
            progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageDealerPageContact>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

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

License:Apache License

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

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

License:Apache License

/**
 *  (asynchronously)//w w w.j av a  2 s.c om
 * 
 * @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 gETpublicV41DealerpagesAccountidMakemodelsAsync(Integer accountId,
        final ApiCallback<ResponseMessageCollectionListVehicleTypeMakeModel> 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 = gETpublicV41DealerpagesAccountidMakemodelsCall(accountId, progressListener,
            progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListVehicleTypeMakeModel>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

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

License:Apache License

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

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

License:Apache License

/**
 *  (asynchronously)/*from w  ww  . j  a v a 2  s .c o m*/
 * 
 * @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 gETpublicV41DealerpagesAccountidNewsAsync(Integer accountId,
        final ApiCallback<ResponseMessageDealerPageNews> 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 = gETpublicV41DealerpagesAccountidNewsCall(accountId, progressListener,
            progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageDealerPageNews>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

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

License:Apache License

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

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

License:Apache License

/**
 *  (asynchronously)//from w  ww  . ja  v  a2s. c o m
 * 
 * @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 gETpublicV41DealerpagesAccountidTabsAsync(Integer accountId,
        final ApiCallback<ResponseMessageListDealerPageTab> 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 = gETpublicV41DealerpagesAccountidTabsCall(accountId, progressListener,
            progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageListDealerPageTab>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

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

License:Apache License

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

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

License:Apache License

/**
 *  (asynchronously)/*  www .  ja va  2 s.  c o  m*/
 * 
 * @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 gETpublicV41DealerpagesAccountidTeamAsync(Integer accountId,
        final ApiCallback<ResponseMessageDealerPageTeam> 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 = gETpublicV41DealerpagesAccountidTeamCall(accountId, progressListener,
            progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageDealerPageTeam>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

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

License:Apache License

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