/* tslint:disable */
/* eslint-disable */
/**
 * Admin API
 * The Admin API is used to manage the ApeCloud platform. 
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: support@apecloud.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 } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { APIErrorResponse } from '../models';
// @ts-ignore
import type { NodeList } from '../models';
// @ts-ignore
import type { OpsCustom } from '../models';
// @ts-ignore
import type { OpsExpose } from '../models';
// @ts-ignore
import type { OpsHScale } from '../models';
// @ts-ignore
import type { OpsIoQuotas } from '../models';
// @ts-ignore
import type { OpsLicense } from '../models';
// @ts-ignore
import type { OpsPromote } from '../models';
// @ts-ignore
import type { OpsRebuildInstance } from '../models';
// @ts-ignore
import type { OpsRequestName } from '../models';
// @ts-ignore
import type { OpsRestart } from '../models';
// @ts-ignore
import type { OpsStart } from '../models';
// @ts-ignore
import type { OpsStop } from '../models';
// @ts-ignore
import type { OpsUpgrade } from '../models';
// @ts-ignore
import type { OpsVScale } from '../models';
// @ts-ignore
import type { OpsVolumeExpand } from '../models';
// @ts-ignore
import type { ReconfigureCreate } from '../models';
/**
 * OpsrequestApi - axios parameter creator
 * @export
 */
