/* 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 { DeleteStorageClass204Response } from '../models';
// @ts-ignore
import type { PersistentVolumeClaimList } from '../models';
// @ts-ignore
import type { StorageClassCreate } from '../models';
// @ts-ignore
import type { StorageClassInfo } from '../models';
// @ts-ignore
import type { StorageClassList } from '../models';
// @ts-ignore
import type { StorageClassNodeStatsList } from '../models';
// @ts-ignore
import type { StorageClassUpdate } from '../models';
// @ts-ignore
import type { StorageProvisionerList } from '../models';
/**
 * StorageClassApi - axios parameter creator
 * @export
 */
export const StorageClassApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Create storage class for the specified environment.
         * @summary create storage class
         * @param {string} environmentName Name of the Environment
         * @param {StorageClassCreate} storageClassCreate Fields used to create the storage class
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createStorageClass: async (environmentName: string, storageClassCreate: StorageClassCreate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            assertParamExists('createStorageClass', 'environmentName', environmentName)
            // verify required parameter 'storageClassCreate' is not null or undefined
            assertParamExists('createStorageClass', 'storageClassCreate', storageClassCreate)
            const localVarPath = `/admin/v1/environments/{environmentName}/storageClasses`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)));
            // 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(storageClassCreate, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Delete the storage class for the specified environment.
         * @summary Delete storage class
         * @param {string} environmentName Name of the Environment
         * @param {string} storageClassName Name of the Storage Class to be deleted
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteStorageClass: async (environmentName: string, storageClassName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            assertParamExists('deleteStorageClass', 'environmentName', environmentName)
            // verify required parameter 'storageClassName' is not null or undefined
            assertParamExists('deleteStorageClass', 'storageClassName', storageClassName)
            const localVarPath = `/admin/v1/environments/{environmentName}/storageClasses/{storageClassName}`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)))
                .replace(`{${"storageClassName"}}`, encodeURIComponent(String(storageClassName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * get the storage class for the specified environment.
         * @summary get storage class
         * @param {string} environmentName Name of the Environment
         * @param {string} storageClassName Name of the Storage Class to be updated
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getStorageClass: async (environmentName: string, storageClassName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            assertParamExists('getStorageClass', 'environmentName', environmentName)
            // verify required parameter 'storageClassName' is not null or undefined
            assertParamExists('getStorageClass', 'storageClassName', storageClassName)
            const localVarPath = `/admin/v1/environments/{environmentName}/storageClasses/{storageClassName}`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)))
                .replace(`{${"storageClassName"}}`, encodeURIComponent(String(storageClassName)));
            // 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)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * get the node stats related to the specified storage class for the specified environment.
         * @summary get node stats of the storage class
         * @param {string} environmentName Name of the Environment
         * @param {string} storageClassName Name of the Storage Class to be specified
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listStorageClassNodeStats: async (environmentName: string, storageClassName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            assertParamExists('listStorageClassNodeStats', 'environmentName', environmentName)
            // verify required parameter 'storageClassName' is not null or undefined
            assertParamExists('listStorageClassNodeStats', 'storageClassName', storageClassName)
            const localVarPath = `/admin/v1/environments/{environmentName}/storageClasses/{storageClassName}/nodeStats`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)))
                .replace(`{${"storageClassName"}}`, encodeURIComponent(String(storageClassName)));
            // 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)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * get the persistentvolumeclaim list related to the specified storage class for the specified environment.
         * @summary get persistentvolumeclaim list of the storage class
         * @param {string} environmentName Name of the Environment
         * @param {string} storageClassName Name of the Storage Class to be specified
         * @param {number} pageId defined page id.
         * @param {number} pageSize defined page size.
         * @param {string} [node] Name of the Node to be specified
         * @param {string} [orgName] Name of the Org to be specified
         * @param {string} [clusterName] Name of the Cluster to be specified
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listStorageClassPvcs: async (environmentName: string, storageClassName: string, pageId: number, pageSize: number, node?: string, orgName?: string, clusterName?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            assertParamExists('listStorageClassPvcs', 'environmentName', environmentName)
            // verify required parameter 'storageClassName' is not null or undefined
            assertParamExists('listStorageClassPvcs', 'storageClassName', storageClassName)
            // verify required parameter 'pageId' is not null or undefined
            assertParamExists('listStorageClassPvcs', 'pageId', pageId)
            // verify required parameter 'pageSize' is not null or undefined
            assertParamExists('listStorageClassPvcs', 'pageSize', pageSize)
            const localVarPath = `/admin/v1/environments/{environmentName}/storageClasses/{storageClassName}/pvcs`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)))
                .replace(`{${"storageClassName"}}`, encodeURIComponent(String(storageClassName)));
            // 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 (node !== undefined) {
                localVarQueryParameter['node'] = node;
            }

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

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

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

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Provides a summary of storage class statistics.
         * @summary List storage classes of a environment
         * @param {string} environmentName name of the Environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listStorageClasses: async (environmentName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            assertParamExists('listStorageClasses', 'environmentName', environmentName)
            const localVarPath = `/admin/v1/environments/{environmentName}/storageClasses`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)));
            // 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)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Provides a summary of storage provisioners statistics.
         * @summary List the provisioners that can be used by storage class of a environment
         * @param {string} environmentName name of the Environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listStorageProvisioners: async (environmentName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            assertParamExists('listStorageProvisioners', 'environmentName', environmentName)
            const localVarPath = `/admin/v1/environments/{environmentName}/storageProvisioners`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)));
            // 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)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Updates the  storage class for the specified environment.
         * @summary Update storage class
         * @param {string} environmentName Name of the Environment
         * @param {string} storageClassName Name of the Storage Class to be updated
         * @param {StorageClassUpdate} storageClassUpdate Fields to update for the storage class
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateStorageClass: async (environmentName: string, storageClassName: string, storageClassUpdate: StorageClassUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            assertParamExists('updateStorageClass', 'environmentName', environmentName)
            // verify required parameter 'storageClassName' is not null or undefined
            assertParamExists('updateStorageClass', 'storageClassName', storageClassName)
            // verify required parameter 'storageClassUpdate' is not null or undefined
            assertParamExists('updateStorageClass', 'storageClassUpdate', storageClassUpdate)
            const localVarPath = `/admin/v1/environments/{environmentName}/storageClasses/{storageClassName}`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)))
                .replace(`{${"storageClassName"}}`, encodeURIComponent(String(storageClassName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

            // authentication 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(storageClassUpdate, localVarRequestOptions, configuration)

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

/**
 * StorageClassApi - functional programming interface
 * @export
 */
export const StorageClassApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = StorageClassApiAxiosParamCreator(configuration)
    return {
        /**
         * Create storage class for the specified environment.
         * @summary create storage class
         * @param {string} environmentName Name of the Environment
         * @param {StorageClassCreate} storageClassCreate Fields used to create the storage class
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createStorageClass(environmentName: string, storageClassCreate: StorageClassCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StorageClassInfo>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createStorageClass(environmentName, storageClassCreate, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['StorageClassApi.createStorageClass']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Delete the storage class for the specified environment.
         * @summary Delete storage class
         * @param {string} environmentName Name of the Environment
         * @param {string} storageClassName Name of the Storage Class to be deleted
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteStorageClass(environmentName: string, storageClassName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteStorageClass204Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteStorageClass(environmentName, storageClassName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['StorageClassApi.deleteStorageClass']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * get the storage class for the specified environment.
         * @summary get storage class
         * @param {string} environmentName Name of the Environment
         * @param {string} storageClassName Name of the Storage Class to be updated
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getStorageClass(environmentName: string, storageClassName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StorageClassInfo>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getStorageClass(environmentName, storageClassName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['StorageClassApi.getStorageClass']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * get the node stats related to the specified storage class for the specified environment.
         * @summary get node stats of the storage class
         * @param {string} environmentName Name of the Environment
         * @param {string} storageClassName Name of the Storage Class to be specified
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listStorageClassNodeStats(environmentName: string, storageClassName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StorageClassNodeStatsList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listStorageClassNodeStats(environmentName, storageClassName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['StorageClassApi.listStorageClassNodeStats']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * get the persistentvolumeclaim list related to the specified storage class for the specified environment.
         * @summary get persistentvolumeclaim list of the storage class
         * @param {string} environmentName Name of the Environment
         * @param {string} storageClassName Name of the Storage Class to be specified
         * @param {number} pageId defined page id.
         * @param {number} pageSize defined page size.
         * @param {string} [node] Name of the Node to be specified
         * @param {string} [orgName] Name of the Org to be specified
         * @param {string} [clusterName] Name of the Cluster to be specified
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listStorageClassPvcs(environmentName: string, storageClassName: string, pageId: number, pageSize: number, node?: string, orgName?: string, clusterName?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PersistentVolumeClaimList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listStorageClassPvcs(environmentName, storageClassName, pageId, pageSize, node, orgName, clusterName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['StorageClassApi.listStorageClassPvcs']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Provides a summary of storage class statistics.
         * @summary List storage classes of a environment
         * @param {string} environmentName name of the Environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listStorageClasses(environmentName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StorageClassList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listStorageClasses(environmentName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['StorageClassApi.listStorageClasses']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Provides a summary of storage provisioners statistics.
         * @summary List the provisioners that can be used by storage class of a environment
         * @param {string} environmentName name of the Environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listStorageProvisioners(environmentName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StorageProvisionerList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listStorageProvisioners(environmentName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['StorageClassApi.listStorageProvisioners']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Updates the  storage class for the specified environment.
         * @summary Update storage class
         * @param {string} environmentName Name of the Environment
         * @param {string} storageClassName Name of the Storage Class to be updated
         * @param {StorageClassUpdate} storageClassUpdate Fields to update for the storage class
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateStorageClass(environmentName: string, storageClassName: string, storageClassUpdate: StorageClassUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteStorageClass204Response>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateStorageClass(environmentName, storageClassName, storageClassUpdate, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['StorageClassApi.updateStorageClass']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * StorageClassApi - factory interface
 * @export
 */
export const StorageClassApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = StorageClassApiFp(configuration)
    return {
        /**
         * Create storage class for the specified environment.
         * @summary create storage class
         * @param {StorageClassApiCreateStorageClassRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createStorageClass(requestParameters: StorageClassApiCreateStorageClassRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageClassInfo> {
            return localVarFp.createStorageClass(requestParameters.environmentName, requestParameters.storageClassCreate, options).then((request) => request(axios, basePath));
        },
        /**
         * Delete the storage class for the specified environment.
         * @summary Delete storage class
         * @param {StorageClassApiDeleteStorageClassRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteStorageClass(requestParameters: StorageClassApiDeleteStorageClassRequest, options?: RawAxiosRequestConfig): AxiosPromise<DeleteStorageClass204Response> {
            return localVarFp.deleteStorageClass(requestParameters.environmentName, requestParameters.storageClassName, options).then((request) => request(axios, basePath));
        },
        /**
         * get the storage class for the specified environment.
         * @summary get storage class
         * @param {StorageClassApiGetStorageClassRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getStorageClass(requestParameters: StorageClassApiGetStorageClassRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageClassInfo> {
            return localVarFp.getStorageClass(requestParameters.environmentName, requestParameters.storageClassName, options).then((request) => request(axios, basePath));
        },
        /**
         * get the node stats related to the specified storage class for the specified environment.
         * @summary get node stats of the storage class
         * @param {StorageClassApiListStorageClassNodeStatsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listStorageClassNodeStats(requestParameters: StorageClassApiListStorageClassNodeStatsRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageClassNodeStatsList> {
            return localVarFp.listStorageClassNodeStats(requestParameters.environmentName, requestParameters.storageClassName, options).then((request) => request(axios, basePath));
        },
        /**
         * get the persistentvolumeclaim list related to the specified storage class for the specified environment.
         * @summary get persistentvolumeclaim list of the storage class
         * @param {StorageClassApiListStorageClassPvcsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listStorageClassPvcs(requestParameters: StorageClassApiListStorageClassPvcsRequest, options?: RawAxiosRequestConfig): AxiosPromise<PersistentVolumeClaimList> {
            return localVarFp.listStorageClassPvcs(requestParameters.environmentName, requestParameters.storageClassName, requestParameters.pageId, requestParameters.pageSize, requestParameters.node, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath));
        },
        /**
         * Provides a summary of storage class statistics.
         * @summary List storage classes of a environment
         * @param {StorageClassApiListStorageClassesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listStorageClasses(requestParameters: StorageClassApiListStorageClassesRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageClassList> {
            return localVarFp.listStorageClasses(requestParameters.environmentName, options).then((request) => request(axios, basePath));
        },
        /**
         * Provides a summary of storage provisioners statistics.
         * @summary List the provisioners that can be used by storage class of a environment
         * @param {StorageClassApiListStorageProvisionersRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listStorageProvisioners(requestParameters: StorageClassApiListStorageProvisionersRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageProvisionerList> {
            return localVarFp.listStorageProvisioners(requestParameters.environmentName, options).then((request) => request(axios, basePath));
        },
        /**
         * Updates the  storage class for the specified environment.
         * @summary Update storage class
         * @param {StorageClassApiUpdateStorageClassRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateStorageClass(requestParameters: StorageClassApiUpdateStorageClassRequest, options?: RawAxiosRequestConfig): AxiosPromise<DeleteStorageClass204Response> {
            return localVarFp.updateStorageClass(requestParameters.environmentName, requestParameters.storageClassName, requestParameters.storageClassUpdate, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * StorageClassApi - interface
 * @export
 * @interface StorageClassApi
 */
export interface StorageClassApiInterface {
    /**
     * Create storage class for the specified environment.
     * @summary create storage class
     * @param {StorageClassApiCreateStorageClassRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApiInterface
     */
    createStorageClass(requestParameters: StorageClassApiCreateStorageClassRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageClassInfo>;

    /**
     * Delete the storage class for the specified environment.
     * @summary Delete storage class
     * @param {StorageClassApiDeleteStorageClassRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApiInterface
     */
    deleteStorageClass(requestParameters: StorageClassApiDeleteStorageClassRequest, options?: RawAxiosRequestConfig): AxiosPromise<DeleteStorageClass204Response>;

    /**
     * get the storage class for the specified environment.
     * @summary get storage class
     * @param {StorageClassApiGetStorageClassRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApiInterface
     */
    getStorageClass(requestParameters: StorageClassApiGetStorageClassRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageClassInfo>;

    /**
     * get the node stats related to the specified storage class for the specified environment.
     * @summary get node stats of the storage class
     * @param {StorageClassApiListStorageClassNodeStatsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApiInterface
     */
    listStorageClassNodeStats(requestParameters: StorageClassApiListStorageClassNodeStatsRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageClassNodeStatsList>;

    /**
     * get the persistentvolumeclaim list related to the specified storage class for the specified environment.
     * @summary get persistentvolumeclaim list of the storage class
     * @param {StorageClassApiListStorageClassPvcsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApiInterface
     */
    listStorageClassPvcs(requestParameters: StorageClassApiListStorageClassPvcsRequest, options?: RawAxiosRequestConfig): AxiosPromise<PersistentVolumeClaimList>;

    /**
     * Provides a summary of storage class statistics.
     * @summary List storage classes of a environment
     * @param {StorageClassApiListStorageClassesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApiInterface
     */
    listStorageClasses(requestParameters: StorageClassApiListStorageClassesRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageClassList>;

    /**
     * Provides a summary of storage provisioners statistics.
     * @summary List the provisioners that can be used by storage class of a environment
     * @param {StorageClassApiListStorageProvisionersRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApiInterface
     */
    listStorageProvisioners(requestParameters: StorageClassApiListStorageProvisionersRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageProvisionerList>;

    /**
     * Updates the  storage class for the specified environment.
     * @summary Update storage class
     * @param {StorageClassApiUpdateStorageClassRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApiInterface
     */
    updateStorageClass(requestParameters: StorageClassApiUpdateStorageClassRequest, options?: RawAxiosRequestConfig): AxiosPromise<DeleteStorageClass204Response>;

}

/**
 * Request parameters for createStorageClass operation in StorageClassApi.
 * @export
 * @interface StorageClassApiCreateStorageClassRequest
 */
export interface StorageClassApiCreateStorageClassRequest {
    /**
     * Name of the Environment
     * @type {string}
     * @memberof StorageClassApiCreateStorageClass
     */
    readonly environmentName: string

    /**
     * Fields used to create the storage class
     * @type {StorageClassCreate}
     * @memberof StorageClassApiCreateStorageClass
     */
    readonly storageClassCreate: StorageClassCreate
}

/**
 * Request parameters for deleteStorageClass operation in StorageClassApi.
 * @export
 * @interface StorageClassApiDeleteStorageClassRequest
 */
export interface StorageClassApiDeleteStorageClassRequest {
    /**
     * Name of the Environment
     * @type {string}
     * @memberof StorageClassApiDeleteStorageClass
     */
    readonly environmentName: string

    /**
     * Name of the Storage Class to be deleted
     * @type {string}
     * @memberof StorageClassApiDeleteStorageClass
     */
    readonly storageClassName: string
}

/**
 * Request parameters for getStorageClass operation in StorageClassApi.
 * @export
 * @interface StorageClassApiGetStorageClassRequest
 */
export interface StorageClassApiGetStorageClassRequest {
    /**
     * Name of the Environment
     * @type {string}
     * @memberof StorageClassApiGetStorageClass
     */
    readonly environmentName: string

    /**
     * Name of the Storage Class to be updated
     * @type {string}
     * @memberof StorageClassApiGetStorageClass
     */
    readonly storageClassName: string
}

/**
 * Request parameters for listStorageClassNodeStats operation in StorageClassApi.
 * @export
 * @interface StorageClassApiListStorageClassNodeStatsRequest
 */
export interface StorageClassApiListStorageClassNodeStatsRequest {
    /**
     * Name of the Environment
     * @type {string}
     * @memberof StorageClassApiListStorageClassNodeStats
     */
    readonly environmentName: string

    /**
     * Name of the Storage Class to be specified
     * @type {string}
     * @memberof StorageClassApiListStorageClassNodeStats
     */
    readonly storageClassName: string
}

/**
 * Request parameters for listStorageClassPvcs operation in StorageClassApi.
 * @export
 * @interface StorageClassApiListStorageClassPvcsRequest
 */
export interface StorageClassApiListStorageClassPvcsRequest {
    /**
     * Name of the Environment
     * @type {string}
     * @memberof StorageClassApiListStorageClassPvcs
     */
    readonly environmentName: string

    /**
     * Name of the Storage Class to be specified
     * @type {string}
     * @memberof StorageClassApiListStorageClassPvcs
     */
    readonly storageClassName: string

    /**
     * defined page id.
     * @type {number}
     * @memberof StorageClassApiListStorageClassPvcs
     */
    readonly pageId: number

    /**
     * defined page size.
     * @type {number}
     * @memberof StorageClassApiListStorageClassPvcs
     */
    readonly pageSize: number

    /**
     * Name of the Node to be specified
     * @type {string}
     * @memberof StorageClassApiListStorageClassPvcs
     */
    readonly node?: string

    /**
     * Name of the Org to be specified
     * @type {string}
     * @memberof StorageClassApiListStorageClassPvcs
     */
    readonly orgName?: string

    /**
     * Name of the Cluster to be specified
     * @type {string}
     * @memberof StorageClassApiListStorageClassPvcs
     */
    readonly clusterName?: string
}

/**
 * Request parameters for listStorageClasses operation in StorageClassApi.
 * @export
 * @interface StorageClassApiListStorageClassesRequest
 */
export interface StorageClassApiListStorageClassesRequest {
    /**
     * name of the Environment
     * @type {string}
     * @memberof StorageClassApiListStorageClasses
     */
    readonly environmentName: string
}

/**
 * Request parameters for listStorageProvisioners operation in StorageClassApi.
 * @export
 * @interface StorageClassApiListStorageProvisionersRequest
 */
export interface StorageClassApiListStorageProvisionersRequest {
    /**
     * name of the Environment
     * @type {string}
     * @memberof StorageClassApiListStorageProvisioners
     */
    readonly environmentName: string
}

/**
 * Request parameters for updateStorageClass operation in StorageClassApi.
 * @export
 * @interface StorageClassApiUpdateStorageClassRequest
 */
export interface StorageClassApiUpdateStorageClassRequest {
    /**
     * Name of the Environment
     * @type {string}
     * @memberof StorageClassApiUpdateStorageClass
     */
    readonly environmentName: string

    /**
     * Name of the Storage Class to be updated
     * @type {string}
     * @memberof StorageClassApiUpdateStorageClass
     */
    readonly storageClassName: string

    /**
     * Fields to update for the storage class
     * @type {StorageClassUpdate}
     * @memberof StorageClassApiUpdateStorageClass
     */
    readonly storageClassUpdate: StorageClassUpdate
}

/**
 * StorageClassApi - object-oriented interface
 * @export
 * @class StorageClassApi
 * @extends {BaseAPI}
 */
export class StorageClassApi extends BaseAPI implements StorageClassApiInterface {
    /**
     * Create storage class for the specified environment.
     * @summary create storage class
     * @param {StorageClassApiCreateStorageClassRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApi
     */
    public createStorageClass(requestParameters: StorageClassApiCreateStorageClassRequest, options?: RawAxiosRequestConfig) {
        return StorageClassApiFp(this.configuration).createStorageClass(requestParameters.environmentName, requestParameters.storageClassCreate, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Delete the storage class for the specified environment.
     * @summary Delete storage class
     * @param {StorageClassApiDeleteStorageClassRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApi
     */
    public deleteStorageClass(requestParameters: StorageClassApiDeleteStorageClassRequest, options?: RawAxiosRequestConfig) {
        return StorageClassApiFp(this.configuration).deleteStorageClass(requestParameters.environmentName, requestParameters.storageClassName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * get the storage class for the specified environment.
     * @summary get storage class
     * @param {StorageClassApiGetStorageClassRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApi
     */
    public getStorageClass(requestParameters: StorageClassApiGetStorageClassRequest, options?: RawAxiosRequestConfig) {
        return StorageClassApiFp(this.configuration).getStorageClass(requestParameters.environmentName, requestParameters.storageClassName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * get the node stats related to the specified storage class for the specified environment.
     * @summary get node stats of the storage class
     * @param {StorageClassApiListStorageClassNodeStatsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApi
     */
    public listStorageClassNodeStats(requestParameters: StorageClassApiListStorageClassNodeStatsRequest, options?: RawAxiosRequestConfig) {
        return StorageClassApiFp(this.configuration).listStorageClassNodeStats(requestParameters.environmentName, requestParameters.storageClassName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * get the persistentvolumeclaim list related to the specified storage class for the specified environment.
     * @summary get persistentvolumeclaim list of the storage class
     * @param {StorageClassApiListStorageClassPvcsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApi
     */
    public listStorageClassPvcs(requestParameters: StorageClassApiListStorageClassPvcsRequest, options?: RawAxiosRequestConfig) {
        return StorageClassApiFp(this.configuration).listStorageClassPvcs(requestParameters.environmentName, requestParameters.storageClassName, requestParameters.pageId, requestParameters.pageSize, requestParameters.node, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Provides a summary of storage class statistics.
     * @summary List storage classes of a environment
     * @param {StorageClassApiListStorageClassesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApi
     */
    public listStorageClasses(requestParameters: StorageClassApiListStorageClassesRequest, options?: RawAxiosRequestConfig) {
        return StorageClassApiFp(this.configuration).listStorageClasses(requestParameters.environmentName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Provides a summary of storage provisioners statistics.
     * @summary List the provisioners that can be used by storage class of a environment
     * @param {StorageClassApiListStorageProvisionersRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApi
     */
    public listStorageProvisioners(requestParameters: StorageClassApiListStorageProvisionersRequest, options?: RawAxiosRequestConfig) {
        return StorageClassApiFp(this.configuration).listStorageProvisioners(requestParameters.environmentName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Updates the  storage class for the specified environment.
     * @summary Update storage class
     * @param {StorageClassApiUpdateStorageClassRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StorageClassApi
     */
    public updateStorageClass(requestParameters: StorageClassApiUpdateStorageClassRequest, options?: RawAxiosRequestConfig) {
        return StorageClassApiFp(this.configuration).updateStorageClass(requestParameters.environmentName, requestParameters.storageClassName, requestParameters.storageClassUpdate, options).then((request) => request(this.axios, this.basePath));
    }
}

