/*
 * 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.PagingAndFiltering;
import org.openapitools.client.model.UserHierarchyLevelDto;
import org.openapitools.client.model.UserHierarchyLevelResponseDto;
import org.openapitools.client.model.UserHierarchyLevelsDto;

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

public class UserHierarchyLevelApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for dELETEUserHierarchyLevelHierarchyLevelCode1
     * @param hierarchyLevelCode  hierarchyLevelCode The hierarchy level&#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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETEUserHierarchyLevelHierarchyLevelCode1Call(String hierarchyLevelCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

        okhttp3.Call localVarCall = dELETEUserHierarchyLevelHierarchyLevelCode1Call(hierarchyLevelCode, _callback);
        return localVarCall;

    }

    /**
     *  Remove an existing hierarchy level with a given code  
     *  Remove an existing hierarchy level with a given code  
     * @param hierarchyLevelCode  hierarchyLevelCode The hierarchy level&#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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus dELETEUserHierarchyLevelHierarchyLevelCode1(String hierarchyLevelCode) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETEUserHierarchyLevelHierarchyLevelCode1WithHttpInfo(hierarchyLevelCode);
        return localVarResp.getData();
    }

    /**
     *  Remove an existing hierarchy level with a given code  
     *  Remove an existing hierarchy level with a given code  
     * @param hierarchyLevelCode  hierarchyLevelCode The hierarchy level&#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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> dELETEUserHierarchyLevelHierarchyLevelCode1WithHttpInfo(String hierarchyLevelCode) throws ApiException {
        okhttp3.Call localVarCall = dELETEUserHierarchyLevelHierarchyLevelCode1ValidateBeforeCall(hierarchyLevelCode, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Remove an existing hierarchy level with a given code   (asynchronously)
     *  Remove an existing hierarchy level with a given code  
     * @param hierarchyLevelCode  hierarchyLevelCode The hierarchy level&#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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETEUserHierarchyLevelHierarchyLevelCode1Async(String hierarchyLevelCode, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = gETIBaseVersion78Call(_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 gETIBaseVersion78() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion78WithHttpInfo();
        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> gETIBaseVersion78WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion78ValidateBeforeCall(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 gETIBaseVersion78Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion78ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETUserHierarchyLevelList1
     * @param query  query Search criteria. Query is composed of the following: filterKey1:filterValue1|filterKey2:filterValue2  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma. Specify childLevels in fields to include the child levels of user hierarchy level.  (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;code&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 user hierarchy levels  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETUserHierarchyLevelList1Call(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 = "/hierarchy/userGroupLevel/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 gETUserHierarchyLevelList1ValidateBeforeCall(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback _callback) throws ApiException {
        

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

    }

    /**
     *  List user hierarchy levels matching a given criteria  
     *  List user hierarchy levels matching a given criteria  
     * @param query  query Search criteria. Query is composed of the following: filterKey1:filterValue1|filterKey2:filterValue2  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma. Specify childLevels in fields to include the child levels of user hierarchy level.  (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;code&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @return UserHierarchyLevelsDto
     * @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 user hierarchy levels  </td><td>  -  </td></tr>
     </table>
     */
    public UserHierarchyLevelsDto gETUserHierarchyLevelList1(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder) throws ApiException {
        ApiResponse<UserHierarchyLevelsDto> localVarResp = gETUserHierarchyLevelList1WithHttpInfo(query, fields, offset, limit, sortBy, sortOrder);
        return localVarResp.getData();
    }

    /**
     *  List user hierarchy levels matching a given criteria  
     *  List user hierarchy levels matching a given criteria  
     * @param query  query Search criteria. Query is composed of the following: filterKey1:filterValue1|filterKey2:filterValue2  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma. Specify childLevels in fields to include the child levels of user hierarchy level.  (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;code&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @return ApiResponse&lt;UserHierarchyLevelsDto&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 user hierarchy levels  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<UserHierarchyLevelsDto> gETUserHierarchyLevelList1WithHttpInfo(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder) throws ApiException {
        okhttp3.Call localVarCall = gETUserHierarchyLevelList1ValidateBeforeCall(query, fields, offset, limit, sortBy, sortOrder, null);
        Type localVarReturnType = new TypeToken<UserHierarchyLevelsDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  List user hierarchy levels matching a given criteria   (asynchronously)
     *  List user hierarchy levels matching a given criteria  
     * @param query  query Search criteria. Query is composed of the following: filterKey1:filterValue1|filterKey2:filterValue2  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma. Specify childLevels in fields to include the child levels of user hierarchy level.  (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;code&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 user hierarchy levels  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETUserHierarchyLevelList1Async(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback<UserHierarchyLevelsDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETUserHierarchyLevelList1ValidateBeforeCall(query, fields, offset, limit, sortBy, sortOrder, _callback);
        Type localVarReturnType = new TypeToken<UserHierarchyLevelsDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETUserHierarchyLevelSearch1
     * @param hierarchyLevelCode  hierarchyLevelCode the code to string  (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 UserHierarchyLevel given the hierarchyCode  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETUserHierarchyLevelSearch1Call(String hierarchyLevelCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/hierarchy/userGroupLevel";

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

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

        okhttp3.Call localVarCall = gETUserHierarchyLevelSearch1Call(hierarchyLevelCode, _callback);
        return localVarCall;

    }

    /**
     *  Search for a user group level with a given code.  
     *  Search for a user group level with a given code.  
     * @param hierarchyLevelCode  hierarchyLevelCode the code to string  (optional)
     * @return UserHierarchyLevelResponseDto
     * @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 UserHierarchyLevel given the hierarchyCode  </td><td>  -  </td></tr>
     </table>
     */
    public UserHierarchyLevelResponseDto gETUserHierarchyLevelSearch1(String hierarchyLevelCode) throws ApiException {
        ApiResponse<UserHierarchyLevelResponseDto> localVarResp = gETUserHierarchyLevelSearch1WithHttpInfo(hierarchyLevelCode);
        return localVarResp.getData();
    }

    /**
     *  Search for a user group level with a given code.  
     *  Search for a user group level with a given code.  
     * @param hierarchyLevelCode  hierarchyLevelCode the code to string  (optional)
     * @return ApiResponse&lt;UserHierarchyLevelResponseDto&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 UserHierarchyLevel given the hierarchyCode  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<UserHierarchyLevelResponseDto> gETUserHierarchyLevelSearch1WithHttpInfo(String hierarchyLevelCode) throws ApiException {
        okhttp3.Call localVarCall = gETUserHierarchyLevelSearch1ValidateBeforeCall(hierarchyLevelCode, null);
        Type localVarReturnType = new TypeToken<UserHierarchyLevelResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Search for a user group level with a given code.   (asynchronously)
     *  Search for a user group level with a given code.  
     * @param hierarchyLevelCode  hierarchyLevelCode the code to string  (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 UserHierarchyLevel given the hierarchyCode  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETUserHierarchyLevelSearch1Async(String hierarchyLevelCode, final ApiCallback<UserHierarchyLevelResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETUserHierarchyLevelSearch1ValidateBeforeCall(hierarchyLevelCode, _callback);
        Type localVarReturnType = new TypeToken<UserHierarchyLevelResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTUserHierarchyLevelCreate1
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTUserHierarchyLevelCreate1Call(UserHierarchyLevelDto userHierarchyLevelDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = userHierarchyLevelDto;

        // create path and map variables
        String localVarPath = "/hierarchy/userGroupLevel";

        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 pOSTUserHierarchyLevelCreate1ValidateBeforeCall(UserHierarchyLevelDto userHierarchyLevelDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTUserHierarchyLevelCreate1Call(userHierarchyLevelDto, _callback);
        return localVarCall;

    }

    /**
     *  Create a new user hierarchy level  
     *  Create a new user hierarchy level  
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTUserHierarchyLevelCreate1(UserHierarchyLevelDto userHierarchyLevelDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTUserHierarchyLevelCreate1WithHttpInfo(userHierarchyLevelDto);
        return localVarResp.getData();
    }

    /**
     *  Create a new user hierarchy level  
     *  Create a new user hierarchy level  
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTUserHierarchyLevelCreate1WithHttpInfo(UserHierarchyLevelDto userHierarchyLevelDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTUserHierarchyLevelCreate1ValidateBeforeCall(userHierarchyLevelDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create a new user hierarchy level   (asynchronously)
     *  Create a new user hierarchy level  
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTUserHierarchyLevelCreate1Async(UserHierarchyLevelDto userHierarchyLevelDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTUserHierarchyLevelCreate1ValidateBeforeCall(userHierarchyLevelDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTUserHierarchyLevelCreateOrUpdate1
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTUserHierarchyLevelCreateOrUpdate1Call(UserHierarchyLevelDto userHierarchyLevelDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = userHierarchyLevelDto;

        // create path and map variables
        String localVarPath = "/hierarchy/userGroupLevel/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 pOSTUserHierarchyLevelCreateOrUpdate1ValidateBeforeCall(UserHierarchyLevelDto userHierarchyLevelDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTUserHierarchyLevelCreateOrUpdate1Call(userHierarchyLevelDto, _callback);
        return localVarCall;

    }

    /**
     *  Create new or update an existing user hierarchy level with a given code  
     *  Create new or update an existing user hierarchy level with a given code  
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTUserHierarchyLevelCreateOrUpdate1(UserHierarchyLevelDto userHierarchyLevelDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTUserHierarchyLevelCreateOrUpdate1WithHttpInfo(userHierarchyLevelDto);
        return localVarResp.getData();
    }

    /**
     *  Create new or update an existing user hierarchy level with a given code  
     *  Create new or update an existing user hierarchy level with a given code  
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTUserHierarchyLevelCreateOrUpdate1WithHttpInfo(UserHierarchyLevelDto userHierarchyLevelDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTUserHierarchyLevelCreateOrUpdate1ValidateBeforeCall(userHierarchyLevelDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create new or update an existing user hierarchy level with a given code   (asynchronously)
     *  Create new or update an existing user hierarchy level with a given code  
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTUserHierarchyLevelCreateOrUpdate1Async(UserHierarchyLevelDto userHierarchyLevelDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTUserHierarchyLevelCreateOrUpdate1ValidateBeforeCall(userHierarchyLevelDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTUserHierarchyLevelList1
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering criteria. Specify childLevels in fields to include the child levels of user hierarchy level.  (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>  A list of user hierarchy levels  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTUserHierarchyLevelList1Call(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = pagingAndFiltering;

        // create path and map variables
        String localVarPath = "/hierarchy/userGroupLevel/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 pOSTUserHierarchyLevelList1ValidateBeforeCall(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        

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

    }

    /**
     *  List user hierarchy levels matching a given criteria  
     *  List user hierarchy levels matching a given criteria  
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering criteria. Specify childLevels in fields to include the child levels of user hierarchy level.  (optional)
     * @return UserHierarchyLevelsDto
     * @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 user hierarchy levels  </td><td>  -  </td></tr>
     </table>
     */
    public UserHierarchyLevelsDto pOSTUserHierarchyLevelList1(PagingAndFiltering pagingAndFiltering) throws ApiException {
        ApiResponse<UserHierarchyLevelsDto> localVarResp = pOSTUserHierarchyLevelList1WithHttpInfo(pagingAndFiltering);
        return localVarResp.getData();
    }

    /**
     *  List user hierarchy levels matching a given criteria  
     *  List user hierarchy levels matching a given criteria  
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering criteria. Specify childLevels in fields to include the child levels of user hierarchy level.  (optional)
     * @return ApiResponse&lt;UserHierarchyLevelsDto&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 user hierarchy levels  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<UserHierarchyLevelsDto> pOSTUserHierarchyLevelList1WithHttpInfo(PagingAndFiltering pagingAndFiltering) throws ApiException {
        okhttp3.Call localVarCall = pOSTUserHierarchyLevelList1ValidateBeforeCall(pagingAndFiltering, null);
        Type localVarReturnType = new TypeToken<UserHierarchyLevelsDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  List user hierarchy levels matching a given criteria   (asynchronously)
     *  List user hierarchy levels matching a given criteria  
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering criteria. Specify childLevels in fields to include the child levels of user hierarchy level.  (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>  A list of user hierarchy levels  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTUserHierarchyLevelList1Async(PagingAndFiltering pagingAndFiltering, final ApiCallback<UserHierarchyLevelsDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTUserHierarchyLevelList1ValidateBeforeCall(pagingAndFiltering, _callback);
        Type localVarReturnType = new TypeToken<UserHierarchyLevelsDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pUTUserHierarchyLevelUpdate1
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTUserHierarchyLevelUpdate1Call(UserHierarchyLevelDto userHierarchyLevelDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = userHierarchyLevelDto;

        // create path and map variables
        String localVarPath = "/hierarchy/userGroupLevel";

        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 pUTUserHierarchyLevelUpdate1ValidateBeforeCall(UserHierarchyLevelDto userHierarchyLevelDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pUTUserHierarchyLevelUpdate1Call(userHierarchyLevelDto, _callback);
        return localVarCall;

    }

    /**
     *  Update an existing user hierarchy level  
     *  Update an existing user hierarchy level  
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @return ActionStatus
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pUTUserHierarchyLevelUpdate1(UserHierarchyLevelDto userHierarchyLevelDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pUTUserHierarchyLevelUpdate1WithHttpInfo(userHierarchyLevelDto);
        return localVarResp.getData();
    }

    /**
     *  Update an existing user hierarchy level  
     *  Update an existing user hierarchy level  
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @return ApiResponse&lt;ActionStatus&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pUTUserHierarchyLevelUpdate1WithHttpInfo(UserHierarchyLevelDto userHierarchyLevelDto) throws ApiException {
        okhttp3.Call localVarCall = pUTUserHierarchyLevelUpdate1ValidateBeforeCall(userHierarchyLevelDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Update an existing user hierarchy level   (asynchronously)
     *  Update an existing user hierarchy level  
     * @param userHierarchyLevelDto  postData The user hierarchy level&#39;s data  (optional)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTUserHierarchyLevelUpdate1Async(UserHierarchyLevelDto userHierarchyLevelDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = user51Call(_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 user51() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user51WithHttpInfo();
        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> user51WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user51ValidateBeforeCall(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 user51Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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