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.NewCarApi.java

License:Apache License

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

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

License:Apache License

/**
 * // w ww .  ja v  a  2  s  .c om
 * 
 * @return ApiResponse&lt;ResponseMessageSearchJob&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
public ApiResponse<ResponseMessageSearchJob> dELETEpublicV41SearchjobsWithHttpInfo() throws ApiException {
    com.squareup.okhttp.Call call = dELETEpublicV41SearchjobsCall(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 a2s.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 dELETEpublicV41SearchjobsAsync(
        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 = dELETEpublicV41SearchjobsCall(progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageSearchJob>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

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

License:Apache License

/**
 * /* w  w w.j  a v a2  s.co  m*/
 * 
 * @return ApiResponse&lt;ResponseMessageCollectionListSearchJob&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
public ApiResponse<ResponseMessageCollectionListSearchJob> gETpublicV41SearchjobsWithHttpInfo()
        throws ApiException {
    com.squareup.okhttp.Call call = gETpublicV41SearchjobsCall(null, null);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListSearchJob>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType);
}

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

License:Apache License

/**
 *  (asynchronously)/*from  w  w w . j  a  va2 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 gETpublicV41SearchjobsAsync(
        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 = gETpublicV41SearchjobsCall(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

/**
 * /*from  www  . ja v  a2  s.  co m*/
 * 
 * @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> gETpublicV41SearchjobsVehiclesWithHttpInfo()
        throws ApiException {
    com.squareup.okhttp.Call call = gETpublicV41SearchjobsVehiclesCall(null, null);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListAd>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType);
}

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

License:Apache License

/**
 *  (asynchronously)/*www  .j  a va 2s.  com*/
 * 
 * @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 gETpublicV41SearchjobsVehiclesAsync(
        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 = gETpublicV41SearchjobsVehiclesCall(progressListener,
            progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListAd>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

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

License:Apache License

/**
 * //from   w ww  .jav a 2 s.c o m
 * 
 * @param searchJob  (required)
 * @return ApiResponse&lt;ResponseMessageSearchJob&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
public ApiResponse<ResponseMessageSearchJob> pOSTpublicV41SearchjobsWithHttpInfo(SearchJob searchJob)
        throws ApiException {
    com.squareup.okhttp.Call call = pOSTpublicV41SearchjobsCall(searchJob, 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)// ww w . j a  va  2  s . c o  m
 * 
 * @param searchJob  (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 pOSTpublicV41SearchjobsAsync(SearchJob searchJob,
        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 = pOSTpublicV41SearchjobsCall(searchJob, progressListener,
            progressRequestListener);
    Type localVarReturnType = new TypeToken<ResponseMessageSearchJob>() {
    }.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}

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

License:Apache License

/**
 * //from w ww  .  j ava 2 s .  com
 * 
 * @param searchJobIds  (required)
 * @return ApiResponse&lt;ResponseMessageCollectionListSearchJob&gt;
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
public ApiResponse<ResponseMessageCollectionListSearchJob> pUTpublicV41SearchjobsExtendWithHttpInfo(
        List<Integer> searchJobIds) throws ApiException {
    com.squareup.okhttp.Call call = pUTpublicV41SearchjobsExtendCall(searchJobIds, null, null);
    Type localVarReturnType = new TypeToken<ResponseMessageCollectionListSearchJob>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType);
}