/*
 * 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.CustomTableDataDto;
import org.openapitools.client.model.CustomTableDataResponseDto;
import org.openapitools.client.model.PagingAndFiltering;

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

public class CustomTableApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for dELETECustomTableDelete1
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record. If no &#39;id&#39; values are passed will delete all the records in a table.  (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 dELETECustomTableDelete1Call(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = customTableDataDto;

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

        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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call dELETECustomTableDelete1ValidateBeforeCall(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = dELETECustomTableDelete1Call(customTableDataDto, _callback);
        return localVarCall;

    }

    /**
     *  Remove an existing data from a custom table.  
     *  Remove an existing data from a custom table.  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record. If no &#39;id&#39; values are passed will delete all the records in a table.  (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 dELETECustomTableDelete1(CustomTableDataDto customTableDataDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETECustomTableDelete1WithHttpInfo(customTableDataDto);
        return localVarResp.getData();
    }

    /**
     *  Remove an existing data from a custom table.  
     *  Remove an existing data from a custom table.  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record. If no &#39;id&#39; values are passed will delete all the records in a table.  (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> dELETECustomTableDelete1WithHttpInfo(CustomTableDataDto customTableDataDto) throws ApiException {
        okhttp3.Call localVarCall = dELETECustomTableDelete1ValidateBeforeCall(customTableDataDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Remove an existing data from a custom table.   (asynchronously)
     *  Remove an existing data from a custom table.  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record. If no &#39;id&#39; values are passed will delete all the records in a table.  (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 dELETECustomTableDelete1Async(CustomTableDataDto customTableDataDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = gETIBaseVersion66Call(_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 gETIBaseVersion66() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion66WithHttpInfo();
        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> gETIBaseVersion66WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion66ValidateBeforeCall(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 gETIBaseVersion66Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion66ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCustomTableCreate1
     * @param customTableDataDto  dto Custom table data  (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 pOSTCustomTableCreate1Call(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = customTableDataDto;

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

        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 pOSTCustomTableCreate1ValidateBeforeCall(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTCustomTableCreate1Call(customTableDataDto, _callback);
        return localVarCall;

    }

    /**
     *  Append data to a custom table 
     *  Append data to a custom table 
     * @param customTableDataDto  dto Custom table data  (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 pOSTCustomTableCreate1(CustomTableDataDto customTableDataDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTCustomTableCreate1WithHttpInfo(customTableDataDto);
        return localVarResp.getData();
    }

    /**
     *  Append data to a custom table 
     *  Append data to a custom table 
     * @param customTableDataDto  dto Custom table data  (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> pOSTCustomTableCreate1WithHttpInfo(CustomTableDataDto customTableDataDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTCustomTableCreate1ValidateBeforeCall(customTableDataDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Append data to a custom table  (asynchronously)
     *  Append data to a custom table 
     * @param customTableDataDto  dto Custom table data  (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 pOSTCustomTableCreate1Async(CustomTableDataDto customTableDataDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCustomTableCreate1ValidateBeforeCall(customTableDataDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCustomTableCreateOrUpdate1
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record. Presence of &#39;id&#39; field will be treated as update operation.  (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 pOSTCustomTableCreateOrUpdate1Call(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = customTableDataDto;

        // create path and map variables
        String localVarPath = "/customTable/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 pOSTCustomTableCreateOrUpdate1ValidateBeforeCall(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTCustomTableCreateOrUpdate1Call(customTableDataDto, _callback);
        return localVarCall;

    }

    /**
     *  Append or update data in a custom table  
     *  Append or update data in a custom table  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record. Presence of &#39;id&#39; field will be treated as update operation.  (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 pOSTCustomTableCreateOrUpdate1(CustomTableDataDto customTableDataDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTCustomTableCreateOrUpdate1WithHttpInfo(customTableDataDto);
        return localVarResp.getData();
    }

    /**
     *  Append or update data in a custom table  
     *  Append or update data in a custom table  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record. Presence of &#39;id&#39; field will be treated as update operation.  (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> pOSTCustomTableCreateOrUpdate1WithHttpInfo(CustomTableDataDto customTableDataDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTCustomTableCreateOrUpdate1ValidateBeforeCall(customTableDataDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Append or update data in a custom table   (asynchronously)
     *  Append or update data in a custom table  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record. Presence of &#39;id&#39; field will be treated as update operation.  (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 pOSTCustomTableCreateOrUpdate1Async(CustomTableDataDto customTableDataDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCustomTableCreateOrUpdate1ValidateBeforeCall(customTableDataDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCustomTableDisable1
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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 pOSTCustomTableDisable1Call(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = customTableDataDto;

        // create path and map variables
        String localVarPath = "/customTable/disable";

        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 pOSTCustomTableDisable1ValidateBeforeCall(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTCustomTableDisable1Call(customTableDataDto, _callback);
        return localVarCall;

    }

    /**
     *  Mark records as disabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;  
     *  Mark records as disabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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 pOSTCustomTableDisable1(CustomTableDataDto customTableDataDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTCustomTableDisable1WithHttpInfo(customTableDataDto);
        return localVarResp.getData();
    }

    /**
     *  Mark records as disabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;  
     *  Mark records as disabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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> pOSTCustomTableDisable1WithHttpInfo(CustomTableDataDto customTableDataDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTCustomTableDisable1ValidateBeforeCall(customTableDataDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Mark records as disabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;   (asynchronously)
     *  Mark records as disabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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 pOSTCustomTableDisable1Async(CustomTableDataDto customTableDataDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCustomTableDisable1ValidateBeforeCall(customTableDataDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCustomTableEnable1
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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 pOSTCustomTableEnable1Call(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = customTableDataDto;

        // create path and map variables
        String localVarPath = "/customTable/enable";

        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 pOSTCustomTableEnable1ValidateBeforeCall(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTCustomTableEnable1Call(customTableDataDto, _callback);
        return localVarCall;

    }

    /**
     *  Mark records as enabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;  
     *  Mark records as enabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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 pOSTCustomTableEnable1(CustomTableDataDto customTableDataDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTCustomTableEnable1WithHttpInfo(customTableDataDto);
        return localVarResp.getData();
    }

    /**
     *  Mark records as enabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;  
     *  Mark records as enabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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> pOSTCustomTableEnable1WithHttpInfo(CustomTableDataDto customTableDataDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTCustomTableEnable1ValidateBeforeCall(customTableDataDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Mark records as enabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;   (asynchronously)
     *  Mark records as enabled in a custom table. Applies only to those custom tables that contain a field &#39;disabled&#39;  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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 pOSTCustomTableEnable1Async(CustomTableDataDto customTableDataDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCustomTableEnable1ValidateBeforeCall(customTableDataDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTCustomTableListCustomTableCode1
     * @param customTableCode  customTableCode Custom table code - can be either db table&#39;s name or a custom entity template code  (required)
     * @param pagingAndFiltering  pagingAndFiltering Paging and search criteria  (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>  Custom table data  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCustomTableListCustomTableCode1Call(String customTableCode, PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = pagingAndFiltering;

        // create path and map variables
        String localVarPath = "/customTable/list/{customTableCode}"
            .replaceAll("\\{" + "customTableCode" + "\\}", localVarApiClient.escapeString(customTableCode.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 = {
            "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 pOSTCustomTableListCustomTableCode1ValidateBeforeCall(String customTableCode, PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        
        // verify the required parameter 'customTableCode' is set
        if (customTableCode == null) {
            throw new ApiException("Missing the required parameter 'customTableCode' when calling pOSTCustomTableListCustomTableCode1(Async)");
        }
        

        okhttp3.Call localVarCall = pOSTCustomTableListCustomTableCode1Call(customTableCode, pagingAndFiltering, _callback);
        return localVarCall;

    }

    /**
     *  Search in custom tables  
     *  Search in custom tables  
     * @param customTableCode  customTableCode Custom table code - can be either db table&#39;s name or a custom entity template code  (required)
     * @param pagingAndFiltering  pagingAndFiltering Paging and search criteria  (optional)
     * @return CustomTableDataResponseDto
     * @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>  Custom table data  </td><td>  -  </td></tr>
     </table>
     */
    public CustomTableDataResponseDto pOSTCustomTableListCustomTableCode1(String customTableCode, PagingAndFiltering pagingAndFiltering) throws ApiException {
        ApiResponse<CustomTableDataResponseDto> localVarResp = pOSTCustomTableListCustomTableCode1WithHttpInfo(customTableCode, pagingAndFiltering);
        return localVarResp.getData();
    }

    /**
     *  Search in custom tables  
     *  Search in custom tables  
     * @param customTableCode  customTableCode Custom table code - can be either db table&#39;s name or a custom entity template code  (required)
     * @param pagingAndFiltering  pagingAndFiltering Paging and search criteria  (optional)
     * @return ApiResponse&lt;CustomTableDataResponseDto&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>  Custom table data  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<CustomTableDataResponseDto> pOSTCustomTableListCustomTableCode1WithHttpInfo(String customTableCode, PagingAndFiltering pagingAndFiltering) throws ApiException {
        okhttp3.Call localVarCall = pOSTCustomTableListCustomTableCode1ValidateBeforeCall(customTableCode, pagingAndFiltering, null);
        Type localVarReturnType = new TypeToken<CustomTableDataResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Search in custom tables   (asynchronously)
     *  Search in custom tables  
     * @param customTableCode  customTableCode Custom table code - can be either db table&#39;s name or a custom entity template code  (required)
     * @param pagingAndFiltering  pagingAndFiltering Paging and search criteria  (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>  Custom table data  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTCustomTableListCustomTableCode1Async(String customTableCode, PagingAndFiltering pagingAndFiltering, final ApiCallback<CustomTableDataResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTCustomTableListCustomTableCode1ValidateBeforeCall(customTableCode, pagingAndFiltering, _callback);
        Type localVarReturnType = new TypeToken<CustomTableDataResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pUTCustomTableUpdate1
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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 pUTCustomTableUpdate1Call(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = customTableDataDto;

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

        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 pUTCustomTableUpdate1ValidateBeforeCall(CustomTableDataDto customTableDataDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pUTCustomTableUpdate1Call(customTableDataDto, _callback);
        return localVarCall;

    }

    /**
     *  Update existing data in a custom table  
     *  Update existing data in a custom table  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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 pUTCustomTableUpdate1(CustomTableDataDto customTableDataDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pUTCustomTableUpdate1WithHttpInfo(customTableDataDto);
        return localVarResp.getData();
    }

    /**
     *  Update existing data in a custom table  
     *  Update existing data in a custom table  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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> pUTCustomTableUpdate1WithHttpInfo(CustomTableDataDto customTableDataDto) throws ApiException {
        okhttp3.Call localVarCall = pUTCustomTableUpdate1ValidateBeforeCall(customTableDataDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Update existing data in a custom table   (asynchronously)
     *  Update existing data in a custom table  
     * @param customTableDataDto  dto Custom table data. &#39;id&#39; field is used to identify an existing record.  (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 pUTCustomTableUpdate1Async(CustomTableDataDto customTableDataDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = user41Call(_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 user41() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user41WithHttpInfo();
        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> user41WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user41ValidateBeforeCall(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 user41Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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