/*
 * Swagger of Opencellsoft Api
 * @#Introduction
 *
 * The version of the OpenAPI document: 7.3.1-SNAPSHOT
 * Contact: contact@opencellsoft.fr
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.api;

import org.openapitools.client.ApiCallback;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.ProgressRequestBody;
import org.openapitools.client.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import org.openapitools.client.model.ActionStatus;
import org.openapitools.client.model.CountryIsoDto;
import org.openapitools.client.model.GetCountriesIsoResponse;
import org.openapitools.client.model.GetCountryIsoResponse;

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

public class CountryIsoApi {
    private ApiClient localVarApiClient;

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

    public CountryIsoApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for dELETECountryIsoDelete1
     * @param countryCode  countryCode country code  (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETECountryIsoDelete1Call(String countryCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/countryIso"
            .replaceAll("\\{" + "countryCode" + "\\}", localVarApiClient.escapeString(countryCode.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call dELETECountryIsoDelete1ValidateBeforeCall(String countryCode, final ApiCallback _callback) throws ApiException {
        
        // verify the required parameter 'countryCode' is set
        if (countryCode == null) {
            throw new ApiException("Missing the required parameter 'countryCode' when calling dELETECountryIsoDelete1(Async)");
        }
        

        okhttp3.Call localVarCall = dELETECountryIsoDelete1Call(countryCode, _callback);
        return localVarCall;

    }

    /**
     *  Does not delete a country but the tradingCountry associated to it.  
     *  Does not delete a country but the tradingCountry associated to it.  
     * @param countryCode  countryCode country code  (required)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus dELETECountryIsoDelete1(String countryCode) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETECountryIsoDelete1WithHttpInfo(countryCode);
        return localVarResp.getData();
    }

    /**
     *  Does not delete a country but the tradingCountry associated to it.  
     *  Does not delete a country but the tradingCountry associated to it.  
     * @param countryCode  countryCode country code  (required)
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> dELETECountryIsoDelete1WithHttpInfo(String countryCode) throws ApiException {
        okhttp3.Call localVarCall = dELETECountryIsoDelete1ValidateBeforeCall(countryCode, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Does not delete a country but the tradingCountry associated to it.   (asynchronously)
     *  Does not delete a country but the tradingCountry associated to it.  
     * @param countryCode  countryCode country code  (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
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETECountryIsoDelete1Async(String countryCode, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = dELETECountryIsoDelete1ValidateBeforeCall(countryCode, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETCountryIso1
     * @param countryCode  countryCode country code  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td> link org.meveo.api.dto.response.GetCountryIsoResponse}.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETCountryIso1Call(String countryCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/countryIso";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        if (countryCode != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("countryCode", countryCode));
        }

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call gETCountryIso1ValidateBeforeCall(String countryCode, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETCountryIso1Call(countryCode, _callback);
        return localVarCall;

    }

    /**
     *  Search country with a given country code.  
     *  Search country with a given country code.  
     * @param countryCode  countryCode country code  (optional)
     * @return GetCountryIsoResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td> link org.meveo.api.dto.response.GetCountryIsoResponse}.  </td><td>  -  </td></tr>
     </table>
     */
    public GetCountryIsoResponse gETCountryIso1(String countryCode) throws ApiException {
        ApiResponse<GetCountryIsoResponse> localVarResp = gETCountryIso1WithHttpInfo(countryCode);
        return localVarResp.getData();
    }

    /**
     *  Search country with a given country code.  
     *  Search country with a given country code.  
     * @param countryCode  countryCode country code  (optional)
     * @return ApiResponse&lt;GetCountryIsoResponse&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td> link org.meveo.api.dto.response.GetCountryIsoResponse}.  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetCountryIsoResponse> gETCountryIso1WithHttpInfo(String countryCode) throws ApiException {
        okhttp3.Call localVarCall = gETCountryIso1ValidateBeforeCall(countryCode, null);
        Type localVarReturnType = new TypeToken<GetCountryIsoResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Search country with a given country code.   (asynchronously)
     *  Search country with a given country code.  
     * @param countryCode  countryCode country code  (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
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td> link org.meveo.api.dto.response.GetCountryIsoResponse}.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETCountryIso1Async(String countryCode, final ApiCallback<GetCountryIsoResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETCountryIso1ValidateBeforeCall(countryCode, _callback);
        Type localVarReturnType = new TypeToken<GetCountryIsoResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETCountryIsoList1
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  list of countries  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETCountryIsoList1Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/countryIso/list";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call gETCountryIsoList1ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETCountryIsoList1Call(_callback);
        return localVarCall;

    }

    /**
     *  List all countries. 
     *  List all countries. 
     * @return GetCountriesIsoResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  list of countries  </td><td>  -  </td></tr>
     </table>
     */
    public GetCountriesIsoResponse gETCountryIsoList1() throws ApiException {
        ApiResponse<GetCountriesIsoResponse> localVarResp = gETCountryIsoList1WithHttpInfo();
        return localVarResp.getData();
    }

    /**
     *  List all countries. 
     *  List all countries. 
     * @return ApiResponse&lt;GetCountriesIsoResponse&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  list of countries  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetCountriesIsoResponse> gETCountryIsoList1WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETCountryIsoList1ValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<GetCountriesIsoResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  List all countries.  (asynchronously)
     *  List all countries. 
     * @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
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  list of countries  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETCountryIsoList1Async(final ApiCallback<GetCountriesIsoResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETCountryIsoList1ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<GetCountriesIsoResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETIBaseVersion2
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Action status with version number as a message  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETIBaseVersion2Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/countryIso/version";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call gETIBaseVersion2ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETIBaseVersion2Call(_callback);
        return localVarCall;

    }

    /**
     *  Get version of application  
     *  Get version of application  
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Action status with version number as a message  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus gETIBaseVersion2() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion2WithHttpInfo();
        return localVarResp.getData();
    }

    /**
     *  Get version of application  
     *  Get version of application  
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Action status with version number as a message  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> gETIBaseVersion2WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion2ValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Get version of application   (asynchronously)
     *  Get version of application  
     * @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
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Action status with version number as a message  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETIBaseVersion2Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion2ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCountryIsoCreate1
     * @param countryIsoDto  countryIsoDto country iso.  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCountryIsoCreate1Call(CountryIsoDto countryIsoDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = countryIsoDto;

        // create path and map variables
        String localVarPath = "/countryIso";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json", "application/xml"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pOSTCountryIsoCreate1ValidateBeforeCall(CountryIsoDto countryIsoDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTCountryIsoCreate1Call(countryIsoDto, _callback);
        return localVarCall;

    }

    /**
     *  Creates a tradingCountry base from the supplied country code
     *  Creates a tradingCountry base from the supplied country code. If the country code does not exists, a country and tradingCountry records are created  
     * @param countryIsoDto  countryIsoDto country iso.  (optional)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTCountryIsoCreate1(CountryIsoDto countryIsoDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTCountryIsoCreate1WithHttpInfo(countryIsoDto);
        return localVarResp.getData();
    }

    /**
     *  Creates a tradingCountry base from the supplied country code
     *  Creates a tradingCountry base from the supplied country code. If the country code does not exists, a country and tradingCountry records are created  
     * @param countryIsoDto  countryIsoDto country iso.  (optional)
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTCountryIsoCreate1WithHttpInfo(CountryIsoDto countryIsoDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTCountryIsoCreate1ValidateBeforeCall(countryIsoDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Creates a tradingCountry base from the supplied country code (asynchronously)
     *  Creates a tradingCountry base from the supplied country code. If the country code does not exists, a country and tradingCountry records are created  
     * @param countryIsoDto  countryIsoDto country iso.  (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
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCountryIsoCreate1Async(CountryIsoDto countryIsoDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCountryIsoCreate1ValidateBeforeCall(countryIsoDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCountryIsoCreateOrUpdate1
     * @param countryIsoDto  countryIsoDto country iso  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCountryIsoCreateOrUpdate1Call(CountryIsoDto countryIsoDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = countryIsoDto;

        // create path and map variables
        String localVarPath = "/countryIso/createOrUpdate";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json", "application/xml"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pOSTCountryIsoCreateOrUpdate1ValidateBeforeCall(CountryIsoDto countryIsoDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTCountryIsoCreateOrUpdate1Call(countryIsoDto, _callback);
        return localVarCall;

    }

    /**
     *  Creates or modify a tradingCountry base from the supplied country code. 
     *  Creates or modify a tradingCountry base from the supplied country code. 
     * @param countryIsoDto  countryIsoDto country iso  (optional)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTCountryIsoCreateOrUpdate1(CountryIsoDto countryIsoDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTCountryIsoCreateOrUpdate1WithHttpInfo(countryIsoDto);
        return localVarResp.getData();
    }

    /**
     *  Creates or modify a tradingCountry base from the supplied country code. 
     *  Creates or modify a tradingCountry base from the supplied country code. 
     * @param countryIsoDto  countryIsoDto country iso  (optional)
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTCountryIsoCreateOrUpdate1WithHttpInfo(CountryIsoDto countryIsoDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTCountryIsoCreateOrUpdate1ValidateBeforeCall(countryIsoDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Creates or modify a tradingCountry base from the supplied country code.  (asynchronously)
     *  Creates or modify a tradingCountry base from the supplied country code. 
     * @param countryIsoDto  countryIsoDto country iso  (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
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCountryIsoCreateOrUpdate1Async(CountryIsoDto countryIsoDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCountryIsoCreateOrUpdate1ValidateBeforeCall(countryIsoDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pUTCountryIsoUpdate1
     * @param countryIsoDto  Modify a country. Same input eter as create. The country and tradingCountry are created if they don&#39;t exists. The operation fails if the tradingCountry is null.   (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTCountryIsoUpdate1Call(CountryIsoDto countryIsoDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = countryIsoDto;

        // create path and map variables
        String localVarPath = "/countryIso";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json", "application/xml"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pUTCountryIsoUpdate1ValidateBeforeCall(CountryIsoDto countryIsoDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pUTCountryIsoUpdate1Call(countryIsoDto, _callback);
        return localVarCall;

    }

    /**
     *  Modify a country
     *  Modify a country. Same input parameter as create. The country and tradingCountry are created if they don&#39;t exists. The operation fails if the tradingCountry is null.  
     * @param countryIsoDto  Modify a country. Same input eter as create. The country and tradingCountry are created if they don&#39;t exists. The operation fails if the tradingCountry is null.   (optional)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pUTCountryIsoUpdate1(CountryIsoDto countryIsoDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pUTCountryIsoUpdate1WithHttpInfo(countryIsoDto);
        return localVarResp.getData();
    }

    /**
     *  Modify a country
     *  Modify a country. Same input parameter as create. The country and tradingCountry are created if they don&#39;t exists. The operation fails if the tradingCountry is null.  
     * @param countryIsoDto  Modify a country. Same input eter as create. The country and tradingCountry are created if they don&#39;t exists. The operation fails if the tradingCountry is null.   (optional)
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pUTCountryIsoUpdate1WithHttpInfo(CountryIsoDto countryIsoDto) throws ApiException {
        okhttp3.Call localVarCall = pUTCountryIsoUpdate1ValidateBeforeCall(countryIsoDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Modify a country (asynchronously)
     *  Modify a country. Same input parameter as create. The country and tradingCountry are created if they don&#39;t exists. The operation fails if the tradingCountry is null.  
     * @param countryIsoDto  Modify a country. Same input eter as create. The country and tradingCountry are created if they don&#39;t exists. The operation fails if the tradingCountry is null.   (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
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTCountryIsoUpdate1Async(CountryIsoDto countryIsoDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pUTCountryIsoUpdate1ValidateBeforeCall(countryIsoDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for user55
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td> default response </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call user55Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/countryIso/user";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call user55ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = user55Call(_callback);
        return localVarCall;

    }

    /**
     * 
     * 
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td> default response </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus user55() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user55WithHttpInfo();
        return localVarResp.getData();
    }

    /**
     * 
     * 
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td> default response </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> user55WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user55ValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * 
     * @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
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td> default response </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call user55Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = user55ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
}
