abtlibrary.utils.as24ApiClient.api.DealersApi.java Source code

Java tutorial

Introduction

Here is the source code for abtlibrary.utils.as24ApiClient.api.DealersApi.java

Source

/**
 * AS24 API v4.1
 * No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v4.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package abtlibrary.utils.as24ApiClient.api;

import abtlibrary.utils.as24ApiClient.ApiCallback;
import abtlibrary.utils.as24ApiClient.ApiClient;
import abtlibrary.utils.as24ApiClient.ApiException;
import abtlibrary.utils.as24ApiClient.ApiResponse;
import abtlibrary.utils.as24ApiClient.Configuration;
import abtlibrary.utils.as24ApiClient.Pair;
import abtlibrary.utils.as24ApiClient.ProgressRequestBody;
import abtlibrary.utils.as24ApiClient.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;

import abtlibrary.utils.as24ApiClient.model.ResponseMessageCollectionListDealer;
import abtlibrary.utils.as24ApiClient.model.ResponseMessageDealer;
import abtlibrary.utils.as24ApiClient.model.ResponseMessageListMake;
import abtlibrary.utils.as24ApiClient.model.ResponseMessageListModel;
import abtlibrary.utils.as24ApiClient.model.ResponseMessageCollectionListUser;
import abtlibrary.utils.as24ApiClient.model.ResponseMessageCount;
import abtlibrary.utils.as24ApiClient.model.ResponseMessageCollectionListAdDealer;
import abtlibrary.utils.as24ApiClient.model.ResponseMessageVehicle;
import abtlibrary.utils.as24ApiClient.model.Vehicle;
import abtlibrary.utils.as24ApiClient.model.ResponseMessageSellerContactRequest;
import abtlibrary.utils.as24ApiClient.model.SellerContactRequest;
import abtlibrary.utils.as24ApiClient.model.ResponseMessageDealerPageRequest;
import abtlibrary.utils.as24ApiClient.model.DealerPageRequest;
import abtlibrary.utils.as24ApiClient.model.SendToFriendRequest;
import abtlibrary.utils.as24ApiClient.model.ResponseMessageDictionaryStringString;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DealersApi {
    private ApiClient apiClient;

    public DealersApi() {
        this(Configuration.getDefaultApiClient());
    }

    public DealersApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /* Build call for gETpublicV41Dealers */
    private com.squareup.okhttp.Call gETpublicV41DealersCall(Integer skip, Integer take, String filter,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'skip' is set
        if (skip == null) {
            throw new ApiException("Missing the required parameter 'skip' when calling gETpublicV41Dealers(Async)");
        }

        // verify the required parameter 'take' is set
        if (take == null) {
            throw new ApiException("Missing the required parameter 'take' when calling gETpublicV41Dealers(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers".replaceAll("\\{format\\}", "json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (skip != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip", skip));
        if (take != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "take", take));
        if (filter != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param skip  (required)
     * @param take  (required)
     * @param filter  (optional)
     * @return ResponseMessageCollectionListDealer
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageCollectionListDealer gETpublicV41Dealers(Integer skip, Integer take, String filter)
            throws ApiException {
        ApiResponse<ResponseMessageCollectionListDealer> resp = gETpublicV41DealersWithHttpInfo(skip, take, filter);
        return resp.getData();
    }

    /**
     * 
     * 
     * @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);
    }

    /**
     *  (asynchronously)
     * 
     * @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;
    }

    /* Build call for gETpublicV41DealersAccountid */
    private com.squareup.okhttp.Call gETpublicV41DealersAccountidCall(Integer accountId,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException(
                    "Missing the required parameter 'accountId' when calling gETpublicV41DealersAccountid(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/{accountId}".replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @return ResponseMessageDealer
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageDealer gETpublicV41DealersAccountid(Integer accountId) throws ApiException {
        ApiResponse<ResponseMessageDealer> resp = gETpublicV41DealersAccountidWithHttpInfo(accountId);
        return resp.getData();
    }

    /**
     * 
     * 
     * @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);
    }

    /**
     *  (asynchronously)
     * 
     * @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 gETpublicV41DealersAccountidAsync(Integer accountId,
            final ApiCallback<ResponseMessageDealer> 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 = gETpublicV41DealersAccountidCall(accountId, progressListener,
                progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageDealer>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for gETpublicV41DealersAccountidMakes */
    private com.squareup.okhttp.Call gETpublicV41DealersAccountidMakesCall(Integer accountId,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException(
                    "Missing the required parameter 'accountId' when calling gETpublicV41DealersAccountidMakes(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/{accountId}/makes".replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @return ResponseMessageListMake
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageListMake gETpublicV41DealersAccountidMakes(Integer accountId) throws ApiException {
        ApiResponse<ResponseMessageListMake> resp = gETpublicV41DealersAccountidMakesWithHttpInfo(accountId);
        return resp.getData();
    }

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

    /**
     *  (asynchronously)
     * 
     * @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 gETpublicV41DealersAccountidMakesAsync(Integer accountId,
            final ApiCallback<ResponseMessageListMake> 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 = gETpublicV41DealersAccountidMakesCall(accountId, progressListener,
                progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageListMake>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for gETpublicV41DealersAccountidModels */
    private com.squareup.okhttp.Call gETpublicV41DealersAccountidModelsCall(Integer accountId,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException(
                    "Missing the required parameter 'accountId' when calling gETpublicV41DealersAccountidModels(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/{accountId}/models".replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @return ResponseMessageListModel
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageListModel gETpublicV41DealersAccountidModels(Integer accountId) throws ApiException {
        ApiResponse<ResponseMessageListModel> resp = gETpublicV41DealersAccountidModelsWithHttpInfo(accountId);
        return resp.getData();
    }

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

    /**
     *  (asynchronously)
     * 
     * @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 gETpublicV41DealersAccountidModelsAsync(Integer accountId,
            final ApiCallback<ResponseMessageListModel> 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 = gETpublicV41DealersAccountidModelsCall(accountId, progressListener,
                progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageListModel>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for gETpublicV41DealersAccountidUsers */
    private com.squareup.okhttp.Call gETpublicV41DealersAccountidUsersCall(Integer accountId, Integer skip,
            Integer take, String filter, final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException(
                    "Missing the required parameter 'accountId' when calling gETpublicV41DealersAccountidUsers(Async)");
        }

        // verify the required parameter 'skip' is set
        if (skip == null) {
            throw new ApiException(
                    "Missing the required parameter 'skip' when calling gETpublicV41DealersAccountidUsers(Async)");
        }

        // verify the required parameter 'take' is set
        if (take == null) {
            throw new ApiException(
                    "Missing the required parameter 'take' when calling gETpublicV41DealersAccountidUsers(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/{accountId}/users".replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (skip != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip", skip));
        if (take != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "take", take));
        if (filter != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @param skip  (required)
     * @param take  (required)
     * @param filter  (optional)
     * @return ResponseMessageCollectionListUser
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageCollectionListUser gETpublicV41DealersAccountidUsers(Integer accountId, Integer skip,
            Integer take, String filter) throws ApiException {
        ApiResponse<ResponseMessageCollectionListUser> resp = gETpublicV41DealersAccountidUsersWithHttpInfo(
                accountId, skip, take, filter);
        return resp.getData();
    }

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

    /**
     *  (asynchronously)
     * 
     * @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 gETpublicV41DealersAccountidUsersAsync(Integer accountId, Integer skip,
            Integer take, String filter, final ApiCallback<ResponseMessageCollectionListUser> 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 = gETpublicV41DealersAccountidUsersCall(accountId, skip, take, filter,
                progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageCollectionListUser>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for gETpublicV41DealersAccountidUsersCount */
    private com.squareup.okhttp.Call gETpublicV41DealersAccountidUsersCountCall(Integer accountId, String filter,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException(
                    "Missing the required parameter 'accountId' when calling gETpublicV41DealersAccountidUsersCount(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/{accountId}/users/count".replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (filter != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @param filter  (optional)
     * @return ResponseMessageCount
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageCount gETpublicV41DealersAccountidUsersCount(Integer accountId, String filter)
            throws ApiException {
        ApiResponse<ResponseMessageCount> resp = gETpublicV41DealersAccountidUsersCountWithHttpInfo(accountId,
                filter);
        return resp.getData();
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @param filter  (optional)
     * @return ApiResponse&lt;ResponseMessageCount&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ResponseMessageCount> gETpublicV41DealersAccountidUsersCountWithHttpInfo(Integer accountId,
            String filter) throws ApiException {
        com.squareup.okhttp.Call call = gETpublicV41DealersAccountidUsersCountCall(accountId, filter, null, null);
        Type localVarReturnType = new TypeToken<ResponseMessageCount>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * 
     * @param accountId  (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 gETpublicV41DealersAccountidUsersCountAsync(Integer accountId, String filter,
            final ApiCallback<ResponseMessageCount> 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 = gETpublicV41DealersAccountidUsersCountCall(accountId, filter,
                progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageCount>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for gETpublicV41DealersAccountidVehicles */
    private com.squareup.okhttp.Call gETpublicV41DealersAccountidVehiclesCall(Integer accountId, Integer skip,
            Integer take, String filter, final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException(
                    "Missing the required parameter 'accountId' when calling gETpublicV41DealersAccountidVehicles(Async)");
        }

        // verify the required parameter 'skip' is set
        if (skip == null) {
            throw new ApiException(
                    "Missing the required parameter 'skip' when calling gETpublicV41DealersAccountidVehicles(Async)");
        }

        // verify the required parameter 'take' is set
        if (take == null) {
            throw new ApiException(
                    "Missing the required parameter 'take' when calling gETpublicV41DealersAccountidVehicles(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/{accountId}/vehicles".replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (skip != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip", skip));
        if (take != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "take", take));
        if (filter != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @param skip  (required)
     * @param take  (required)
     * @param filter  (optional)
     * @return ResponseMessageCollectionListAdDealer
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageCollectionListAdDealer gETpublicV41DealersAccountidVehicles(Integer accountId,
            Integer skip, Integer take, String filter) throws ApiException {
        ApiResponse<ResponseMessageCollectionListAdDealer> resp = gETpublicV41DealersAccountidVehiclesWithHttpInfo(
                accountId, skip, take, filter);
        return resp.getData();
    }

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

    /**
     *  (asynchronously)
     * 
     * @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 gETpublicV41DealersAccountidVehiclesAsync(Integer accountId, Integer skip,
            Integer take, String filter, final ApiCallback<ResponseMessageCollectionListAdDealer> 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 = gETpublicV41DealersAccountidVehiclesCall(accountId, skip, take, filter,
                progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageCollectionListAdDealer>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for gETpublicV41DealersAccountidVehiclesCount */
    private com.squareup.okhttp.Call gETpublicV41DealersAccountidVehiclesCountCall(Integer accountId, String filter,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException(
                    "Missing the required parameter 'accountId' when calling gETpublicV41DealersAccountidVehiclesCount(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/{accountId}/vehicles/count".replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (filter != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @param filter  (optional)
     * @return ResponseMessageCount
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageCount gETpublicV41DealersAccountidVehiclesCount(Integer accountId, String filter)
            throws ApiException {
        ApiResponse<ResponseMessageCount> resp = gETpublicV41DealersAccountidVehiclesCountWithHttpInfo(accountId,
                filter);
        return resp.getData();
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @param filter  (optional)
     * @return ApiResponse&lt;ResponseMessageCount&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ResponseMessageCount> gETpublicV41DealersAccountidVehiclesCountWithHttpInfo(
            Integer accountId, String filter) throws ApiException {
        com.squareup.okhttp.Call call = gETpublicV41DealersAccountidVehiclesCountCall(accountId, filter, null,
                null);
        Type localVarReturnType = new TypeToken<ResponseMessageCount>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * 
     * @param accountId  (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 gETpublicV41DealersAccountidVehiclesCountAsync(Integer accountId, String filter,
            final ApiCallback<ResponseMessageCount> 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 = gETpublicV41DealersAccountidVehiclesCountCall(accountId, filter,
                progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageCount>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for gETpublicV41DealersAccountidVehiclesVehicleid */
    private com.squareup.okhttp.Call gETpublicV41DealersAccountidVehiclesVehicleidCall(Integer accountId,
            Integer vehicleId, final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException(
                    "Missing the required parameter 'accountId' when calling gETpublicV41DealersAccountidVehiclesVehicleid(Async)");
        }

        // verify the required parameter 'vehicleId' is set
        if (vehicleId == null) {
            throw new ApiException(
                    "Missing the required parameter 'vehicleId' when calling gETpublicV41DealersAccountidVehiclesVehicleid(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/{accountId}/vehicles/{vehicleId}"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
                .replaceAll("\\{" + "vehicleId" + "\\}", apiClient.escapeString(vehicleId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @param vehicleId  (required)
     * @return ResponseMessageVehicle
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageVehicle gETpublicV41DealersAccountidVehiclesVehicleid(Integer accountId,
            Integer vehicleId) throws ApiException {
        ApiResponse<ResponseMessageVehicle> resp = gETpublicV41DealersAccountidVehiclesVehicleidWithHttpInfo(
                accountId, vehicleId);
        return resp.getData();
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @param vehicleId  (required)
     * @return ApiResponse&lt;ResponseMessageVehicle&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ResponseMessageVehicle> gETpublicV41DealersAccountidVehiclesVehicleidWithHttpInfo(
            Integer accountId, Integer vehicleId) throws ApiException {
        com.squareup.okhttp.Call call = gETpublicV41DealersAccountidVehiclesVehicleidCall(accountId, vehicleId,
                null, null);
        Type localVarReturnType = new TypeToken<ResponseMessageVehicle>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * 
     * @param accountId  (required)
     * @param vehicleId  (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 gETpublicV41DealersAccountidVehiclesVehicleidAsync(Integer accountId,
            Integer vehicleId, final ApiCallback<ResponseMessageVehicle> 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 = gETpublicV41DealersAccountidVehiclesVehicleidCall(accountId, vehicleId,
                progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageVehicle>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for gETpublicV41DealersCount */
    private com.squareup.okhttp.Call gETpublicV41DealersCountCall(String filter,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/count".replaceAll("\\{format\\}", "json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (filter != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {

        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param filter  (optional)
     * @return ResponseMessageCount
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageCount gETpublicV41DealersCount(String filter) throws ApiException {
        ApiResponse<ResponseMessageCount> resp = gETpublicV41DealersCountWithHttpInfo(filter);
        return resp.getData();
    }

    /**
     * 
     * 
     * @param filter  (optional)
     * @return ApiResponse&lt;ResponseMessageCount&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ResponseMessageCount> gETpublicV41DealersCountWithHttpInfo(String filter)
            throws ApiException {
        com.squareup.okhttp.Call call = gETpublicV41DealersCountCall(filter, null, null);
        Type localVarReturnType = new TypeToken<ResponseMessageCount>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * 
     * @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 gETpublicV41DealersCountAsync(String filter,
            final ApiCallback<ResponseMessageCount> 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 = gETpublicV41DealersCountCall(filter, progressListener,
                progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageCount>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for pOSTpublicV41DealersAccountidVehicles */
    private com.squareup.okhttp.Call pOSTpublicV41DealersAccountidVehiclesCall(Integer accountId, Vehicle vehicle,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = vehicle;

        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException(
                    "Missing the required parameter 'accountId' when calling pOSTpublicV41DealersAccountidVehicles(Async)");
        }

        // verify the required parameter 'vehicle' is set
        if (vehicle == null) {
            throw new ApiException(
                    "Missing the required parameter 'vehicle' when calling pOSTpublicV41DealersAccountidVehicles(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/{accountId}/vehicles".replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = { "application/json", "text/json",
                "application/x-www-form-urlencoded" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody,
                localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @param vehicle  (required)
     * @return ResponseMessageVehicle
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageVehicle pOSTpublicV41DealersAccountidVehicles(Integer accountId, Vehicle vehicle)
            throws ApiException {
        ApiResponse<ResponseMessageVehicle> resp = pOSTpublicV41DealersAccountidVehiclesWithHttpInfo(accountId,
                vehicle);
        return resp.getData();
    }

    /**
     * 
     * 
     * @param accountId  (required)
     * @param vehicle  (required)
     * @return ApiResponse&lt;ResponseMessageVehicle&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ResponseMessageVehicle> pOSTpublicV41DealersAccountidVehiclesWithHttpInfo(Integer accountId,
            Vehicle vehicle) throws ApiException {
        com.squareup.okhttp.Call call = pOSTpublicV41DealersAccountidVehiclesCall(accountId, vehicle, null, null);
        Type localVarReturnType = new TypeToken<ResponseMessageVehicle>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * 
     * @param accountId  (required)
     * @param vehicle  (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 pOSTpublicV41DealersAccountidVehiclesAsync(Integer accountId, Vehicle vehicle,
            final ApiCallback<ResponseMessageVehicle> 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 = pOSTpublicV41DealersAccountidVehiclesCall(accountId, vehicle,
                progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageVehicle>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for pOSTpublicV41DealersContactrequest */
    private com.squareup.okhttp.Call pOSTpublicV41DealersContactrequestCall(SellerContactRequest contactRequest,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = contactRequest;

        // verify the required parameter 'contactRequest' is set
        if (contactRequest == null) {
            throw new ApiException(
                    "Missing the required parameter 'contactRequest' when calling pOSTpublicV41DealersContactrequest(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/contactrequest".replaceAll("\\{format\\}", "json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = { "application/json", "text/json",
                "application/x-www-form-urlencoded" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody,
                localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param contactRequest  (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void pOSTpublicV41DealersContactrequest(SellerContactRequest contactRequest) throws ApiException {
        pOSTpublicV41DealersContactrequestWithHttpInfo(contactRequest);
    }

    /**
     * 
     * 
     * @param contactRequest  (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<Void> pOSTpublicV41DealersContactrequestWithHttpInfo(SellerContactRequest contactRequest)
            throws ApiException {
        com.squareup.okhttp.Call call = pOSTpublicV41DealersContactrequestCall(contactRequest, null, null);
        return apiClient.execute(call);
    }

    /**
     *  (asynchronously)
     * 
     * @param contactRequest  (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 pOSTpublicV41DealersContactrequestAsync(SellerContactRequest contactRequest,
            final ApiCallback<Void> 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 = pOSTpublicV41DealersContactrequestCall(contactRequest, progressListener,
                progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }

    /* Build call for pOSTpublicV41DealersDealerpagerequest */
    private com.squareup.okhttp.Call pOSTpublicV41DealersDealerpagerequestCall(DealerPageRequest dealerPageRequest,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = dealerPageRequest;

        // verify the required parameter 'dealerPageRequest' is set
        if (dealerPageRequest == null) {
            throw new ApiException(
                    "Missing the required parameter 'dealerPageRequest' when calling pOSTpublicV41DealersDealerpagerequest(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/dealerpagerequest".replaceAll("\\{format\\}", "json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = { "application/json", "text/json",
                "application/x-www-form-urlencoded" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody,
                localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param dealerPageRequest  (required)
     * @return ResponseMessageDealerPageRequest
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageDealerPageRequest pOSTpublicV41DealersDealerpagerequest(
            DealerPageRequest dealerPageRequest) throws ApiException {
        ApiResponse<ResponseMessageDealerPageRequest> resp = pOSTpublicV41DealersDealerpagerequestWithHttpInfo(
                dealerPageRequest);
        return resp.getData();
    }

    /**
     * 
     * 
     * @param dealerPageRequest  (required)
     * @return ApiResponse&lt;ResponseMessageDealerPageRequest&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ResponseMessageDealerPageRequest> pOSTpublicV41DealersDealerpagerequestWithHttpInfo(
            DealerPageRequest dealerPageRequest) throws ApiException {
        com.squareup.okhttp.Call call = pOSTpublicV41DealersDealerpagerequestCall(dealerPageRequest, null, null);
        Type localVarReturnType = new TypeToken<ResponseMessageDealerPageRequest>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * 
     * @param dealerPageRequest  (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 pOSTpublicV41DealersDealerpagerequestAsync(DealerPageRequest dealerPageRequest,
            final ApiCallback<ResponseMessageDealerPageRequest> 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 = pOSTpublicV41DealersDealerpagerequestCall(dealerPageRequest,
                progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageDealerPageRequest>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for pOSTpublicV41DealersSendtofriend */
    private com.squareup.okhttp.Call pOSTpublicV41DealersSendtofriendCall(SendToFriendRequest sendToFriendRequest,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = sendToFriendRequest;

        // verify the required parameter 'sendToFriendRequest' is set
        if (sendToFriendRequest == null) {
            throw new ApiException(
                    "Missing the required parameter 'sendToFriendRequest' when calling pOSTpublicV41DealersSendtofriend(Async)");
        }

        // create path and map variables
        String localVarPath = "/public/v4.1/dealers/sendtofriend".replaceAll("\\{format\\}", "json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json", "text/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = { "application/json", "text/json",
                "application/x-www-form-urlencoded" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody,
                localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * 
     * 
     * @param sendToFriendRequest  (required)
     * @return ResponseMessageDictionaryStringString
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ResponseMessageDictionaryStringString pOSTpublicV41DealersSendtofriend(
            SendToFriendRequest sendToFriendRequest) throws ApiException {
        ApiResponse<ResponseMessageDictionaryStringString> resp = pOSTpublicV41DealersSendtofriendWithHttpInfo(
                sendToFriendRequest);
        return resp.getData();
    }

    /**
     * 
     * 
     * @param sendToFriendRequest  (required)
     * @return ApiResponse&lt;ResponseMessageDictionaryStringString&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<ResponseMessageDictionaryStringString> pOSTpublicV41DealersSendtofriendWithHttpInfo(
            SendToFriendRequest sendToFriendRequest) throws ApiException {
        com.squareup.okhttp.Call call = pOSTpublicV41DealersSendtofriendCall(sendToFriendRequest, null, null);
        Type localVarReturnType = new TypeToken<ResponseMessageDictionaryStringString>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * 
     * @param sendToFriendRequest  (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 pOSTpublicV41DealersSendtofriendAsync(SendToFriendRequest sendToFriendRequest,
            final ApiCallback<ResponseMessageDictionaryStringString> 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 = pOSTpublicV41DealersSendtofriendCall(sendToFriendRequest, progressListener,
                progressRequestListener);
        Type localVarReturnType = new TypeToken<ResponseMessageDictionaryStringString>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
}