/*
 * 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 java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

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

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

    public PreviewApi(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 getSandboxIdFromSignedPreviewUrlToken
     * @param signedPreviewToken Signed preview URL token (required)
     * @param port Port number to get sandbox ID from signed preview URL token (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Sandbox ID from signed preview URL token </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxIdFromSignedPreviewUrlTokenCall(@javax.annotation.Nonnull String signedPreviewToken, @javax.annotation.Nonnull BigDecimal port, 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 = "/preview/{signedPreviewToken}/{port}/sandbox-id"
            .replace("{" + "signedPreviewToken" + "}", localVarApiClient.escapeString(signedPreviewToken.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);
        }

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

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

        return getSandboxIdFromSignedPreviewUrlTokenCall(signedPreviewToken, port, _callback);

    }

    /**
     * Get sandbox ID from signed preview URL token
     * 
     * @param signedPreviewToken Signed preview URL token (required)
     * @param port Port number to get sandbox ID from signed preview URL token (required)
     * @return String
     * @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 ID from signed preview URL token </td><td>  -  </td></tr>
     </table>
     */
    public String getSandboxIdFromSignedPreviewUrlToken(@javax.annotation.Nonnull String signedPreviewToken, @javax.annotation.Nonnull BigDecimal port) throws ApiException {
        ApiResponse<String> localVarResp = getSandboxIdFromSignedPreviewUrlTokenWithHttpInfo(signedPreviewToken, port);
        return localVarResp.getData();
    }

    /**
     * Get sandbox ID from signed preview URL token
     * 
     * @param signedPreviewToken Signed preview URL token (required)
     * @param port Port number to get sandbox ID from signed preview URL token (required)
     * @return ApiResponse&lt;String&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 ID from signed preview URL token </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<String> getSandboxIdFromSignedPreviewUrlTokenWithHttpInfo(@javax.annotation.Nonnull String signedPreviewToken, @javax.annotation.Nonnull BigDecimal port) throws ApiException {
        okhttp3.Call localVarCall = getSandboxIdFromSignedPreviewUrlTokenValidateBeforeCall(signedPreviewToken, port, null);
        Type localVarReturnType = new TypeToken<String>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Get sandbox ID from signed preview URL token (asynchronously)
     * 
     * @param signedPreviewToken Signed preview URL token (required)
     * @param port Port number to get sandbox ID from signed preview URL token (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Sandbox ID from signed preview URL token </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call getSandboxIdFromSignedPreviewUrlTokenAsync(@javax.annotation.Nonnull String signedPreviewToken, @javax.annotation.Nonnull BigDecimal port, final ApiCallback<String> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSandboxIdFromSignedPreviewUrlTokenValidateBeforeCall(signedPreviewToken, port, _callback);
        Type localVarReturnType = new TypeToken<String>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for hasSandboxAccess
     * @param sandboxId  (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> User access status to the sandbox </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call hasSandboxAccessCall(@javax.annotation.Nonnull String sandboxId, 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 = "/preview/{sandboxId}/access"
            .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);
        }

        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 hasSandboxAccessValidateBeforeCall(@javax.annotation.Nonnull String sandboxId, 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 hasSandboxAccess(Async)");
        }

        return hasSandboxAccessCall(sandboxId, _callback);

    }

    /**
     * Check if user has access to the sandbox
     * 
     * @param sandboxId  (required)
     * @return Boolean
     * @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> User access status to the sandbox </td><td>  -  </td></tr>
     </table>
     */
    public Boolean hasSandboxAccess(@javax.annotation.Nonnull String sandboxId) throws ApiException {
        ApiResponse<Boolean> localVarResp = hasSandboxAccessWithHttpInfo(sandboxId);
        return localVarResp.getData();
    }

    /**
     * Check if user has access to the sandbox
     * 
     * @param sandboxId  (required)
     * @return ApiResponse&lt;Boolean&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> User access status to the sandbox </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Boolean> hasSandboxAccessWithHttpInfo(@javax.annotation.Nonnull String sandboxId) throws ApiException {
        okhttp3.Call localVarCall = hasSandboxAccessValidateBeforeCall(sandboxId, null);
        Type localVarReturnType = new TypeToken<Boolean>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Check if user has access to the sandbox (asynchronously)
     * 
     * @param sandboxId  (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> User access status to the sandbox </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call hasSandboxAccessAsync(@javax.annotation.Nonnull String sandboxId, final ApiCallback<Boolean> _callback) throws ApiException {

        okhttp3.Call localVarCall = hasSandboxAccessValidateBeforeCall(sandboxId, _callback);
        Type localVarReturnType = new TypeToken<Boolean>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for isSandboxPublic
     * @param sandboxId ID of the sandbox (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Public status of the sandbox </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call isSandboxPublicCall(@javax.annotation.Nonnull String sandboxId, 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 = "/preview/{sandboxId}/public"
            .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);
        }

        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 isSandboxPublicValidateBeforeCall(@javax.annotation.Nonnull String sandboxId, 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 isSandboxPublic(Async)");
        }

        return isSandboxPublicCall(sandboxId, _callback);

    }

    /**
     * Check if sandbox is public
     * 
     * @param sandboxId ID of the sandbox (required)
     * @return Boolean
     * @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 of the sandbox </td><td>  -  </td></tr>
     </table>
     */
    public Boolean isSandboxPublic(@javax.annotation.Nonnull String sandboxId) throws ApiException {
        ApiResponse<Boolean> localVarResp = isSandboxPublicWithHttpInfo(sandboxId);
        return localVarResp.getData();
    }

    /**
     * Check if sandbox is public
     * 
     * @param sandboxId ID of the sandbox (required)
     * @return ApiResponse&lt;Boolean&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 of the sandbox </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Boolean> isSandboxPublicWithHttpInfo(@javax.annotation.Nonnull String sandboxId) throws ApiException {
        okhttp3.Call localVarCall = isSandboxPublicValidateBeforeCall(sandboxId, null);
        Type localVarReturnType = new TypeToken<Boolean>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

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

        okhttp3.Call localVarCall = isSandboxPublicValidateBeforeCall(sandboxId, _callback);
        Type localVarReturnType = new TypeToken<Boolean>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for isValidAuthToken
     * @param sandboxId ID of the sandbox (required)
     * @param authToken Auth token of the sandbox (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Sandbox auth token validation status </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call isValidAuthTokenCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull String authToken, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

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

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/preview/{sandboxId}/validate/{authToken}"
            .replace("{" + "sandboxId" + "}", localVarApiClient.escapeString(sandboxId.toString()))
            .replace("{" + "authToken" + "}", localVarApiClient.escapeString(authToken.toString()));

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

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

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call isValidAuthTokenValidateBeforeCall(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull String authToken, 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 isValidAuthToken(Async)");
        }

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

        return isValidAuthTokenCall(sandboxId, authToken, _callback);

    }

    /**
     * Check if sandbox auth token is valid
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param authToken Auth token of the sandbox (required)
     * @return Boolean
     * @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 auth token validation status </td><td>  -  </td></tr>
     </table>
     */
    public Boolean isValidAuthToken(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull String authToken) throws ApiException {
        ApiResponse<Boolean> localVarResp = isValidAuthTokenWithHttpInfo(sandboxId, authToken);
        return localVarResp.getData();
    }

    /**
     * Check if sandbox auth token is valid
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param authToken Auth token of the sandbox (required)
     * @return ApiResponse&lt;Boolean&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 auth token validation status </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<Boolean> isValidAuthTokenWithHttpInfo(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull String authToken) throws ApiException {
        okhttp3.Call localVarCall = isValidAuthTokenValidateBeforeCall(sandboxId, authToken, null);
        Type localVarReturnType = new TypeToken<Boolean>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     * Check if sandbox auth token is valid (asynchronously)
     * 
     * @param sandboxId ID of the sandbox (required)
     * @param authToken Auth token of the sandbox (required)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Sandbox auth token validation status </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call isValidAuthTokenAsync(@javax.annotation.Nonnull String sandboxId, @javax.annotation.Nonnull String authToken, final ApiCallback<Boolean> _callback) throws ApiException {

        okhttp3.Call localVarCall = isValidAuthTokenValidateBeforeCall(sandboxId, authToken, _callback);
        Type localVarReturnType = new TypeToken<Boolean>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
}
