Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

33.0 KB
Raw Blame
/* tslint:disable */
/* eslint-disable */
/**
 * BoxLite Runner API
 * BoxLite Runner API
 *
 * The version of the OpenAPI document: v0.0.0-dev
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { BoxInfoResponse } from '../models';
// @ts-ignore
import type { CreateBoxDTO } from '../models';
// @ts-ignore
import type { ErrorResponse } from '../models';
// @ts-ignore
import type { IsRecoverableDTO } from '../models';
// @ts-ignore
import type { IsRecoverableResponse } from '../models';
// @ts-ignore
import type { RecoverBoxDTO } from '../models';
// @ts-ignore
import type { StartBoxResponse } from '../models';
// @ts-ignore
import type { StopBoxDTO } from '../models';
// @ts-ignore
import type { UpdateNetworkSettingsDTO } from '../models';
/**
 * BoxApi - axios parameter creator
 */
export const BoxApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Create a box
         * @summary Create a box
         * @param {CreateBoxDTO} box Create box
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        create: async (box: CreateBoxDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'box' is not null or undefined
            assertParamExists('create', 'box', box)
            const localVarPath = `/boxes`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication Bearer required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarHeaderParameter['Accept'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(box, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Destroy box
         * @summary Destroy box
         * @param {string} boxId Box ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        destroy: async (boxId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'boxId' is not null or undefined
            assertParamExists('destroy', 'boxId', boxId)
            const localVarPath = `/boxes/{boxId}/destroy`
                .replace('{boxId}', encodeURIComponent(String(boxId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication Bearer required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            localVarHeaderParameter['Accept'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get box info
         * @summary Get box info
         * @param {string} boxId Box ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        info: async (boxId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'boxId' is not null or undefined
            assertParamExists('info', 'boxId', boxId)
            const localVarPath = `/boxes/{boxId}`
                .replace('{boxId}', encodeURIComponent(String(boxId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication Bearer required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            localVarHeaderParameter['Accept'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Check if the box\'s error reason indicates a recoverable error
         * @summary Check if box error is recoverable
         * @param {string} boxId Box ID
         * @param {IsRecoverableDTO} request Error reason to check
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        isRecoverable: async (boxId: string, request: IsRecoverableDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'boxId' is not null or undefined
            assertParamExists('isRecoverable', 'boxId', boxId)
            // verify required parameter 'request' is not null or undefined
            assertParamExists('isRecoverable', 'request', request)
            const localVarPath = `/boxes/{boxId}/is-recoverable`
                .replace('{boxId}', encodeURIComponent(String(boxId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication Bearer required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarHeaderParameter['Accept'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(request, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Recover box from error state using specified recovery type
         * @summary Recover box from error state
         * @param {string} boxId Box ID
         * @param {RecoverBoxDTO} recovery Recovery parameters
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        recover: async (boxId: string, recovery: RecoverBoxDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'boxId' is not null or undefined
            assertParamExists('recover', 'boxId', boxId)
            // verify required parameter 'recovery' is not null or undefined
            assertParamExists('recover', 'recovery', recovery)
            const localVarPath = `/boxes/{boxId}/recover`
                .replace('{boxId}', encodeURIComponent(String(boxId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication Bearer required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarHeaderParameter['Accept'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(recovery, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Start box
         * @summary Start box
         * @param {string} boxId Box ID
         * @param {string} [token] Auth token
         * @param {object} [metadata] Metadata
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        start: async (boxId: string, token?: string, metadata?: object, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'boxId' is not null or undefined
            assertParamExists('start', 'boxId', boxId)
            const localVarPath = `/boxes/{boxId}/start`
                .replace('{boxId}', encodeURIComponent(String(boxId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication Bearer required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            if (token !== undefined) {
                localVarQueryParameter['token'] = token;
            }

            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarHeaderParameter['Accept'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(metadata, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Stop box
         * @summary Stop box
         * @param {string} boxId Box ID
         * @param {StopBoxDTO} [box] Stop box
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stop: async (boxId: string, box?: StopBoxDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'boxId' is not null or undefined
            assertParamExists('stop', 'boxId', boxId)
            const localVarPath = `/boxes/{boxId}/stop`
                .replace('{boxId}', encodeURIComponent(String(boxId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication Bearer required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarHeaderParameter['Accept'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(box, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update box network settings
         * @summary Update box network settings
         * @param {string} boxId Box ID
         * @param {UpdateNetworkSettingsDTO} box Update network settings
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateNetworkSettings: async (boxId: string, box: UpdateNetworkSettingsDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'boxId' is not null or undefined
            assertParamExists('updateNetworkSettings', 'boxId', boxId)
            // verify required parameter 'box' is not null or undefined
            assertParamExists('updateNetworkSettings', 'box', box)
            const localVarPath = `/boxes/{boxId}/network-settings`
                .replace('{boxId}', encodeURIComponent(String(boxId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication Bearer required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarHeaderParameter['Accept'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(box, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * BoxApi - functional programming interface
 */
export const BoxApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = BoxApiAxiosParamCreator(configuration)
    return {
        /**
         * Create a box
         * @summary Create a box
         * @param {CreateBoxDTO} box Create box
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async create(box: CreateBoxDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StartBoxResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.create(box, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BoxApi.create']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Destroy box
         * @summary Destroy box
         * @param {string} boxId Box ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async destroy(boxId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.destroy(boxId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BoxApi.destroy']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get box info
         * @summary Get box info
         * @param {string} boxId Box ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async info(boxId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BoxInfoResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.info(boxId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BoxApi.info']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Check if the box\'s error reason indicates a recoverable error
         * @summary Check if box error is recoverable
         * @param {string} boxId Box ID
         * @param {IsRecoverableDTO} request Error reason to check
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async isRecoverable(boxId: string, request: IsRecoverableDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IsRecoverableResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.isRecoverable(boxId, request, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BoxApi.isRecoverable']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Recover box from error state using specified recovery type
         * @summary Recover box from error state
         * @param {string} boxId Box ID
         * @param {RecoverBoxDTO} recovery Recovery parameters
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async recover(boxId: string, recovery: RecoverBoxDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.recover(boxId, recovery, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BoxApi.recover']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Start box
         * @summary Start box
         * @param {string} boxId Box ID
         * @param {string} [token] Auth token
         * @param {object} [metadata] Metadata
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async start(boxId: string, token?: string, metadata?: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StartBoxResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.start(boxId, token, metadata, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BoxApi.start']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Stop box
         * @summary Stop box
         * @param {string} boxId Box ID
         * @param {StopBoxDTO} [box] Stop box
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async stop(boxId: string, box?: StopBoxDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.stop(boxId, box, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BoxApi.stop']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update box network settings
         * @summary Update box network settings
         * @param {string} boxId Box ID
         * @param {UpdateNetworkSettingsDTO} box Update network settings
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateNetworkSettings(boxId: string, box: UpdateNetworkSettingsDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateNetworkSettings(boxId, box, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['BoxApi.updateNetworkSettings']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * BoxApi - factory interface
 */
export const BoxApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = BoxApiFp(configuration)
    return {
        /**
         * Create a box
         * @summary Create a box
         * @param {CreateBoxDTO} box Create box
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        create(box: CreateBoxDTO, options?: RawAxiosRequestConfig): AxiosPromise<StartBoxResponse> {
            return localVarFp.create(box, options).then((request) => request(axios, basePath));
        },
        /**
         * Destroy box
         * @summary Destroy box
         * @param {string} boxId Box ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        destroy(boxId: string, options?: RawAxiosRequestConfig): AxiosPromise<string> {
            return localVarFp.destroy(boxId, options).then((request) => request(axios, basePath));
        },
        /**
         * Get box info
         * @summary Get box info
         * @param {string} boxId Box ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        info(boxId: string, options?: RawAxiosRequestConfig): AxiosPromise<BoxInfoResponse> {
            return localVarFp.info(boxId, options).then((request) => request(axios, basePath));
        },
        /**
         * Check if the box\'s error reason indicates a recoverable error
         * @summary Check if box error is recoverable
         * @param {string} boxId Box ID
         * @param {IsRecoverableDTO} request Error reason to check
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        isRecoverable(boxId: string, request: IsRecoverableDTO, options?: RawAxiosRequestConfig): AxiosPromise<IsRecoverableResponse> {
            return localVarFp.isRecoverable(boxId, request, options).then((request) => request(axios, basePath));
        },
        /**
         * Recover box from error state using specified recovery type
         * @summary Recover box from error state
         * @param {string} boxId Box ID
         * @param {RecoverBoxDTO} recovery Recovery parameters
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        recover(boxId: string, recovery: RecoverBoxDTO, options?: RawAxiosRequestConfig): AxiosPromise<string> {
            return localVarFp.recover(boxId, recovery, options).then((request) => request(axios, basePath));
        },
        /**
         * Start box
         * @summary Start box
         * @param {string} boxId Box ID
         * @param {string} [token] Auth token
         * @param {object} [metadata] Metadata
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        start(boxId: string, token?: string, metadata?: object, options?: RawAxiosRequestConfig): AxiosPromise<StartBoxResponse> {
            return localVarFp.start(boxId, token, metadata, options).then((request) => request(axios, basePath));
        },
        /**
         * Stop box
         * @summary Stop box
         * @param {string} boxId Box ID
         * @param {StopBoxDTO} [box] Stop box
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stop(boxId: string, box?: StopBoxDTO, options?: RawAxiosRequestConfig): AxiosPromise<string> {
            return localVarFp.stop(boxId, box, options).then((request) => request(axios, basePath));
        },
        /**
         * Update box network settings
         * @summary Update box network settings
         * @param {string} boxId Box ID
         * @param {UpdateNetworkSettingsDTO} box Update network settings
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateNetworkSettings(boxId: string, box: UpdateNetworkSettingsDTO, options?: RawAxiosRequestConfig): AxiosPromise<string> {
            return localVarFp.updateNetworkSettings(boxId, box, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * BoxApi - object-oriented interface
 */
export class BoxApi extends BaseAPI {
    /**
     * Create a box
     * @summary Create a box
     * @param {CreateBoxDTO} box Create box
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public create(box: CreateBoxDTO, options?: RawAxiosRequestConfig) {
        return BoxApiFp(this.configuration).create(box, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Destroy box
     * @summary Destroy box
     * @param {string} boxId Box ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public destroy(boxId: string, options?: RawAxiosRequestConfig) {
        return BoxApiFp(this.configuration).destroy(boxId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get box info
     * @summary Get box info
     * @param {string} boxId Box ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public info(boxId: string, options?: RawAxiosRequestConfig) {
        return BoxApiFp(this.configuration).info(boxId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Check if the box\'s error reason indicates a recoverable error
     * @summary Check if box error is recoverable
     * @param {string} boxId Box ID
     * @param {IsRecoverableDTO} request Error reason to check
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public isRecoverable(boxId: string, request: IsRecoverableDTO, options?: RawAxiosRequestConfig) {
        return BoxApiFp(this.configuration).isRecoverable(boxId, request, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Recover box from error state using specified recovery type
     * @summary Recover box from error state
     * @param {string} boxId Box ID
     * @param {RecoverBoxDTO} recovery Recovery parameters
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public recover(boxId: string, recovery: RecoverBoxDTO, options?: RawAxiosRequestConfig) {
        return BoxApiFp(this.configuration).recover(boxId, recovery, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Start box
     * @summary Start box
     * @param {string} boxId Box ID
     * @param {string} [token] Auth token
     * @param {object} [metadata] Metadata
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public start(boxId: string, token?: string, metadata?: object, options?: RawAxiosRequestConfig) {
        return BoxApiFp(this.configuration).start(boxId, token, metadata, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Stop box
     * @summary Stop box
     * @param {string} boxId Box ID
     * @param {StopBoxDTO} [box] Stop box
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public stop(boxId: string, box?: StopBoxDTO, options?: RawAxiosRequestConfig) {
        return BoxApiFp(this.configuration).stop(boxId, box, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update box network settings
     * @summary Update box network settings
     * @param {string} boxId Box ID
     * @param {UpdateNetworkSettingsDTO} box Update network settings
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public updateNetworkSettings(boxId: string, box: UpdateNetworkSettingsDTO, options?: RawAxiosRequestConfig) {
        return BoxApiFp(this.configuration).updateNetworkSettings(boxId, box, options).then((request) => request(this.axios, this.basePath));
    }
}