/*
 * 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.CreateSandbox;
import io.daytona.api.client.model.CreateSandboxSnapshot;
import io.daytona.api.client.model.ForkSandbox;
import io.daytona.api.client.model.MetricsResponse;
import java.time.OffsetDateTime;
import io.daytona.api.client.model.Organization;
import io.daytona.api.client.model.PaginatedLogs;
import io.daytona.api.client.model.PaginatedSandboxes;
import io.daytona.api.client.model.PaginatedTraces;
import io.daytona.api.client.model.PortPreviewUrl;
import io.daytona.api.client.model.RegionQuota;
import io.daytona.api.client.model.ResizeSandbox;
import io.daytona.api.client.model.Sandbox;
import io.daytona.api.client.model.SandboxLabels;
import io.daytona.api.client.model.SignedPortPreviewUrl;
import io.daytona.api.client.model.SshAccessDto;
import io.daytona.api.client.model.SshAccessValidationDto;
import io.daytona.api.client.model.ToolboxProxyUrl;
import io.daytona.api.client.model.TraceSpan;
import io.daytona.api.client.model.UpdateSandboxNetworkSettings;
import io.daytona.api.client.model.UpdateSandboxStateDto;
import io.daytona.api.client.model.Url;

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

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

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

    public SandboxApi(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 archiveSandbox
     * @param sandboxIdOrName  (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> Sandbox has been archived </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call archiveSandboxCall(@javax.annotation.Nonnull String sandboxIdOrName, @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 = "/sandbox/{sandboxIdOrName}/archive"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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 archiveSandboxValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling archiveSandbox(Async)");
        }

        return archiveSandboxCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);

    }

    /**
     * Archive sandbox
     * 
     * @param sandboxIdOrName  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Sandbox has been archived </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox archiveSandbox(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = archiveSandboxWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Archive sandbox
     * 
     * @param sandboxIdOrName  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Sandbox has been archived </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> archiveSandboxWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = archiveSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Archive sandbox (asynchronously)
     * 
     * @param sandboxIdOrName  (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> Sandbox has been archived </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call archiveSandboxAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = archiveSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for createBackup
     * @param sandboxIdOrName ID or name of the sandbox (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> Sandbox backup has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createBackupCall(@javax.annotation.Nonnull String sandboxIdOrName, @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 = "/sandbox/{sandboxIdOrName}/backup"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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 createBackupValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling createBackup(Async)");
        }

        return createBackupCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);

    }

    /**
     * Create sandbox backup
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Sandbox backup has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox createBackup(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = createBackupWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Create sandbox backup
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Sandbox backup has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> createBackupWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = createBackupValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Create sandbox backup (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (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> Sandbox backup has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createBackupAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = createBackupValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for createSandbox
     * @param createSandbox  (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 sandbox has been successfully created. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createSandboxCall(@javax.annotation.Nonnull CreateSandbox createSandbox, @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 = createSandbox;

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

        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 createSandboxValidateBeforeCall(@javax.annotation.Nonnull CreateSandbox createSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'createSandbox' is set
        if (createSandbox == null) {
            throw new ApiException("Missing the required parameter 'createSandbox' when calling createSandbox(Async)");
        }

        return createSandboxCall(createSandbox, xDaytonaOrganizationID, _callback);

    }

    /**
     * Create a new sandbox
     * 
     * @param createSandbox  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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 sandbox has been successfully created. </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox createSandbox(@javax.annotation.Nonnull CreateSandbox createSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = createSandboxWithHttpInfo(createSandbox, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Create a new sandbox
     * 
     * @param createSandbox  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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 sandbox has been successfully created. </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> createSandboxWithHttpInfo(@javax.annotation.Nonnull CreateSandbox createSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = createSandboxValidateBeforeCall(createSandbox, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Create a new sandbox (asynchronously)
     * 
     * @param createSandbox  (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 sandbox has been successfully created. </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createSandboxAsync(@javax.annotation.Nonnull CreateSandbox createSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = createSandboxValidateBeforeCall(createSandbox, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for createSandboxSnapshot
     * @param sandboxIdOrName  (required)
     * @param createSandboxSnapshot  (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> Snapshot creation has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createSandboxSnapshotCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull CreateSandboxSnapshot createSandboxSnapshot, @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 = createSandboxSnapshot;

        // create path and map variables
        String localVarPath = "/sandbox/{sandboxIdOrName}/snapshot"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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);
        }

        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 createSandboxSnapshotValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull CreateSandboxSnapshot createSandboxSnapshot, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling createSandboxSnapshot(Async)");
        }

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

        return createSandboxSnapshotCall(sandboxIdOrName, createSandboxSnapshot, xDaytonaOrganizationID, _callback);

    }

    /**
     * Create a snapshot from a sandbox
     * 
     * @param sandboxIdOrName  (required)
     * @param createSandboxSnapshot  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Snapshot creation has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox createSandboxSnapshot(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull CreateSandboxSnapshot createSandboxSnapshot, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = createSandboxSnapshotWithHttpInfo(sandboxIdOrName, createSandboxSnapshot, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Create a snapshot from a sandbox
     * 
     * @param sandboxIdOrName  (required)
     * @param createSandboxSnapshot  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Snapshot creation has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> createSandboxSnapshotWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull CreateSandboxSnapshot createSandboxSnapshot, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = createSandboxSnapshotValidateBeforeCall(sandboxIdOrName, createSandboxSnapshot, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Create a snapshot from a sandbox (asynchronously)
     * 
     * @param sandboxIdOrName  (required)
     * @param createSandboxSnapshot  (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> Snapshot creation has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createSandboxSnapshotAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull CreateSandboxSnapshot createSandboxSnapshot, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = createSandboxSnapshotValidateBeforeCall(sandboxIdOrName, createSandboxSnapshot, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for createSshAccess
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param expiresInMinutes Expiration time in minutes (default: 60) (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> SSH access has been created </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createSshAccessCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal expiresInMinutes, 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 = "/sandbox/{sandboxIdOrName}/ssh-access"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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>();

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

        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 createSshAccessValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal expiresInMinutes, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling createSshAccess(Async)");
        }

        return createSshAccessCall(sandboxIdOrName, xDaytonaOrganizationID, expiresInMinutes, _callback);

    }

    /**
     * Create SSH access for sandbox
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param expiresInMinutes Expiration time in minutes (default: 60) (optional)
     * @return SshAccessDto
     * @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> SSH access has been created </td><td>  -  </td></tr>
     </table>
     */
    public SshAccessDto createSshAccess(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal expiresInMinutes) throws ApiException {
        ApiResponse<SshAccessDto> localVarResp = createSshAccessWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID, expiresInMinutes);
        return localVarResp.getData();
    }

    /**
     * Create SSH access for sandbox
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param expiresInMinutes Expiration time in minutes (default: 60) (optional)
     * @return ApiResponse&lt;SshAccessDto&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> SSH access has been created </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<SshAccessDto> createSshAccessWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal expiresInMinutes) throws ApiException {
        okhttp3.Call localVarCall = createSshAccessValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, expiresInMinutes, null);
        Type localVarReturnType = new TypeToken<SshAccessDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Create SSH access for sandbox (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param expiresInMinutes Expiration time in minutes (default: 60) (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> SSH access has been created </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call createSshAccessAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal expiresInMinutes, final ApiCallback<SshAccessDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = createSshAccessValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, expiresInMinutes, _callback);
        Type localVarReturnType = new TypeToken<SshAccessDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for deleteSandbox
     * @param sandboxIdOrName ID or name of the sandbox (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> Sandbox has been deleted </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteSandboxCall(@javax.annotation.Nonnull String sandboxIdOrName, @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 = "/sandbox/{sandboxIdOrName}"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        return deleteSandboxCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);

    }

    /**
     * Delete sandbox
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Sandbox has been deleted </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox deleteSandbox(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = deleteSandboxWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Delete sandbox
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Sandbox has been deleted </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> deleteSandboxWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = deleteSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Delete sandbox (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (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> Sandbox has been deleted </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call deleteSandboxAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = deleteSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for expireSignedPortPreviewUrl
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to expire signed preview URL for (required)
     * @param token Token to expire signed preview URL for (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> Signed preview URL has been expired </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call expireSignedPortPreviewUrlCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Integer port, @javax.annotation.Nonnull String token, @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 = "/sandbox/{sandboxIdOrName}/ports/{port}/signed-preview-url/{token}/expire"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.toString()))
            .replace("{" + "port" + "}", localVarApiClient.escapeString(port.toString()))
            .replace("{" + "token" + "}", localVarApiClient.escapeString(token.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

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

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

        return expireSignedPortPreviewUrlCall(sandboxIdOrName, port, token, xDaytonaOrganizationID, _callback);

    }

    /**
     * Expire signed preview URL for a sandbox port
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to expire signed preview URL for (required)
     * @param token Token to expire signed preview URL for (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> Signed preview URL has been expired </td><td>  -  </td></tr>
     </table>
     */
    public void expireSignedPortPreviewUrl(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Integer port, @javax.annotation.Nonnull String token, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        expireSignedPortPreviewUrlWithHttpInfo(sandboxIdOrName, port, token, xDaytonaOrganizationID);
    }

    /**
     * Expire signed preview URL for a sandbox port
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to expire signed preview URL for (required)
     * @param token Token to expire signed preview URL for (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> Signed preview URL has been expired </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> expireSignedPortPreviewUrlWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Integer port, @javax.annotation.Nonnull String token, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = expireSignedPortPreviewUrlValidateBeforeCall(sandboxIdOrName, port, token, xDaytonaOrganizationID, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Expire signed preview URL for a sandbox port (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to expire signed preview URL for (required)
     * @param token Token to expire signed preview URL for (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> Signed preview URL has been expired </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call expireSignedPortPreviewUrlAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Integer port, @javax.annotation.Nonnull String token, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = expireSignedPortPreviewUrlValidateBeforeCall(sandboxIdOrName, port, token, xDaytonaOrganizationID, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for forkSandbox
     * @param sandboxIdOrName  (required)
     * @param forkSandbox  (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> Fork operation has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call forkSandboxCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull ForkSandbox forkSandbox, @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 = forkSandbox;

        // create path and map variables
        String localVarPath = "/sandbox/{sandboxIdOrName}/fork"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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);
        }

        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 forkSandboxValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull ForkSandbox forkSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling forkSandbox(Async)");
        }

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

        return forkSandboxCall(sandboxIdOrName, forkSandbox, xDaytonaOrganizationID, _callback);

    }

    /**
     * Fork a sandbox
     * 
     * @param sandboxIdOrName  (required)
     * @param forkSandbox  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Fork operation has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox forkSandbox(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull ForkSandbox forkSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = forkSandboxWithHttpInfo(sandboxIdOrName, forkSandbox, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Fork a sandbox
     * 
     * @param sandboxIdOrName  (required)
     * @param forkSandbox  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Fork operation has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> forkSandboxWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull ForkSandbox forkSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = forkSandboxValidateBeforeCall(sandboxIdOrName, forkSandbox, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Fork a sandbox (asynchronously)
     * 
     * @param sandboxIdOrName  (required)
     * @param forkSandbox  (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> Fork operation has been initiated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call forkSandboxAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull ForkSandbox forkSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = forkSandboxValidateBeforeCall(sandboxIdOrName, forkSandbox, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getBuildLogs
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param follow Whether to follow the logs stream (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> Build logs stream </td><td>  -  </td></tr>
     </table>
     * @deprecated
     */
    @Deprecated
    public okhttp3.Call getBuildLogsCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean follow, 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 = "/sandbox/{sandboxIdOrName}/build-logs"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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>();

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

        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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        return getBuildLogsCall(sandboxIdOrName, xDaytonaOrganizationID, follow, _callback);

    }

    /**
     * Get build logs
     * This endpoint is deprecated. Use &#x60;getBuildLogsUrl&#x60; instead.
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param follow Whether to follow the logs stream (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> Build logs stream </td><td>  -  </td></tr>
     </table>
     * @deprecated
     */
    @Deprecated
    public void getBuildLogs(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean follow) throws ApiException {
        getBuildLogsWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID, follow);
    }

    /**
     * Get build logs
     * This endpoint is deprecated. Use &#x60;getBuildLogsUrl&#x60; instead.
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param follow Whether to follow the logs stream (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> Build logs stream </td><td>  -  </td></tr>
     </table>
     * @deprecated
     */
    @Deprecated
    public ApiResponse<Void> getBuildLogsWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean follow) throws ApiException {
        okhttp3.Call localVarCall = getBuildLogsValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, follow, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Get build logs (asynchronously)
     * This endpoint is deprecated. Use &#x60;getBuildLogsUrl&#x60; instead.
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param follow Whether to follow the logs stream (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> Build logs stream </td><td>  -  </td></tr>
     </table>
     * @deprecated
     */
    @Deprecated
    public okhttp3.Call getBuildLogsAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean follow, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = getBuildLogsValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, follow, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for getBuildLogsUrl
     * @param sandboxIdOrName ID or name of the sandbox (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> Build logs URL </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getBuildLogsUrlCall(@javax.annotation.Nonnull String sandboxIdOrName, @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 = "/sandbox/{sandboxIdOrName}/build-logs-url"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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 getBuildLogsUrlValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling getBuildLogsUrl(Async)");
        }

        return getBuildLogsUrlCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);

    }

    /**
     * Get build logs URL
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Url
     * @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> Build logs URL </td><td>  -  </td></tr>
     </table>
     */
    public Url getBuildLogsUrl(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Url> localVarResp = getBuildLogsUrlWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Get build logs URL
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Url&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> Build logs URL </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Url> getBuildLogsUrlWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = getBuildLogsUrlValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Url>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get build logs URL (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (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> Build logs URL </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getBuildLogsUrlAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Url> _callback) throws ApiException {

        okhttp3.Call localVarCall = getBuildLogsUrlValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Url>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getOrganizationBySandboxId
     * @param sandboxId ID of the sandbox (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> Organization </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationBySandboxIdCall(@javax.annotation.Nonnull String sandboxId, @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 = "/sandbox/{sandboxId}/organization"
            .replace("{" + "sandboxId" + "}", localVarApiClient.escapeString(sandboxId.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 getOrganizationBySandboxIdValidateBeforeCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxId' is set
        if (sandboxId == null) {
            throw new ApiException("Missing the required parameter 'sandboxId' when calling getOrganizationBySandboxId(Async)");
        }

        return getOrganizationBySandboxIdCall(sandboxId, xDaytonaOrganizationID, _callback);

    }

    /**
     * Get organization by sandbox ID
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @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 </td><td>  -  </td></tr>
     </table>
     */
    public Organization getOrganizationBySandboxId(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Organization> localVarResp = getOrganizationBySandboxIdWithHttpInfo(sandboxId, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Get organization by sandbox ID
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @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 </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Organization> getOrganizationBySandboxIdWithHttpInfo(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = getOrganizationBySandboxIdValidateBeforeCall(sandboxId, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Organization>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get organization by sandbox ID (asynchronously)
     * 
     * @param sandboxId ID of the sandbox (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> Organization </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getOrganizationBySandboxIdAsync(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Organization> _callback) throws ApiException {

        okhttp3.Call localVarCall = getOrganizationBySandboxIdValidateBeforeCall(sandboxId, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Organization>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getPortPreviewUrl
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to get preview URL for (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> Preview URL for the specified port </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getPortPreviewUrlCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal port, @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 = "/sandbox/{sandboxIdOrName}/ports/{port}/preview-url"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.toString()))
            .replace("{" + "port" + "}", localVarApiClient.escapeString(port.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 getPortPreviewUrlValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal port, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling getPortPreviewUrl(Async)");
        }

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

        return getPortPreviewUrlCall(sandboxIdOrName, port, xDaytonaOrganizationID, _callback);

    }

    /**
     * Get preview URL for a sandbox port
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to get preview URL for (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return PortPreviewUrl
     * @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> Preview URL for the specified port </td><td>  -  </td></tr>
     </table>
     */
    public PortPreviewUrl getPortPreviewUrl(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal port, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<PortPreviewUrl> localVarResp = getPortPreviewUrlWithHttpInfo(sandboxIdOrName, port, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Get preview URL for a sandbox port
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to get preview URL for (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;PortPreviewUrl&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> Preview URL for the specified port </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<PortPreviewUrl> getPortPreviewUrlWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal port, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = getPortPreviewUrlValidateBeforeCall(sandboxIdOrName, port, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<PortPreviewUrl>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get preview URL for a sandbox port (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to get preview URL for (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> Preview URL for the specified port </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getPortPreviewUrlAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal port, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<PortPreviewUrl> _callback) throws ApiException {

        okhttp3.Call localVarCall = getPortPreviewUrlValidateBeforeCall(sandboxIdOrName, port, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<PortPreviewUrl>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getRegionQuotaBySandboxId
     * @param sandboxId ID of the sandbox (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> Region quota </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getRegionQuotaBySandboxIdCall(@javax.annotation.Nonnull String sandboxId, @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 = "/sandbox/{sandboxId}/region-quota"
            .replace("{" + "sandboxId" + "}", localVarApiClient.escapeString(sandboxId.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 getRegionQuotaBySandboxIdValidateBeforeCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxId' is set
        if (sandboxId == null) {
            throw new ApiException("Missing the required parameter 'sandboxId' when calling getRegionQuotaBySandboxId(Async)");
        }

        return getRegionQuotaBySandboxIdCall(sandboxId, xDaytonaOrganizationID, _callback);

    }

    /**
     * Get region quota by sandbox ID
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return RegionQuota
     * @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> Region quota </td><td>  -  </td></tr>
     </table>
     */
    public RegionQuota getRegionQuotaBySandboxId(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<RegionQuota> localVarResp = getRegionQuotaBySandboxIdWithHttpInfo(sandboxId, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Get region quota by sandbox ID
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;RegionQuota&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> Region quota </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<RegionQuota> getRegionQuotaBySandboxIdWithHttpInfo(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = getRegionQuotaBySandboxIdValidateBeforeCall(sandboxId, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<RegionQuota>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get region quota by sandbox ID (asynchronously)
     * 
     * @param sandboxId ID of the sandbox (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> Region quota </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getRegionQuotaBySandboxIdAsync(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<RegionQuota> _callback) throws ApiException {

        okhttp3.Call localVarCall = getRegionQuotaBySandboxIdValidateBeforeCall(sandboxId, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<RegionQuota>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getSandbox
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param verbose Include verbose output (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> Sandbox details </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean verbose, 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 = "/sandbox/{sandboxIdOrName}"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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>();

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

        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 getSandboxValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean verbose, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling getSandbox(Async)");
        }

        return getSandboxCall(sandboxIdOrName, xDaytonaOrganizationID, verbose, _callback);

    }

    /**
     * Get sandbox details
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param verbose Include verbose output (optional)
     * @return Sandbox
     * @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> Sandbox details </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox getSandbox(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean verbose) throws ApiException {
        ApiResponse<Sandbox> localVarResp = getSandboxWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID, verbose);
        return localVarResp.getData();
    }

    /**
     * Get sandbox details
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param verbose Include verbose output (optional)
     * @return ApiResponse&lt;Sandbox&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> Sandbox details </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> getSandboxWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean verbose) throws ApiException {
        okhttp3.Call localVarCall = getSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, verbose, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get sandbox details (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param verbose Include verbose output (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> Sandbox details </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean verbose, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, verbose, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getSandboxAncestors
     * @param sandboxIdOrName  (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 getSandboxAncestorsCall(@javax.annotation.Nonnull String sandboxIdOrName, @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 = "/sandbox/{sandboxIdOrName}/ancestors"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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 getSandboxAncestorsValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling getSandboxAncestors(Async)");
        }

        return getSandboxAncestorsCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);

    }

    /**
     * Get sandbox fork ancestor chain
     * 
     * @param sandboxIdOrName  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return List&lt;Sandbox&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 List<Sandbox> getSandboxAncestors(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<List<Sandbox>> localVarResp = getSandboxAncestorsWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Get sandbox fork ancestor chain
     * 
     * @param sandboxIdOrName  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;List&lt;Sandbox&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>  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<Sandbox>> getSandboxAncestorsWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = getSandboxAncestorsValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<List<Sandbox>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get sandbox fork ancestor chain (asynchronously)
     * 
     * @param sandboxIdOrName  (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 getSandboxAncestorsAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<List<Sandbox>> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSandboxAncestorsValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<List<Sandbox>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getSandboxForks
     * @param sandboxIdOrName  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param includeDestroyed  (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 getSandboxForksCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean includeDestroyed, 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 = "/sandbox/{sandboxIdOrName}/forks"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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>();

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

        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 getSandboxForksValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean includeDestroyed, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling getSandboxForks(Async)");
        }

        return getSandboxForksCall(sandboxIdOrName, xDaytonaOrganizationID, includeDestroyed, _callback);

    }

    /**
     * Get sandbox fork children
     * 
     * @param sandboxIdOrName  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param includeDestroyed  (optional)
     * @return List&lt;Sandbox&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 List<Sandbox> getSandboxForks(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean includeDestroyed) throws ApiException {
        ApiResponse<List<Sandbox>> localVarResp = getSandboxForksWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID, includeDestroyed);
        return localVarResp.getData();
    }

    /**
     * Get sandbox fork children
     * 
     * @param sandboxIdOrName  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param includeDestroyed  (optional)
     * @return ApiResponse&lt;List&lt;Sandbox&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>  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<Sandbox>> getSandboxForksWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean includeDestroyed) throws ApiException {
        okhttp3.Call localVarCall = getSandboxForksValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, includeDestroyed, null);
        Type localVarReturnType = new TypeToken<List<Sandbox>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get sandbox fork children (asynchronously)
     * 
     * @param sandboxIdOrName  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param includeDestroyed  (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 getSandboxForksAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean includeDestroyed, final ApiCallback<List<Sandbox>> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSandboxForksValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, includeDestroyed, _callback);
        Type localVarReturnType = new TypeToken<List<Sandbox>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getSandboxLogs
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number (1-indexed) (optional, default to 1)
     * @param limit Number of items per page (optional, default to 100)
     * @param severities Filter by severity levels (DEBUG, INFO, WARN, ERROR) (optional)
     * @param search Search in log body (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> Paginated list of log entries </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxLogsCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, @javax.annotation.Nullable List<String> severities, @javax.annotation.Nullable String search, 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 = "/sandbox/{sandboxId}/telemetry/logs"
            .replace("{" + "sandboxId" + "}", localVarApiClient.escapeString(sandboxId.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>();

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

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

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

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

        if (severities != null) {
            localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "severities", severities));
        }

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

        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 getSandboxLogsValidateBeforeCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, @javax.annotation.Nullable List<String> severities, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxId' is set
        if (sandboxId == null) {
            throw new ApiException("Missing the required parameter 'sandboxId' when calling getSandboxLogs(Async)");
        }

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

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

        return getSandboxLogsCall(sandboxId, from, to, xDaytonaOrganizationID, page, limit, severities, search, _callback);

    }

    /**
     * Get sandbox logs
     * Retrieve OTEL logs for a sandbox within a time range
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number (1-indexed) (optional, default to 1)
     * @param limit Number of items per page (optional, default to 100)
     * @param severities Filter by severity levels (DEBUG, INFO, WARN, ERROR) (optional)
     * @param search Search in log body (optional)
     * @return PaginatedLogs
     * @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> Paginated list of log entries </td><td>  -  </td></tr>
     </table>
     */
    public PaginatedLogs getSandboxLogs(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, @javax.annotation.Nullable List<String> severities, @javax.annotation.Nullable String search) throws ApiException {
        ApiResponse<PaginatedLogs> localVarResp = getSandboxLogsWithHttpInfo(sandboxId, from, to, xDaytonaOrganizationID, page, limit, severities, search);
        return localVarResp.getData();
    }

    /**
     * Get sandbox logs
     * Retrieve OTEL logs for a sandbox within a time range
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number (1-indexed) (optional, default to 1)
     * @param limit Number of items per page (optional, default to 100)
     * @param severities Filter by severity levels (DEBUG, INFO, WARN, ERROR) (optional)
     * @param search Search in log body (optional)
     * @return ApiResponse&lt;PaginatedLogs&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> Paginated list of log entries </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<PaginatedLogs> getSandboxLogsWithHttpInfo(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, @javax.annotation.Nullable List<String> severities, @javax.annotation.Nullable String search) throws ApiException {
        okhttp3.Call localVarCall = getSandboxLogsValidateBeforeCall(sandboxId, from, to, xDaytonaOrganizationID, page, limit, severities, search, null);
        Type localVarReturnType = new TypeToken<PaginatedLogs>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get sandbox logs (asynchronously)
     * Retrieve OTEL logs for a sandbox within a time range
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number (1-indexed) (optional, default to 1)
     * @param limit Number of items per page (optional, default to 100)
     * @param severities Filter by severity levels (DEBUG, INFO, WARN, ERROR) (optional)
     * @param search Search in log body (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> Paginated list of log entries </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxLogsAsync(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, @javax.annotation.Nullable List<String> severities, @javax.annotation.Nullable String search, final ApiCallback<PaginatedLogs> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSandboxLogsValidateBeforeCall(sandboxId, from, to, xDaytonaOrganizationID, page, limit, severities, search, _callback);
        Type localVarReturnType = new TypeToken<PaginatedLogs>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getSandboxMetrics
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param metricNames Filter by metric names (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> Metrics time series data </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxMetricsCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable List<String> metricNames, 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 = "/sandbox/{sandboxId}/telemetry/metrics"
            .replace("{" + "sandboxId" + "}", localVarApiClient.escapeString(sandboxId.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>();

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

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

        if (metricNames != null) {
            localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "metricNames", metricNames));
        }

        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 getSandboxMetricsValidateBeforeCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable List<String> metricNames, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxId' is set
        if (sandboxId == null) {
            throw new ApiException("Missing the required parameter 'sandboxId' when calling getSandboxMetrics(Async)");
        }

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

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

        return getSandboxMetricsCall(sandboxId, from, to, xDaytonaOrganizationID, metricNames, _callback);

    }

    /**
     * Get sandbox metrics
     * Retrieve OTEL metrics for a sandbox within a time range
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param metricNames Filter by metric names (optional)
     * @return MetricsResponse
     * @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> Metrics time series data </td><td>  -  </td></tr>
     </table>
     */
    public MetricsResponse getSandboxMetrics(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable List<String> metricNames) throws ApiException {
        ApiResponse<MetricsResponse> localVarResp = getSandboxMetricsWithHttpInfo(sandboxId, from, to, xDaytonaOrganizationID, metricNames);
        return localVarResp.getData();
    }

    /**
     * Get sandbox metrics
     * Retrieve OTEL metrics for a sandbox within a time range
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param metricNames Filter by metric names (optional)
     * @return ApiResponse&lt;MetricsResponse&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> Metrics time series data </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<MetricsResponse> getSandboxMetricsWithHttpInfo(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable List<String> metricNames) throws ApiException {
        okhttp3.Call localVarCall = getSandboxMetricsValidateBeforeCall(sandboxId, from, to, xDaytonaOrganizationID, metricNames, null);
        Type localVarReturnType = new TypeToken<MetricsResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get sandbox metrics (asynchronously)
     * Retrieve OTEL metrics for a sandbox within a time range
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param metricNames Filter by metric names (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> Metrics time series data </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxMetricsAsync(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable List<String> metricNames, final ApiCallback<MetricsResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSandboxMetricsValidateBeforeCall(sandboxId, from, to, xDaytonaOrganizationID, metricNames, _callback);
        Type localVarReturnType = new TypeToken<MetricsResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getSandboxParent
     * @param sandboxIdOrName  (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 getSandboxParentCall(@javax.annotation.Nonnull String sandboxIdOrName, @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 = "/sandbox/{sandboxIdOrName}/parent"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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 getSandboxParentValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling getSandboxParent(Async)");
        }

        return getSandboxParentCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);

    }

    /**
     * Get sandbox fork parent
     * 
     * @param sandboxIdOrName  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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 Sandbox getSandboxParent(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = getSandboxParentWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Get sandbox fork parent
     * 
     * @param sandboxIdOrName  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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<Sandbox> getSandboxParentWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = getSandboxParentValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get sandbox fork parent (asynchronously)
     * 
     * @param sandboxIdOrName  (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 getSandboxParentAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSandboxParentValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getSandboxTraceSpans
     * @param sandboxId ID of the sandbox (required)
     * @param traceId ID of the trace (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> List of spans in the trace </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxTraceSpansCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull String traceId, @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 = "/sandbox/{sandboxId}/telemetry/traces/{traceId}"
            .replace("{" + "sandboxId" + "}", localVarApiClient.escapeString(sandboxId.toString()))
            .replace("{" + "traceId" + "}", localVarApiClient.escapeString(traceId.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 getSandboxTraceSpansValidateBeforeCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull String traceId, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxId' is set
        if (sandboxId == null) {
            throw new ApiException("Missing the required parameter 'sandboxId' when calling getSandboxTraceSpans(Async)");
        }

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

        return getSandboxTraceSpansCall(sandboxId, traceId, xDaytonaOrganizationID, _callback);

    }

    /**
     * Get trace spans
     * Retrieve all spans for a specific trace
     * @param sandboxId ID of the sandbox (required)
     * @param traceId ID of the trace (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return List&lt;TraceSpan&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 spans in the trace </td><td>  -  </td></tr>
     </table>
     */
    public List<TraceSpan> getSandboxTraceSpans(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull String traceId, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<List<TraceSpan>> localVarResp = getSandboxTraceSpansWithHttpInfo(sandboxId, traceId, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Get trace spans
     * Retrieve all spans for a specific trace
     * @param sandboxId ID of the sandbox (required)
     * @param traceId ID of the trace (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;List&lt;TraceSpan&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 spans in the trace </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<TraceSpan>> getSandboxTraceSpansWithHttpInfo(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull String traceId, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = getSandboxTraceSpansValidateBeforeCall(sandboxId, traceId, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<List<TraceSpan>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get trace spans (asynchronously)
     * Retrieve all spans for a specific trace
     * @param sandboxId ID of the sandbox (required)
     * @param traceId ID of the trace (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> List of spans in the trace </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxTraceSpansAsync(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull String traceId, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<List<TraceSpan>> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSandboxTraceSpansValidateBeforeCall(sandboxId, traceId, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<List<TraceSpan>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getSandboxTraces
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number (1-indexed) (optional, default to 1)
     * @param limit Number of items per page (optional, default to 100)
     * @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> Paginated list of trace summaries </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxTracesCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, 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 = "/sandbox/{sandboxId}/telemetry/traces"
            .replace("{" + "sandboxId" + "}", localVarApiClient.escapeString(sandboxId.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>();

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

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

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

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

        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 getSandboxTracesValidateBeforeCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxId' is set
        if (sandboxId == null) {
            throw new ApiException("Missing the required parameter 'sandboxId' when calling getSandboxTraces(Async)");
        }

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

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

        return getSandboxTracesCall(sandboxId, from, to, xDaytonaOrganizationID, page, limit, _callback);

    }

    /**
     * Get sandbox traces
     * Retrieve OTEL traces for a sandbox within a time range
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number (1-indexed) (optional, default to 1)
     * @param limit Number of items per page (optional, default to 100)
     * @return PaginatedTraces
     * @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> Paginated list of trace summaries </td><td>  -  </td></tr>
     </table>
     */
    public PaginatedTraces getSandboxTraces(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit) throws ApiException {
        ApiResponse<PaginatedTraces> localVarResp = getSandboxTracesWithHttpInfo(sandboxId, from, to, xDaytonaOrganizationID, page, limit);
        return localVarResp.getData();
    }

    /**
     * Get sandbox traces
     * Retrieve OTEL traces for a sandbox within a time range
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number (1-indexed) (optional, default to 1)
     * @param limit Number of items per page (optional, default to 100)
     * @return ApiResponse&lt;PaginatedTraces&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> Paginated list of trace summaries </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<PaginatedTraces> getSandboxTracesWithHttpInfo(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit) throws ApiException {
        okhttp3.Call localVarCall = getSandboxTracesValidateBeforeCall(sandboxId, from, to, xDaytonaOrganizationID, page, limit, null);
        Type localVarReturnType = new TypeToken<PaginatedTraces>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get sandbox traces (asynchronously)
     * Retrieve OTEL traces for a sandbox within a time range
     * @param sandboxId ID of the sandbox (required)
     * @param from Start of time range (ISO 8601) (required)
     * @param to End of time range (ISO 8601) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number (1-indexed) (optional, default to 1)
     * @param limit Number of items per page (optional, default to 100)
     * @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> Paginated list of trace summaries </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxTracesAsync(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull OffsetDateTime from, @javax.annotation.Nonnull OffsetDateTime to, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, final ApiCallback<PaginatedTraces> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSandboxTracesValidateBeforeCall(sandboxId, from, to, xDaytonaOrganizationID, page, limit, _callback);
        Type localVarReturnType = new TypeToken<PaginatedTraces>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getSandboxesForRunner
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param states Comma-separated list of sandbox states to filter by (optional)
     * @param skipReconcilingSandboxes Skip sandboxes where state differs from desired state (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 sandboxes for the authenticated runner </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxesForRunnerCall(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable String states, @javax.annotation.Nullable Boolean skipReconcilingSandboxes, 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 = "/sandbox/for-runner";

        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>();

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

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

        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 getSandboxesForRunnerValidateBeforeCall(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable String states, @javax.annotation.Nullable Boolean skipReconcilingSandboxes, final ApiCallback _callback) throws ApiException {
        return getSandboxesForRunnerCall(xDaytonaOrganizationID, states, skipReconcilingSandboxes, _callback);

    }

    /**
     * Get sandboxes for the authenticated runner
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param states Comma-separated list of sandbox states to filter by (optional)
     * @param skipReconcilingSandboxes Skip sandboxes where state differs from desired state (optional)
     * @return List&lt;Sandbox&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 sandboxes for the authenticated runner </td><td>  -  </td></tr>
     </table>
     */
    public List<Sandbox> getSandboxesForRunner(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable String states, @javax.annotation.Nullable Boolean skipReconcilingSandboxes) throws ApiException {
        ApiResponse<List<Sandbox>> localVarResp = getSandboxesForRunnerWithHttpInfo(xDaytonaOrganizationID, states, skipReconcilingSandboxes);
        return localVarResp.getData();
    }

    /**
     * Get sandboxes for the authenticated runner
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param states Comma-separated list of sandbox states to filter by (optional)
     * @param skipReconcilingSandboxes Skip sandboxes where state differs from desired state (optional)
     * @return ApiResponse&lt;List&lt;Sandbox&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 sandboxes for the authenticated runner </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<Sandbox>> getSandboxesForRunnerWithHttpInfo(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable String states, @javax.annotation.Nullable Boolean skipReconcilingSandboxes) throws ApiException {
        okhttp3.Call localVarCall = getSandboxesForRunnerValidateBeforeCall(xDaytonaOrganizationID, states, skipReconcilingSandboxes, null);
        Type localVarReturnType = new TypeToken<List<Sandbox>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get sandboxes for the authenticated runner (asynchronously)
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param states Comma-separated list of sandbox states to filter by (optional)
     * @param skipReconcilingSandboxes Skip sandboxes where state differs from desired state (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 sandboxes for the authenticated runner </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxesForRunnerAsync(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable String states, @javax.annotation.Nullable Boolean skipReconcilingSandboxes, final ApiCallback<List<Sandbox>> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSandboxesForRunnerValidateBeforeCall(xDaytonaOrganizationID, states, skipReconcilingSandboxes, _callback);
        Type localVarReturnType = new TypeToken<List<Sandbox>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getSignedPortPreviewUrl
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to get signed preview URL for (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param expiresInSeconds Expiration time in seconds (default: 60 seconds) (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> Signed preview URL for the specified port </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSignedPortPreviewUrlCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Integer port, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Integer expiresInSeconds, 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 = "/sandbox/{sandboxIdOrName}/ports/{port}/signed-preview-url"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.toString()))
            .replace("{" + "port" + "}", localVarApiClient.escapeString(port.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>();

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

        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 getSignedPortPreviewUrlValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Integer port, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Integer expiresInSeconds, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling getSignedPortPreviewUrl(Async)");
        }

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

        return getSignedPortPreviewUrlCall(sandboxIdOrName, port, xDaytonaOrganizationID, expiresInSeconds, _callback);

    }

    /**
     * Get signed preview URL for a sandbox port
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to get signed preview URL for (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param expiresInSeconds Expiration time in seconds (default: 60 seconds) (optional)
     * @return SignedPortPreviewUrl
     * @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> Signed preview URL for the specified port </td><td>  -  </td></tr>
     </table>
     */
    public SignedPortPreviewUrl getSignedPortPreviewUrl(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Integer port, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Integer expiresInSeconds) throws ApiException {
        ApiResponse<SignedPortPreviewUrl> localVarResp = getSignedPortPreviewUrlWithHttpInfo(sandboxIdOrName, port, xDaytonaOrganizationID, expiresInSeconds);
        return localVarResp.getData();
    }

    /**
     * Get signed preview URL for a sandbox port
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to get signed preview URL for (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param expiresInSeconds Expiration time in seconds (default: 60 seconds) (optional)
     * @return ApiResponse&lt;SignedPortPreviewUrl&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> Signed preview URL for the specified port </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<SignedPortPreviewUrl> getSignedPortPreviewUrlWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Integer port, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Integer expiresInSeconds) throws ApiException {
        okhttp3.Call localVarCall = getSignedPortPreviewUrlValidateBeforeCall(sandboxIdOrName, port, xDaytonaOrganizationID, expiresInSeconds, null);
        Type localVarReturnType = new TypeToken<SignedPortPreviewUrl>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get signed preview URL for a sandbox port (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param port Port number to get signed preview URL for (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param expiresInSeconds Expiration time in seconds (default: 60 seconds) (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> Signed preview URL for the specified port </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSignedPortPreviewUrlAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Integer port, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Integer expiresInSeconds, final ApiCallback<SignedPortPreviewUrl> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSignedPortPreviewUrlValidateBeforeCall(sandboxIdOrName, port, xDaytonaOrganizationID, expiresInSeconds, _callback);
        Type localVarReturnType = new TypeToken<SignedPortPreviewUrl>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for getToolboxProxyUrl
     * @param sandboxId ID of the sandbox (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> Toolbox proxy URL for the specified sandbox </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getToolboxProxyUrlCall(@javax.annotation.Nonnull String sandboxId, @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 = "/sandbox/{sandboxId}/toolbox-proxy-url"
            .replace("{" + "sandboxId" + "}", localVarApiClient.escapeString(sandboxId.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 getToolboxProxyUrlValidateBeforeCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxId' is set
        if (sandboxId == null) {
            throw new ApiException("Missing the required parameter 'sandboxId' when calling getToolboxProxyUrl(Async)");
        }

        return getToolboxProxyUrlCall(sandboxId, xDaytonaOrganizationID, _callback);

    }

    /**
     * Get toolbox proxy URL for a sandbox
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ToolboxProxyUrl
     * @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> Toolbox proxy URL for the specified sandbox </td><td>  -  </td></tr>
     </table>
     */
    public ToolboxProxyUrl getToolboxProxyUrl(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<ToolboxProxyUrl> localVarResp = getToolboxProxyUrlWithHttpInfo(sandboxId, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Get toolbox proxy URL for a sandbox
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;ToolboxProxyUrl&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> Toolbox proxy URL for the specified sandbox </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ToolboxProxyUrl> getToolboxProxyUrlWithHttpInfo(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = getToolboxProxyUrlValidateBeforeCall(sandboxId, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<ToolboxProxyUrl>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get toolbox proxy URL for a sandbox (asynchronously)
     * 
     * @param sandboxId ID of the sandbox (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> Toolbox proxy URL for the specified sandbox </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getToolboxProxyUrlAsync(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<ToolboxProxyUrl> _callback) throws ApiException {

        okhttp3.Call localVarCall = getToolboxProxyUrlValidateBeforeCall(sandboxId, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<ToolboxProxyUrl>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for listSandboxes
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param verbose Include verbose output (optional)
     * @param labels JSON encoded labels to filter by (optional)
     * @param includeErroredDeleted Include errored and deleted sandboxes (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 sandboxes </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listSandboxesCall(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean verbose, @javax.annotation.Nullable String labels, @javax.annotation.Nullable Boolean includeErroredDeleted, 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 = "/sandbox";

        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>();

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

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

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

        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 listSandboxesValidateBeforeCall(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean verbose, @javax.annotation.Nullable String labels, @javax.annotation.Nullable Boolean includeErroredDeleted, final ApiCallback _callback) throws ApiException {
        return listSandboxesCall(xDaytonaOrganizationID, verbose, labels, includeErroredDeleted, _callback);

    }

    /**
     * List all sandboxes
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param verbose Include verbose output (optional)
     * @param labels JSON encoded labels to filter by (optional)
     * @param includeErroredDeleted Include errored and deleted sandboxes (optional)
     * @return List&lt;Sandbox&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 sandboxes </td><td>  -  </td></tr>
     </table>
     */
    public List<Sandbox> listSandboxes(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean verbose, @javax.annotation.Nullable String labels, @javax.annotation.Nullable Boolean includeErroredDeleted) throws ApiException {
        ApiResponse<List<Sandbox>> localVarResp = listSandboxesWithHttpInfo(xDaytonaOrganizationID, verbose, labels, includeErroredDeleted);
        return localVarResp.getData();
    }

    /**
     * List all sandboxes
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param verbose Include verbose output (optional)
     * @param labels JSON encoded labels to filter by (optional)
     * @param includeErroredDeleted Include errored and deleted sandboxes (optional)
     * @return ApiResponse&lt;List&lt;Sandbox&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 sandboxes </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<List<Sandbox>> listSandboxesWithHttpInfo(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean verbose, @javax.annotation.Nullable String labels, @javax.annotation.Nullable Boolean includeErroredDeleted) throws ApiException {
        okhttp3.Call localVarCall = listSandboxesValidateBeforeCall(xDaytonaOrganizationID, verbose, labels, includeErroredDeleted, null);
        Type localVarReturnType = new TypeToken<List<Sandbox>>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * List all sandboxes (asynchronously)
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param verbose Include verbose output (optional)
     * @param labels JSON encoded labels to filter by (optional)
     * @param includeErroredDeleted Include errored and deleted sandboxes (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 sandboxes </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listSandboxesAsync(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean verbose, @javax.annotation.Nullable String labels, @javax.annotation.Nullable Boolean includeErroredDeleted, final ApiCallback<List<Sandbox>> _callback) throws ApiException {

        okhttp3.Call localVarCall = listSandboxesValidateBeforeCall(xDaytonaOrganizationID, verbose, labels, includeErroredDeleted, _callback);
        Type localVarReturnType = new TypeToken<List<Sandbox>>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for listSandboxesPaginated
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number of the results (optional, default to 1)
     * @param limit Number of results per page (optional, default to 100)
     * @param id Filter by partial ID match (optional)
     * @param name Filter by partial name match (optional)
     * @param labels JSON encoded labels to filter by (optional)
     * @param includeErroredDeleted Include results with errored state and deleted desired state (optional, default to false)
     * @param states List of states to filter by (optional)
     * @param snapshots List of snapshot names to filter by (optional)
     * @param regions List of regions to filter by (optional)
     * @param minCpu Minimum CPU (optional)
     * @param maxCpu Maximum CPU (optional)
     * @param minMemoryGiB Minimum memory in GiB (optional)
     * @param maxMemoryGiB Maximum memory in GiB (optional)
     * @param minDiskGiB Minimum disk space in GiB (optional)
     * @param maxDiskGiB Maximum disk space in GiB (optional)
     * @param lastEventAfter Include items with last event after this timestamp (optional)
     * @param lastEventBefore Include items with last event before this timestamp (optional)
     * @param sort Field to sort by (optional, default to createdAt)
     * @param order Direction to sort by (optional, default to desc)
     * @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> Paginated list of all sandboxes </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listSandboxesPaginatedCall(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, @javax.annotation.Nullable String id, @javax.annotation.Nullable String name, @javax.annotation.Nullable String labels, @javax.annotation.Nullable Boolean includeErroredDeleted, @javax.annotation.Nullable List<String> states, @javax.annotation.Nullable List<String> snapshots, @javax.annotation.Nullable List<String> regions, @javax.annotation.Nullable BigDecimal minCpu, @javax.annotation.Nullable BigDecimal maxCpu, @javax.annotation.Nullable BigDecimal minMemoryGiB, @javax.annotation.Nullable BigDecimal maxMemoryGiB, @javax.annotation.Nullable BigDecimal minDiskGiB, @javax.annotation.Nullable BigDecimal maxDiskGiB, @javax.annotation.Nullable OffsetDateTime lastEventAfter, @javax.annotation.Nullable OffsetDateTime lastEventBefore, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String order, 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 = "/sandbox/paginated";

        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>();

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

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

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

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

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

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

        if (states != null) {
            localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "states", states));
        }

        if (snapshots != null) {
            localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "snapshots", snapshots));
        }

        if (regions != null) {
            localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "regions", regions));
        }

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

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

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

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

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

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

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

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

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

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

        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 listSandboxesPaginatedValidateBeforeCall(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, @javax.annotation.Nullable String id, @javax.annotation.Nullable String name, @javax.annotation.Nullable String labels, @javax.annotation.Nullable Boolean includeErroredDeleted, @javax.annotation.Nullable List<String> states, @javax.annotation.Nullable List<String> snapshots, @javax.annotation.Nullable List<String> regions, @javax.annotation.Nullable BigDecimal minCpu, @javax.annotation.Nullable BigDecimal maxCpu, @javax.annotation.Nullable BigDecimal minMemoryGiB, @javax.annotation.Nullable BigDecimal maxMemoryGiB, @javax.annotation.Nullable BigDecimal minDiskGiB, @javax.annotation.Nullable BigDecimal maxDiskGiB, @javax.annotation.Nullable OffsetDateTime lastEventAfter, @javax.annotation.Nullable OffsetDateTime lastEventBefore, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String order, final ApiCallback _callback) throws ApiException {
        return listSandboxesPaginatedCall(xDaytonaOrganizationID, page, limit, id, name, labels, includeErroredDeleted, states, snapshots, regions, minCpu, maxCpu, minMemoryGiB, maxMemoryGiB, minDiskGiB, maxDiskGiB, lastEventAfter, lastEventBefore, sort, order, _callback);

    }

    /**
     * List all sandboxes paginated
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number of the results (optional, default to 1)
     * @param limit Number of results per page (optional, default to 100)
     * @param id Filter by partial ID match (optional)
     * @param name Filter by partial name match (optional)
     * @param labels JSON encoded labels to filter by (optional)
     * @param includeErroredDeleted Include results with errored state and deleted desired state (optional, default to false)
     * @param states List of states to filter by (optional)
     * @param snapshots List of snapshot names to filter by (optional)
     * @param regions List of regions to filter by (optional)
     * @param minCpu Minimum CPU (optional)
     * @param maxCpu Maximum CPU (optional)
     * @param minMemoryGiB Minimum memory in GiB (optional)
     * @param maxMemoryGiB Maximum memory in GiB (optional)
     * @param minDiskGiB Minimum disk space in GiB (optional)
     * @param maxDiskGiB Maximum disk space in GiB (optional)
     * @param lastEventAfter Include items with last event after this timestamp (optional)
     * @param lastEventBefore Include items with last event before this timestamp (optional)
     * @param sort Field to sort by (optional, default to createdAt)
     * @param order Direction to sort by (optional, default to desc)
     * @return PaginatedSandboxes
     * @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> Paginated list of all sandboxes </td><td>  -  </td></tr>
     </table>
     */
    public PaginatedSandboxes listSandboxesPaginated(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, @javax.annotation.Nullable String id, @javax.annotation.Nullable String name, @javax.annotation.Nullable String labels, @javax.annotation.Nullable Boolean includeErroredDeleted, @javax.annotation.Nullable List<String> states, @javax.annotation.Nullable List<String> snapshots, @javax.annotation.Nullable List<String> regions, @javax.annotation.Nullable BigDecimal minCpu, @javax.annotation.Nullable BigDecimal maxCpu, @javax.annotation.Nullable BigDecimal minMemoryGiB, @javax.annotation.Nullable BigDecimal maxMemoryGiB, @javax.annotation.Nullable BigDecimal minDiskGiB, @javax.annotation.Nullable BigDecimal maxDiskGiB, @javax.annotation.Nullable OffsetDateTime lastEventAfter, @javax.annotation.Nullable OffsetDateTime lastEventBefore, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String order) throws ApiException {
        ApiResponse<PaginatedSandboxes> localVarResp = listSandboxesPaginatedWithHttpInfo(xDaytonaOrganizationID, page, limit, id, name, labels, includeErroredDeleted, states, snapshots, regions, minCpu, maxCpu, minMemoryGiB, maxMemoryGiB, minDiskGiB, maxDiskGiB, lastEventAfter, lastEventBefore, sort, order);
        return localVarResp.getData();
    }

    /**
     * List all sandboxes paginated
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number of the results (optional, default to 1)
     * @param limit Number of results per page (optional, default to 100)
     * @param id Filter by partial ID match (optional)
     * @param name Filter by partial name match (optional)
     * @param labels JSON encoded labels to filter by (optional)
     * @param includeErroredDeleted Include results with errored state and deleted desired state (optional, default to false)
     * @param states List of states to filter by (optional)
     * @param snapshots List of snapshot names to filter by (optional)
     * @param regions List of regions to filter by (optional)
     * @param minCpu Minimum CPU (optional)
     * @param maxCpu Maximum CPU (optional)
     * @param minMemoryGiB Minimum memory in GiB (optional)
     * @param maxMemoryGiB Maximum memory in GiB (optional)
     * @param minDiskGiB Minimum disk space in GiB (optional)
     * @param maxDiskGiB Maximum disk space in GiB (optional)
     * @param lastEventAfter Include items with last event after this timestamp (optional)
     * @param lastEventBefore Include items with last event before this timestamp (optional)
     * @param sort Field to sort by (optional, default to createdAt)
     * @param order Direction to sort by (optional, default to desc)
     * @return ApiResponse&lt;PaginatedSandboxes&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> Paginated list of all sandboxes </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<PaginatedSandboxes> listSandboxesPaginatedWithHttpInfo(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, @javax.annotation.Nullable String id, @javax.annotation.Nullable String name, @javax.annotation.Nullable String labels, @javax.annotation.Nullable Boolean includeErroredDeleted, @javax.annotation.Nullable List<String> states, @javax.annotation.Nullable List<String> snapshots, @javax.annotation.Nullable List<String> regions, @javax.annotation.Nullable BigDecimal minCpu, @javax.annotation.Nullable BigDecimal maxCpu, @javax.annotation.Nullable BigDecimal minMemoryGiB, @javax.annotation.Nullable BigDecimal maxMemoryGiB, @javax.annotation.Nullable BigDecimal minDiskGiB, @javax.annotation.Nullable BigDecimal maxDiskGiB, @javax.annotation.Nullable OffsetDateTime lastEventAfter, @javax.annotation.Nullable OffsetDateTime lastEventBefore, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String order) throws ApiException {
        okhttp3.Call localVarCall = listSandboxesPaginatedValidateBeforeCall(xDaytonaOrganizationID, page, limit, id, name, labels, includeErroredDeleted, states, snapshots, regions, minCpu, maxCpu, minMemoryGiB, maxMemoryGiB, minDiskGiB, maxDiskGiB, lastEventAfter, lastEventBefore, sort, order, null);
        Type localVarReturnType = new TypeToken<PaginatedSandboxes>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * List all sandboxes paginated (asynchronously)
     * 
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param page Page number of the results (optional, default to 1)
     * @param limit Number of results per page (optional, default to 100)
     * @param id Filter by partial ID match (optional)
     * @param name Filter by partial name match (optional)
     * @param labels JSON encoded labels to filter by (optional)
     * @param includeErroredDeleted Include results with errored state and deleted desired state (optional, default to false)
     * @param states List of states to filter by (optional)
     * @param snapshots List of snapshot names to filter by (optional)
     * @param regions List of regions to filter by (optional)
     * @param minCpu Minimum CPU (optional)
     * @param maxCpu Maximum CPU (optional)
     * @param minMemoryGiB Minimum memory in GiB (optional)
     * @param maxMemoryGiB Maximum memory in GiB (optional)
     * @param minDiskGiB Minimum disk space in GiB (optional)
     * @param maxDiskGiB Maximum disk space in GiB (optional)
     * @param lastEventAfter Include items with last event after this timestamp (optional)
     * @param lastEventBefore Include items with last event before this timestamp (optional)
     * @param sort Field to sort by (optional, default to createdAt)
     * @param order Direction to sort by (optional, default to desc)
     * @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> Paginated list of all sandboxes </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call listSandboxesPaginatedAsync(@javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable BigDecimal page, @javax.annotation.Nullable BigDecimal limit, @javax.annotation.Nullable String id, @javax.annotation.Nullable String name, @javax.annotation.Nullable String labels, @javax.annotation.Nullable Boolean includeErroredDeleted, @javax.annotation.Nullable List<String> states, @javax.annotation.Nullable List<String> snapshots, @javax.annotation.Nullable List<String> regions, @javax.annotation.Nullable BigDecimal minCpu, @javax.annotation.Nullable BigDecimal maxCpu, @javax.annotation.Nullable BigDecimal minMemoryGiB, @javax.annotation.Nullable BigDecimal maxMemoryGiB, @javax.annotation.Nullable BigDecimal minDiskGiB, @javax.annotation.Nullable BigDecimal maxDiskGiB, @javax.annotation.Nullable OffsetDateTime lastEventAfter, @javax.annotation.Nullable OffsetDateTime lastEventBefore, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String order, final ApiCallback<PaginatedSandboxes> _callback) throws ApiException {

        okhttp3.Call localVarCall = listSandboxesPaginatedValidateBeforeCall(xDaytonaOrganizationID, page, limit, id, name, labels, includeErroredDeleted, states, snapshots, regions, minCpu, maxCpu, minMemoryGiB, maxMemoryGiB, minDiskGiB, maxDiskGiB, lastEventAfter, lastEventBefore, sort, order, _callback);
        Type localVarReturnType = new TypeToken<PaginatedSandboxes>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for recoverSandbox
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param skipStart If true, the sandbox is left in STOPPED after recovery instead of being started. (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> Recovery initiated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call recoverSandboxCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean skipStart, 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 = "/sandbox/{sandboxIdOrName}/recover"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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>();

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

        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 recoverSandboxValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean skipStart, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling recoverSandbox(Async)");
        }

        return recoverSandboxCall(sandboxIdOrName, xDaytonaOrganizationID, skipStart, _callback);

    }

    /**
     * Recover sandbox from error state
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param skipStart If true, the sandbox is left in STOPPED after recovery instead of being started. (optional)
     * @return Sandbox
     * @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> Recovery initiated </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox recoverSandbox(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean skipStart) throws ApiException {
        ApiResponse<Sandbox> localVarResp = recoverSandboxWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID, skipStart);
        return localVarResp.getData();
    }

    /**
     * Recover sandbox from error state
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param skipStart If true, the sandbox is left in STOPPED after recovery instead of being started. (optional)
     * @return ApiResponse&lt;Sandbox&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> Recovery initiated </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> recoverSandboxWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean skipStart) throws ApiException {
        okhttp3.Call localVarCall = recoverSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, skipStart, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Recover sandbox from error state (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param skipStart If true, the sandbox is left in STOPPED after recovery instead of being started. (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> Recovery initiated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call recoverSandboxAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean skipStart, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = recoverSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, skipStart, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for replaceLabels
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param sandboxLabels  (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> Labels have been successfully replaced </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call replaceLabelsCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull SandboxLabels sandboxLabels, @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 = sandboxLabels;

        // create path and map variables
        String localVarPath = "/sandbox/{sandboxIdOrName}/labels"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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);
        }

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


        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 replaceLabelsValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull SandboxLabels sandboxLabels, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling replaceLabels(Async)");
        }

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

        return replaceLabelsCall(sandboxIdOrName, sandboxLabels, xDaytonaOrganizationID, _callback);

    }

    /**
     * Replace sandbox labels
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param sandboxLabels  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return SandboxLabels
     * @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> Labels have been successfully replaced </td><td>  -  </td></tr>
     </table>
     */
    public SandboxLabels replaceLabels(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull SandboxLabels sandboxLabels, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<SandboxLabels> localVarResp = replaceLabelsWithHttpInfo(sandboxIdOrName, sandboxLabels, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Replace sandbox labels
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param sandboxLabels  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;SandboxLabels&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> Labels have been successfully replaced </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<SandboxLabels> replaceLabelsWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull SandboxLabels sandboxLabels, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = replaceLabelsValidateBeforeCall(sandboxIdOrName, sandboxLabels, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<SandboxLabels>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Replace sandbox labels (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param sandboxLabels  (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> Labels have been successfully replaced </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call replaceLabelsAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull SandboxLabels sandboxLabels, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<SandboxLabels> _callback) throws ApiException {

        okhttp3.Call localVarCall = replaceLabelsValidateBeforeCall(sandboxIdOrName, sandboxLabels, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<SandboxLabels>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for resizeSandbox
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param resizeSandbox  (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> Sandbox has been resized </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call resizeSandboxCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull ResizeSandbox resizeSandbox, @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 = resizeSandbox;

        // create path and map variables
        String localVarPath = "/sandbox/{sandboxIdOrName}/resize"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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);
        }

        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 resizeSandboxValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull ResizeSandbox resizeSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling resizeSandbox(Async)");
        }

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

        return resizeSandboxCall(sandboxIdOrName, resizeSandbox, xDaytonaOrganizationID, _callback);

    }

    /**
     * Resize sandbox resources
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param resizeSandbox  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Sandbox has been resized </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox resizeSandbox(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull ResizeSandbox resizeSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = resizeSandboxWithHttpInfo(sandboxIdOrName, resizeSandbox, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Resize sandbox resources
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param resizeSandbox  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Sandbox has been resized </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> resizeSandboxWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull ResizeSandbox resizeSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = resizeSandboxValidateBeforeCall(sandboxIdOrName, resizeSandbox, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Resize sandbox resources (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param resizeSandbox  (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> Sandbox has been resized </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call resizeSandboxAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull ResizeSandbox resizeSandbox, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = resizeSandboxValidateBeforeCall(sandboxIdOrName, resizeSandbox, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for revokeSshAccess
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked. (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> SSH access has been revoked </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call revokeSshAccessCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable String token, 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 = "/sandbox/{sandboxIdOrName}/ssh-access"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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>();

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

        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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        return revokeSshAccessCall(sandboxIdOrName, xDaytonaOrganizationID, token, _callback);

    }

    /**
     * Revoke SSH access for sandbox
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked. (optional)
     * @return Sandbox
     * @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> SSH access has been revoked </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox revokeSshAccess(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable String token) throws ApiException {
        ApiResponse<Sandbox> localVarResp = revokeSshAccessWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID, token);
        return localVarResp.getData();
    }

    /**
     * Revoke SSH access for sandbox
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked. (optional)
     * @return ApiResponse&lt;Sandbox&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> SSH access has been revoked </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> revokeSshAccessWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable String token) throws ApiException {
        okhttp3.Call localVarCall = revokeSshAccessValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, token, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Revoke SSH access for sandbox (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked. (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> SSH access has been revoked </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call revokeSshAccessAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable String token, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = revokeSshAccessValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, token, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for setAutoArchiveInterval
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-archive interval in minutes (0 means the maximum interval will be used) (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> Auto-archive interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call setAutoArchiveIntervalCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @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 = "/sandbox/{sandboxIdOrName}/autoarchive/{interval}"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.toString()))
            .replace("{" + "interval" + "}", localVarApiClient.escapeString(interval.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 setAutoArchiveIntervalValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling setAutoArchiveInterval(Async)");
        }

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

        return setAutoArchiveIntervalCall(sandboxIdOrName, interval, xDaytonaOrganizationID, _callback);

    }

    /**
     * Set sandbox auto-archive interval
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-archive interval in minutes (0 means the maximum interval will be used) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Auto-archive interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox setAutoArchiveInterval(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = setAutoArchiveIntervalWithHttpInfo(sandboxIdOrName, interval, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Set sandbox auto-archive interval
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-archive interval in minutes (0 means the maximum interval will be used) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Auto-archive interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> setAutoArchiveIntervalWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = setAutoArchiveIntervalValidateBeforeCall(sandboxIdOrName, interval, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Set sandbox auto-archive interval (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-archive interval in minutes (0 means the maximum interval will be used) (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> Auto-archive interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call setAutoArchiveIntervalAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = setAutoArchiveIntervalValidateBeforeCall(sandboxIdOrName, interval, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for setAutoDeleteInterval
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping) (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> Auto-delete interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call setAutoDeleteIntervalCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @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 = "/sandbox/{sandboxIdOrName}/autodelete/{interval}"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.toString()))
            .replace("{" + "interval" + "}", localVarApiClient.escapeString(interval.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 setAutoDeleteIntervalValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling setAutoDeleteInterval(Async)");
        }

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

        return setAutoDeleteIntervalCall(sandboxIdOrName, interval, xDaytonaOrganizationID, _callback);

    }

    /**
     * Set sandbox auto-delete interval
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Auto-delete interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox setAutoDeleteInterval(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = setAutoDeleteIntervalWithHttpInfo(sandboxIdOrName, interval, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Set sandbox auto-delete interval
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Auto-delete interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> setAutoDeleteIntervalWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = setAutoDeleteIntervalValidateBeforeCall(sandboxIdOrName, interval, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Set sandbox auto-delete interval (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping) (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> Auto-delete interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call setAutoDeleteIntervalAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = setAutoDeleteIntervalValidateBeforeCall(sandboxIdOrName, interval, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for setAutostopInterval
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-stop interval in minutes (0 to disable) (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> Auto-stop interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call setAutostopIntervalCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @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 = "/sandbox/{sandboxIdOrName}/autostop/{interval}"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.toString()))
            .replace("{" + "interval" + "}", localVarApiClient.escapeString(interval.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 setAutostopIntervalValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling setAutostopInterval(Async)");
        }

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

        return setAutostopIntervalCall(sandboxIdOrName, interval, xDaytonaOrganizationID, _callback);

    }

    /**
     * Set sandbox auto-stop interval
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-stop interval in minutes (0 to disable) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Auto-stop interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox setAutostopInterval(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = setAutostopIntervalWithHttpInfo(sandboxIdOrName, interval, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Set sandbox auto-stop interval
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-stop interval in minutes (0 to disable) (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Auto-stop interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> setAutostopIntervalWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = setAutostopIntervalValidateBeforeCall(sandboxIdOrName, interval, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Set sandbox auto-stop interval (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param interval Auto-stop interval in minutes (0 to disable) (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> Auto-stop interval has been set </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call setAutostopIntervalAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull BigDecimal interval, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = setAutostopIntervalValidateBeforeCall(sandboxIdOrName, interval, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for startSandbox
     * @param sandboxIdOrName ID or name of the sandbox (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> Sandbox has been started or is being restored from archived state </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call startSandboxCall(@javax.annotation.Nonnull String sandboxIdOrName, @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 = "/sandbox/{sandboxIdOrName}/start"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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 startSandboxValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling startSandbox(Async)");
        }

        return startSandboxCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);

    }

    /**
     * Start sandbox
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Sandbox has been started or is being restored from archived state </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox startSandbox(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = startSandboxWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Start sandbox
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Sandbox has been started or is being restored from archived state </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> startSandboxWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = startSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Start sandbox (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (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> Sandbox has been started or is being restored from archived state </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call startSandboxAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = startSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for stopSandbox
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param force Force stop the sandbox using SIGKILL instead of SIGTERM (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> Sandbox has been stopped </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call stopSandboxCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean force, 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 = "/sandbox/{sandboxIdOrName}/stop"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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>();

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

        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 stopSandboxValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean force, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling stopSandbox(Async)");
        }

        return stopSandboxCall(sandboxIdOrName, xDaytonaOrganizationID, force, _callback);

    }

    /**
     * Stop sandbox
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param force Force stop the sandbox using SIGKILL instead of SIGTERM (optional)
     * @return Sandbox
     * @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> Sandbox has been stopped </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox stopSandbox(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean force) throws ApiException {
        ApiResponse<Sandbox> localVarResp = stopSandboxWithHttpInfo(sandboxIdOrName, xDaytonaOrganizationID, force);
        return localVarResp.getData();
    }

    /**
     * Stop sandbox
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param force Force stop the sandbox using SIGKILL instead of SIGTERM (optional)
     * @return ApiResponse&lt;Sandbox&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> Sandbox has been stopped </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> stopSandboxWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean force) throws ApiException {
        okhttp3.Call localVarCall = stopSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, force, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Stop sandbox (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @param force Force stop the sandbox using SIGKILL instead of SIGTERM (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> Sandbox has been stopped </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call stopSandboxAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nullable String xDaytonaOrganizationID, @javax.annotation.Nullable Boolean force, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = stopSandboxValidateBeforeCall(sandboxIdOrName, xDaytonaOrganizationID, force, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateLastActivity
     * @param sandboxId ID of the sandbox (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> Last activity has been updated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateLastActivityCall(@javax.annotation.Nonnull String sandboxId, @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 = "/sandbox/{sandboxId}/last-activity"
            .replace("{" + "sandboxId" + "}", localVarApiClient.escapeString(sandboxId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        return updateLastActivityCall(sandboxId, xDaytonaOrganizationID, _callback);

    }

    /**
     * Update sandbox last activity
     * 
     * @param sandboxId ID of the sandbox (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> 201 </td><td> Last activity has been updated </td><td>  -  </td></tr>
     </table>
     */
    public void updateLastActivity(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        updateLastActivityWithHttpInfo(sandboxId, xDaytonaOrganizationID);
    }

    /**
     * Update sandbox last activity
     * 
     * @param sandboxId ID of the sandbox (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> 201 </td><td> Last activity has been updated </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> updateLastActivityWithHttpInfo(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = updateLastActivityValidateBeforeCall(sandboxId, xDaytonaOrganizationID, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Update sandbox last activity (asynchronously)
     * 
     * @param sandboxId ID of the sandbox (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> Last activity has been updated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateLastActivityAsync(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateLastActivityValidateBeforeCall(sandboxId, xDaytonaOrganizationID, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateNetworkSettings
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param updateSandboxNetworkSettings  (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> Network settings have been updated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateNetworkSettingsCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull UpdateSandboxNetworkSettings updateSandboxNetworkSettings, @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 = updateSandboxNetworkSettings;

        // create path and map variables
        String localVarPath = "/sandbox/{sandboxIdOrName}/network-settings"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.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);
        }

        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 updateNetworkSettingsValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull UpdateSandboxNetworkSettings updateSandboxNetworkSettings, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling updateNetworkSettings(Async)");
        }

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

        return updateNetworkSettingsCall(sandboxIdOrName, updateSandboxNetworkSettings, xDaytonaOrganizationID, _callback);

    }

    /**
     * Update sandbox network settings
     * Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param updateSandboxNetworkSettings  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Network settings have been updated </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox updateNetworkSettings(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull UpdateSandboxNetworkSettings updateSandboxNetworkSettings, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = updateNetworkSettingsWithHttpInfo(sandboxIdOrName, updateSandboxNetworkSettings, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Update sandbox network settings
     * Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param updateSandboxNetworkSettings  (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Network settings have been updated </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> updateNetworkSettingsWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull UpdateSandboxNetworkSettings updateSandboxNetworkSettings, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = updateNetworkSettingsValidateBeforeCall(sandboxIdOrName, updateSandboxNetworkSettings, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Update sandbox network settings (asynchronously)
     * Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param updateSandboxNetworkSettings  (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> Network settings have been updated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateNetworkSettingsAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull UpdateSandboxNetworkSettings updateSandboxNetworkSettings, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateNetworkSettingsValidateBeforeCall(sandboxIdOrName, updateSandboxNetworkSettings, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for updatePublicStatus
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param isPublic Public status to set (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> Public status has been successfully updated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updatePublicStatusCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Boolean isPublic, @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 = "/sandbox/{sandboxIdOrName}/public/{isPublic}"
            .replace("{" + "sandboxIdOrName" + "}", localVarApiClient.escapeString(sandboxIdOrName.toString()))
            .replace("{" + "isPublic" + "}", localVarApiClient.escapeString(isPublic.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 updatePublicStatusValidateBeforeCall(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Boolean isPublic, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'sandboxIdOrName' is set
        if (sandboxIdOrName == null) {
            throw new ApiException("Missing the required parameter 'sandboxIdOrName' when calling updatePublicStatus(Async)");
        }

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

        return updatePublicStatusCall(sandboxIdOrName, isPublic, xDaytonaOrganizationID, _callback);

    }

    /**
     * Update public status
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param isPublic Public status to set (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return Sandbox
     * @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> Public status has been successfully updated </td><td>  -  </td></tr>
     </table>
     */
    public Sandbox updatePublicStatus(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Boolean isPublic, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<Sandbox> localVarResp = updatePublicStatusWithHttpInfo(sandboxIdOrName, isPublic, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Update public status
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param isPublic Public status to set (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;Sandbox&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> Public status has been successfully updated </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Sandbox> updatePublicStatusWithHttpInfo(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Boolean isPublic, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = updatePublicStatusValidateBeforeCall(sandboxIdOrName, isPublic, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Update public status (asynchronously)
     * 
     * @param sandboxIdOrName ID or name of the sandbox (required)
     * @param isPublic Public status to set (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> Public status has been successfully updated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updatePublicStatusAsync(@javax.annotation.Nonnull String sandboxIdOrName, @javax.annotation.Nonnull Boolean isPublic, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Sandbox> _callback) throws ApiException {

        okhttp3.Call localVarCall = updatePublicStatusValidateBeforeCall(sandboxIdOrName, isPublic, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<Sandbox>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for updateSandboxState
     * @param sandboxId ID of the sandbox (required)
     * @param updateSandboxStateDto  (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> Sandbox state has been successfully updated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateSandboxStateCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull UpdateSandboxStateDto updateSandboxStateDto, @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 = updateSandboxStateDto;

        // create path and map variables
        String localVarPath = "/sandbox/{sandboxId}/state"
            .replace("{" + "sandboxId" + "}", localVarApiClient.escapeString(sandboxId.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

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

        return updateSandboxStateCall(sandboxId, updateSandboxStateDto, xDaytonaOrganizationID, _callback);

    }

    /**
     * Update sandbox state
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param updateSandboxStateDto  (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> Sandbox state has been successfully updated </td><td>  -  </td></tr>
     </table>
     */
    public void updateSandboxState(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull UpdateSandboxStateDto updateSandboxStateDto, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        updateSandboxStateWithHttpInfo(sandboxId, updateSandboxStateDto, xDaytonaOrganizationID);
    }

    /**
     * Update sandbox state
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param updateSandboxStateDto  (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> Sandbox state has been successfully updated </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Void> updateSandboxStateWithHttpInfo(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull UpdateSandboxStateDto updateSandboxStateDto, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = updateSandboxStateValidateBeforeCall(sandboxId, updateSandboxStateDto, xDaytonaOrganizationID, null);
        return localVarApiClient.execute(localVarCall);
    }

    /**
     * Update sandbox state (asynchronously)
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param updateSandboxStateDto  (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> Sandbox state has been successfully updated </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call updateSandboxStateAsync(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull UpdateSandboxStateDto updateSandboxStateDto, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<Void> _callback) throws ApiException {

        okhttp3.Call localVarCall = updateSandboxStateValidateBeforeCall(sandboxId, updateSandboxStateDto, xDaytonaOrganizationID, _callback);
        localVarApiClient.executeAsync(localVarCall, _callback);
        return localVarCall;
    }
    /**
     * Build call for validateSshAccess
     * @param token SSH access token to validate (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> SSH access validation result </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call validateSshAccessCall(@javax.annotation.Nonnull String token, @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 = "/sandbox/ssh-access/validate";

        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>();

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

        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 validateSshAccessValidateBeforeCall(@javax.annotation.Nonnull String token, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'token' is set
        if (token == null) {
            throw new ApiException("Missing the required parameter 'token' when calling validateSshAccess(Async)");
        }

        return validateSshAccessCall(token, xDaytonaOrganizationID, _callback);

    }

    /**
     * Validate SSH access for sandbox
     * 
     * @param token SSH access token to validate (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return SshAccessValidationDto
     * @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> SSH access validation result </td><td>  -  </td></tr>
     </table>
     */
    public SshAccessValidationDto validateSshAccess(@javax.annotation.Nonnull String token, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        ApiResponse<SshAccessValidationDto> localVarResp = validateSshAccessWithHttpInfo(token, xDaytonaOrganizationID);
        return localVarResp.getData();
    }

    /**
     * Validate SSH access for sandbox
     * 
     * @param token SSH access token to validate (required)
     * @param xDaytonaOrganizationID Use with JWT to specify the organization ID (optional)
     * @return ApiResponse&lt;SshAccessValidationDto&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> SSH access validation result </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<SshAccessValidationDto> validateSshAccessWithHttpInfo(@javax.annotation.Nonnull String token, @javax.annotation.Nullable String xDaytonaOrganizationID) throws ApiException {
        okhttp3.Call localVarCall = validateSshAccessValidateBeforeCall(token, xDaytonaOrganizationID, null);
        Type localVarReturnType = new TypeToken<SshAccessValidationDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Validate SSH access for sandbox (asynchronously)
     * 
     * @param token SSH access token to validate (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> SSH access validation result </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call validateSshAccessAsync(@javax.annotation.Nonnull String token, @javax.annotation.Nullable String xDaytonaOrganizationID, final ApiCallback<SshAccessValidationDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = validateSshAccessValidateBeforeCall(token, xDaytonaOrganizationID, _callback);
        Type localVarReturnType = new TypeToken<SshAccessValidationDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
}
