"use strict";
/* 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.
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.StorageClassApi = exports.StorageClassApiFactory = exports.StorageClassApiFp = exports.StorageClassApiAxiosParamCreator = void 0;
const axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("../common");
// @ts-ignore
const base_1 = require("../base");
/**
 * StorageClassApi - axios parameter creator
 * @export
 */
const StorageClassApiAxiosParamCreator = function (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, storageClassCreate, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('createStorageClass', 'environmentName', environmentName);
            // verify required parameter 'storageClassCreate' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(storageClassCreate, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.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, storageClassName, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('deleteStorageClass', 'environmentName', environmentName);
            // verify required parameter 'storageClassName' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.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, storageClassName, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('getStorageClass', 'environmentName', environmentName);
            // verify required parameter 'storageClassName' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.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, storageClassName, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('listStorageClassNodeStats', 'environmentName', environmentName);
            // verify required parameter 'storageClassName' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.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, storageClassName, pageId, pageSize, node, orgName, clusterName, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('listStorageClassPvcs', 'environmentName', environmentName);
            // verify required parameter 'storageClassName' is not null or undefined
            (0, common_1.assertParamExists)('listStorageClassPvcs', 'storageClassName', storageClassName);
            // verify required parameter 'pageId' is not null or undefined
            (0, common_1.assertParamExists)('listStorageClassPvcs', 'pageId', pageId);
            // verify required parameter 'pageSize' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.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;
            }
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.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, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.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, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.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, storageClassName, storageClassUpdate, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('updateStorageClass', 'environmentName', environmentName);
            // verify required parameter 'storageClassName' is not null or undefined
            (0, common_1.assertParamExists)('updateStorageClass', 'storageClassName', storageClassName);
            // verify required parameter 'storageClassUpdate' is not null or undefined
            (0, common_1.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, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(storageClassUpdate, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
exports.StorageClassApiAxiosParamCreator = StorageClassApiAxiosParamCreator;
/**
 * StorageClassApi - functional programming interface
 * @export
 */
const StorageClassApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.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, storageClassCreate, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createStorageClass(environmentName, storageClassCreate, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StorageClassApi.createStorageClass']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.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, storageClassName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteStorageClass(environmentName, storageClassName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StorageClassApi.deleteStorageClass']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.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, storageClassName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getStorageClass(environmentName, storageClassName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StorageClassApi.getStorageClass']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.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, storageClassName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listStorageClassNodeStats(environmentName, storageClassName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StorageClassApi.listStorageClassNodeStats']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.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, storageClassName, pageId, pageSize, node, orgName, clusterName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listStorageClassPvcs(environmentName, storageClassName, pageId, pageSize, node, orgName, clusterName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StorageClassApi.listStorageClassPvcs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.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, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listStorageClasses(environmentName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StorageClassApi.listStorageClasses']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.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, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listStorageProvisioners(environmentName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StorageClassApi.listStorageProvisioners']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.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, storageClassName, storageClassUpdate, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateStorageClass(environmentName, storageClassName, storageClassUpdate, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StorageClassApi.updateStorageClass']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    };
};
exports.StorageClassApiFp = StorageClassApiFp;
/**
 * StorageClassApi - factory interface
 * @export
 */
const StorageClassApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.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, options) {
            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, options) {
            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, options) {
            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, options) {
            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, options) {
            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, options) {
            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, options) {
            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, options) {
            return localVarFp.updateStorageClass(requestParameters.environmentName, requestParameters.storageClassName, requestParameters.storageClassUpdate, options).then((request) => request(axios, basePath));
        },
    };
};
exports.StorageClassApiFactory = StorageClassApiFactory;
/**
 * StorageClassApi - object-oriented interface
 * @export
 * @class StorageClassApi
 * @extends {BaseAPI}
 */
class StorageClassApi extends base_1.BaseAPI {
    /**
     * 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
     */
    createStorageClass(requestParameters, options) {
        return (0, exports.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
     */
    deleteStorageClass(requestParameters, options) {
        return (0, exports.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
     */
    getStorageClass(requestParameters, options) {
        return (0, exports.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
     */
    listStorageClassNodeStats(requestParameters, options) {
        return (0, exports.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
     */
    listStorageClassPvcs(requestParameters, options) {
        return (0, exports.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
     */
    listStorageClasses(requestParameters, options) {
        return (0, exports.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
     */
    listStorageProvisioners(requestParameters, options) {
        return (0, exports.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
     */
    updateStorageClass(requestParameters, options) {
        return (0, exports.StorageClassApiFp)(this.configuration).updateStorageClass(requestParameters.environmentName, requestParameters.storageClassName, requestParameters.storageClassUpdate, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.StorageClassApi = StorageClassApi;
//# sourceMappingURL=storage-class-api.js.map