/*
 * Daytona
 * Daytona AI platform API Docs
 *
 * The version of the OpenAPI document: 1.0
 * Contact: support@daytona.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package io.daytona.api.client.api;

import io.daytona.api.client.ApiCallback;
import io.daytona.api.client.ApiClient;
import io.daytona.api.client.ApiException;
import io.daytona.api.client.ApiResponse;
import io.daytona.api.client.Configuration;
import io.daytona.api.client.Pair;
import io.daytona.api.client.ProgressRequestBody;
import io.daytona.api.client.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import java.math.BigDecimal;
import io.daytona.api.client.model.CreateOrganization;
import io.daytona.api.client.model.CreateOrganizationInvitation;
import io.daytona.api.client.model.CreateOrganizationRole;
import io.daytona.api.client.model.CreateRegion;
import io.daytona.api.client.model.CreateRegionResponse;
import io.daytona.api.client.model.Organization;
import io.daytona.api.client.model.OrganizationInvitation;
import io.daytona.api.client.model.OrganizationRole;
import io.daytona.api.client.model.OrganizationSandboxDefaultLimitedNetworkEgress;
import io.daytona.api.client.model.OrganizationSuspension;
import io.daytona.api.client.model.OrganizationUsageOverview;
import io.daytona.api.client.model.OrganizationUser;
import io.daytona.api.client.model.OtelConfig;
import io.daytona.api.client.model.RegenerateApiKeyResponse;
import io.daytona.api.client.model.Region;
import io.daytona.api.client.model.SnapshotManagerCredentials;
import io.daytona.api.client.model.UpdateOrganizationDefaultRegion;
import io.daytona.api.client.model.UpdateOrganizationInvitation;
import io.daytona.api.client.model.UpdateOrganizationMemberAccess;
import io.daytona.api.client.model.UpdateOrganizationQuota;
import io.daytona.api.client.model.UpdateOrganizationRegionQuota;
import io.daytona.api.client.model.UpdateOrganizationRole;
import io.daytona.api.client.model.UpdateRegion;

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

public class OrganizationsApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    /**
     * Build call for acceptOrganizationInvitation
     * @param invitationId Invitation ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation accepted successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call acceptOrganizationInvitationCall(@javax.annotation.Nonnull String invitationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/invitations/{invitationId}/accept"
            .replace("{" + "invitationId" + "}", localVarApiClient.escapeString(invitationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return acceptOrganizationInvitationCall(invitationId, _callback);

    }

    /**
     * Accept organization invitation
     * 
     * @param invitationId Invitation ID (required)
     * @return OrganizationInvitation
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation accepted successfully </td><td>  -  </td></tr>
     </table>
     */
    public OrganizationInvitation acceptOrganizationInvitation(@javax.annotation.Nonnull String invitationId) throws ApiException {
        ApiResponse<OrganizationInvitation> localVarResp = acceptOrganizationInvitationWithHttpInfo(invitationId);
        return localVarResp.getData();
    }

    /**
     * Accept organization invitation
     * 
     * @param invitationId Invitation ID (required)
     * @return ApiResponse&lt;OrganizationInvitation&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation accepted successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<OrganizationInvitation> acceptOrganizationInvitationWithHttpInfo(@javax.annotation.Nonnull String invitationId) throws ApiException {
        okhttp3.Call localVarCall = acceptOrganizationInvitationValidateBeforeCall(invitationId, null);
        Type localVarReturnType = new TypeToken<OrganizationInvitation>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Accept organization invitation (asynchronously)
     * 
     * @param invitationId Invitation ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation accepted successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call acceptOrganizationInvitationAsync(@javax.annotation.Nonnull String invitationId, final ApiCallback<OrganizationInvitation> _callback) throws ApiException {

        okhttp3.Call localVarCall = acceptOrganizationInvitationValidateBeforeCall(invitationId, _callback);
        Type localVarReturnType = new TypeToken<OrganizationInvitation>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for cancelOrganizationInvitation
     * @param organizationId Organization ID (required)
     * @param invitationId Invitation ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization invitation cancelled successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call cancelOrganizationInvitationCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String invitationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/invitations/{invitationId}/cancel"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()))
            .replace("{" + "invitationId" + "}", localVarApiClient.escapeString(invitationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call cancelOrganizationInvitationValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String invitationId, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling cancelOrganizationInvitation(Async)");
        }

        // verify the required parameter 'invitationId' is set
        if (invitationId == null) {
            throw new ApiException("Missing the required parameter 'invitationId' when calling cancelOrganizationInvitation(Async)");
        }

        return cancelOrganizationInvitationCall(organizationId, invitationId, _callback);

    }

    /**
     * Cancel organization invitation
     * 
     * @param organizationId Organization ID (required)
     * @param invitationId Invitation ID (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization invitation cancelled successfully </td><td>  -  </td></tr>
     </table>
     */
    public void cancelOrganizationInvitation(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String invitationId) throws ApiException {
        cancelOrganizationInvitationWithHttpInfo(organizationId, invitationId);
    }

    /**
     * Cancel organization invitation
     * 
     * @param organizationId Organization ID (required)
     * @param invitationId Invitation ID (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization invitation cancelled successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> cancelOrganizationInvitationWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String invitationId) throws ApiException {
        okhttp3.Call localVarCall = cancelOrganizationInvitationValidateBeforeCall(organizationId, invitationId, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Cancel organization invitation (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param invitationId Invitation ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization invitation cancelled successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call cancelOrganizationInvitationAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String invitationId, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = cancelOrganizationInvitationValidateBeforeCall(organizationId, invitationId, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for createOrganization
     * @param createOrganization  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization created successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createOrganizationCall(@javax.annotation.Nonnull CreateOrganization createOrganization, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = createOrganization;

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

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call createOrganizationValidateBeforeCall(@javax.annotation.Nonnull CreateOrganization createOrganization, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'createOrganization' is set
        if (createOrganization == null) {
            throw new ApiException("Missing the required parameter 'createOrganization' when calling createOrganization(Async)");
        }

        return createOrganizationCall(createOrganization, _callback);

    }

    /**
     * Create organization
     * 
     * @param createOrganization  (required)
     * @return Organization
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization created successfully </td><td>  -  </td></tr>
     </table>
     */
    public Organization createOrganization(@javax.annotation.Nonnull CreateOrganization createOrganization) throws ApiException {
        ApiResponse<Organization> localVarResp = createOrganizationWithHttpInfo(createOrganization);
        return localVarResp.getData();
    }

    /**
     * Create organization
     * 
     * @param createOrganization  (required)
     * @return ApiResponse&lt;Organization&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization created successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Organization> createOrganizationWithHttpInfo(@javax.annotation.Nonnull CreateOrganization createOrganization) throws ApiException {
        okhttp3.Call localVarCall = createOrganizationValidateBeforeCall(createOrganization, null);
        Type localVarReturnType = new TypeToken<Organization>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Create organization (asynchronously)
     * 
     * @param createOrganization  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization created successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createOrganizationAsync(@javax.annotation.Nonnull CreateOrganization createOrganization, final ApiCallback<Organization> _callback) throws ApiException {

        okhttp3.Call localVarCall = createOrganizationValidateBeforeCall(createOrganization, _callback);
        Type localVarReturnType = new TypeToken<Organization>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for createOrganizationInvitation
     * @param organizationId Organization ID (required)
     * @param createOrganizationInvitation  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization invitation created successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createOrganizationInvitationCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull CreateOrganizationInvitation createOrganizationInvitation, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = createOrganizationInvitation;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/invitations"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call createOrganizationInvitationValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull CreateOrganizationInvitation createOrganizationInvitation, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling createOrganizationInvitation(Async)");
        }

        // verify the required parameter 'createOrganizationInvitation' is set
        if (createOrganizationInvitation == null) {
            throw new ApiException("Missing the required parameter 'createOrganizationInvitation' when calling createOrganizationInvitation(Async)");
        }

        return createOrganizationInvitationCall(organizationId, createOrganizationInvitation, _callback);

    }

    /**
     * Create organization invitation
     * 
     * @param organizationId Organization ID (required)
     * @param createOrganizationInvitation  (required)
     * @return OrganizationInvitation
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization invitation created successfully </td><td>  -  </td></tr>
     </table>
     */
    public OrganizationInvitation createOrganizationInvitation(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull CreateOrganizationInvitation createOrganizationInvitation) throws ApiException {
        ApiResponse<OrganizationInvitation> localVarResp = createOrganizationInvitationWithHttpInfo(organizationId, createOrganizationInvitation);
        return localVarResp.getData();
    }

    /**
     * Create organization invitation
     * 
     * @param organizationId Organization ID (required)
     * @param createOrganizationInvitation  (required)
     * @return ApiResponse&lt;OrganizationInvitation&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization invitation created successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<OrganizationInvitation> createOrganizationInvitationWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull CreateOrganizationInvitation createOrganizationInvitation) throws ApiException {
        okhttp3.Call localVarCall = createOrganizationInvitationValidateBeforeCall(organizationId, createOrganizationInvitation, null);
        Type localVarReturnType = new TypeToken<OrganizationInvitation>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Create organization invitation (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param createOrganizationInvitation  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization invitation created successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createOrganizationInvitationAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull CreateOrganizationInvitation createOrganizationInvitation, final ApiCallback<OrganizationInvitation> _callback) throws ApiException {

        okhttp3.Call localVarCall = createOrganizationInvitationValidateBeforeCall(organizationId, createOrganizationInvitation, _callback);
        Type localVarReturnType = new TypeToken<OrganizationInvitation>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for createOrganizationRole
     * @param organizationId Organization ID (required)
     * @param createOrganizationRole  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization role created successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createOrganizationRoleCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull CreateOrganizationRole createOrganizationRole, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = createOrganizationRole;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/roles"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call createOrganizationRoleValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull CreateOrganizationRole createOrganizationRole, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling createOrganizationRole(Async)");
        }

        // verify the required parameter 'createOrganizationRole' is set
        if (createOrganizationRole == null) {
            throw new ApiException("Missing the required parameter 'createOrganizationRole' when calling createOrganizationRole(Async)");
        }

        return createOrganizationRoleCall(organizationId, createOrganizationRole, _callback);

    }

    /**
     * Create organization role
     * 
     * @param organizationId Organization ID (required)
     * @param createOrganizationRole  (required)
     * @return OrganizationRole
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization role created successfully </td><td>  -  </td></tr>
     </table>
     */
    public OrganizationRole createOrganizationRole(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull CreateOrganizationRole createOrganizationRole) throws ApiException {
        ApiResponse<OrganizationRole> localVarResp = createOrganizationRoleWithHttpInfo(organizationId, createOrganizationRole);
        return localVarResp.getData();
    }

    /**
     * Create organization role
     * 
     * @param organizationId Organization ID (required)
     * @param createOrganizationRole  (required)
     * @return ApiResponse&lt;OrganizationRole&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization role created successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<OrganizationRole> createOrganizationRoleWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull CreateOrganizationRole createOrganizationRole) throws ApiException {
        okhttp3.Call localVarCall = createOrganizationRoleValidateBeforeCall(organizationId, createOrganizationRole, null);
        Type localVarReturnType = new TypeToken<OrganizationRole>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Create organization role (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param createOrganizationRole  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> Organization role created successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createOrganizationRoleAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull CreateOrganizationRole createOrganizationRole, final ApiCallback<OrganizationRole> _callback) throws ApiException {

        okhttp3.Call localVarCall = createOrganizationRoleValidateBeforeCall(organizationId, createOrganizationRole, _callback);
        Type localVarReturnType = new TypeToken<OrganizationRole>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for createRegion
     * @param createRegion  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> The region has been successfully created. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createRegionCall(@javax.annotation.Nonnull CreateRegion createRegion, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = createRegion;

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

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        if (xDaytonaOrganizationID != null) {
            localVarHeaderParams.put("X-Daytona-Organization-ID", localVarApiClient.parameterToString(xDaytonaOrganizationID));
        }


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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call createRegionValidateBeforeCall(@javax.annotation.Nonnull CreateRegion createRegion, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'createRegion' is set
        if (createRegion == null) {
            throw new ApiException("Missing the required parameter 'createRegion' when calling createRegion(Async)");
        }

        return createRegionCall(createRegion, xDaytonaOrganizationID, _callback);

    }

    /**
     * Create a new region
     * 
     * @param createRegion  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return CreateRegionResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> The region has been successfully created. </td><td>  -  </td></tr>
     </table>
     */
    public CreateRegionResponse createRegion(@javax.annotation.Nonnull CreateRegion createRegion, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<CreateRegionResponse> localVarResp = createRegionWithHttpInfo(createRegion, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Create a new region
     * 
     * @param createRegion  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;CreateRegionResponse&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> The region has been successfully created. </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<CreateRegionResponse> createRegionWithHttpInfo(@javax.annotation.Nonnull CreateRegion createRegion, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = createRegionValidateBeforeCall(createRegion, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<CreateRegionResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Create a new region (asynchronously)
     * 
     * @param createRegion  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 201 </td><td> The region has been successfully created. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createRegionAsync(@javax.annotation.Nonnull CreateRegion createRegion, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<CreateRegionResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = createRegionValidateBeforeCall(createRegion, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<CreateRegionResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for declineOrganizationInvitation
     * @param invitationId Invitation ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation declined successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call declineOrganizationInvitationCall(@javax.annotation.Nonnull String invitationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/invitations/{invitationId}/decline"
            .replace("{" + "invitationId" + "}", localVarApiClient.escapeString(invitationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return declineOrganizationInvitationCall(invitationId, _callback);

    }

    /**
     * Decline organization invitation
     * 
     * @param invitationId Invitation ID (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation declined successfully </td><td>  -  </td></tr>
     </table>
     */
    public void declineOrganizationInvitation(@javax.annotation.Nonnull String invitationId) throws ApiException {
        declineOrganizationInvitationWithHttpInfo(invitationId);
    }

    /**
     * Decline organization invitation
     * 
     * @param invitationId Invitation ID (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation declined successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> declineOrganizationInvitationWithHttpInfo(@javax.annotation.Nonnull String invitationId) throws ApiException {
        okhttp3.Call localVarCall = declineOrganizationInvitationValidateBeforeCall(invitationId, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Decline organization invitation (asynchronously)
     * 
     * @param invitationId Invitation ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation declined successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call declineOrganizationInvitationAsync(@javax.annotation.Nonnull String invitationId, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = declineOrganizationInvitationValidateBeforeCall(invitationId, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for deleteOrganization
     * @param organizationId Organization ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteOrganizationCall(@javax.annotation.Nonnull String organizationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        return deleteOrganizationCall(organizationId, _callback);

    }

    /**
     * Delete organization
     * 
     * @param organizationId Organization ID (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public void deleteOrganization(@javax.annotation.Nonnull String organizationId) throws ApiException {
        deleteOrganizationWithHttpInfo(organizationId);
    }

    /**
     * Delete organization
     * 
     * @param organizationId Organization ID (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> deleteOrganizationWithHttpInfo(@javax.annotation.Nonnull String organizationId) throws ApiException {
        okhttp3.Call localVarCall = deleteOrganizationValidateBeforeCall(organizationId, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Delete organization (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteOrganizationAsync(@javax.annotation.Nonnull String organizationId, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = deleteOrganizationValidateBeforeCall(organizationId, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for deleteOrganizationMember
     * @param organizationId Organization ID (required)
     * @param userId User ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> User removed from organization successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteOrganizationMemberCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/users/{userId}"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()))
            .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call deleteOrganizationMemberValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling deleteOrganizationMember(Async)");
        }

        // verify the required parameter 'userId' is set
        if (userId == null) {
            throw new ApiException("Missing the required parameter 'userId' when calling deleteOrganizationMember(Async)");
        }

        return deleteOrganizationMemberCall(organizationId, userId, _callback);

    }

    /**
     * Delete organization member
     * 
     * @param organizationId Organization ID (required)
     * @param userId User ID (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> User removed from organization successfully </td><td>  -  </td></tr>
     </table>
     */
    public void deleteOrganizationMember(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String userId) throws ApiException {
        deleteOrganizationMemberWithHttpInfo(organizationId, userId);
    }

    /**
     * Delete organization member
     * 
     * @param organizationId Organization ID (required)
     * @param userId User ID (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> User removed from organization successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> deleteOrganizationMemberWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String userId) throws ApiException {
        okhttp3.Call localVarCall = deleteOrganizationMemberValidateBeforeCall(organizationId, userId, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Delete organization member (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param userId User ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> User removed from organization successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteOrganizationMemberAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String userId, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = deleteOrganizationMemberValidateBeforeCall(organizationId, userId, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for deleteOrganizationOtelConfig
     * @param organizationId Organization ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> OpenTelemetry configuration deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteOrganizationOtelConfigCall(@javax.annotation.Nonnull String organizationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/otel-config"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        return deleteOrganizationOtelConfigCall(organizationId, _callback);

    }

    /**
     * Delete organization OpenTelemetry configuration
     * 
     * @param organizationId Organization ID (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> OpenTelemetry configuration deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public void deleteOrganizationOtelConfig(@javax.annotation.Nonnull String organizationId) throws ApiException {
        deleteOrganizationOtelConfigWithHttpInfo(organizationId);
    }

    /**
     * Delete organization OpenTelemetry configuration
     * 
     * @param organizationId Organization ID (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> OpenTelemetry configuration deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> deleteOrganizationOtelConfigWithHttpInfo(@javax.annotation.Nonnull String organizationId) throws ApiException {
        okhttp3.Call localVarCall = deleteOrganizationOtelConfigValidateBeforeCall(organizationId, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Delete organization OpenTelemetry configuration (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> OpenTelemetry configuration deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteOrganizationOtelConfigAsync(@javax.annotation.Nonnull String organizationId, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = deleteOrganizationOtelConfigValidateBeforeCall(organizationId, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for deleteOrganizationRole
     * @param organizationId Organization ID (required)
     * @param roleId Role ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization role deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteOrganizationRoleCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String roleId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/roles/{roleId}"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()))
            .replace("{" + "roleId" + "}", localVarApiClient.escapeString(roleId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call deleteOrganizationRoleValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String roleId, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling deleteOrganizationRole(Async)");
        }

        // verify the required parameter 'roleId' is set
        if (roleId == null) {
            throw new ApiException("Missing the required parameter 'roleId' when calling deleteOrganizationRole(Async)");
        }

        return deleteOrganizationRoleCall(organizationId, roleId, _callback);

    }

    /**
     * Delete organization role
     * 
     * @param organizationId Organization ID (required)
     * @param roleId Role ID (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization role deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public void deleteOrganizationRole(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String roleId) throws ApiException {
        deleteOrganizationRoleWithHttpInfo(organizationId, roleId);
    }

    /**
     * Delete organization role
     * 
     * @param organizationId Organization ID (required)
     * @param roleId Role ID (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization role deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> deleteOrganizationRoleWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String roleId) throws ApiException {
        okhttp3.Call localVarCall = deleteOrganizationRoleValidateBeforeCall(organizationId, roleId, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Delete organization role (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param roleId Role ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization role deleted successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteOrganizationRoleAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String roleId, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = deleteOrganizationRoleValidateBeforeCall(organizationId, roleId, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for deleteRegion
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> The region has been successfully deleted. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteRegionCall(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/regions/{id}"
            .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        if (xDaytonaOrganizationID != null) {
            localVarHeaderParams.put("X-Daytona-Organization-ID", localVarApiClient.parameterToString(xDaytonaOrganizationID));
        }


        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        return deleteRegionCall(id, xDaytonaOrganizationID, _callback);

    }

    /**
     * Delete a region
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> The region has been successfully deleted. </td><td>  -  </td></tr>
     </table>
     */
    public void deleteRegion(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        deleteRegionWithHttpInfo(id, xDaytonaOrganizationID);
    }

    /**
     * Delete a region
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> The region has been successfully deleted. </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> deleteRegionWithHttpInfo(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = deleteRegionValidateBeforeCall(id, xDaytonaOrganizationID, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Delete a region (asynchronously)
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> The region has been successfully deleted. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteRegionAsync(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = deleteRegionValidateBeforeCall(id, xDaytonaOrganizationID, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for getOrganization
     * @param organizationId Organization ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization details </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationCall(@javax.annotation.Nonnull String organizationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return getOrganizationCall(organizationId, _callback);

    }

    /**
     * Get organization by ID
     * 
     * @param organizationId Organization ID (required)
     * @return Organization
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization details </td><td>  -  </td></tr>
     </table>
     */
    public Organization getOrganization(@javax.annotation.Nonnull String organizationId) throws ApiException {
        ApiResponse<Organization> localVarResp = getOrganizationWithHttpInfo(organizationId);
        return localVarResp.getData();
    }

    /**
     * Get organization by ID
     * 
     * @param organizationId Organization ID (required)
     * @return ApiResponse&lt;Organization&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization details </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Organization> getOrganizationWithHttpInfo(@javax.annotation.Nonnull String organizationId) throws ApiException {
        okhttp3.Call localVarCall = getOrganizationValidateBeforeCall(organizationId, null);
        Type localVarReturnType = new TypeToken<Organization>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get organization by ID (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization details </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationAsync(@javax.annotation.Nonnull String organizationId, final ApiCallback<Organization> _callback) throws ApiException {

        okhttp3.Call localVarCall = getOrganizationValidateBeforeCall(organizationId, _callback);
        Type localVarReturnType = new TypeToken<Organization>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getOrganizationInvitationsCountForAuthenticatedUser
     * @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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Count of organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationInvitationsCountForAuthenticatedUserCall(final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/invitations/count";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getOrganizationInvitationsCountForAuthenticatedUserValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        return getOrganizationInvitationsCountForAuthenticatedUserCall(_callback);

    }

    /**
     * Get count of organization invitations for authenticated user
     * 
     * @return BigDecimal
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Count of organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public BigDecimal getOrganizationInvitationsCountForAuthenticatedUser() throws ApiException {
        ApiResponse<BigDecimal> localVarResp = getOrganizationInvitationsCountForAuthenticatedUserWithHttpInfo();
        return localVarResp.getData();
    }

    /**
     * Get count of organization invitations for authenticated user
     * 
     * @return ApiResponse&lt;BigDecimal&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Count of organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<BigDecimal> getOrganizationInvitationsCountForAuthenticatedUserWithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = getOrganizationInvitationsCountForAuthenticatedUserValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<BigDecimal>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get count of organization invitations for authenticated user (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Count of organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationInvitationsCountForAuthenticatedUserAsync(final ApiCallback<BigDecimal> _callback) throws ApiException {

        okhttp3.Call localVarCall = getOrganizationInvitationsCountForAuthenticatedUserValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<BigDecimal>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getOrganizationOtelConfig
     * @param organizationId Organization ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OTEL Config </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationOtelConfigCall(@javax.annotation.Nonnull String organizationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/otel-config"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return getOrganizationOtelConfigCall(organizationId, _callback);

    }

    /**
     * Get organization OTEL config by organization ID
     * 
     * @param organizationId Organization ID (required)
     * @return OtelConfig
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OTEL Config </td><td>  -  </td></tr>
     </table>
     */
    public OtelConfig getOrganizationOtelConfig(@javax.annotation.Nonnull String organizationId) throws ApiException {
        ApiResponse<OtelConfig> localVarResp = getOrganizationOtelConfigWithHttpInfo(organizationId);
        return localVarResp.getData();
    }

    /**
     * Get organization OTEL config by organization ID
     * 
     * @param organizationId Organization ID (required)
     * @return ApiResponse&lt;OtelConfig&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OTEL Config </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<OtelConfig> getOrganizationOtelConfigWithHttpInfo(@javax.annotation.Nonnull String organizationId) throws ApiException {
        okhttp3.Call localVarCall = getOrganizationOtelConfigValidateBeforeCall(organizationId, null);
        Type localVarReturnType = new TypeToken<OtelConfig>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get organization OTEL config by organization ID (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OTEL Config </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationOtelConfigAsync(@javax.annotation.Nonnull String organizationId, final ApiCallback<OtelConfig> _callback) throws ApiException {

        okhttp3.Call localVarCall = getOrganizationOtelConfigValidateBeforeCall(organizationId, _callback);
        Type localVarReturnType = new TypeToken<OtelConfig>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getOrganizationOtelConfigBySandboxAuthToken
     * @param authToken Sandbox Auth Token (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OTEL Config </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationOtelConfigBySandboxAuthTokenCall(@javax.annotation.Nonnull String authToken, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/otel-config/by-sandbox-auth-token/{authToken}"
            .replace("{" + "authToken" + "}", localVarApiClient.escapeString(authToken.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return getOrganizationOtelConfigBySandboxAuthTokenCall(authToken, _callback);

    }

    /**
     * Get organization OTEL config by sandbox auth token
     * 
     * @param authToken Sandbox Auth Token (required)
     * @return OtelConfig
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OTEL Config </td><td>  -  </td></tr>
     </table>
     */
    public OtelConfig getOrganizationOtelConfigBySandboxAuthToken(@javax.annotation.Nonnull String authToken) throws ApiException {
        ApiResponse<OtelConfig> localVarResp = getOrganizationOtelConfigBySandboxAuthTokenWithHttpInfo(authToken);
        return localVarResp.getData();
    }

    /**
     * Get organization OTEL config by sandbox auth token
     * 
     * @param authToken Sandbox Auth Token (required)
     * @return ApiResponse&lt;OtelConfig&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OTEL Config </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<OtelConfig> getOrganizationOtelConfigBySandboxAuthTokenWithHttpInfo(@javax.annotation.Nonnull String authToken) throws ApiException {
        okhttp3.Call localVarCall = getOrganizationOtelConfigBySandboxAuthTokenValidateBeforeCall(authToken, null);
        Type localVarReturnType = new TypeToken<OtelConfig>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get organization OTEL config by sandbox auth token (asynchronously)
     * 
     * @param authToken Sandbox Auth Token (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OTEL Config </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationOtelConfigBySandboxAuthTokenAsync(@javax.annotation.Nonnull String authToken, final ApiCallback<OtelConfig> _callback) throws ApiException {

        okhttp3.Call localVarCall = getOrganizationOtelConfigBySandboxAuthTokenValidateBeforeCall(authToken, _callback);
        Type localVarReturnType = new TypeToken<OtelConfig>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getOrganizationUsageOverview
     * @param organizationId Organization ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Current usage overview </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationUsageOverviewCall(@javax.annotation.Nonnull String organizationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/usage"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return getOrganizationUsageOverviewCall(organizationId, _callback);

    }

    /**
     * Get organization current usage overview
     * 
     * @param organizationId Organization ID (required)
     * @return OrganizationUsageOverview
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Current usage overview </td><td>  -  </td></tr>
     </table>
     */
    public OrganizationUsageOverview getOrganizationUsageOverview(@javax.annotation.Nonnull String organizationId) throws ApiException {
        ApiResponse<OrganizationUsageOverview> localVarResp = getOrganizationUsageOverviewWithHttpInfo(organizationId);
        return localVarResp.getData();
    }

    /**
     * Get organization current usage overview
     * 
     * @param organizationId Organization ID (required)
     * @return ApiResponse&lt;OrganizationUsageOverview&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Current usage overview </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<OrganizationUsageOverview> getOrganizationUsageOverviewWithHttpInfo(@javax.annotation.Nonnull String organizationId) throws ApiException {
        okhttp3.Call localVarCall = getOrganizationUsageOverviewValidateBeforeCall(organizationId, null);
        Type localVarReturnType = new TypeToken<OrganizationUsageOverview>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get organization current usage overview (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Current usage overview </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationUsageOverviewAsync(@javax.annotation.Nonnull String organizationId, final ApiCallback<OrganizationUsageOverview> _callback) throws ApiException {

        okhttp3.Call localVarCall = getOrganizationUsageOverviewValidateBeforeCall(organizationId, _callback);
        Type localVarReturnType = new TypeToken<OrganizationUsageOverview>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getRegionById
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getRegionByIdCall(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/regions/{id}"
            .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        if (xDaytonaOrganizationID != null) {
            localVarHeaderParams.put("X-Daytona-Organization-ID", localVarApiClient.parameterToString(xDaytonaOrganizationID));
        }


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

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

        return getRegionByIdCall(id, xDaytonaOrganizationID, _callback);

    }

    /**
     * Get region by ID
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Region
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public Region getRegionById(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Region> localVarResp = getRegionByIdWithHttpInfo(id, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Get region by ID
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Region&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Region> getRegionByIdWithHttpInfo(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = getRegionByIdValidateBeforeCall(id, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Region>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get region by ID (asynchronously)
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getRegionByIdAsync(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Region> _callback) throws ApiException {

        okhttp3.Call localVarCall = getRegionByIdValidateBeforeCall(id, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Region>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for leaveOrganization
     * @param organizationId Organization ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization left successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call leaveOrganizationCall(@javax.annotation.Nonnull String organizationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/leave"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return leaveOrganizationCall(organizationId, _callback);

    }

    /**
     * Leave organization
     * 
     * @param organizationId Organization ID (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization left successfully </td><td>  -  </td></tr>
     </table>
     */
    public void leaveOrganization(@javax.annotation.Nonnull String organizationId) throws ApiException {
        leaveOrganizationWithHttpInfo(organizationId);
    }

    /**
     * Leave organization
     * 
     * @param organizationId Organization ID (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization left successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> leaveOrganizationWithHttpInfo(@javax.annotation.Nonnull String organizationId) throws ApiException {
        okhttp3.Call localVarCall = leaveOrganizationValidateBeforeCall(organizationId, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Leave organization (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization left successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call leaveOrganizationAsync(@javax.annotation.Nonnull String organizationId, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = leaveOrganizationValidateBeforeCall(organizationId, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for listAvailableRegions
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of all available regions </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listAvailableRegionsCall(@javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

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

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        if (xDaytonaOrganizationID != null) {
            localVarHeaderParams.put("X-Daytona-Organization-ID", localVarApiClient.parameterToString(xDaytonaOrganizationID));
        }


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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call listAvailableRegionsValidateBeforeCall(@javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        return listAvailableRegionsCall(xDaytonaOrganizationID, _callback);

    }

    /**
     * List all available regions for the organization
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return List&lt;Region&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of all available regions </td><td>  -  </td></tr>
     </table>
     */
    public List<Region> listAvailableRegions(@javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<List<Region>> localVarResp = listAvailableRegionsWithHttpInfo(xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * List all available regions for the organization
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;List&lt;Region&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of all available regions </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<Region>> listAvailableRegionsWithHttpInfo(@javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = listAvailableRegionsValidateBeforeCall(xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<List<Region>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * List all available regions for the organization (asynchronously)
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of all available regions </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listAvailableRegionsAsync(@javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<List<Region>> _callback) throws ApiException {

        okhttp3.Call localVarCall = listAvailableRegionsValidateBeforeCall(xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<List<Region>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for listOrganizationInvitations
     * @param organizationId Organization ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of pending organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listOrganizationInvitationsCall(@javax.annotation.Nonnull String organizationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/invitations"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return listOrganizationInvitationsCall(organizationId, _callback);

    }

    /**
     * List pending organization invitations
     * 
     * @param organizationId Organization ID (required)
     * @return List&lt;OrganizationInvitation&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of pending organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public List<OrganizationInvitation> listOrganizationInvitations(@javax.annotation.Nonnull String organizationId) throws ApiException {
        ApiResponse<List<OrganizationInvitation>> localVarResp = listOrganizationInvitationsWithHttpInfo(organizationId);
        return localVarResp.getData();
    }

    /**
     * List pending organization invitations
     * 
     * @param organizationId Organization ID (required)
     * @return ApiResponse&lt;List&lt;OrganizationInvitation&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of pending organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<OrganizationInvitation>> listOrganizationInvitationsWithHttpInfo(@javax.annotation.Nonnull String organizationId) throws ApiException {
        okhttp3.Call localVarCall = listOrganizationInvitationsValidateBeforeCall(organizationId, null);
        Type localVarReturnType = new TypeToken<List<OrganizationInvitation>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * List pending organization invitations (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of pending organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listOrganizationInvitationsAsync(@javax.annotation.Nonnull String organizationId, final ApiCallback<List<OrganizationInvitation>> _callback) throws ApiException {

        okhttp3.Call localVarCall = listOrganizationInvitationsValidateBeforeCall(organizationId, _callback);
        Type localVarReturnType = new TypeToken<List<OrganizationInvitation>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for listOrganizationInvitationsForAuthenticatedUser
     * @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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listOrganizationInvitationsForAuthenticatedUserCall(final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/invitations";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call listOrganizationInvitationsForAuthenticatedUserValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        return listOrganizationInvitationsForAuthenticatedUserCall(_callback);

    }

    /**
     * List organization invitations for authenticated user
     * 
     * @return List&lt;OrganizationInvitation&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public List<OrganizationInvitation> listOrganizationInvitationsForAuthenticatedUser() throws ApiException {
        ApiResponse<List<OrganizationInvitation>> localVarResp = listOrganizationInvitationsForAuthenticatedUserWithHttpInfo();
        return localVarResp.getData();
    }

    /**
     * List organization invitations for authenticated user
     * 
     * @return ApiResponse&lt;List&lt;OrganizationInvitation&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<OrganizationInvitation>> listOrganizationInvitationsForAuthenticatedUserWithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = listOrganizationInvitationsForAuthenticatedUserValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<List<OrganizationInvitation>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * List organization invitations for authenticated user (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization invitations </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listOrganizationInvitationsForAuthenticatedUserAsync(final ApiCallback<List<OrganizationInvitation>> _callback) throws ApiException {

        okhttp3.Call localVarCall = listOrganizationInvitationsForAuthenticatedUserValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<List<OrganizationInvitation>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for listOrganizationMembers
     * @param organizationId Organization ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization members </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listOrganizationMembersCall(@javax.annotation.Nonnull String organizationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/users"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return listOrganizationMembersCall(organizationId, _callback);

    }

    /**
     * List organization members
     * 
     * @param organizationId Organization ID (required)
     * @return List&lt;OrganizationUser&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization members </td><td>  -  </td></tr>
     </table>
     */
    public List<OrganizationUser> listOrganizationMembers(@javax.annotation.Nonnull String organizationId) throws ApiException {
        ApiResponse<List<OrganizationUser>> localVarResp = listOrganizationMembersWithHttpInfo(organizationId);
        return localVarResp.getData();
    }

    /**
     * List organization members
     * 
     * @param organizationId Organization ID (required)
     * @return ApiResponse&lt;List&lt;OrganizationUser&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization members </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<OrganizationUser>> listOrganizationMembersWithHttpInfo(@javax.annotation.Nonnull String organizationId) throws ApiException {
        okhttp3.Call localVarCall = listOrganizationMembersValidateBeforeCall(organizationId, null);
        Type localVarReturnType = new TypeToken<List<OrganizationUser>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * List organization members (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization members </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listOrganizationMembersAsync(@javax.annotation.Nonnull String organizationId, final ApiCallback<List<OrganizationUser>> _callback) throws ApiException {

        okhttp3.Call localVarCall = listOrganizationMembersValidateBeforeCall(organizationId, _callback);
        Type localVarReturnType = new TypeToken<List<OrganizationUser>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for listOrganizationRoles
     * @param organizationId Organization ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization roles </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listOrganizationRolesCall(@javax.annotation.Nonnull String organizationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/roles"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return listOrganizationRolesCall(organizationId, _callback);

    }

    /**
     * List organization roles
     * 
     * @param organizationId Organization ID (required)
     * @return List&lt;OrganizationRole&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization roles </td><td>  -  </td></tr>
     </table>
     */
    public List<OrganizationRole> listOrganizationRoles(@javax.annotation.Nonnull String organizationId) throws ApiException {
        ApiResponse<List<OrganizationRole>> localVarResp = listOrganizationRolesWithHttpInfo(organizationId);
        return localVarResp.getData();
    }

    /**
     * List organization roles
     * 
     * @param organizationId Organization ID (required)
     * @return ApiResponse&lt;List&lt;OrganizationRole&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization roles </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<OrganizationRole>> listOrganizationRolesWithHttpInfo(@javax.annotation.Nonnull String organizationId) throws ApiException {
        okhttp3.Call localVarCall = listOrganizationRolesValidateBeforeCall(organizationId, null);
        Type localVarReturnType = new TypeToken<List<OrganizationRole>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * List organization roles (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organization roles </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listOrganizationRolesAsync(@javax.annotation.Nonnull String organizationId, final ApiCallback<List<OrganizationRole>> _callback) throws ApiException {

        okhttp3.Call localVarCall = listOrganizationRolesValidateBeforeCall(organizationId, _callback);
        Type localVarReturnType = new TypeToken<List<OrganizationRole>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for listOrganizations
     * @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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organizations </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listOrganizationsCall(final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

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

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call listOrganizationsValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        return listOrganizationsCall(_callback);

    }

    /**
     * List organizations
     * 
     * @return List&lt;Organization&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organizations </td><td>  -  </td></tr>
     </table>
     */
    public List<Organization> listOrganizations() throws ApiException {
        ApiResponse<List<Organization>> localVarResp = listOrganizationsWithHttpInfo();
        return localVarResp.getData();
    }

    /**
     * List organizations
     * 
     * @return ApiResponse&lt;List&lt;Organization&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organizations </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<Organization>> listOrganizationsWithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = listOrganizationsValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<List<Organization>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * List organizations (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> List of organizations </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listOrganizationsAsync(final ApiCallback<List<Organization>> _callback) throws ApiException {

        okhttp3.Call localVarCall = listOrganizationsValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<List<Organization>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for regenerateProxyApiKey
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The proxy API key has been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call regenerateProxyApiKeyCall(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/regions/{id}/regenerate-proxy-api-key"
            .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        if (xDaytonaOrganizationID != null) {
            localVarHeaderParams.put("X-Daytona-Organization-ID", localVarApiClient.parameterToString(xDaytonaOrganizationID));
        }


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

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

        return regenerateProxyApiKeyCall(id, xDaytonaOrganizationID, _callback);

    }

    /**
     * Regenerate proxy API key for a region
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return RegenerateApiKeyResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The proxy API key has been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public RegenerateApiKeyResponse regenerateProxyApiKey(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<RegenerateApiKeyResponse> localVarResp = regenerateProxyApiKeyWithHttpInfo(id, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Regenerate proxy API key for a region
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;RegenerateApiKeyResponse&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The proxy API key has been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<RegenerateApiKeyResponse> regenerateProxyApiKeyWithHttpInfo(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = regenerateProxyApiKeyValidateBeforeCall(id, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<RegenerateApiKeyResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Regenerate proxy API key for a region (asynchronously)
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The proxy API key has been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call regenerateProxyApiKeyAsync(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<RegenerateApiKeyResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = regenerateProxyApiKeyValidateBeforeCall(id, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<RegenerateApiKeyResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for regenerateSnapshotManagerCredentials
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The snapshot manager credentials have been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call regenerateSnapshotManagerCredentialsCall(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/regions/{id}/regenerate-snapshot-manager-credentials"
            .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        if (xDaytonaOrganizationID != null) {
            localVarHeaderParams.put("X-Daytona-Organization-ID", localVarApiClient.parameterToString(xDaytonaOrganizationID));
        }


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

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

        return regenerateSnapshotManagerCredentialsCall(id, xDaytonaOrganizationID, _callback);

    }

    /**
     * Regenerate snapshot manager credentials for a region
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return SnapshotManagerCredentials
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The snapshot manager credentials have been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public SnapshotManagerCredentials regenerateSnapshotManagerCredentials(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<SnapshotManagerCredentials> localVarResp = regenerateSnapshotManagerCredentialsWithHttpInfo(id, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Regenerate snapshot manager credentials for a region
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;SnapshotManagerCredentials&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The snapshot manager credentials have been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<SnapshotManagerCredentials> regenerateSnapshotManagerCredentialsWithHttpInfo(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = regenerateSnapshotManagerCredentialsValidateBeforeCall(id, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<SnapshotManagerCredentials>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Regenerate snapshot manager credentials for a region (asynchronously)
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The snapshot manager credentials have been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call regenerateSnapshotManagerCredentialsAsync(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<SnapshotManagerCredentials> _callback) throws ApiException {

        okhttp3.Call localVarCall = regenerateSnapshotManagerCredentialsValidateBeforeCall(id, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<SnapshotManagerCredentials>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for regenerateSshGatewayApiKey
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The SSH gateway API key has been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call regenerateSshGatewayApiKeyCall(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/regions/{id}/regenerate-ssh-gateway-api-key"
            .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        if (xDaytonaOrganizationID != null) {
            localVarHeaderParams.put("X-Daytona-Organization-ID", localVarApiClient.parameterToString(xDaytonaOrganizationID));
        }


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

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

        return regenerateSshGatewayApiKeyCall(id, xDaytonaOrganizationID, _callback);

    }

    /**
     * Regenerate SSH gateway API key for a region
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return RegenerateApiKeyResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The SSH gateway API key has been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public RegenerateApiKeyResponse regenerateSshGatewayApiKey(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<RegenerateApiKeyResponse> localVarResp = regenerateSshGatewayApiKeyWithHttpInfo(id, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Regenerate SSH gateway API key for a region
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;RegenerateApiKeyResponse&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The SSH gateway API key has been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<RegenerateApiKeyResponse> regenerateSshGatewayApiKeyWithHttpInfo(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = regenerateSshGatewayApiKeyValidateBeforeCall(id, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<RegenerateApiKeyResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Regenerate SSH gateway API key for a region (asynchronously)
     * 
     * @param id Region ID (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> The SSH gateway API key has been successfully regenerated. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call regenerateSshGatewayApiKeyAsync(@javax.annotation.Nonnull String id, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<RegenerateApiKeyResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = regenerateSshGatewayApiKeyValidateBeforeCall(id, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<RegenerateApiKeyResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for setOrganizationDefaultRegion
     * @param organizationId Organization ID (required)
     * @param updateOrganizationDefaultRegion  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Default region set successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call setOrganizationDefaultRegionCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull UpdateOrganizationDefaultRegion updateOrganizationDefaultRegion, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = updateOrganizationDefaultRegion;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/default-region"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call setOrganizationDefaultRegionValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull UpdateOrganizationDefaultRegion updateOrganizationDefaultRegion, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling setOrganizationDefaultRegion(Async)");
        }

        // verify the required parameter 'updateOrganizationDefaultRegion' is set
        if (updateOrganizationDefaultRegion == null) {
            throw new ApiException("Missing the required parameter 'updateOrganizationDefaultRegion' when calling setOrganizationDefaultRegion(Async)");
        }

        return setOrganizationDefaultRegionCall(organizationId, updateOrganizationDefaultRegion, _callback);

    }

    /**
     * Set default region for organization
     * 
     * @param organizationId Organization ID (required)
     * @param updateOrganizationDefaultRegion  (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Default region set successfully </td><td>  -  </td></tr>
     </table>
     */
    public void setOrganizationDefaultRegion(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull UpdateOrganizationDefaultRegion updateOrganizationDefaultRegion) throws ApiException {
        setOrganizationDefaultRegionWithHttpInfo(organizationId, updateOrganizationDefaultRegion);
    }

    /**
     * Set default region for organization
     * 
     * @param organizationId Organization ID (required)
     * @param updateOrganizationDefaultRegion  (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Default region set successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> setOrganizationDefaultRegionWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull UpdateOrganizationDefaultRegion updateOrganizationDefaultRegion) throws ApiException {
        okhttp3.Call localVarCall = setOrganizationDefaultRegionValidateBeforeCall(organizationId, updateOrganizationDefaultRegion, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Set default region for organization (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param updateOrganizationDefaultRegion  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Default region set successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call setOrganizationDefaultRegionAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull UpdateOrganizationDefaultRegion updateOrganizationDefaultRegion, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = setOrganizationDefaultRegionValidateBeforeCall(organizationId, updateOrganizationDefaultRegion, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for suspendOrganization
     * @param organizationId Organization ID (required)
     * @param organizationSuspension  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization suspended successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call suspendOrganizationCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nullable OrganizationSuspension organizationSuspension, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = organizationSuspension;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/suspend"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call suspendOrganizationValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nullable OrganizationSuspension organizationSuspension, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling suspendOrganization(Async)");
        }

        return suspendOrganizationCall(organizationId, organizationSuspension, _callback);

    }

    /**
     * Suspend organization
     * 
     * @param organizationId Organization ID (required)
     * @param organizationSuspension  (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization suspended successfully </td><td>  -  </td></tr>
     </table>
     */
    public void suspendOrganization(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nullable OrganizationSuspension organizationSuspension) throws ApiException {
        suspendOrganizationWithHttpInfo(organizationId, organizationSuspension);
    }

    /**
     * Suspend organization
     * 
     * @param organizationId Organization ID (required)
     * @param organizationSuspension  (optional)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization suspended successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> suspendOrganizationWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nullable OrganizationSuspension organizationSuspension) throws ApiException {
        okhttp3.Call localVarCall = suspendOrganizationValidateBeforeCall(organizationId, organizationSuspension, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Suspend organization (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param organizationSuspension  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization suspended successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call suspendOrganizationAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nullable OrganizationSuspension organizationSuspension, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = suspendOrganizationValidateBeforeCall(organizationId, organizationSuspension, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for unsuspendOrganization
     * @param organizationId Organization ID (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization unsuspended successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call unsuspendOrganizationCall(@javax.annotation.Nonnull String organizationId, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/unsuspend"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

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

        return unsuspendOrganizationCall(organizationId, _callback);

    }

    /**
     * Unsuspend organization
     * 
     * @param organizationId Organization ID (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization unsuspended successfully </td><td>  -  </td></tr>
     </table>
     */
    public void unsuspendOrganization(@javax.annotation.Nonnull String organizationId) throws ApiException {
        unsuspendOrganizationWithHttpInfo(organizationId);
    }

    /**
     * Unsuspend organization
     * 
     * @param organizationId Organization ID (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization unsuspended successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> unsuspendOrganizationWithHttpInfo(@javax.annotation.Nonnull String organizationId) throws ApiException {
        okhttp3.Call localVarCall = unsuspendOrganizationValidateBeforeCall(organizationId, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Unsuspend organization (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization unsuspended successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call unsuspendOrganizationAsync(@javax.annotation.Nonnull String organizationId, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = unsuspendOrganizationValidateBeforeCall(organizationId, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateAccessForOrganizationMember
     * @param organizationId Organization ID (required)
     * @param userId User ID (required)
     * @param updateOrganizationMemberAccess  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Access updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateAccessForOrganizationMemberCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UpdateOrganizationMemberAccess updateOrganizationMemberAccess, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = updateOrganizationMemberAccess;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/users/{userId}/access"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()))
            .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call updateAccessForOrganizationMemberValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UpdateOrganizationMemberAccess updateOrganizationMemberAccess, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling updateAccessForOrganizationMember(Async)");
        }

        // verify the required parameter 'userId' is set
        if (userId == null) {
            throw new ApiException("Missing the required parameter 'userId' when calling updateAccessForOrganizationMember(Async)");
        }

        // verify the required parameter 'updateOrganizationMemberAccess' is set
        if (updateOrganizationMemberAccess == null) {
            throw new ApiException("Missing the required parameter 'updateOrganizationMemberAccess' when calling updateAccessForOrganizationMember(Async)");
        }

        return updateAccessForOrganizationMemberCall(organizationId, userId, updateOrganizationMemberAccess, _callback);

    }

    /**
     * Update access for organization member
     * 
     * @param organizationId Organization ID (required)
     * @param userId User ID (required)
     * @param updateOrganizationMemberAccess  (required)
     * @return OrganizationUser
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Access updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public OrganizationUser updateAccessForOrganizationMember(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UpdateOrganizationMemberAccess updateOrganizationMemberAccess) throws ApiException {
        ApiResponse<OrganizationUser> localVarResp = updateAccessForOrganizationMemberWithHttpInfo(organizationId, userId, updateOrganizationMemberAccess);
        return localVarResp.getData();
    }

    /**
     * Update access for organization member
     * 
     * @param organizationId Organization ID (required)
     * @param userId User ID (required)
     * @param updateOrganizationMemberAccess  (required)
     * @return ApiResponse&lt;OrganizationUser&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Access updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<OrganizationUser> updateAccessForOrganizationMemberWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UpdateOrganizationMemberAccess updateOrganizationMemberAccess) throws ApiException {
        okhttp3.Call localVarCall = updateAccessForOrganizationMemberValidateBeforeCall(organizationId, userId, updateOrganizationMemberAccess, null);
        Type localVarReturnType = new TypeToken<OrganizationUser>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Update access for organization member (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param userId User ID (required)
     * @param updateOrganizationMemberAccess  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Access updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateAccessForOrganizationMemberAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull UpdateOrganizationMemberAccess updateOrganizationMemberAccess, final ApiCallback<OrganizationUser> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateAccessForOrganizationMemberValidateBeforeCall(organizationId, userId, updateOrganizationMemberAccess, _callback);
        Type localVarReturnType = new TypeToken<OrganizationUser>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateExperimentalConfig
     * @param organizationId Organization ID (required)
     * @param requestBody Experimental configuration as a JSON object. Set to null to clear the configuration. (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateExperimentalConfigCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nullable Map<String, Object> requestBody, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = requestBody;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/experimental-config"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call updateExperimentalConfigValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nullable Map<String, Object> requestBody, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling updateExperimentalConfig(Async)");
        }

        return updateExperimentalConfigCall(organizationId, requestBody, _callback);

    }

    /**
     * Update experimental configuration
     * 
     * @param organizationId Organization ID (required)
     * @param requestBody Experimental configuration as a JSON object. Set to null to clear the configuration. (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public void updateExperimentalConfig(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nullable Map<String, Object> requestBody) throws ApiException {
        updateExperimentalConfigWithHttpInfo(organizationId, requestBody);
    }

    /**
     * Update experimental configuration
     * 
     * @param organizationId Organization ID (required)
     * @param requestBody Experimental configuration as a JSON object. Set to null to clear the configuration. (optional)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> updateExperimentalConfigWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nullable Map<String, Object> requestBody) throws ApiException {
        okhttp3.Call localVarCall = updateExperimentalConfigValidateBeforeCall(organizationId, requestBody, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Update experimental configuration (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param requestBody Experimental configuration as a JSON object. Set to null to clear the configuration. (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateExperimentalConfigAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nullable Map<String, Object> requestBody, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateExperimentalConfigValidateBeforeCall(organizationId, requestBody, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateOrganizationInvitation
     * @param organizationId Organization ID (required)
     * @param invitationId Invitation ID (required)
     * @param updateOrganizationInvitation  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateOrganizationInvitationCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String invitationId, @javax.annotation.Nonnull UpdateOrganizationInvitation updateOrganizationInvitation, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = updateOrganizationInvitation;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/invitations/{invitationId}"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()))
            .replace("{" + "invitationId" + "}", localVarApiClient.escapeString(invitationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call updateOrganizationInvitationValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String invitationId, @javax.annotation.Nonnull UpdateOrganizationInvitation updateOrganizationInvitation, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling updateOrganizationInvitation(Async)");
        }

        // verify the required parameter 'invitationId' is set
        if (invitationId == null) {
            throw new ApiException("Missing the required parameter 'invitationId' when calling updateOrganizationInvitation(Async)");
        }

        // verify the required parameter 'updateOrganizationInvitation' is set
        if (updateOrganizationInvitation == null) {
            throw new ApiException("Missing the required parameter 'updateOrganizationInvitation' when calling updateOrganizationInvitation(Async)");
        }

        return updateOrganizationInvitationCall(organizationId, invitationId, updateOrganizationInvitation, _callback);

    }

    /**
     * Update organization invitation
     * 
     * @param organizationId Organization ID (required)
     * @param invitationId Invitation ID (required)
     * @param updateOrganizationInvitation  (required)
     * @return OrganizationInvitation
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public OrganizationInvitation updateOrganizationInvitation(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String invitationId, @javax.annotation.Nonnull UpdateOrganizationInvitation updateOrganizationInvitation) throws ApiException {
        ApiResponse<OrganizationInvitation> localVarResp = updateOrganizationInvitationWithHttpInfo(organizationId, invitationId, updateOrganizationInvitation);
        return localVarResp.getData();
    }

    /**
     * Update organization invitation
     * 
     * @param organizationId Organization ID (required)
     * @param invitationId Invitation ID (required)
     * @param updateOrganizationInvitation  (required)
     * @return ApiResponse&lt;OrganizationInvitation&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<OrganizationInvitation> updateOrganizationInvitationWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String invitationId, @javax.annotation.Nonnull UpdateOrganizationInvitation updateOrganizationInvitation) throws ApiException {
        okhttp3.Call localVarCall = updateOrganizationInvitationValidateBeforeCall(organizationId, invitationId, updateOrganizationInvitation, null);
        Type localVarReturnType = new TypeToken<OrganizationInvitation>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Update organization invitation (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param invitationId Invitation ID (required)
     * @param updateOrganizationInvitation  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Organization invitation updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateOrganizationInvitationAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String invitationId, @javax.annotation.Nonnull UpdateOrganizationInvitation updateOrganizationInvitation, final ApiCallback<OrganizationInvitation> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateOrganizationInvitationValidateBeforeCall(organizationId, invitationId, updateOrganizationInvitation, _callback);
        Type localVarReturnType = new TypeToken<OrganizationInvitation>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateOrganizationOtelConfig
     * @param organizationId Organization ID (required)
     * @param otelConfig  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> OpenTelemetry configuration updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateOrganizationOtelConfigCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull OtelConfig otelConfig, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = otelConfig;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/otel-config"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call updateOrganizationOtelConfigValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull OtelConfig otelConfig, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling updateOrganizationOtelConfig(Async)");
        }

        // verify the required parameter 'otelConfig' is set
        if (otelConfig == null) {
            throw new ApiException("Missing the required parameter 'otelConfig' when calling updateOrganizationOtelConfig(Async)");
        }

        return updateOrganizationOtelConfigCall(organizationId, otelConfig, _callback);

    }

    /**
     * Update organization OpenTelemetry configuration
     * 
     * @param organizationId Organization ID (required)
     * @param otelConfig  (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> OpenTelemetry configuration updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public void updateOrganizationOtelConfig(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull OtelConfig otelConfig) throws ApiException {
        updateOrganizationOtelConfigWithHttpInfo(organizationId, otelConfig);
    }

    /**
     * Update organization OpenTelemetry configuration
     * 
     * @param organizationId Organization ID (required)
     * @param otelConfig  (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> OpenTelemetry configuration updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> updateOrganizationOtelConfigWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull OtelConfig otelConfig) throws ApiException {
        okhttp3.Call localVarCall = updateOrganizationOtelConfigValidateBeforeCall(organizationId, otelConfig, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Update organization OpenTelemetry configuration (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param otelConfig  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> OpenTelemetry configuration updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateOrganizationOtelConfigAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull OtelConfig otelConfig, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateOrganizationOtelConfigValidateBeforeCall(organizationId, otelConfig, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateOrganizationQuota
     * @param organizationId Organization ID (required)
     * @param updateOrganizationQuota  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization quota updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateOrganizationQuotaCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull UpdateOrganizationQuota updateOrganizationQuota, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = updateOrganizationQuota;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/quota"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call updateOrganizationQuotaValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull UpdateOrganizationQuota updateOrganizationQuota, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling updateOrganizationQuota(Async)");
        }

        // verify the required parameter 'updateOrganizationQuota' is set
        if (updateOrganizationQuota == null) {
            throw new ApiException("Missing the required parameter 'updateOrganizationQuota' when calling updateOrganizationQuota(Async)");
        }

        return updateOrganizationQuotaCall(organizationId, updateOrganizationQuota, _callback);

    }

    /**
     * Update organization quota
     * 
     * @param organizationId Organization ID (required)
     * @param updateOrganizationQuota  (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization quota updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public void updateOrganizationQuota(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull UpdateOrganizationQuota updateOrganizationQuota) throws ApiException {
        updateOrganizationQuotaWithHttpInfo(organizationId, updateOrganizationQuota);
    }

    /**
     * Update organization quota
     * 
     * @param organizationId Organization ID (required)
     * @param updateOrganizationQuota  (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization quota updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> updateOrganizationQuotaWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull UpdateOrganizationQuota updateOrganizationQuota) throws ApiException {
        okhttp3.Call localVarCall = updateOrganizationQuotaValidateBeforeCall(organizationId, updateOrganizationQuota, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Update organization quota (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param updateOrganizationQuota  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Organization quota updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateOrganizationQuotaAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull UpdateOrganizationQuota updateOrganizationQuota, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateOrganizationQuotaValidateBeforeCall(organizationId, updateOrganizationQuota, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateOrganizationRegionQuota
     * @param organizationId Organization ID (required)
     * @param regionId ID of the region where the updated quota will be applied (required)
     * @param updateOrganizationRegionQuota  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Region quota updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateOrganizationRegionQuotaCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String regionId, @javax.annotation.Nonnull UpdateOrganizationRegionQuota updateOrganizationRegionQuota, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = updateOrganizationRegionQuota;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/quota/{regionId}"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()))
            .replace("{" + "regionId" + "}", localVarApiClient.escapeString(regionId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call updateOrganizationRegionQuotaValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String regionId, @javax.annotation.Nonnull UpdateOrganizationRegionQuota updateOrganizationRegionQuota, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling updateOrganizationRegionQuota(Async)");
        }

        // verify the required parameter 'regionId' is set
        if (regionId == null) {
            throw new ApiException("Missing the required parameter 'regionId' when calling updateOrganizationRegionQuota(Async)");
        }

        // verify the required parameter 'updateOrganizationRegionQuota' is set
        if (updateOrganizationRegionQuota == null) {
            throw new ApiException("Missing the required parameter 'updateOrganizationRegionQuota' when calling updateOrganizationRegionQuota(Async)");
        }

        return updateOrganizationRegionQuotaCall(organizationId, regionId, updateOrganizationRegionQuota, _callback);

    }

    /**
     * Update organization region quota
     * 
     * @param organizationId Organization ID (required)
     * @param regionId ID of the region where the updated quota will be applied (required)
     * @param updateOrganizationRegionQuota  (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Region quota updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public void updateOrganizationRegionQuota(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String regionId, @javax.annotation.Nonnull UpdateOrganizationRegionQuota updateOrganizationRegionQuota) throws ApiException {
        updateOrganizationRegionQuotaWithHttpInfo(organizationId, regionId, updateOrganizationRegionQuota);
    }

    /**
     * Update organization region quota
     * 
     * @param organizationId Organization ID (required)
     * @param regionId ID of the region where the updated quota will be applied (required)
     * @param updateOrganizationRegionQuota  (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Region quota updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> updateOrganizationRegionQuotaWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String regionId, @javax.annotation.Nonnull UpdateOrganizationRegionQuota updateOrganizationRegionQuota) throws ApiException {
        okhttp3.Call localVarCall = updateOrganizationRegionQuotaValidateBeforeCall(organizationId, regionId, updateOrganizationRegionQuota, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Update organization region quota (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param regionId ID of the region where the updated quota will be applied (required)
     * @param updateOrganizationRegionQuota  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Region quota updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateOrganizationRegionQuotaAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String regionId, @javax.annotation.Nonnull UpdateOrganizationRegionQuota updateOrganizationRegionQuota, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateOrganizationRegionQuotaValidateBeforeCall(organizationId, regionId, updateOrganizationRegionQuota, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateOrganizationRole
     * @param organizationId Organization ID (required)
     * @param roleId Role ID (required)
     * @param updateOrganizationRole  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Role updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateOrganizationRoleCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String roleId, @javax.annotation.Nonnull UpdateOrganizationRole updateOrganizationRole, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = updateOrganizationRole;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/roles/{roleId}"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()))
            .replace("{" + "roleId" + "}", localVarApiClient.escapeString(roleId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call updateOrganizationRoleValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String roleId, @javax.annotation.Nonnull UpdateOrganizationRole updateOrganizationRole, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling updateOrganizationRole(Async)");
        }

        // verify the required parameter 'roleId' is set
        if (roleId == null) {
            throw new ApiException("Missing the required parameter 'roleId' when calling updateOrganizationRole(Async)");
        }

        // verify the required parameter 'updateOrganizationRole' is set
        if (updateOrganizationRole == null) {
            throw new ApiException("Missing the required parameter 'updateOrganizationRole' when calling updateOrganizationRole(Async)");
        }

        return updateOrganizationRoleCall(organizationId, roleId, updateOrganizationRole, _callback);

    }

    /**
     * Update organization role
     * 
     * @param organizationId Organization ID (required)
     * @param roleId Role ID (required)
     * @param updateOrganizationRole  (required)
     * @return OrganizationRole
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Role updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public OrganizationRole updateOrganizationRole(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String roleId, @javax.annotation.Nonnull UpdateOrganizationRole updateOrganizationRole) throws ApiException {
        ApiResponse<OrganizationRole> localVarResp = updateOrganizationRoleWithHttpInfo(organizationId, roleId, updateOrganizationRole);
        return localVarResp.getData();
    }

    /**
     * Update organization role
     * 
     * @param organizationId Organization ID (required)
     * @param roleId Role ID (required)
     * @param updateOrganizationRole  (required)
     * @return ApiResponse&lt;OrganizationRole&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Role updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<OrganizationRole> updateOrganizationRoleWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String roleId, @javax.annotation.Nonnull UpdateOrganizationRole updateOrganizationRole) throws ApiException {
        okhttp3.Call localVarCall = updateOrganizationRoleValidateBeforeCall(organizationId, roleId, updateOrganizationRole, null);
        Type localVarReturnType = new TypeToken<OrganizationRole>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Update organization role (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param roleId Role ID (required)
     * @param updateOrganizationRole  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Role updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateOrganizationRoleAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull String roleId, @javax.annotation.Nonnull UpdateOrganizationRole updateOrganizationRole, final ApiCallback<OrganizationRole> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateOrganizationRoleValidateBeforeCall(organizationId, roleId, updateOrganizationRole, _callback);
        Type localVarReturnType = new TypeToken<OrganizationRole>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateRegion
     * @param id Region ID (required)
     * @param updateRegion  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateRegionCall(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateRegion updateRegion, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = updateRegion;

        // create path and map variables
        String localVarPath = "/regions/{id}"
            .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        if (xDaytonaOrganizationID != null) {
            localVarHeaderParams.put("X-Daytona-Organization-ID", localVarApiClient.parameterToString(xDaytonaOrganizationID));
        }


        String[] localVarAuthNames = new String[] { "bearer", "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call updateRegionValidateBeforeCall(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateRegion updateRegion, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'id' is set
        if (id == null) {
            throw new ApiException("Missing the required parameter 'id' when calling updateRegion(Async)");
        }

        // verify the required parameter 'updateRegion' is set
        if (updateRegion == null) {
            throw new ApiException("Missing the required parameter 'updateRegion' when calling updateRegion(Async)");
        }

        return updateRegionCall(id, updateRegion, xDaytonaOrganizationID, _callback);

    }

    /**
     * Update region configuration
     * 
     * @param id Region ID (required)
     * @param updateRegion  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public void updateRegion(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateRegion updateRegion, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        updateRegionWithHttpInfo(id, updateRegion, xDaytonaOrganizationID);
    }

    /**
     * Update region configuration
     * 
     * @param id Region ID (required)
     * @param updateRegion  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> updateRegionWithHttpInfo(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateRegion updateRegion, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = updateRegionValidateBeforeCall(id, updateRegion, xDaytonaOrganizationID, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Update region configuration (asynchronously)
     * 
     * @param id Region ID (required)
     * @param updateRegion  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateRegionAsync(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull UpdateRegion updateRegion, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateRegionValidateBeforeCall(id, updateRegion, xDaytonaOrganizationID, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateSandboxDefaultLimitedNetworkEgress
     * @param organizationId Organization ID (required)
     * @param organizationSandboxDefaultLimitedNetworkEgress  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Sandbox default limited network egress updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateSandboxDefaultLimitedNetworkEgressCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull OrganizationSandboxDefaultLimitedNetworkEgress organizationSandboxDefaultLimitedNetworkEgress, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = organizationSandboxDefaultLimitedNetworkEgress;

        // create path and map variables
        String localVarPath = "/organizations/{organizationId}/sandbox-default-limited-network-egress"
            .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call updateSandboxDefaultLimitedNetworkEgressValidateBeforeCall(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull OrganizationSandboxDefaultLimitedNetworkEgress organizationSandboxDefaultLimitedNetworkEgress, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'organizationId' is set
        if (organizationId == null) {
            throw new ApiException("Missing the required parameter 'organizationId' when calling updateSandboxDefaultLimitedNetworkEgress(Async)");
        }

        // verify the required parameter 'organizationSandboxDefaultLimitedNetworkEgress' is set
        if (organizationSandboxDefaultLimitedNetworkEgress == null) {
            throw new ApiException("Missing the required parameter 'organizationSandboxDefaultLimitedNetworkEgress' when calling updateSandboxDefaultLimitedNetworkEgress(Async)");
        }

        return updateSandboxDefaultLimitedNetworkEgressCall(organizationId, organizationSandboxDefaultLimitedNetworkEgress, _callback);

    }

    /**
     * Update sandbox default limited network egress
     * 
     * @param organizationId Organization ID (required)
     * @param organizationSandboxDefaultLimitedNetworkEgress  (required)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Sandbox default limited network egress updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public void updateSandboxDefaultLimitedNetworkEgress(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull OrganizationSandboxDefaultLimitedNetworkEgress organizationSandboxDefaultLimitedNetworkEgress) throws ApiException {
        updateSandboxDefaultLimitedNetworkEgressWithHttpInfo(organizationId, organizationSandboxDefaultLimitedNetworkEgress);
    }

    /**
     * Update sandbox default limited network egress
     * 
     * @param organizationId Organization ID (required)
     * @param organizationSandboxDefaultLimitedNetworkEgress  (required)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Sandbox default limited network egress updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> updateSandboxDefaultLimitedNetworkEgressWithHttpInfo(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull OrganizationSandboxDefaultLimitedNetworkEgress organizationSandboxDefaultLimitedNetworkEgress) throws ApiException {
        okhttp3.Call localVarCall = updateSandboxDefaultLimitedNetworkEgressValidateBeforeCall(organizationId, organizationSandboxDefaultLimitedNetworkEgress, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Update sandbox default limited network egress (asynchronously)
     * 
     * @param organizationId Organization ID (required)
     * @param organizationSandboxDefaultLimitedNetworkEgress  (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 border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 204 </td><td> Sandbox default limited network egress updated successfully </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateSandboxDefaultLimitedNetworkEgressAsync(@javax.annotation.Nonnull String organizationId, @javax.annotation.Nonnull OrganizationSandboxDefaultLimitedNetworkEgress organizationSandboxDefaultLimitedNetworkEgress, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateSandboxDefaultLimitedNetworkEgressValidateBeforeCall(organizationId, organizationSandboxDefaultLimitedNetworkEgress, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
}
