/*
 * 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.CustomFieldTemplateDto;
import org.openapitools.client.model.GetCustomFieldTemplateReponseDto;

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

public class CustomFieldTemplateApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1Call(String customFieldTemplateCode, String appliesTo, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/customFieldTemplate/{customFieldTemplateCode}/{appliesTo}"
            .replaceAll("\\{" + "customFieldTemplateCode" + "\\}", localVarApiClient.escapeString(customFieldTemplateCode.toString()))
            .replaceAll("\\{" + "appliesTo" + "\\}", localVarApiClient.escapeString(appliesTo.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 dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1ValidateBeforeCall(String customFieldTemplateCode, String appliesTo, final ApiCallback _callback) throws ApiException {
        
        // verify the required parameter 'customFieldTemplateCode' is set
        if (customFieldTemplateCode == null) {
            throw new ApiException("Missing the required parameter 'customFieldTemplateCode' when calling dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1(Async)");
        }
        
        // verify the required parameter 'appliesTo' is set
        if (appliesTo == null) {
            throw new ApiException("Missing the required parameter 'appliesTo' when calling dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1(Async)");
        }
        

        okhttp3.Call localVarCall = dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1Call(customFieldTemplateCode, appliesTo, _callback);
        return localVarCall;

    }

    /**
     *  Remove custom field definition given its code and entity it applies to  
     *  Remove custom field definition given its code and entity it applies to  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1(String customFieldTemplateCode, String appliesTo) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1WithHttpInfo(customFieldTemplateCode, appliesTo);
        return localVarResp.getData();
    }

    /**
     *  Remove custom field definition given its code and entity it applies to  
     *  Remove custom field definition given its code and entity it applies to  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1WithHttpInfo(String customFieldTemplateCode, String appliesTo) throws ApiException {
        okhttp3.Call localVarCall = dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1ValidateBeforeCall(customFieldTemplateCode, appliesTo, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Remove custom field definition given its code and entity it applies to   (asynchronously)
     *  Remove custom field definition given its code and entity it applies to  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1Async(String customFieldTemplateCode, String appliesTo, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = dELETECustomFieldTemplateCustomFieldTemplateCodeAppliesTo1ValidateBeforeCall(customFieldTemplateCode, appliesTo, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETCustomFieldTemplateSearch1
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (optional)
     * @param appliesTo  appliesTo Entity it applies to  (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>  instance of GetCustomFieldTemplateReponseDto  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETCustomFieldTemplateSearch1Call(String customFieldTemplateCode, String appliesTo, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

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

        if (appliesTo != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("appliesTo", appliesTo));
        }

        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 gETCustomFieldTemplateSearch1ValidateBeforeCall(String customFieldTemplateCode, String appliesTo, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETCustomFieldTemplateSearch1Call(customFieldTemplateCode, appliesTo, _callback);
        return localVarCall;

    }

    /**
     *  Get custom field definition  
     *  Get custom field definition  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (optional)
     * @param appliesTo  appliesTo Entity it applies to  (optional)
     * @return GetCustomFieldTemplateReponseDto
     * @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>  instance of GetCustomFieldTemplateReponseDto  </td><td>  -  </td></tr>
     </table>
     */
    public GetCustomFieldTemplateReponseDto gETCustomFieldTemplateSearch1(String customFieldTemplateCode, String appliesTo) throws ApiException {
        ApiResponse<GetCustomFieldTemplateReponseDto> localVarResp = gETCustomFieldTemplateSearch1WithHttpInfo(customFieldTemplateCode, appliesTo);
        return localVarResp.getData();
    }

    /**
     *  Get custom field definition  
     *  Get custom field definition  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (optional)
     * @param appliesTo  appliesTo Entity it applies to  (optional)
     * @return ApiResponse&lt;GetCustomFieldTemplateReponseDto&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>  instance of GetCustomFieldTemplateReponseDto  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetCustomFieldTemplateReponseDto> gETCustomFieldTemplateSearch1WithHttpInfo(String customFieldTemplateCode, String appliesTo) throws ApiException {
        okhttp3.Call localVarCall = gETCustomFieldTemplateSearch1ValidateBeforeCall(customFieldTemplateCode, appliesTo, null);
        Type localVarReturnType = new TypeToken<GetCustomFieldTemplateReponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Get custom field definition   (asynchronously)
     *  Get custom field definition  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (optional)
     * @param appliesTo  appliesTo Entity it applies to  (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>  instance of GetCustomFieldTemplateReponseDto  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETCustomFieldTemplateSearch1Async(String customFieldTemplateCode, String appliesTo, final ApiCallback<GetCustomFieldTemplateReponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETCustomFieldTemplateSearch1ValidateBeforeCall(customFieldTemplateCode, appliesTo, _callback);
        Type localVarReturnType = new TypeToken<GetCustomFieldTemplateReponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETIBaseVersion64
     * @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 gETIBaseVersion64Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/customFieldTemplate/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 gETIBaseVersion64ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETIBaseVersion64Call(_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 gETIBaseVersion64() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion64WithHttpInfo();
        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> gETIBaseVersion64WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion64ValidateBeforeCall(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 gETIBaseVersion64Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion64ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCustomFieldTemplateCreate1
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCustomFieldTemplateCreate1Call(CustomFieldTemplateDto customFieldTemplateDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = customFieldTemplateDto;

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

        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 pOSTCustomFieldTemplateCreate1ValidateBeforeCall(CustomFieldTemplateDto customFieldTemplateDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCreate1Call(customFieldTemplateDto, _callback);
        return localVarCall;

    }

    /**
     *  Define a new custom field  
     *  Define a new custom field  
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTCustomFieldTemplateCreate1(CustomFieldTemplateDto customFieldTemplateDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTCustomFieldTemplateCreate1WithHttpInfo(customFieldTemplateDto);
        return localVarResp.getData();
    }

    /**
     *  Define a new custom field  
     *  Define a new custom field  
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTCustomFieldTemplateCreate1WithHttpInfo(CustomFieldTemplateDto customFieldTemplateDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCreate1ValidateBeforeCall(customFieldTemplateDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Define a new custom field   (asynchronously)
     *  Define a new custom field  
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCustomFieldTemplateCreate1Async(CustomFieldTemplateDto customFieldTemplateDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCreate1ValidateBeforeCall(customFieldTemplateDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCustomFieldTemplateCreateOrUpdate1
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCustomFieldTemplateCreateOrUpdate1Call(CustomFieldTemplateDto customFieldTemplateDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = customFieldTemplateDto;

        // create path and map variables
        String localVarPath = "/customFieldTemplate/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 pOSTCustomFieldTemplateCreateOrUpdate1ValidateBeforeCall(CustomFieldTemplateDto customFieldTemplateDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCreateOrUpdate1Call(customFieldTemplateDto, _callback);
        return localVarCall;

    }

    /**
     *  Define new or update existing custom field definition  
     *  Define new or update existing custom field definition  
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTCustomFieldTemplateCreateOrUpdate1(CustomFieldTemplateDto customFieldTemplateDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTCustomFieldTemplateCreateOrUpdate1WithHttpInfo(customFieldTemplateDto);
        return localVarResp.getData();
    }

    /**
     *  Define new or update existing custom field definition  
     *  Define new or update existing custom field definition  
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTCustomFieldTemplateCreateOrUpdate1WithHttpInfo(CustomFieldTemplateDto customFieldTemplateDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCreateOrUpdate1ValidateBeforeCall(customFieldTemplateDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Define new or update existing custom field definition   (asynchronously)
     *  Define new or update existing custom field definition  
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCustomFieldTemplateCreateOrUpdate1Async(CustomFieldTemplateDto customFieldTemplateDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCreateOrUpdate1ValidateBeforeCall(customFieldTemplateDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToDisable1
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToDisable1Call(String customFieldTemplateCode, String appliesTo, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/customFieldTemplate/{customFieldTemplateCode}/{appliesTo}/disable"
            .replaceAll("\\{" + "customFieldTemplateCode" + "\\}", localVarApiClient.escapeString(customFieldTemplateCode.toString()))
            .replaceAll("\\{" + "appliesTo" + "\\}", localVarApiClient.escapeString(appliesTo.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToDisable1Call(customFieldTemplateCode, appliesTo, _callback);
        return localVarCall;

    }

    /**
     *  Disable a Custom field template with a given code  
     *  Disable a Custom field template with a given code  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToDisable1(String customFieldTemplateCode, String appliesTo) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToDisable1WithHttpInfo(customFieldTemplateCode, appliesTo);
        return localVarResp.getData();
    }

    /**
     *  Disable a Custom field template with a given code  
     *  Disable a Custom field template with a given code  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToDisable1WithHttpInfo(String customFieldTemplateCode, String appliesTo) throws ApiException {
        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToDisable1ValidateBeforeCall(customFieldTemplateCode, appliesTo, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Disable a Custom field template with a given code   (asynchronously)
     *  Disable a Custom field template with a given code  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToDisable1Async(String customFieldTemplateCode, String appliesTo, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToDisable1ValidateBeforeCall(customFieldTemplateCode, appliesTo, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToEnable1
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToEnable1Call(String customFieldTemplateCode, String appliesTo, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/customFieldTemplate/{customFieldTemplateCode}/{appliesTo}/enable"
            .replaceAll("\\{" + "customFieldTemplateCode" + "\\}", localVarApiClient.escapeString(customFieldTemplateCode.toString()))
            .replaceAll("\\{" + "appliesTo" + "\\}", localVarApiClient.escapeString(appliesTo.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToEnable1Call(customFieldTemplateCode, appliesTo, _callback);
        return localVarCall;

    }

    /**
     *  Enable a Custom field template with a given code  
     *  Enable a Custom field template with a given code  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToEnable1(String customFieldTemplateCode, String appliesTo) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToEnable1WithHttpInfo(customFieldTemplateCode, appliesTo);
        return localVarResp.getData();
    }

    /**
     *  Enable a Custom field template with a given code  
     *  Enable a Custom field template with a given code  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToEnable1WithHttpInfo(String customFieldTemplateCode, String appliesTo) throws ApiException {
        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToEnable1ValidateBeforeCall(customFieldTemplateCode, appliesTo, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Enable a Custom field template with a given code   (asynchronously)
     *  Enable a Custom field template with a given code  
     * @param customFieldTemplateCode  customFieldTemplateCode Custom field template code  (required)
     * @param appliesTo  appliesTo Entity it applies to  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToEnable1Async(String customFieldTemplateCode, String appliesTo, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCustomFieldTemplateCustomFieldTemplateCodeAppliesToEnable1ValidateBeforeCall(customFieldTemplateCode, appliesTo, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pUTCustomFieldTemplateUpdate1
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTCustomFieldTemplateUpdate1Call(CustomFieldTemplateDto customFieldTemplateDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = customFieldTemplateDto;

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

        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 pUTCustomFieldTemplateUpdate1ValidateBeforeCall(CustomFieldTemplateDto customFieldTemplateDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pUTCustomFieldTemplateUpdate1Call(customFieldTemplateDto, _callback);
        return localVarCall;

    }

    /**
     *  Update existing custom field definition  
     *  Update existing custom field definition  
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pUTCustomFieldTemplateUpdate1(CustomFieldTemplateDto customFieldTemplateDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pUTCustomFieldTemplateUpdate1WithHttpInfo(customFieldTemplateDto);
        return localVarResp.getData();
    }

    /**
     *  Update existing custom field definition  
     *  Update existing custom field definition  
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pUTCustomFieldTemplateUpdate1WithHttpInfo(CustomFieldTemplateDto customFieldTemplateDto) throws ApiException {
        okhttp3.Call localVarCall = pUTCustomFieldTemplateUpdate1ValidateBeforeCall(customFieldTemplateDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Update existing custom field definition   (asynchronously)
     *  Update existing custom field definition  
     * @param customFieldTemplateDto  postData posted data to API  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTCustomFieldTemplateUpdate1Async(CustomFieldTemplateDto customFieldTemplateDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pUTCustomFieldTemplateUpdate1ValidateBeforeCall(customFieldTemplateDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for user40
     * @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 user40Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/customFieldTemplate/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 user40ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = user40Call(_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 user40() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user40WithHttpInfo();
        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> user40WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user40ValidateBeforeCall(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 user40Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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