/*
 * 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.GetOccTemplateResponseDto;
import org.openapitools.client.model.GetOccTemplatesResponseDto;
import org.openapitools.client.model.OccTemplateDto;
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 OccTemplateApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

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

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

        okhttp3.Call localVarCall = dELETEOccTemplateOccTemplateCode1Call(occTemplateCode, _callback);
        return localVarCall;

    }

    /**
     *  Remove OccTemplate with a given code.  
     *  Remove OccTemplate with a given code.  
     * @param occTemplateCode  occTemplateCode code of account operation template  (required)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus dELETEOccTemplateOccTemplateCode1(String occTemplateCode) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETEOccTemplateOccTemplateCode1WithHttpInfo(occTemplateCode);
        return localVarResp.getData();
    }

    /**
     *  Remove OccTemplate with a given code.  
     *  Remove OccTemplate with a given code.  
     * @param occTemplateCode  occTemplateCode code of account operation template  (required)
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> dELETEOccTemplateOccTemplateCode1WithHttpInfo(String occTemplateCode) throws ApiException {
        okhttp3.Call localVarCall = dELETEOccTemplateOccTemplateCode1ValidateBeforeCall(occTemplateCode, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Remove OccTemplate with a given code.   (asynchronously)
     *  Remove OccTemplate with a given code.  
     * @param occTemplateCode  occTemplateCode code of account operation template  (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETEOccTemplateOccTemplateCode1Async(String occTemplateCode, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = gETIBaseVersion14Call(_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 gETIBaseVersion14() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion14WithHttpInfo();
        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> gETIBaseVersion14WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion14ValidateBeforeCall(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 gETIBaseVersion14Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion14ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETOccTemplateList1
     * @param query  query Search criteria  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma  (optional)
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;accountCode&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @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>  A list of account operations  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETOccTemplateList1Call(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

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

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

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

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

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

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

        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 gETOccTemplateList1ValidateBeforeCall(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETOccTemplateList1Call(query, fields, offset, limit, sortBy, sortOrder, _callback);
        return localVarCall;

    }

    /**
     *  Get List of OccTemplates matching a given criteria  
     *  Get List of OccTemplates matching a given criteria  
     * @param query  query Search criteria  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma  (optional)
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;accountCode&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @return GetOccTemplatesResponseDto
     * @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>  A list of account operations  </td><td>  -  </td></tr>
     </table>
     */
    public GetOccTemplatesResponseDto gETOccTemplateList1(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder) throws ApiException {
        ApiResponse<GetOccTemplatesResponseDto> localVarResp = gETOccTemplateList1WithHttpInfo(query, fields, offset, limit, sortBy, sortOrder);
        return localVarResp.getData();
    }

    /**
     *  Get List of OccTemplates matching a given criteria  
     *  Get List of OccTemplates matching a given criteria  
     * @param query  query Search criteria  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma  (optional)
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;accountCode&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @return ApiResponse&lt;GetOccTemplatesResponseDto&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>  A list of account operations  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetOccTemplatesResponseDto> gETOccTemplateList1WithHttpInfo(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder) throws ApiException {
        okhttp3.Call localVarCall = gETOccTemplateList1ValidateBeforeCall(query, fields, offset, limit, sortBy, sortOrder, null);
        Type localVarReturnType = new TypeToken<GetOccTemplatesResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Get List of OccTemplates matching a given criteria   (asynchronously)
     *  Get List of OccTemplates matching a given criteria  
     * @param query  query Search criteria  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma  (optional)
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;accountCode&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @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>  A list of account operations  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETOccTemplateList1Async(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback<GetOccTemplatesResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETOccTemplateList1ValidateBeforeCall(query, fields, offset, limit, sortBy, sortOrder, _callback);
        Type localVarReturnType = new TypeToken<GetOccTemplatesResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETOccTemplateSearch1
     * @param occTemplateCode  occtemplateCode  code of account operation template  (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>  account operation template  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETOccTemplateSearch1Call(String occTemplateCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

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

        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 gETOccTemplateSearch1ValidateBeforeCall(String occTemplateCode, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETOccTemplateSearch1Call(occTemplateCode, _callback);
        return localVarCall;

    }

    /**
     *  Search OccTemplate with a given code.  
     *  Search OccTemplate with a given code.  
     * @param occTemplateCode  occtemplateCode  code of account operation template  (optional)
     * @return GetOccTemplateResponseDto
     * @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>  account operation template  </td><td>  -  </td></tr>
     </table>
     */
    public GetOccTemplateResponseDto gETOccTemplateSearch1(String occTemplateCode) throws ApiException {
        ApiResponse<GetOccTemplateResponseDto> localVarResp = gETOccTemplateSearch1WithHttpInfo(occTemplateCode);
        return localVarResp.getData();
    }

    /**
     *  Search OccTemplate with a given code.  
     *  Search OccTemplate with a given code.  
     * @param occTemplateCode  occtemplateCode  code of account operation template  (optional)
     * @return ApiResponse&lt;GetOccTemplateResponseDto&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>  account operation template  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetOccTemplateResponseDto> gETOccTemplateSearch1WithHttpInfo(String occTemplateCode) throws ApiException {
        okhttp3.Call localVarCall = gETOccTemplateSearch1ValidateBeforeCall(occTemplateCode, null);
        Type localVarReturnType = new TypeToken<GetOccTemplateResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Search OccTemplate with a given code.   (asynchronously)
     *  Search OccTemplate with a given code.  
     * @param occTemplateCode  occtemplateCode  code of account operation template  (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>  account operation template  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETOccTemplateSearch1Async(String occTemplateCode, final ApiCallback<GetOccTemplateResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETOccTemplateSearch1ValidateBeforeCall(occTemplateCode, _callback);
        Type localVarReturnType = new TypeToken<GetOccTemplateResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTOccTemplateCreate1
     * @param occTemplateDto  postData posted data to API (account operation template)  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTOccTemplateCreate1Call(OccTemplateDto occTemplateDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = occTemplateDto;

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

        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 pOSTOccTemplateCreate1ValidateBeforeCall(OccTemplateDto occTemplateDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTOccTemplateCreate1Call(occTemplateDto, _callback);
        return localVarCall;

    }

    /**
     *  Create OccTemplate.  
     *  Create OccTemplate.  
     * @param occTemplateDto  postData posted data to API (account operation template)  (optional)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTOccTemplateCreate1(OccTemplateDto occTemplateDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTOccTemplateCreate1WithHttpInfo(occTemplateDto);
        return localVarResp.getData();
    }

    /**
     *  Create OccTemplate.  
     *  Create OccTemplate.  
     * @param occTemplateDto  postData posted data to API (account operation template)  (optional)
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTOccTemplateCreate1WithHttpInfo(OccTemplateDto occTemplateDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTOccTemplateCreate1ValidateBeforeCall(occTemplateDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create OccTemplate.   (asynchronously)
     *  Create OccTemplate.  
     * @param occTemplateDto  postData posted data to API (account operation template)  (optional)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTOccTemplateCreate1Async(OccTemplateDto occTemplateDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTOccTemplateCreate1ValidateBeforeCall(occTemplateDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTOccTemplateCreateOrUpdate1
     * @param occTemplateDto  postData posted 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>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTOccTemplateCreateOrUpdate1Call(OccTemplateDto occTemplateDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = occTemplateDto;

        // create path and map variables
        String localVarPath = "/occTemplate/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 pOSTOccTemplateCreateOrUpdate1ValidateBeforeCall(OccTemplateDto occTemplateDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTOccTemplateCreateOrUpdate1Call(occTemplateDto, _callback);
        return localVarCall;

    }

    /**
     *  Create or update OccTemplate.  
     *  Create or update OccTemplate.  
     * @param occTemplateDto  postData posted 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>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTOccTemplateCreateOrUpdate1(OccTemplateDto occTemplateDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTOccTemplateCreateOrUpdate1WithHttpInfo(occTemplateDto);
        return localVarResp.getData();
    }

    /**
     *  Create or update OccTemplate.  
     *  Create or update OccTemplate.  
     * @param occTemplateDto  postData posted 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>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTOccTemplateCreateOrUpdate1WithHttpInfo(OccTemplateDto occTemplateDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTOccTemplateCreateOrUpdate1ValidateBeforeCall(occTemplateDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create or update OccTemplate.   (asynchronously)
     *  Create or update OccTemplate.  
     * @param occTemplateDto  postData posted 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>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTOccTemplateCreateOrUpdate1Async(OccTemplateDto occTemplateDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTOccTemplateCreateOrUpdate1ValidateBeforeCall(occTemplateDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTOccTemplateList1
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering 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>  List of account operations  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTOccTemplateList1Call(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = pagingAndFiltering;

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

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

        final String[] localVarContentTypes = {
            "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 pOSTOccTemplateList1ValidateBeforeCall(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        

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

    }

    /**
     *  Get List of OccTemplates matching a given criteria  
     *  Get List of OccTemplates matching a given criteria  
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering criteria  (optional)
     * @return GetOccTemplatesResponseDto
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  List of account operations  </td><td>  -  </td></tr>
     </table>
     */
    public GetOccTemplatesResponseDto pOSTOccTemplateList1(PagingAndFiltering pagingAndFiltering) throws ApiException {
        ApiResponse<GetOccTemplatesResponseDto> localVarResp = pOSTOccTemplateList1WithHttpInfo(pagingAndFiltering);
        return localVarResp.getData();
    }

    /**
     *  Get List of OccTemplates matching a given criteria  
     *  Get List of OccTemplates matching a given criteria  
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering criteria  (optional)
     * @return ApiResponse&lt;GetOccTemplatesResponseDto&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  List of account operations  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetOccTemplatesResponseDto> pOSTOccTemplateList1WithHttpInfo(PagingAndFiltering pagingAndFiltering) throws ApiException {
        okhttp3.Call localVarCall = pOSTOccTemplateList1ValidateBeforeCall(pagingAndFiltering, null);
        Type localVarReturnType = new TypeToken<GetOccTemplatesResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Get List of OccTemplates matching a given criteria   (asynchronously)
     *  Get List of OccTemplates matching a given criteria  
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering 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>  List of account operations  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTOccTemplateList1Async(PagingAndFiltering pagingAndFiltering, final ApiCallback<GetOccTemplatesResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTOccTemplateList1ValidateBeforeCall(pagingAndFiltering, _callback);
        Type localVarReturnType = new TypeToken<GetOccTemplatesResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pUTOccTemplateUpdate1
     * @param occTemplateDto  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>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTOccTemplateUpdate1Call(OccTemplateDto occTemplateDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = occTemplateDto;

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

        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 pUTOccTemplateUpdate1ValidateBeforeCall(OccTemplateDto occTemplateDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pUTOccTemplateUpdate1Call(occTemplateDto, _callback);
        return localVarCall;

    }

    /**
     *  Update OccTemplate.  
     *  Update OccTemplate.  
     * @param occTemplateDto  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>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pUTOccTemplateUpdate1(OccTemplateDto occTemplateDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pUTOccTemplateUpdate1WithHttpInfo(occTemplateDto);
        return localVarResp.getData();
    }

    /**
     *  Update OccTemplate.  
     *  Update OccTemplate.  
     * @param occTemplateDto  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>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pUTOccTemplateUpdate1WithHttpInfo(OccTemplateDto occTemplateDto) throws ApiException {
        okhttp3.Call localVarCall = pUTOccTemplateUpdate1ValidateBeforeCall(occTemplateDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Update OccTemplate.   (asynchronously)
     *  Update OccTemplate.  
     * @param occTemplateDto  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>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTOccTemplateUpdate1Async(OccTemplateDto occTemplateDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = user67Call(_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 user67() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user67WithHttpInfo();
        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> user67WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user67ValidateBeforeCall(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 user67Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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