/* tslint:disable */
/* eslint-disable */
/**
 * 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.
 */


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 { CreateWorkspace } from '../models';
// @ts-ignore
import type { SandboxLabels } from '../models';
// @ts-ignore
import type { Workspace } from '../models';
// @ts-ignore
import type { WorkspacePortPreviewUrl } from '../models';
/**
 * WorkspaceApi - axios parameter creator
 */
export const WorkspaceApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary [DEPRECATED] Archive workspace
         * @param {string} workspaceId 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        archiveWorkspaceDeprecated: async (workspaceId: string, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('archiveWorkspaceDeprecated', 'workspaceId', workspaceId)
            const localVarPath = `/workspace/{workspaceId}/archive`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required


            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Create workspace backup
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        createBackupWorkspaceDeprecated: async (workspaceId: string, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('createBackupWorkspaceDeprecated', 'workspaceId', workspaceId)
            const localVarPath = `/workspace/{workspaceId}/backup`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required

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

            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Create a new workspace
         * @param {CreateWorkspace} createWorkspace 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        createWorkspaceDeprecated: async (createWorkspace: CreateWorkspace, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'createWorkspace' is not null or undefined
            assertParamExists('createWorkspaceDeprecated', 'createWorkspace', createWorkspace)
            const localVarPath = `/workspace`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required

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

            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(createWorkspace, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Delete workspace
         * @param {string} workspaceId ID of the workspace
         * @param {boolean} force 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        deleteWorkspaceDeprecated: async (workspaceId: string, force: boolean, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('deleteWorkspaceDeprecated', 'workspaceId', workspaceId)
            // verify required parameter 'force' is not null or undefined
            assertParamExists('deleteWorkspaceDeprecated', 'force', force)
            const localVarPath = `/workspace/{workspaceId}`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
            // 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: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication bearer required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required

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


            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Get build logs
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {boolean} [follow] Whether to follow the logs stream
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        getBuildLogsWorkspaceDeprecated: async (workspaceId: string, xDaytonaOrganizationID?: string, follow?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('getBuildLogsWorkspaceDeprecated', 'workspaceId', workspaceId)
            const localVarPath = `/workspace/{workspaceId}/build-logs`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required

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


            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Get preview URL for a workspace port
         * @param {string} workspaceId ID of the workspace
         * @param {number} port Port number to get preview URL for
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        getPortPreviewUrlWorkspaceDeprecated: async (workspaceId: string, port: number, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('getPortPreviewUrlWorkspaceDeprecated', 'workspaceId', workspaceId)
            // verify required parameter 'port' is not null or undefined
            assertParamExists('getPortPreviewUrlWorkspaceDeprecated', 'port', port)
            const localVarPath = `/workspace/{workspaceId}/ports/{port}/preview-url`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
                .replace(`{${"port"}}`, encodeURIComponent(String(port)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required

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

            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Get workspace details
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {boolean} [verbose] Include verbose output
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        getWorkspaceDeprecated: async (workspaceId: string, xDaytonaOrganizationID?: string, verbose?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('getWorkspaceDeprecated', 'workspaceId', workspaceId)
            const localVarPath = `/workspace/{workspaceId}`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required

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

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

            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] List all workspaces
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {boolean} [verbose] Include verbose output
         * @param {string} [labels] JSON encoded labels to filter by
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        listWorkspacesDeprecated: async (xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/workspace`;
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required

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

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

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

            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Replace workspace labels
         * @param {string} workspaceId ID of the workspace
         * @param {SandboxLabels} sandboxLabels 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        replaceLabelsWorkspaceDeprecated: async (workspaceId: string, sandboxLabels: SandboxLabels, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('replaceLabelsWorkspaceDeprecated', 'workspaceId', workspaceId)
            // verify required parameter 'sandboxLabels' is not null or undefined
            assertParamExists('replaceLabelsWorkspaceDeprecated', 'sandboxLabels', sandboxLabels)
            const localVarPath = `/workspace/{workspaceId}/labels`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
            // 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: 'PUT', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication bearer required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required

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

            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(sandboxLabels, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Set workspace auto-archive interval
         * @param {string} workspaceId ID of the workspace
         * @param {number} interval Auto-archive interval in minutes (0 means the maximum interval will be used)
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        setAutoArchiveIntervalWorkspaceDeprecated: async (workspaceId: string, interval: number, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('setAutoArchiveIntervalWorkspaceDeprecated', 'workspaceId', workspaceId)
            // verify required parameter 'interval' is not null or undefined
            assertParamExists('setAutoArchiveIntervalWorkspaceDeprecated', 'interval', interval)
            const localVarPath = `/workspace/{workspaceId}/autoarchive/{interval}`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
                .replace(`{${"interval"}}`, encodeURIComponent(String(interval)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required


            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Set workspace auto-stop interval
         * @param {string} workspaceId ID of the workspace
         * @param {number} interval Auto-stop interval in minutes (0 to disable)
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        setAutostopIntervalWorkspaceDeprecated: async (workspaceId: string, interval: number, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('setAutostopIntervalWorkspaceDeprecated', 'workspaceId', workspaceId)
            // verify required parameter 'interval' is not null or undefined
            assertParamExists('setAutostopIntervalWorkspaceDeprecated', 'interval', interval)
            const localVarPath = `/workspace/{workspaceId}/autostop/{interval}`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
                .replace(`{${"interval"}}`, encodeURIComponent(String(interval)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required


            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Start workspace
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        startWorkspaceDeprecated: async (workspaceId: string, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('startWorkspaceDeprecated', 'workspaceId', workspaceId)
            const localVarPath = `/workspace/{workspaceId}/start`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required


            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Stop workspace
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        stopWorkspaceDeprecated: async (workspaceId: string, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('stopWorkspaceDeprecated', 'workspaceId', workspaceId)
            const localVarPath = `/workspace/{workspaceId}/stop`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required


            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary [DEPRECATED] Update public status
         * @param {string} workspaceId ID of the workspace
         * @param {boolean} isPublic Public status to set
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        updatePublicStatusWorkspaceDeprecated: async (workspaceId: string, isPublic: boolean, xDaytonaOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'workspaceId' is not null or undefined
            assertParamExists('updatePublicStatusWorkspaceDeprecated', 'workspaceId', workspaceId)
            // verify required parameter 'isPublic' is not null or undefined
            assertParamExists('updatePublicStatusWorkspaceDeprecated', 'isPublic', isPublic)
            const localVarPath = `/workspace/{workspaceId}/public/{isPublic}`
                .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
                .replace(`{${"isPublic"}}`, encodeURIComponent(String(isPublic)));
            // 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
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication oauth2 required


            if (xDaytonaOrganizationID != null) {
                localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID);
            }
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

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

/**
 * WorkspaceApi - functional programming interface
 */
export const WorkspaceApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = WorkspaceApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary [DEPRECATED] Archive workspace
         * @param {string} workspaceId 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async archiveWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.archiveWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.archiveWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Create workspace backup
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async createBackupWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Workspace>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createBackupWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.createBackupWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Create a new workspace
         * @param {CreateWorkspace} createWorkspace 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async createWorkspaceDeprecated(createWorkspace: CreateWorkspace, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Workspace>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createWorkspaceDeprecated(createWorkspace, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.createWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Delete workspace
         * @param {string} workspaceId ID of the workspace
         * @param {boolean} force 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async deleteWorkspaceDeprecated(workspaceId: string, force: boolean, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWorkspaceDeprecated(workspaceId, force, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.deleteWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Get build logs
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {boolean} [follow] Whether to follow the logs stream
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async getBuildLogsWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, follow?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getBuildLogsWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, follow, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.getBuildLogsWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Get preview URL for a workspace port
         * @param {string} workspaceId ID of the workspace
         * @param {number} port Port number to get preview URL for
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async getPortPreviewUrlWorkspaceDeprecated(workspaceId: string, port: number, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorkspacePortPreviewUrl>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getPortPreviewUrlWorkspaceDeprecated(workspaceId, port, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.getPortPreviewUrlWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Get workspace details
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {boolean} [verbose] Include verbose output
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async getWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, verbose?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Workspace>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, verbose, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.getWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] List all workspaces
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {boolean} [verbose] Include verbose output
         * @param {string} [labels] JSON encoded labels to filter by
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async listWorkspacesDeprecated(xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Workspace>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkspacesDeprecated(xDaytonaOrganizationID, verbose, labels, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.listWorkspacesDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Replace workspace labels
         * @param {string} workspaceId ID of the workspace
         * @param {SandboxLabels} sandboxLabels 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async replaceLabelsWorkspaceDeprecated(workspaceId: string, sandboxLabels: SandboxLabels, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SandboxLabels>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.replaceLabelsWorkspaceDeprecated(workspaceId, sandboxLabels, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.replaceLabelsWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Set workspace auto-archive interval
         * @param {string} workspaceId ID of the workspace
         * @param {number} interval Auto-archive interval in minutes (0 means the maximum interval will be used)
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async setAutoArchiveIntervalWorkspaceDeprecated(workspaceId: string, interval: number, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.setAutoArchiveIntervalWorkspaceDeprecated(workspaceId, interval, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.setAutoArchiveIntervalWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Set workspace auto-stop interval
         * @param {string} workspaceId ID of the workspace
         * @param {number} interval Auto-stop interval in minutes (0 to disable)
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async setAutostopIntervalWorkspaceDeprecated(workspaceId: string, interval: number, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.setAutostopIntervalWorkspaceDeprecated(workspaceId, interval, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.setAutostopIntervalWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Start workspace
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async startWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.startWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.startWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Stop workspace
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async stopWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.stopWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.stopWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary [DEPRECATED] Update public status
         * @param {string} workspaceId ID of the workspace
         * @param {boolean} isPublic Public status to set
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        async updatePublicStatusWorkspaceDeprecated(workspaceId: string, isPublic: boolean, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updatePublicStatusWorkspaceDeprecated(workspaceId, isPublic, xDaytonaOrganizationID, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.updatePublicStatusWorkspaceDeprecated']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * WorkspaceApi - factory interface
 */
export const WorkspaceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = WorkspaceApiFp(configuration)
    return {
        /**
         * 
         * @summary [DEPRECATED] Archive workspace
         * @param {string} workspaceId 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        archiveWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.archiveWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Create workspace backup
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        createBackupWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<Workspace> {
            return localVarFp.createBackupWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Create a new workspace
         * @param {CreateWorkspace} createWorkspace 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        createWorkspaceDeprecated(createWorkspace: CreateWorkspace, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<Workspace> {
            return localVarFp.createWorkspaceDeprecated(createWorkspace, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Delete workspace
         * @param {string} workspaceId ID of the workspace
         * @param {boolean} force 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        deleteWorkspaceDeprecated(workspaceId: string, force: boolean, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteWorkspaceDeprecated(workspaceId, force, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Get build logs
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {boolean} [follow] Whether to follow the logs stream
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        getBuildLogsWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, follow?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.getBuildLogsWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, follow, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Get preview URL for a workspace port
         * @param {string} workspaceId ID of the workspace
         * @param {number} port Port number to get preview URL for
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        getPortPreviewUrlWorkspaceDeprecated(workspaceId: string, port: number, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<WorkspacePortPreviewUrl> {
            return localVarFp.getPortPreviewUrlWorkspaceDeprecated(workspaceId, port, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Get workspace details
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {boolean} [verbose] Include verbose output
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        getWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, verbose?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Workspace> {
            return localVarFp.getWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, verbose, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] List all workspaces
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {boolean} [verbose] Include verbose output
         * @param {string} [labels] JSON encoded labels to filter by
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        listWorkspacesDeprecated(xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Workspace>> {
            return localVarFp.listWorkspacesDeprecated(xDaytonaOrganizationID, verbose, labels, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Replace workspace labels
         * @param {string} workspaceId ID of the workspace
         * @param {SandboxLabels} sandboxLabels 
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        replaceLabelsWorkspaceDeprecated(workspaceId: string, sandboxLabels: SandboxLabels, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<SandboxLabels> {
            return localVarFp.replaceLabelsWorkspaceDeprecated(workspaceId, sandboxLabels, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Set workspace auto-archive interval
         * @param {string} workspaceId ID of the workspace
         * @param {number} interval Auto-archive interval in minutes (0 means the maximum interval will be used)
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        setAutoArchiveIntervalWorkspaceDeprecated(workspaceId: string, interval: number, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.setAutoArchiveIntervalWorkspaceDeprecated(workspaceId, interval, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Set workspace auto-stop interval
         * @param {string} workspaceId ID of the workspace
         * @param {number} interval Auto-stop interval in minutes (0 to disable)
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        setAutostopIntervalWorkspaceDeprecated(workspaceId: string, interval: number, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.setAutostopIntervalWorkspaceDeprecated(workspaceId, interval, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Start workspace
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        startWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.startWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Stop workspace
         * @param {string} workspaceId ID of the workspace
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        stopWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.stopWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary [DEPRECATED] Update public status
         * @param {string} workspaceId ID of the workspace
         * @param {boolean} isPublic Public status to set
         * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
         * @param {*} [options] Override http request option.
         * @deprecated
         * @throws {RequiredError}
         */
        updatePublicStatusWorkspaceDeprecated(workspaceId: string, isPublic: boolean, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.updatePublicStatusWorkspaceDeprecated(workspaceId, isPublic, xDaytonaOrganizationID, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * WorkspaceApi - object-oriented interface
 */
export class WorkspaceApi extends BaseAPI {
    /**
     * 
     * @summary [DEPRECATED] Archive workspace
     * @param {string} workspaceId 
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public archiveWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).archiveWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Create workspace backup
     * @param {string} workspaceId ID of the workspace
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public createBackupWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).createBackupWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Create a new workspace
     * @param {CreateWorkspace} createWorkspace 
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public createWorkspaceDeprecated(createWorkspace: CreateWorkspace, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).createWorkspaceDeprecated(createWorkspace, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Delete workspace
     * @param {string} workspaceId ID of the workspace
     * @param {boolean} force 
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public deleteWorkspaceDeprecated(workspaceId: string, force: boolean, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).deleteWorkspaceDeprecated(workspaceId, force, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Get build logs
     * @param {string} workspaceId ID of the workspace
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {boolean} [follow] Whether to follow the logs stream
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public getBuildLogsWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, follow?: boolean, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).getBuildLogsWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, follow, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Get preview URL for a workspace port
     * @param {string} workspaceId ID of the workspace
     * @param {number} port Port number to get preview URL for
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public getPortPreviewUrlWorkspaceDeprecated(workspaceId: string, port: number, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).getPortPreviewUrlWorkspaceDeprecated(workspaceId, port, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Get workspace details
     * @param {string} workspaceId ID of the workspace
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {boolean} [verbose] Include verbose output
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public getWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, verbose?: boolean, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).getWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, verbose, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] List all workspaces
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {boolean} [verbose] Include verbose output
     * @param {string} [labels] JSON encoded labels to filter by
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public listWorkspacesDeprecated(xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).listWorkspacesDeprecated(xDaytonaOrganizationID, verbose, labels, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Replace workspace labels
     * @param {string} workspaceId ID of the workspace
     * @param {SandboxLabels} sandboxLabels 
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public replaceLabelsWorkspaceDeprecated(workspaceId: string, sandboxLabels: SandboxLabels, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).replaceLabelsWorkspaceDeprecated(workspaceId, sandboxLabels, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Set workspace auto-archive interval
     * @param {string} workspaceId ID of the workspace
     * @param {number} interval Auto-archive interval in minutes (0 means the maximum interval will be used)
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public setAutoArchiveIntervalWorkspaceDeprecated(workspaceId: string, interval: number, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).setAutoArchiveIntervalWorkspaceDeprecated(workspaceId, interval, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Set workspace auto-stop interval
     * @param {string} workspaceId ID of the workspace
     * @param {number} interval Auto-stop interval in minutes (0 to disable)
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public setAutostopIntervalWorkspaceDeprecated(workspaceId: string, interval: number, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).setAutostopIntervalWorkspaceDeprecated(workspaceId, interval, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Start workspace
     * @param {string} workspaceId ID of the workspace
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public startWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).startWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Stop workspace
     * @param {string} workspaceId ID of the workspace
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public stopWorkspaceDeprecated(workspaceId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).stopWorkspaceDeprecated(workspaceId, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary [DEPRECATED] Update public status
     * @param {string} workspaceId ID of the workspace
     * @param {boolean} isPublic Public status to set
     * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
     * @param {*} [options] Override http request option.
     * @deprecated
     * @throws {RequiredError}
     */
    public updatePublicStatusWorkspaceDeprecated(workspaceId: string, isPublic: boolean, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
        return WorkspaceApiFp(this.configuration).updatePublicStatusWorkspaceDeprecated(workspaceId, isPublic, xDaytonaOrganizationID, options).then((request) => request(this.axios, this.basePath));
    }
}

