/* 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 { AdminCreateRunner } from '../models';
// @ts-ignore
import type { AdminGetWebhookStatus200Response } from '../models';
// @ts-ignore
import type { CreateRunnerResponse } from '../models';
// @ts-ignore
import type { CreateUser } from '../models';
// @ts-ignore
import type { DockerRegistry } from '../models';
// @ts-ignore
import type { PaginatedAuditLogs } from '../models';
// @ts-ignore
import type { RunnerFull } from '../models';
// @ts-ignore
import type { Sandbox } from '../models';
// @ts-ignore
import type { SendWebhookDto } from '../models';
// @ts-ignore
import type { SetSnapshotGeneralStatusDto } from '../models';
// @ts-ignore
import type { SnapshotDto } from '../models';
// @ts-ignore
import type { User } from '../models';
/**
 * AdminApi - axios parameter creator
 */
export const AdminApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary Check if an image can be cleaned up
         * @param {string} imageName Image name with tag to check
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminCanCleanupImage: async (imageName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'imageName' is not null or undefined
            assertParamExists('adminCanCleanupImage', 'imageName', imageName)
            const localVarPath = `/admin/snapshots/can-cleanup-image`;
            // 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 (imageName !== undefined) {
                localVarQueryParameter['imageName'] = imageName;
            }

            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,
            };
        },
        /**
         * 
         * @summary Create runner
         * @param {AdminCreateRunner} adminCreateRunner 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminCreateRunner: async (adminCreateRunner: AdminCreateRunner, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'adminCreateRunner' is not null or undefined
            assertParamExists('adminCreateRunner', 'adminCreateRunner', adminCreateRunner)
            const localVarPath = `/admin/runners`;
            // 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';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Create user
         * @param {CreateUser} createUser 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminCreateUser: async (createUser: CreateUser, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'createUser' is not null or undefined
            assertParamExists('adminCreateUser', 'createUser', createUser)
            const localVarPath = `/admin/users`;
            // 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';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Delete runner
         * @param {string} id Runner ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminDeleteRunner: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('adminDeleteRunner', 'id', id)
            const localVarPath = `/admin/runners/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // 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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Get all audit logs
         * @param {number} [page] Page number of the results
         * @param {number} [limit] Number of results per page
         * @param {Date} [from] From date (ISO 8601 format)
         * @param {Date} [to] To date (ISO 8601 format)
         * @param {string} [nextToken] Token for cursor-based pagination. When provided, takes precedence over page parameter.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminGetAllAuditLogs: async (page?: number, limit?: number, from?: Date, to?: Date, nextToken?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/audit`;
            // 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 (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }

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

            if (from !== undefined) {
                localVarQueryParameter['from'] = (from as any instanceof Date) ?
                    (from as any).toISOString() :
                    from;
            }

            if (to !== undefined) {
                localVarQueryParameter['to'] = (to as any instanceof Date) ?
                    (to as any).toISOString() :
                    to;
            }

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

            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,
            };
        },
        /**
         * 
         * @summary Get delivery attempts for a webhook message
         * @param {string} organizationId 
         * @param {string} messageId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminGetMessageAttempts: async (organizationId: string, messageId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'organizationId' is not null or undefined
            assertParamExists('adminGetMessageAttempts', 'organizationId', organizationId)
            // verify required parameter 'messageId' is not null or undefined
            assertParamExists('adminGetMessageAttempts', 'messageId', messageId)
            const localVarPath = `/admin/webhooks/organizations/{organizationId}/messages/{messageId}/attempts`
                .replace(`{${"organizationId"}}`, encodeURIComponent(String(organizationId)))
                .replace(`{${"messageId"}}`, encodeURIComponent(String(messageId)));
            // 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';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Get runner by ID
         * @param {string} id Runner ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminGetRunnerById: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('adminGetRunnerById', 'id', id)
            const localVarPath = `/admin/runners/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // 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';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Get user by ID
         * @param {string} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminGetUser: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('adminGetUser', 'id', id)
            const localVarPath = `/admin/users/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // 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';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Get webhook service status
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminGetWebhookStatus: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/webhooks/status`;
            // 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';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Initialize webhooks for an organization
         * @param {string} organizationId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminInitializeWebhooks: async (organizationId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'organizationId' is not null or undefined
            assertParamExists('adminInitializeWebhooks', 'organizationId', organizationId)
            const localVarPath = `/admin/webhooks/organizations/{organizationId}/initialize`
                .replace(`{${"organizationId"}}`, encodeURIComponent(String(organizationId)));
            // 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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary List all runners
         * @param {string} [regionId] Filter runners by region ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminListRunners: async (regionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/runners`;
            // 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 (regionId !== undefined) {
                localVarQueryParameter['regionId'] = regionId;
            }

            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,
            };
        },
        /**
         * 
         * @summary List all users
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminListUsers: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/users`;
            // 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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Recover sandbox from error state as an admin
         * @param {string} sandboxId ID of the sandbox
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminRecoverSandbox: async (sandboxId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'sandboxId' is not null or undefined
            assertParamExists('adminRecoverSandbox', 'sandboxId', sandboxId)
            const localVarPath = `/admin/sandbox/{sandboxId}/recover`
                .replace(`{${"sandboxId"}}`, encodeURIComponent(String(sandboxId)));
            // 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';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Regenerate user key pair
         * @param {string} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminRegenerateKeyPair: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('adminRegenerateKeyPair', 'id', id)
            const localVarPath = `/admin/users/{id}/regenerate-key-pair`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // 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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Send a webhook message to an organization
         * @param {string} organizationId 
         * @param {SendWebhookDto} sendWebhookDto 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminSendWebhook: async (organizationId: string, sendWebhookDto: SendWebhookDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'organizationId' is not null or undefined
            assertParamExists('adminSendWebhook', 'organizationId', organizationId)
            // verify required parameter 'sendWebhookDto' is not null or undefined
            assertParamExists('adminSendWebhook', 'sendWebhookDto', sendWebhookDto)
            const localVarPath = `/admin/webhooks/organizations/{organizationId}/send`
                .replace(`{${"organizationId"}}`, encodeURIComponent(String(organizationId)));
            // 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';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Set default registry
         * @param {string} id ID of the docker registry
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminSetDefaultRegistry: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('adminSetDefaultRegistry', 'id', id)
            const localVarPath = `/admin/docker-registry/{id}/set-default`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // 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';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Set snapshot general status
         * @param {string} id Snapshot ID
         * @param {SetSnapshotGeneralStatusDto} setSnapshotGeneralStatusDto 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminSetSnapshotGeneralStatus: async (id: string, setSnapshotGeneralStatusDto: SetSnapshotGeneralStatusDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('adminSetSnapshotGeneralStatus', 'id', id)
            // verify required parameter 'setSnapshotGeneralStatusDto' is not null or undefined
            assertParamExists('adminSetSnapshotGeneralStatus', 'setSnapshotGeneralStatusDto', setSnapshotGeneralStatusDto)
            const localVarPath = `/admin/snapshots/{id}/general`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // 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: 'PATCH', ...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';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Update runner scheduling status
         * @param {string} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminUpdateRunnerScheduling: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('adminUpdateRunnerScheduling', 'id', id)
            const localVarPath = `/admin/runners/{id}/scheduling`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // 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: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

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

            // authentication oauth2 required


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

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

/**
 * AdminApi - functional programming interface
 */