export const OpsrequestApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary Expand cluster volume size
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsVolumeExpand} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        clusterVolumeExpand: async (orgName: string, clusterName: string, body: OpsVolumeExpand, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('clusterVolumeExpand', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('clusterVolumeExpand', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('clusterVolumeExpand', 'body', body)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/volume-expand`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Create custom OpsRequest
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsCustom} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        customOps: async (orgName: string, clusterName: string, body: OpsCustom, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('customOps', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('customOps', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('customOps', 'body', body)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/custom-ops`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Expose cluster loadbalancer endpoint
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsExpose} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        exposeCluster: async (orgName: string, clusterName: string, body: OpsExpose, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('exposeCluster', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('exposeCluster', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('exposeCluster', 'body', body)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/expose`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Horizontal scale cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsHScale} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        horizontalScaleCluster: async (orgName: string, clusterName: string, body: OpsHScale, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('horizontalScaleCluster', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('horizontalScaleCluster', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('horizontalScaleCluster', 'body', body)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/hscale`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary List available nodes for rebuilding instance
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {string} name name of the instance to be rebuilt
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAvailableNodes: async (orgName: string, clusterName: string, name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('listAvailableNodes', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('listAvailableNodes', 'clusterName', clusterName)
            // verify required parameter 'name' is not null or undefined
            assertParamExists('listAvailableNodes', 'name', name)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/rebuildInstance/availableNodes`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Promote cluster intance to primary
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsPromote} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        promoteCluster: async (orgName: string, clusterName: string, body: OpsPromote, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('promoteCluster', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('promoteCluster', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('promoteCluster', 'body', body)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/promote`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary rebuild the instance
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsRebuildInstance} opsRebuildInstance 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        rebuildInstance: async (orgName: string, clusterName: string, opsRebuildInstance: OpsRebuildInstance, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('rebuildInstance', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('rebuildInstance', 'clusterName', clusterName)
            // verify required parameter 'opsRebuildInstance' is not null or undefined
            assertParamExists('rebuildInstance', 'opsRebuildInstance', opsRebuildInstance)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/rebuildInstance`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Update cluster configuration
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {ReconfigureCreate} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        reconfigureCluster: async (orgName: string, clusterName: string, body: ReconfigureCreate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('reconfigureCluster', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('reconfigureCluster', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('reconfigureCluster', 'body', body)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/reconfigure`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Restart cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsRestart} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        restartCluster: async (orgName: string, clusterName: string, body: OpsRestart, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('restartCluster', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('restartCluster', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('restartCluster', 'body', body)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/restart`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Specify IOPS and BPS of cluster volumes
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsIoQuotas} opsIoQuotas 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        specifyClusterIOQuotas: async (orgName: string, clusterName: string, opsIoQuotas: OpsIoQuotas, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('specifyClusterIOQuotas', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('specifyClusterIOQuotas', 'clusterName', clusterName)
            // verify required parameter 'opsIoQuotas' is not null or undefined
            assertParamExists('specifyClusterIOQuotas', 'opsIoQuotas', opsIoQuotas)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/volumes/io-quotas`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Start cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsStart} [opsStart] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        startCluster: async (orgName: string, clusterName: string, opsStart?: OpsStart, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('startCluster', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('startCluster', 'clusterName', clusterName)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/start`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Stop cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsStop} [opsStop] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stopCluster: async (orgName: string, clusterName: string, opsStop?: OpsStop, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('stopCluster', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('stopCluster', 'clusterName', clusterName)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/stop`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Update the cluster license
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsLicense} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateClusterLicense: async (orgName: string, clusterName: string, body: OpsLicense, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('updateClusterLicense', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('updateClusterLicense', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('updateClusterLicense', 'body', body)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/updateLicense`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Upgrade cluster version
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsUpgrade} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        upgradeCluster: async (orgName: string, clusterName: string, body: OpsUpgrade, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('upgradeCluster', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('upgradeCluster', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('upgradeCluster', 'body', body)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/upgrade`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Vertical scale cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsVScale} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        verticalScaleCluster: async (orgName: string, clusterName: string, body: OpsVScale, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('verticalScaleCluster', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('verticalScaleCluster', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('verticalScaleCluster', 'body', body)
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/vscale`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // 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 BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

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


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

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

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

/**
 * OpsrequestApi - functional programming interface
 * @export
 */
export const OpsrequestApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = OpsrequestApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary Expand cluster volume size
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsVolumeExpand} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async clusterVolumeExpand(orgName: string, clusterName: string, body: OpsVolumeExpand, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.clusterVolumeExpand(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.clusterVolumeExpand']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Create custom OpsRequest
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsCustom} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async customOps(orgName: string, clusterName: string, body: OpsCustom, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.customOps(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.customOps']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Expose cluster loadbalancer endpoint
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsExpose} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async exposeCluster(orgName: string, clusterName: string, body: OpsExpose, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.exposeCluster(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.exposeCluster']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Horizontal scale cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsHScale} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async horizontalScaleCluster(orgName: string, clusterName: string, body: OpsHScale, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.horizontalScaleCluster(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.horizontalScaleCluster']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary List available nodes for rebuilding instance
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {string} name name of the instance to be rebuilt
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAvailableNodes(orgName: string, clusterName: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NodeList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAvailableNodes(orgName, clusterName, name, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.listAvailableNodes']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Promote cluster intance to primary
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsPromote} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async promoteCluster(orgName: string, clusterName: string, body: OpsPromote, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.promoteCluster(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.promoteCluster']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary rebuild the instance
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsRebuildInstance} opsRebuildInstance 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async rebuildInstance(orgName: string, clusterName: string, opsRebuildInstance: OpsRebuildInstance, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.rebuildInstance(orgName, clusterName, opsRebuildInstance, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.rebuildInstance']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Update cluster configuration
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {ReconfigureCreate} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async reconfigureCluster(orgName: string, clusterName: string, body: ReconfigureCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.reconfigureCluster(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.reconfigureCluster']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Restart cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsRestart} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async restartCluster(orgName: string, clusterName: string, body: OpsRestart, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.restartCluster(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.restartCluster']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Specify IOPS and BPS of cluster volumes
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsIoQuotas} opsIoQuotas 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async specifyClusterIOQuotas(orgName: string, clusterName: string, opsIoQuotas: OpsIoQuotas, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsIoQuotas>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.specifyClusterIOQuotas(orgName, clusterName, opsIoQuotas, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.specifyClusterIOQuotas']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Start cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsStart} [opsStart] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async startCluster(orgName: string, clusterName: string, opsStart?: OpsStart, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.startCluster(orgName, clusterName, opsStart, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.startCluster']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Stop cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsStop} [opsStop] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async stopCluster(orgName: string, clusterName: string, opsStop?: OpsStop, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.stopCluster(orgName, clusterName, opsStop, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.stopCluster']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Update the cluster license
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsLicense} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateClusterLicense(orgName: string, clusterName: string, body: OpsLicense, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateClusterLicense(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.updateClusterLicense']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Upgrade cluster version
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsUpgrade} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async upgradeCluster(orgName: string, clusterName: string, body: OpsUpgrade, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.upgradeCluster(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.upgradeCluster']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Vertical scale cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsVScale} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async verticalScaleCluster(orgName: string, clusterName: string, body: OpsVScale, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpsRequestName>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.verticalScaleCluster(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OpsrequestApi.verticalScaleCluster']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * OpsrequestApi - factory interface
 * @export
 */
export const OpsrequestApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = OpsrequestApiFp(configuration)
    return {
        /**
         * 
         * @summary Expand cluster volume size
         * @param {OpsrequestApiClusterVolumeExpandRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        clusterVolumeExpand(requestParameters: OpsrequestApiClusterVolumeExpandRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.clusterVolumeExpand(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Create custom OpsRequest
         * @param {OpsrequestApiCustomOpsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        customOps(requestParameters: OpsrequestApiCustomOpsRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.customOps(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Expose cluster loadbalancer endpoint
         * @param {OpsrequestApiExposeClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        exposeCluster(requestParameters: OpsrequestApiExposeClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.exposeCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Horizontal scale cluster
         * @param {OpsrequestApiHorizontalScaleClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        horizontalScaleCluster(requestParameters: OpsrequestApiHorizontalScaleClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.horizontalScaleCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary List available nodes for rebuilding instance
         * @param {OpsrequestApiListAvailableNodesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAvailableNodes(requestParameters: OpsrequestApiListAvailableNodesRequest, options?: RawAxiosRequestConfig): AxiosPromise<NodeList> {
            return localVarFp.listAvailableNodes(requestParameters.orgName, requestParameters.clusterName, requestParameters.name, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Promote cluster intance to primary
         * @param {OpsrequestApiPromoteClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        promoteCluster(requestParameters: OpsrequestApiPromoteClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.promoteCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary rebuild the instance
         * @param {OpsrequestApiRebuildInstanceRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        rebuildInstance(requestParameters: OpsrequestApiRebuildInstanceRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.rebuildInstance(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsRebuildInstance, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Update cluster configuration
         * @param {OpsrequestApiReconfigureClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        reconfigureCluster(requestParameters: OpsrequestApiReconfigureClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.reconfigureCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Restart cluster
         * @param {OpsrequestApiRestartClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        restartCluster(requestParameters: OpsrequestApiRestartClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.restartCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Specify IOPS and BPS of cluster volumes
         * @param {OpsrequestApiSpecifyClusterIOQuotasRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        specifyClusterIOQuotas(requestParameters: OpsrequestApiSpecifyClusterIOQuotasRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsIoQuotas> {
            return localVarFp.specifyClusterIOQuotas(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsIoQuotas, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Start cluster
         * @param {OpsrequestApiStartClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        startCluster(requestParameters: OpsrequestApiStartClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.startCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsStart, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Stop cluster
         * @param {OpsrequestApiStopClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stopCluster(requestParameters: OpsrequestApiStopClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.stopCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsStop, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Update the cluster license
         * @param {OpsrequestApiUpdateClusterLicenseRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateClusterLicense(requestParameters: OpsrequestApiUpdateClusterLicenseRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.updateClusterLicense(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Upgrade cluster version
         * @param {OpsrequestApiUpgradeClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        upgradeCluster(requestParameters: OpsrequestApiUpgradeClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.upgradeCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Vertical scale cluster
         * @param {OpsrequestApiVerticalScaleClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        verticalScaleCluster(requestParameters: OpsrequestApiVerticalScaleClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName> {
            return localVarFp.verticalScaleCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * OpsrequestApi - interface
 * @export
 * @interface OpsrequestApi
 */
export interface OpsrequestApiInterface {
    /**
     * 
     * @summary Expand cluster volume size
     * @param {OpsrequestApiClusterVolumeExpandRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    clusterVolumeExpand(requestParameters: OpsrequestApiClusterVolumeExpandRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary Create custom OpsRequest
     * @param {OpsrequestApiCustomOpsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    customOps(requestParameters: OpsrequestApiCustomOpsRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary Expose cluster loadbalancer endpoint
     * @param {OpsrequestApiExposeClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    exposeCluster(requestParameters: OpsrequestApiExposeClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary Horizontal scale cluster
     * @param {OpsrequestApiHorizontalScaleClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    horizontalScaleCluster(requestParameters: OpsrequestApiHorizontalScaleClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary List available nodes for rebuilding instance
     * @param {OpsrequestApiListAvailableNodesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    listAvailableNodes(requestParameters: OpsrequestApiListAvailableNodesRequest, options?: RawAxiosRequestConfig): AxiosPromise<NodeList>;

    /**
     * 
     * @summary Promote cluster intance to primary
     * @param {OpsrequestApiPromoteClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    promoteCluster(requestParameters: OpsrequestApiPromoteClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary rebuild the instance
     * @param {OpsrequestApiRebuildInstanceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    rebuildInstance(requestParameters: OpsrequestApiRebuildInstanceRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary Update cluster configuration
     * @param {OpsrequestApiReconfigureClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    reconfigureCluster(requestParameters: OpsrequestApiReconfigureClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary Restart cluster
     * @param {OpsrequestApiRestartClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    restartCluster(requestParameters: OpsrequestApiRestartClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary Specify IOPS and BPS of cluster volumes
     * @param {OpsrequestApiSpecifyClusterIOQuotasRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    specifyClusterIOQuotas(requestParameters: OpsrequestApiSpecifyClusterIOQuotasRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsIoQuotas>;

    /**
     * 
     * @summary Start cluster
     * @param {OpsrequestApiStartClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    startCluster(requestParameters: OpsrequestApiStartClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary Stop cluster
     * @param {OpsrequestApiStopClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    stopCluster(requestParameters: OpsrequestApiStopClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary Update the cluster license
     * @param {OpsrequestApiUpdateClusterLicenseRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    updateClusterLicense(requestParameters: OpsrequestApiUpdateClusterLicenseRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary Upgrade cluster version
     * @param {OpsrequestApiUpgradeClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    upgradeCluster(requestParameters: OpsrequestApiUpgradeClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

    /**
     * 
     * @summary Vertical scale cluster
     * @param {OpsrequestApiVerticalScaleClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApiInterface
     */
    verticalScaleCluster(requestParameters: OpsrequestApiVerticalScaleClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpsRequestName>;

}

/**
 * Request parameters for clusterVolumeExpand operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiClusterVolumeExpandRequest
 */
export interface OpsrequestApiClusterVolumeExpandRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiClusterVolumeExpand
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiClusterVolumeExpand
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsVolumeExpand}
     * @memberof OpsrequestApiClusterVolumeExpand
     */
    readonly body: OpsVolumeExpand
}

/**
 * Request parameters for customOps operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiCustomOpsRequest
 */
export interface OpsrequestApiCustomOpsRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiCustomOps
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiCustomOps
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsCustom}
     * @memberof OpsrequestApiCustomOps
     */
    readonly body: OpsCustom
}

/**
 * Request parameters for exposeCluster operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiExposeClusterRequest
 */
export interface OpsrequestApiExposeClusterRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiExposeCluster
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiExposeCluster
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsExpose}
     * @memberof OpsrequestApiExposeCluster
     */
    readonly body: OpsExpose
}

/**
 * Request parameters for horizontalScaleCluster operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiHorizontalScaleClusterRequest
 */
export interface OpsrequestApiHorizontalScaleClusterRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiHorizontalScaleCluster
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiHorizontalScaleCluster
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsHScale}
     * @memberof OpsrequestApiHorizontalScaleCluster
     */
    readonly body: OpsHScale
}

/**
 * Request parameters for listAvailableNodes operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiListAvailableNodesRequest
 */
export interface OpsrequestApiListAvailableNodesRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiListAvailableNodes
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiListAvailableNodes
     */
    readonly clusterName: string

    /**
     * name of the instance to be rebuilt
     * @type {string}
     * @memberof OpsrequestApiListAvailableNodes
     */
    readonly name: string
}

/**
 * Request parameters for promoteCluster operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiPromoteClusterRequest
 */
export interface OpsrequestApiPromoteClusterRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiPromoteCluster
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiPromoteCluster
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsPromote}
     * @memberof OpsrequestApiPromoteCluster
     */
    readonly body: OpsPromote
}

/**
 * Request parameters for rebuildInstance operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiRebuildInstanceRequest
 */
export interface OpsrequestApiRebuildInstanceRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiRebuildInstance
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiRebuildInstance
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsRebuildInstance}
     * @memberof OpsrequestApiRebuildInstance
     */
    readonly opsRebuildInstance: OpsRebuildInstance
}

/**
 * Request parameters for reconfigureCluster operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiReconfigureClusterRequest
 */
export interface OpsrequestApiReconfigureClusterRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiReconfigureCluster
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiReconfigureCluster
     */
    readonly clusterName: string

    /**
     * 
     * @type {ReconfigureCreate}
     * @memberof OpsrequestApiReconfigureCluster
     */
    readonly body: ReconfigureCreate
}

/**
 * Request parameters for restartCluster operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiRestartClusterRequest
 */
export interface OpsrequestApiRestartClusterRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiRestartCluster
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiRestartCluster
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsRestart}
     * @memberof OpsrequestApiRestartCluster
     */
    readonly body: OpsRestart
}

/**
 * Request parameters for specifyClusterIOQuotas operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiSpecifyClusterIOQuotasRequest
 */
export interface OpsrequestApiSpecifyClusterIOQuotasRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiSpecifyClusterIOQuotas
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiSpecifyClusterIOQuotas
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsIoQuotas}
     * @memberof OpsrequestApiSpecifyClusterIOQuotas
     */
    readonly opsIoQuotas: OpsIoQuotas
}

/**
 * Request parameters for startCluster operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiStartClusterRequest
 */
export interface OpsrequestApiStartClusterRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiStartCluster
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiStartCluster
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsStart}
     * @memberof OpsrequestApiStartCluster
     */
    readonly opsStart?: OpsStart
}

/**
 * Request parameters for stopCluster operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiStopClusterRequest
 */
export interface OpsrequestApiStopClusterRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiStopCluster
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiStopCluster
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsStop}
     * @memberof OpsrequestApiStopCluster
     */
    readonly opsStop?: OpsStop
}

/**
 * Request parameters for updateClusterLicense operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiUpdateClusterLicenseRequest
 */
export interface OpsrequestApiUpdateClusterLicenseRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiUpdateClusterLicense
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiUpdateClusterLicense
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsLicense}
     * @memberof OpsrequestApiUpdateClusterLicense
     */
    readonly body: OpsLicense
}

/**
 * Request parameters for upgradeCluster operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiUpgradeClusterRequest
 */
export interface OpsrequestApiUpgradeClusterRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiUpgradeCluster
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiUpgradeCluster
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsUpgrade}
     * @memberof OpsrequestApiUpgradeCluster
     */
    readonly body: OpsUpgrade
}

/**
 * Request parameters for verticalScaleCluster operation in OpsrequestApi.
 * @export
 * @interface OpsrequestApiVerticalScaleClusterRequest
 */
export interface OpsrequestApiVerticalScaleClusterRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OpsrequestApiVerticalScaleCluster
     */
    readonly orgName: string

    /**
     * name of the KubeBlocks cluster
     * @type {string}
     * @memberof OpsrequestApiVerticalScaleCluster
     */
    readonly clusterName: string

    /**
     * 
     * @type {OpsVScale}
     * @memberof OpsrequestApiVerticalScaleCluster
     */
    readonly body: OpsVScale
}

/**
 * OpsrequestApi - object-oriented interface
 * @export
 * @class OpsrequestApi
 * @extends {BaseAPI}
 */
export class OpsrequestApi extends BaseAPI implements OpsrequestApiInterface {
    /**
     * 
     * @summary Expand cluster volume size
     * @param {OpsrequestApiClusterVolumeExpandRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public clusterVolumeExpand(requestParameters: OpsrequestApiClusterVolumeExpandRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).clusterVolumeExpand(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Create custom OpsRequest
     * @param {OpsrequestApiCustomOpsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public customOps(requestParameters: OpsrequestApiCustomOpsRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).customOps(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Expose cluster loadbalancer endpoint
     * @param {OpsrequestApiExposeClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public exposeCluster(requestParameters: OpsrequestApiExposeClusterRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).exposeCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Horizontal scale cluster
     * @param {OpsrequestApiHorizontalScaleClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public horizontalScaleCluster(requestParameters: OpsrequestApiHorizontalScaleClusterRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).horizontalScaleCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary List available nodes for rebuilding instance
     * @param {OpsrequestApiListAvailableNodesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public listAvailableNodes(requestParameters: OpsrequestApiListAvailableNodesRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).listAvailableNodes(requestParameters.orgName, requestParameters.clusterName, requestParameters.name, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Promote cluster intance to primary
     * @param {OpsrequestApiPromoteClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public promoteCluster(requestParameters: OpsrequestApiPromoteClusterRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).promoteCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary rebuild the instance
     * @param {OpsrequestApiRebuildInstanceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public rebuildInstance(requestParameters: OpsrequestApiRebuildInstanceRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).rebuildInstance(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsRebuildInstance, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Update cluster configuration
     * @param {OpsrequestApiReconfigureClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public reconfigureCluster(requestParameters: OpsrequestApiReconfigureClusterRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).reconfigureCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Restart cluster
     * @param {OpsrequestApiRestartClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public restartCluster(requestParameters: OpsrequestApiRestartClusterRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).restartCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Specify IOPS and BPS of cluster volumes
     * @param {OpsrequestApiSpecifyClusterIOQuotasRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public specifyClusterIOQuotas(requestParameters: OpsrequestApiSpecifyClusterIOQuotasRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).specifyClusterIOQuotas(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsIoQuotas, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Start cluster
     * @param {OpsrequestApiStartClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public startCluster(requestParameters: OpsrequestApiStartClusterRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).startCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsStart, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Stop cluster
     * @param {OpsrequestApiStopClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public stopCluster(requestParameters: OpsrequestApiStopClusterRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).stopCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsStop, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Update the cluster license
     * @param {OpsrequestApiUpdateClusterLicenseRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public updateClusterLicense(requestParameters: OpsrequestApiUpdateClusterLicenseRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).updateClusterLicense(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Upgrade cluster version
     * @param {OpsrequestApiUpgradeClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public upgradeCluster(requestParameters: OpsrequestApiUpgradeClusterRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).upgradeCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Vertical scale cluster
     * @param {OpsrequestApiVerticalScaleClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    public verticalScaleCluster(requestParameters: OpsrequestApiVerticalScaleClusterRequest, options?: RawAxiosRequestConfig) {
        return OpsrequestApiFp(this.configuration).verticalScaleCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}

