/*
 * 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.CreateProcedureRequestDto;
import org.openapitools.client.model.RawResponseDto;
import org.openapitools.client.model.SignFileResponseDto;
import org.openapitools.client.model.SignProcedureResponseDto;

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

public class DocumentSignApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for gETDocumentSignFilesIdDownload1
     * @param id  id The id  (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>  the file by id  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETDocumentSignFilesIdDownload1Call(String id, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/document/sign/files/{id}/download"
            .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        okhttp3.Call localVarCall = gETDocumentSignFilesIdDownload1Call(id, _callback);
        return localVarCall;

    }

    /**
     *  Download the files with the given id 
     *  Download the files with the given id 
     * @param id  id The id  (required)
     * @return SignFileResponseDto
     * @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>  the file by id  </td><td>  -  </td></tr>
     </table>
     */
    public SignFileResponseDto gETDocumentSignFilesIdDownload1(String id) throws ApiException {
        ApiResponse<SignFileResponseDto> localVarResp = gETDocumentSignFilesIdDownload1WithHttpInfo(id);
        return localVarResp.getData();
    }

    /**
     *  Download the files with the given id 
     *  Download the files with the given id 
     * @param id  id The id  (required)
     * @return ApiResponse&lt;SignFileResponseDto&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>  the file by id  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<SignFileResponseDto> gETDocumentSignFilesIdDownload1WithHttpInfo(String id) throws ApiException {
        okhttp3.Call localVarCall = gETDocumentSignFilesIdDownload1ValidateBeforeCall(id, null);
        Type localVarReturnType = new TypeToken<SignFileResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Download the files with the given id  (asynchronously)
     *  Download the files with the given id 
     * @param id  id The id  (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>  the file by id  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETDocumentSignFilesIdDownload1Async(String id, final ApiCallback<SignFileResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETDocumentSignFilesIdDownload1ValidateBeforeCall(id, _callback);
        Type localVarReturnType = new TypeToken<SignFileResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETDocumentSignProceduresId1
     * @param id  id the id  (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>  the procedure by id  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETDocumentSignProceduresId1Call(String id, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/document/sign/procedures/{id}"
            .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        okhttp3.Call localVarCall = gETDocumentSignProceduresId1Call(id, _callback);
        return localVarCall;

    }

    /**
     *  Gets the procedure by id. 
     *  Gets the procedure by id. 
     * @param id  id the id  (required)
     * @return SignProcedureResponseDto
     * @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>  the procedure by id  </td><td>  -  </td></tr>
     </table>
     */
    public SignProcedureResponseDto gETDocumentSignProceduresId1(String id) throws ApiException {
        ApiResponse<SignProcedureResponseDto> localVarResp = gETDocumentSignProceduresId1WithHttpInfo(id);
        return localVarResp.getData();
    }

    /**
     *  Gets the procedure by id. 
     *  Gets the procedure by id. 
     * @param id  id the id  (required)
     * @return ApiResponse&lt;SignProcedureResponseDto&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>  the procedure by id  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<SignProcedureResponseDto> gETDocumentSignProceduresId1WithHttpInfo(String id) throws ApiException {
        okhttp3.Call localVarCall = gETDocumentSignProceduresId1ValidateBeforeCall(id, null);
        Type localVarReturnType = new TypeToken<SignProcedureResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Gets the procedure by id.  (asynchronously)
     *  Gets the procedure by id. 
     * @param id  id the id  (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>  the procedure by id  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETDocumentSignProceduresId1Async(String id, final ApiCallback<SignProcedureResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETDocumentSignProceduresId1ValidateBeforeCall(id, _callback);
        Type localVarReturnType = new TypeToken<SignProcedureResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETDocumentSignProceduresIdStatus1
     * @param id  id the id  (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>  the procedure status by id  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETDocumentSignProceduresIdStatus1Call(String id, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/document/sign/procedures/{id}/status"
            .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        okhttp3.Call localVarCall = gETDocumentSignProceduresIdStatus1Call(id, _callback);
        return localVarCall;

    }

    /**
     *  Gets the procedure status by id. 
     *  Gets the procedure status by id. 
     * @param id  id the id  (required)
     * @return RawResponseDto
     * @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>  the procedure status by id  </td><td>  -  </td></tr>
     </table>
     */
    public RawResponseDto gETDocumentSignProceduresIdStatus1(String id) throws ApiException {
        ApiResponse<RawResponseDto> localVarResp = gETDocumentSignProceduresIdStatus1WithHttpInfo(id);
        return localVarResp.getData();
    }

    /**
     *  Gets the procedure status by id. 
     *  Gets the procedure status by id. 
     * @param id  id the id  (required)
     * @return ApiResponse&lt;RawResponseDto&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>  the procedure status by id  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<RawResponseDto> gETDocumentSignProceduresIdStatus1WithHttpInfo(String id) throws ApiException {
        okhttp3.Call localVarCall = gETDocumentSignProceduresIdStatus1ValidateBeforeCall(id, null);
        Type localVarReturnType = new TypeToken<RawResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Gets the procedure status by id.  (asynchronously)
     *  Gets the procedure status by id. 
     * @param id  id the id  (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>  the procedure status by id  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETDocumentSignProceduresIdStatus1Async(String id, final ApiCallback<RawResponseDto> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = gETIBaseVersion71Call(_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 gETIBaseVersion71() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion71WithHttpInfo();
        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> gETIBaseVersion71WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion71ValidateBeforeCall(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 gETIBaseVersion71Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion71ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTDocumentSignProcedures1
     * @param createProcedureRequestDto  postData the post 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>  the sign procedure response dto  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTDocumentSignProcedures1Call(CreateProcedureRequestDto createProcedureRequestDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = createProcedureRequestDto;

        // create path and map variables
        String localVarPath = "/document/sign/procedures";

        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 pOSTDocumentSignProcedures1ValidateBeforeCall(CreateProcedureRequestDto createProcedureRequestDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTDocumentSignProcedures1Call(createProcedureRequestDto, _callback);
        return localVarCall;

    }

    /**
     *  Creates the procedure. 
     *  Creates the procedure. 
     * @param createProcedureRequestDto  postData the post data  (optional)
     * @return SignProcedureResponseDto
     * @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>  the sign procedure response dto  </td><td>  -  </td></tr>
     </table>
     */
    public SignProcedureResponseDto pOSTDocumentSignProcedures1(CreateProcedureRequestDto createProcedureRequestDto) throws ApiException {
        ApiResponse<SignProcedureResponseDto> localVarResp = pOSTDocumentSignProcedures1WithHttpInfo(createProcedureRequestDto);
        return localVarResp.getData();
    }

    /**
     *  Creates the procedure. 
     *  Creates the procedure. 
     * @param createProcedureRequestDto  postData the post data  (optional)
     * @return ApiResponse&lt;SignProcedureResponseDto&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>  the sign procedure response dto  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<SignProcedureResponseDto> pOSTDocumentSignProcedures1WithHttpInfo(CreateProcedureRequestDto createProcedureRequestDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTDocumentSignProcedures1ValidateBeforeCall(createProcedureRequestDto, null);
        Type localVarReturnType = new TypeToken<SignProcedureResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Creates the procedure.  (asynchronously)
     *  Creates the procedure. 
     * @param createProcedureRequestDto  postData the post 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>  the sign procedure response dto  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTDocumentSignProcedures1Async(CreateProcedureRequestDto createProcedureRequestDto, final ApiCallback<SignProcedureResponseDto> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = user43Call(_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 user43() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user43WithHttpInfo();
        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> user43WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user43ValidateBeforeCall(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 user43Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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