export const AdminApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary Check if an image can be cleaned up
         * @param {string} imageName Image name with tag to check
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminCanCleanupImage(imageName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminCanCleanupImage(imageName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminCanCleanupImage']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Create runner
         * @param {AdminCreateRunner} adminCreateRunner 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminCreateRunner(adminCreateRunner: AdminCreateRunner, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRunnerResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminCreateRunner(adminCreateRunner, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminCreateRunner']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Create user
         * @param {CreateUser} createUser 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminCreateUser(createUser: CreateUser, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminCreateUser(createUser, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminCreateUser']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Delete runner
         * @param {string} id Runner ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminDeleteRunner(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminDeleteRunner(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminDeleteRunner']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Get all audit logs
         * @param {number} [page] Page number of the results
         * @param {number} [limit] Number of results per page
         * @param {Date} [from] From date (ISO 8601 format)
         * @param {Date} [to] To date (ISO 8601 format)
         * @param {string} [nextToken] Token for cursor-based pagination. When provided, takes precedence over page parameter.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminGetAllAuditLogs(page?: number, limit?: number, from?: Date, to?: Date, nextToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedAuditLogs>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminGetAllAuditLogs(page, limit, from, to, nextToken, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminGetAllAuditLogs']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Get delivery attempts for a webhook message
         * @param {string} organizationId 
         * @param {string} messageId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminGetMessageAttempts(organizationId: string, messageId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<object>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminGetMessageAttempts(organizationId, messageId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminGetMessageAttempts']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Get runner by ID
         * @param {string} id Runner ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminGetRunnerById(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RunnerFull>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminGetRunnerById(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminGetRunnerById']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Get user by ID
         * @param {string} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminGetUser(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminGetUser(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminGetUser']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Get webhook service status
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminGetWebhookStatus(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminGetWebhookStatus200Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminGetWebhookStatus(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminGetWebhookStatus']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Initialize webhooks for an organization
         * @param {string} organizationId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminInitializeWebhooks(organizationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminInitializeWebhooks(organizationId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminInitializeWebhooks']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary List all runners
         * @param {string} [regionId] Filter runners by region ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminListRunners(regionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RunnerFull>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminListRunners(regionId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminListRunners']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary List all users
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminListUsers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminListUsers(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminListUsers']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Recover sandbox from error state as an admin
         * @param {string} sandboxId ID of the sandbox
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminRecoverSandbox(sandboxId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Sandbox>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminRecoverSandbox(sandboxId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminRecoverSandbox']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Regenerate user key pair
         * @param {string} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminRegenerateKeyPair(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminRegenerateKeyPair(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminRegenerateKeyPair']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Send a webhook message to an organization
         * @param {string} organizationId 
         * @param {SendWebhookDto} sendWebhookDto 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminSendWebhook(organizationId: string, sendWebhookDto: SendWebhookDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminSendWebhook(organizationId, sendWebhookDto, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminSendWebhook']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Set default registry
         * @param {string} id ID of the docker registry
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminSetDefaultRegistry(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DockerRegistry>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminSetDefaultRegistry(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminSetDefaultRegistry']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Set snapshot general status
         * @param {string} id Snapshot ID
         * @param {SetSnapshotGeneralStatusDto} setSnapshotGeneralStatusDto 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminSetSnapshotGeneralStatus(id: string, setSnapshotGeneralStatusDto: SetSnapshotGeneralStatusDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SnapshotDto>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminSetSnapshotGeneralStatus(id, setSnapshotGeneralStatusDto, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminSetSnapshotGeneralStatus']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Update runner scheduling status
         * @param {string} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async adminUpdateRunnerScheduling(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.adminUpdateRunnerScheduling(id, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['AdminApi.adminUpdateRunnerScheduling']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * AdminApi - factory interface
 */
export const AdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = AdminApiFp(configuration)
    return {
        /**
         * 
         * @summary Check if an image can be cleaned up
         * @param {string} imageName Image name with tag to check
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminCanCleanupImage(imageName: string, options?: RawAxiosRequestConfig): AxiosPromise<boolean> {
            return localVarFp.adminCanCleanupImage(imageName, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Create runner
         * @param {AdminCreateRunner} adminCreateRunner 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminCreateRunner(adminCreateRunner: AdminCreateRunner, options?: RawAxiosRequestConfig): AxiosPromise<CreateRunnerResponse> {
            return localVarFp.adminCreateRunner(adminCreateRunner, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Create user
         * @param {CreateUser} createUser 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminCreateUser(createUser: CreateUser, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.adminCreateUser(createUser, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Delete runner
         * @param {string} id Runner ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminDeleteRunner(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.adminDeleteRunner(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Get all audit logs
         * @param {number} [page] Page number of the results
         * @param {number} [limit] Number of results per page
         * @param {Date} [from] From date (ISO 8601 format)
         * @param {Date} [to] To date (ISO 8601 format)
         * @param {string} [nextToken] Token for cursor-based pagination. When provided, takes precedence over page parameter.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminGetAllAuditLogs(page?: number, limit?: number, from?: Date, to?: Date, nextToken?: string, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedAuditLogs> {
            return localVarFp.adminGetAllAuditLogs(page, limit, from, to, nextToken, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Get delivery attempts for a webhook message
         * @param {string} organizationId 
         * @param {string} messageId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminGetMessageAttempts(organizationId: string, messageId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<object>> {
            return localVarFp.adminGetMessageAttempts(organizationId, messageId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Get runner by ID
         * @param {string} id Runner ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminGetRunnerById(id: string, options?: RawAxiosRequestConfig): AxiosPromise<RunnerFull> {
            return localVarFp.adminGetRunnerById(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Get user by ID
         * @param {string} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminGetUser(id: string, options?: RawAxiosRequestConfig): AxiosPromise<User> {
            return localVarFp.adminGetUser(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Get webhook service status
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminGetWebhookStatus(options?: RawAxiosRequestConfig): AxiosPromise<AdminGetWebhookStatus200Response> {
            return localVarFp.adminGetWebhookStatus(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Initialize webhooks for an organization
         * @param {string} organizationId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminInitializeWebhooks(organizationId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.adminInitializeWebhooks(organizationId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary List all runners
         * @param {string} [regionId] Filter runners by region ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminListRunners(regionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<RunnerFull>> {
            return localVarFp.adminListRunners(regionId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary List all users
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminListUsers(options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.adminListUsers(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Recover sandbox from error state as an admin
         * @param {string} sandboxId ID of the sandbox
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminRecoverSandbox(sandboxId: string, options?: RawAxiosRequestConfig): AxiosPromise<Sandbox> {
            return localVarFp.adminRecoverSandbox(sandboxId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Regenerate user key pair
         * @param {string} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminRegenerateKeyPair(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.adminRegenerateKeyPair(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Send a webhook message to an organization
         * @param {string} organizationId 
         * @param {SendWebhookDto} sendWebhookDto 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminSendWebhook(organizationId: string, sendWebhookDto: SendWebhookDto, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.adminSendWebhook(organizationId, sendWebhookDto, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Set default registry
         * @param {string} id ID of the docker registry
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminSetDefaultRegistry(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DockerRegistry> {
            return localVarFp.adminSetDefaultRegistry(id, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Set snapshot general status
         * @param {string} id Snapshot ID
         * @param {SetSnapshotGeneralStatusDto} setSnapshotGeneralStatusDto 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminSetSnapshotGeneralStatus(id: string, setSnapshotGeneralStatusDto: SetSnapshotGeneralStatusDto, options?: RawAxiosRequestConfig): AxiosPromise<SnapshotDto> {
            return localVarFp.adminSetSnapshotGeneralStatus(id, setSnapshotGeneralStatusDto, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Update runner scheduling status
         * @param {string} id 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        adminUpdateRunnerScheduling(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.adminUpdateRunnerScheduling(id, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * AdminApi - object-oriented interface
 */
export class AdminApi extends BaseAPI {
    /**
     * 
     * @summary Check if an image can be cleaned up
     * @param {string} imageName Image name with tag to check
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminCanCleanupImage(imageName: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminCanCleanupImage(imageName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Create runner
     * @param {AdminCreateRunner} adminCreateRunner 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminCreateRunner(adminCreateRunner: AdminCreateRunner, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminCreateRunner(adminCreateRunner, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Create user
     * @param {CreateUser} createUser 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminCreateUser(createUser: CreateUser, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminCreateUser(createUser, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Delete runner
     * @param {string} id Runner ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminDeleteRunner(id: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminDeleteRunner(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Get all audit logs
     * @param {number} [page] Page number of the results
     * @param {number} [limit] Number of results per page
     * @param {Date} [from] From date (ISO 8601 format)
     * @param {Date} [to] To date (ISO 8601 format)
     * @param {string} [nextToken] Token for cursor-based pagination. When provided, takes precedence over page parameter.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminGetAllAuditLogs(page?: number, limit?: number, from?: Date, to?: Date, nextToken?: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminGetAllAuditLogs(page, limit, from, to, nextToken, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Get delivery attempts for a webhook message
     * @param {string} organizationId 
     * @param {string} messageId 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminGetMessageAttempts(organizationId: string, messageId: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminGetMessageAttempts(organizationId, messageId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Get runner by ID
     * @param {string} id Runner ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminGetRunnerById(id: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminGetRunnerById(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Get user by ID
     * @param {string} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminGetUser(id: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminGetUser(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Get webhook service status
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminGetWebhookStatus(options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminGetWebhookStatus(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Initialize webhooks for an organization
     * @param {string} organizationId 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminInitializeWebhooks(organizationId: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminInitializeWebhooks(organizationId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary List all runners
     * @param {string} [regionId] Filter runners by region ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminListRunners(regionId?: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminListRunners(regionId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary List all users
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminListUsers(options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminListUsers(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Recover sandbox from error state as an admin
     * @param {string} sandboxId ID of the sandbox
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminRecoverSandbox(sandboxId: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminRecoverSandbox(sandboxId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Regenerate user key pair
     * @param {string} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminRegenerateKeyPair(id: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminRegenerateKeyPair(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Send a webhook message to an organization
     * @param {string} organizationId 
     * @param {SendWebhookDto} sendWebhookDto 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminSendWebhook(organizationId: string, sendWebhookDto: SendWebhookDto, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminSendWebhook(organizationId, sendWebhookDto, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Set default registry
     * @param {string} id ID of the docker registry
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminSetDefaultRegistry(id: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminSetDefaultRegistry(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Set snapshot general status
     * @param {string} id Snapshot ID
     * @param {SetSnapshotGeneralStatusDto} setSnapshotGeneralStatusDto 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminSetSnapshotGeneralStatus(id: string, setSnapshotGeneralStatusDto: SetSnapshotGeneralStatusDto, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminSetSnapshotGeneralStatus(id, setSnapshotGeneralStatusDto, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Update runner scheduling status
     * @param {string} id 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    public adminUpdateRunnerScheduling(id: string, options?: RawAxiosRequestConfig) {
        return AdminApiFp(this.configuration).adminUpdateRunnerScheduling(id, options).then((request) => request(this.axios, this.basePath));
    }
}

