/*
 * 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.GetListMeasurableQuantityResponse;
import org.openapitools.client.model.GetMeasurableQuantityResponse;
import org.openapitools.client.model.InlineResponseDefault;
import org.openapitools.client.model.MeasurableQuantityDto;
import org.threeten.bp.OffsetDateTime;

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

public class MeasurableQuantityApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

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

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

        okhttp3.Call localVarCall = dELETEMeasurableQuantityCode1Call(code, _callback);
        return localVarCall;

    }

    /**
     *  Remove Measurable quantity with a given code.  
     *  Remove Measurable quantity with a given code.  
     * @param code  code Measurable quantity&#39;s code  (required)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  action status.  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus dELETEMeasurableQuantityCode1(String code) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETEMeasurableQuantityCode1WithHttpInfo(code);
        return localVarResp.getData();
    }

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

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

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

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

        okhttp3.Call localVarCall = gETIBaseVersion70Call(_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 gETIBaseVersion70() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion70WithHttpInfo();
        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> gETIBaseVersion70WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion70ValidateBeforeCall(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 gETIBaseVersion70Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion70ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETMeasurableQuantityFindMVByDateAndPeriod1
     * @param code  code code of mesurable value.  (optional)
     * @param fromDate  fromDate format yyyy-MM-dd&#39;T&#39;HH:mm:ss or yyyy-MM-dd  (optional)
     * @param toDate  toDate format yyyy-MM-dd&#39;T&#39;HH:mm:ss or yyyy-MM-dd  (optional)
     * @param period  period period in which mesurable value is calculated.  (optional)
     * @param mqCode  mqCode Measureable quantity&#39;s code  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  mesurable value by date and period.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETMeasurableQuantityFindMVByDateAndPeriod1Call(String code, OffsetDateTime fromDate, OffsetDateTime toDate, String period, String mqCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/measurableQuantity/findMVByDateAndPeriod";

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

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

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

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

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

        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 gETMeasurableQuantityFindMVByDateAndPeriod1ValidateBeforeCall(String code, OffsetDateTime fromDate, OffsetDateTime toDate, String period, String mqCode, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETMeasurableQuantityFindMVByDateAndPeriod1Call(code, fromDate, toDate, period, mqCode, _callback);
        return localVarCall;

    }

    /**
     *  Find a Measurable value during a period of date and period 
     *  Find a Measurable value during a period of date and period 
     * @param code  code code of mesurable value.  (optional)
     * @param fromDate  fromDate format yyyy-MM-dd&#39;T&#39;HH:mm:ss or yyyy-MM-dd  (optional)
     * @param toDate  toDate format yyyy-MM-dd&#39;T&#39;HH:mm:ss or yyyy-MM-dd  (optional)
     * @param period  period period in which mesurable value is calculated.  (optional)
     * @param mqCode  mqCode Measureable quantity&#39;s code  (optional)
     * @return InlineResponseDefault
     * @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>  mesurable value by date and period.  </td><td>  -  </td></tr>
     </table>
     */
    public InlineResponseDefault gETMeasurableQuantityFindMVByDateAndPeriod1(String code, OffsetDateTime fromDate, OffsetDateTime toDate, String period, String mqCode) throws ApiException {
        ApiResponse<InlineResponseDefault> localVarResp = gETMeasurableQuantityFindMVByDateAndPeriod1WithHttpInfo(code, fromDate, toDate, period, mqCode);
        return localVarResp.getData();
    }

    /**
     *  Find a Measurable value during a period of date and period 
     *  Find a Measurable value during a period of date and period 
     * @param code  code code of mesurable value.  (optional)
     * @param fromDate  fromDate format yyyy-MM-dd&#39;T&#39;HH:mm:ss or yyyy-MM-dd  (optional)
     * @param toDate  toDate format yyyy-MM-dd&#39;T&#39;HH:mm:ss or yyyy-MM-dd  (optional)
     * @param period  period period in which mesurable value is calculated.  (optional)
     * @param mqCode  mqCode Measureable quantity&#39;s code  (optional)
     * @return ApiResponse&lt;InlineResponseDefault&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>  mesurable value by date and period.  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<InlineResponseDefault> gETMeasurableQuantityFindMVByDateAndPeriod1WithHttpInfo(String code, OffsetDateTime fromDate, OffsetDateTime toDate, String period, String mqCode) throws ApiException {
        okhttp3.Call localVarCall = gETMeasurableQuantityFindMVByDateAndPeriod1ValidateBeforeCall(code, fromDate, toDate, period, mqCode, null);
        Type localVarReturnType = new TypeToken<InlineResponseDefault>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Find a Measurable value during a period of date and period  (asynchronously)
     *  Find a Measurable value during a period of date and period 
     * @param code  code code of mesurable value.  (optional)
     * @param fromDate  fromDate format yyyy-MM-dd&#39;T&#39;HH:mm:ss or yyyy-MM-dd  (optional)
     * @param toDate  toDate format yyyy-MM-dd&#39;T&#39;HH:mm:ss or yyyy-MM-dd  (optional)
     * @param period  period period in which mesurable value is calculated.  (optional)
     * @param mqCode  mqCode Measureable quantity&#39;s code  (optional)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  mesurable value by date and period.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETMeasurableQuantityFindMVByDateAndPeriod1Async(String code, OffsetDateTime fromDate, OffsetDateTime toDate, String period, String mqCode, final ApiCallback<InlineResponseDefault> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETMeasurableQuantityFindMVByDateAndPeriod1ValidateBeforeCall(code, fromDate, toDate, period, mqCode, _callback);
        Type localVarReturnType = new TypeToken<InlineResponseDefault>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETMeasurableQuantityList1
     * @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 measurable quantities  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETMeasurableQuantityList1Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

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

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

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

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

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

    }

    /**
     *  List Measurable quantity with a given code.  
     *  List Measurable quantity with a given code.  
     * @return GetListMeasurableQuantityResponse
     * @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 measurable quantities  </td><td>  -  </td></tr>
     </table>
     */
    public GetListMeasurableQuantityResponse gETMeasurableQuantityList1() throws ApiException {
        ApiResponse<GetListMeasurableQuantityResponse> localVarResp = gETMeasurableQuantityList1WithHttpInfo();
        return localVarResp.getData();
    }

    /**
     *  List Measurable quantity with a given code.  
     *  List Measurable quantity with a given code.  
     * @return ApiResponse&lt;GetListMeasurableQuantityResponse&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 measurable quantities  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetListMeasurableQuantityResponse> gETMeasurableQuantityList1WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETMeasurableQuantityList1ValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<GetListMeasurableQuantityResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  List Measurable quantity with a given code.   (asynchronously)
     *  List Measurable quantity with a given code.  
     * @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 measurable quantities  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETMeasurableQuantityList1Async(final ApiCallback<GetListMeasurableQuantityResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETMeasurableQuantityList1ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<GetListMeasurableQuantityResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETMeasurableQuantitySearch1
     * @param code  code Measureable quantity&#39;s code  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Measurable Quantity Response data  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETMeasurableQuantitySearch1Call(String code, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

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

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

        okhttp3.Call localVarCall = gETMeasurableQuantitySearch1Call(code, _callback);
        return localVarCall;

    }

    /**
     *  Get Measurable quantity from a given code.  
     *  Get Measurable quantity from a given code.  
     * @param code  code Measureable quantity&#39;s code  (optional)
     * @return GetMeasurableQuantityResponse
     * @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>  Measurable Quantity Response data  </td><td>  -  </td></tr>
     </table>
     */
    public GetMeasurableQuantityResponse gETMeasurableQuantitySearch1(String code) throws ApiException {
        ApiResponse<GetMeasurableQuantityResponse> localVarResp = gETMeasurableQuantitySearch1WithHttpInfo(code);
        return localVarResp.getData();
    }

    /**
     *  Get Measurable quantity from a given code.  
     *  Get Measurable quantity from a given code.  
     * @param code  code Measureable quantity&#39;s code  (optional)
     * @return ApiResponse&lt;GetMeasurableQuantityResponse&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>  Measurable Quantity Response data  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetMeasurableQuantityResponse> gETMeasurableQuantitySearch1WithHttpInfo(String code) throws ApiException {
        okhttp3.Call localVarCall = gETMeasurableQuantitySearch1ValidateBeforeCall(code, null);
        Type localVarReturnType = new TypeToken<GetMeasurableQuantityResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Get Measurable quantity from a given code.   (asynchronously)
     *  Get Measurable quantity from a given code.  
     * @param code  code Measureable quantity&#39;s code  (optional)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Measurable Quantity Response data  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETMeasurableQuantitySearch1Async(String code, final ApiCallback<GetMeasurableQuantityResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETMeasurableQuantitySearch1ValidateBeforeCall(code, _callback);
        Type localVarReturnType = new TypeToken<GetMeasurableQuantityResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTMeasurableQuantityCodeDisable1
     * @param code  code Measurable quantity code  (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTMeasurableQuantityCodeDisable1Call(String code, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

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

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

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

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

        okhttp3.Call localVarCall = pOSTMeasurableQuantityCodeDisable1Call(code, _callback);
        return localVarCall;

    }

    /**
     *  Disable a Measurable quantity with a given code  
     *  Disable a Measurable quantity with a given code  
     * @param code  code Measurable quantity code  (required)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTMeasurableQuantityCodeDisable1(String code) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTMeasurableQuantityCodeDisable1WithHttpInfo(code);
        return localVarResp.getData();
    }

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

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

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

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

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

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

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

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

        okhttp3.Call localVarCall = pOSTMeasurableQuantityCodeEnable1Call(code, _callback);
        return localVarCall;

    }

    /**
     *  Enable a Measurable quantity with a given code  
     *  Enable a Measurable quantity with a given code  
     * @param code  code Measurable quantity code  (required)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTMeasurableQuantityCodeEnable1(String code) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTMeasurableQuantityCodeEnable1WithHttpInfo(code);
        return localVarResp.getData();
    }

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

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

        okhttp3.Call localVarCall = pOSTMeasurableQuantityCodeEnable1ValidateBeforeCall(code, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTMeasurableQuantityCreate1
     * @param measurableQuantityDto  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 pOSTMeasurableQuantityCreate1Call(MeasurableQuantityDto measurableQuantityDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = measurableQuantityDto;

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

        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 pOSTMeasurableQuantityCreate1ValidateBeforeCall(MeasurableQuantityDto measurableQuantityDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTMeasurableQuantityCreate1Call(measurableQuantityDto, _callback);
        return localVarCall;

    }

    /**
     *  Create a Measurable quantity. 
     *  Create a Measurable quantity. 
     * @param measurableQuantityDto  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 pOSTMeasurableQuantityCreate1(MeasurableQuantityDto measurableQuantityDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTMeasurableQuantityCreate1WithHttpInfo(measurableQuantityDto);
        return localVarResp.getData();
    }

    /**
     *  Create a Measurable quantity. 
     *  Create a Measurable quantity. 
     * @param measurableQuantityDto  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> pOSTMeasurableQuantityCreate1WithHttpInfo(MeasurableQuantityDto measurableQuantityDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTMeasurableQuantityCreate1ValidateBeforeCall(measurableQuantityDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create a Measurable quantity.  (asynchronously)
     *  Create a Measurable quantity. 
     * @param measurableQuantityDto  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 pOSTMeasurableQuantityCreate1Async(MeasurableQuantityDto measurableQuantityDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTMeasurableQuantityCreate1ValidateBeforeCall(measurableQuantityDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pUTMeasurableQuantityUpdate1
     * @param measurableQuantityDto  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>  actions status.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTMeasurableQuantityUpdate1Call(MeasurableQuantityDto measurableQuantityDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = measurableQuantityDto;

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

        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 pUTMeasurableQuantityUpdate1ValidateBeforeCall(MeasurableQuantityDto measurableQuantityDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pUTMeasurableQuantityUpdate1Call(measurableQuantityDto, _callback);
        return localVarCall;

    }

    /**
     *  Update Measurable quantity from mesearable quantities.  
     *  Update Measurable quantity from mesearable quantities.  
     * @param measurableQuantityDto  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>  actions status.  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pUTMeasurableQuantityUpdate1(MeasurableQuantityDto measurableQuantityDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pUTMeasurableQuantityUpdate1WithHttpInfo(measurableQuantityDto);
        return localVarResp.getData();
    }

    /**
     *  Update Measurable quantity from mesearable quantities.  
     *  Update Measurable quantity from mesearable quantities.  
     * @param measurableQuantityDto  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>  actions status.  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pUTMeasurableQuantityUpdate1WithHttpInfo(MeasurableQuantityDto measurableQuantityDto) throws ApiException {
        okhttp3.Call localVarCall = pUTMeasurableQuantityUpdate1ValidateBeforeCall(measurableQuantityDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Update Measurable quantity from mesearable quantities.   (asynchronously)
     *  Update Measurable quantity from mesearable quantities.  
     * @param measurableQuantityDto  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>  actions status.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTMeasurableQuantityUpdate1Async(MeasurableQuantityDto measurableQuantityDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = user47Call(_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 user47() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user47WithHttpInfo();
        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> user47WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user47ValidateBeforeCall(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 user47Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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