"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * KubeBlocks Cloud API
 * KubeBlocks Cloud API is a RESTful API for managing KubeBlocks Cloud resources.  The API is organized around REST.  Our API has predictable resource-oriented URLs, accepts `JSON-encoded` request bodies, returns `JSON-encoded` responses, and uses standard HTTP response codes, authentication, and verbs.  We use standard HTTP authentication and provide API keys to identify who you are. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
 *
 * 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.ParameterTemplateApi = exports.ParameterTemplateApiFactory = exports.ParameterTemplateApiFp = exports.ParameterTemplateApiAxiosParamCreator = 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");
/**
 * ParameterTemplateApi - axios parameter creator
 * @export
 */
const ParameterTemplateApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create parameter template
         * @param {string} orgName name of the Org
         * @param {ParamTplCreate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createParameterTemplate: async (orgName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createParameterTemplate', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('createParameterTemplate', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/parameterTemplates`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)));
            // 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)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Delete parameter template
         * @param {string} orgName name of the Org
         * @param {string} parameterTemplateName name of the parameter template
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteParameterTemplate: async (orgName, parameterTemplateName, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteParameterTemplate', 'orgName', orgName);
            // verify required parameter 'parameterTemplateName' is not null or undefined
            (0, common_1.assertParamExists)('deleteParameterTemplate', 'parameterTemplateName', parameterTemplateName);
            const localVarPath = `/api/v1/organizations/{orgName}/parameterTemplate/{parameterTemplateName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"parameterTemplateName"}}`, encodeURIComponent(String(parameterTemplateName)));
            // 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,
            };
        },
        /**
         *
         * @summary Export parameter template from cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the cluster
         * @param {ParamTplCreateFromCluster} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        exportParameterTemplateFromCluster: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('exportParameterTemplateFromCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('exportParameterTemplateFromCluster', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('exportParameterTemplateFromCluster', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/parameterTemplate`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, 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)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Get cluster parameter template
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the cluster
         * @param {string} [component] component type
         * @param {string} [engineName] engine name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getClusterParameterTemplate: async (orgName, clusterName, component, engineName, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getClusterParameterTemplate', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('getClusterParameterTemplate', 'clusterName', clusterName);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/parameterTemplate`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, 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 (component !== undefined) {
                localVarQueryParameter['component'] = component;
            }
            if (engineName !== undefined) {
                localVarQueryParameter['engineName'] = engineName;
            }
            (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,
            };
        },
        /**
         *
         * @summary List parameter templates in an Org
         * @param {string} orgName name of the Org
         * @param {ParameterTemplatePartition} [partition] the template partition in listParamTpl request
         * @param {string} [version] Cluster Application Version
         * @param {string} [component] component type
         * @param {string} [engineName] engine Name
         * @param {string} [engineMode] engine mode
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listParameterTemplates: async (orgName, partition, version, component, engineName, engineMode, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listParameterTemplates', 'orgName', orgName);
            const localVarPath = `/api/v1/organizations/{orgName}/parameterTemplates`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)));
            // 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 (partition !== undefined) {
                localVarQueryParameter['partition'] = partition;
            }
            if (version !== undefined) {
                localVarQueryParameter['version'] = version;
            }
            if (component !== undefined) {
                localVarQueryParameter['component'] = component;
            }
            if (engineName !== undefined) {
                localVarQueryParameter['engineName'] = engineName;
            }
            if (engineMode !== undefined) {
                localVarQueryParameter['engineMode'] = engineMode;
            }
            (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,
            };
        },
        /**
         *
         * @summary Update parameter template
         * @param {string} orgName name of the Org
         * @param {string} parameterTemplateName name of the parameter template
         * @param {ParamTplUpdate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchParameterTemplate: async (orgName, parameterTemplateName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('patchParameterTemplate', 'orgName', orgName);
            // verify required parameter 'parameterTemplateName' is not null or undefined
            (0, common_1.assertParamExists)('patchParameterTemplate', 'parameterTemplateName', parameterTemplateName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('patchParameterTemplate', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/parameterTemplate/{parameterTemplateName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"parameterTemplateName"}}`, encodeURIComponent(String(parameterTemplateName)));
            // 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)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Get parameter template details
         * @param {string} orgName name of the Org
         * @param {string} parameterTemplateName name of the parameter template
         * @param {ParameterTemplatePartition} [partition] the template partition in read paramTpl request
         * @param {boolean} [rawContent] whether to return the raw template content
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readParameterTemplate: async (orgName, parameterTemplateName, partition, rawContent, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('readParameterTemplate', 'orgName', orgName);
            // verify required parameter 'parameterTemplateName' is not null or undefined
            (0, common_1.assertParamExists)('readParameterTemplate', 'parameterTemplateName', parameterTemplateName);
            const localVarPath = `/api/v1/organizations/{orgName}/parameterTemplate/{parameterTemplateName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"parameterTemplateName"}}`, encodeURIComponent(String(parameterTemplateName)));
            // 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 (partition !== undefined) {
                localVarQueryParameter['partition'] = partition;
            }
            if (rawContent !== undefined) {
                localVarQueryParameter['rawContent'] = rawContent;
            }
            (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,
            };
        },
        /**
         *
         * @summary Get parameter template diff against default template
         * @param {string} orgName name of the Org
         * @param {string} parameterTemplateName name of the parameter template
         * @param {ParameterTemplatePartition} [partition] the template partition in diff parameter template request
         * @param {boolean} [rawContent] whether to compare raw template content
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readParameterTemplateDiff: async (orgName, parameterTemplateName, partition, rawContent, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('readParameterTemplateDiff', 'orgName', orgName);
            // verify required parameter 'parameterTemplateName' is not null or undefined
            (0, common_1.assertParamExists)('readParameterTemplateDiff', 'parameterTemplateName', parameterTemplateName);
            const localVarPath = `/api/v1/organizations/{orgName}/parameterTemplate/{parameterTemplateName}/diff`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"parameterTemplateName"}}`, encodeURIComponent(String(parameterTemplateName)));
            // 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 (partition !== undefined) {
                localVarQueryParameter['partition'] = partition;
            }
            if (rawContent !== undefined) {
                localVarQueryParameter['rawContent'] = rawContent;
            }
            (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,
            };
        },
        /**
         *
         * @summary Update cluster parameter template
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the cluster
         * @param {Array<ParamTplsItem>} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateClusterParameterTemplate: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('updateClusterParameterTemplate', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('updateClusterParameterTemplate', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('updateClusterParameterTemplate', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/parameterTemplate`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, 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)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
exports.ParameterTemplateApiAxiosParamCreator = ParameterTemplateApiAxiosParamCreator;
/**
 * ParameterTemplateApi - functional programming interface
 * @export
 */
const ParameterTemplateApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.ParameterTemplateApiAxiosParamCreator)(configuration);
    return {
        /**
         *
         * @summary Create parameter template
         * @param {string} orgName name of the Org
         * @param {ParamTplCreate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createParameterTemplate(orgName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createParameterTemplate(orgName, body, 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['ParameterTemplateApi.createParameterTemplate']) === 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);
        },
        /**
         *
         * @summary Delete parameter template
         * @param {string} orgName name of the Org
         * @param {string} parameterTemplateName name of the parameter template
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteParameterTemplate(orgName, parameterTemplateName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteParameterTemplate(orgName, parameterTemplateName, 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['ParameterTemplateApi.deleteParameterTemplate']) === 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);
        },
        /**
         *
         * @summary Export parameter template from cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the cluster
         * @param {ParamTplCreateFromCluster} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async exportParameterTemplateFromCluster(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.exportParameterTemplateFromCluster(orgName, clusterName, body, 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['ParameterTemplateApi.exportParameterTemplateFromCluster']) === 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);
        },
        /**
         *
         * @summary Get cluster parameter template
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the cluster
         * @param {string} [component] component type
         * @param {string} [engineName] engine name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getClusterParameterTemplate(orgName, clusterName, component, engineName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getClusterParameterTemplate(orgName, clusterName, component, engineName, 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['ParameterTemplateApi.getClusterParameterTemplate']) === 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);
        },
        /**
         *
         * @summary List parameter templates in an Org
         * @param {string} orgName name of the Org
         * @param {ParameterTemplatePartition} [partition] the template partition in listParamTpl request
         * @param {string} [version] Cluster Application Version
         * @param {string} [component] component type
         * @param {string} [engineName] engine Name
         * @param {string} [engineMode] engine mode
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listParameterTemplates(orgName, partition, version, component, engineName, engineMode, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listParameterTemplates(orgName, partition, version, component, engineName, engineMode, 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['ParameterTemplateApi.listParameterTemplates']) === 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);
        },
        /**
         *
         * @summary Update parameter template
         * @param {string} orgName name of the Org
         * @param {string} parameterTemplateName name of the parameter template
         * @param {ParamTplUpdate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchParameterTemplate(orgName, parameterTemplateName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchParameterTemplate(orgName, parameterTemplateName, body, 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['ParameterTemplateApi.patchParameterTemplate']) === 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);
        },
        /**
         *
         * @summary Get parameter template details
         * @param {string} orgName name of the Org
         * @param {string} parameterTemplateName name of the parameter template
         * @param {ParameterTemplatePartition} [partition] the template partition in read paramTpl request
         * @param {boolean} [rawContent] whether to return the raw template content
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async readParameterTemplate(orgName, parameterTemplateName, partition, rawContent, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.readParameterTemplate(orgName, parameterTemplateName, partition, rawContent, 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['ParameterTemplateApi.readParameterTemplate']) === 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);
        },
        /**
         *
         * @summary Get parameter template diff against default template
         * @param {string} orgName name of the Org
         * @param {string} parameterTemplateName name of the parameter template
         * @param {ParameterTemplatePartition} [partition] the template partition in diff parameter template request
         * @param {boolean} [rawContent] whether to compare raw template content
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async readParameterTemplateDiff(orgName, parameterTemplateName, partition, rawContent, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.readParameterTemplateDiff(orgName, parameterTemplateName, partition, rawContent, 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['ParameterTemplateApi.readParameterTemplateDiff']) === 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);
        },
        /**
         *
         * @summary Update cluster parameter template
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the cluster
         * @param {Array<ParamTplsItem>} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateClusterParameterTemplate(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateClusterParameterTemplate(orgName, clusterName, body, 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['ParameterTemplateApi.updateClusterParameterTemplate']) === 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.ParameterTemplateApiFp = ParameterTemplateApiFp;
/**
 * ParameterTemplateApi - factory interface
 * @export
 */
const ParameterTemplateApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.ParameterTemplateApiFp)(configuration);
    return {
        /**
         *
         * @summary Create parameter template
         * @param {ParameterTemplateApiCreateParameterTemplateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createParameterTemplate(requestParameters, options) {
            return localVarFp.createParameterTemplate(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete parameter template
         * @param {ParameterTemplateApiDeleteParameterTemplateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteParameterTemplate(requestParameters, options) {
            return localVarFp.deleteParameterTemplate(requestParameters.orgName, requestParameters.parameterTemplateName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Export parameter template from cluster
         * @param {ParameterTemplateApiExportParameterTemplateFromClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        exportParameterTemplateFromCluster(requestParameters, options) {
            return localVarFp.exportParameterTemplateFromCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Get cluster parameter template
         * @param {ParameterTemplateApiGetClusterParameterTemplateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getClusterParameterTemplate(requestParameters, options) {
            return localVarFp.getClusterParameterTemplate(requestParameters.orgName, requestParameters.clusterName, requestParameters.component, requestParameters.engineName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List parameter templates in an Org
         * @param {ParameterTemplateApiListParameterTemplatesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listParameterTemplates(requestParameters, options) {
            return localVarFp.listParameterTemplates(requestParameters.orgName, requestParameters.partition, requestParameters.version, requestParameters.component, requestParameters.engineName, requestParameters.engineMode, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update parameter template
         * @param {ParameterTemplateApiPatchParameterTemplateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchParameterTemplate(requestParameters, options) {
            return localVarFp.patchParameterTemplate(requestParameters.orgName, requestParameters.parameterTemplateName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Get parameter template details
         * @param {ParameterTemplateApiReadParameterTemplateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readParameterTemplate(requestParameters, options) {
            return localVarFp.readParameterTemplate(requestParameters.orgName, requestParameters.parameterTemplateName, requestParameters.partition, requestParameters.rawContent, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Get parameter template diff against default template
         * @param {ParameterTemplateApiReadParameterTemplateDiffRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readParameterTemplateDiff(requestParameters, options) {
            return localVarFp.readParameterTemplateDiff(requestParameters.orgName, requestParameters.parameterTemplateName, requestParameters.partition, requestParameters.rawContent, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update cluster parameter template
         * @param {ParameterTemplateApiUpdateClusterParameterTemplateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateClusterParameterTemplate(requestParameters, options) {
            return localVarFp.updateClusterParameterTemplate(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
    };
};
exports.ParameterTemplateApiFactory = ParameterTemplateApiFactory;
/**
 * ParameterTemplateApi - object-oriented interface
 * @export
 * @class ParameterTemplateApi
 * @extends {BaseAPI}
 */
class ParameterTemplateApi extends base_1.BaseAPI {
    /**
     *
     * @summary Create parameter template
     * @param {ParameterTemplateApiCreateParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApi
     */
    createParameterTemplate(requestParameters, options) {
        return (0, exports.ParameterTemplateApiFp)(this.configuration).createParameterTemplate(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete parameter template
     * @param {ParameterTemplateApiDeleteParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApi
     */
    deleteParameterTemplate(requestParameters, options) {
        return (0, exports.ParameterTemplateApiFp)(this.configuration).deleteParameterTemplate(requestParameters.orgName, requestParameters.parameterTemplateName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Export parameter template from cluster
     * @param {ParameterTemplateApiExportParameterTemplateFromClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApi
     */
    exportParameterTemplateFromCluster(requestParameters, options) {
        return (0, exports.ParameterTemplateApiFp)(this.configuration).exportParameterTemplateFromCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Get cluster parameter template
     * @param {ParameterTemplateApiGetClusterParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApi
     */
    getClusterParameterTemplate(requestParameters, options) {
        return (0, exports.ParameterTemplateApiFp)(this.configuration).getClusterParameterTemplate(requestParameters.orgName, requestParameters.clusterName, requestParameters.component, requestParameters.engineName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List parameter templates in an Org
     * @param {ParameterTemplateApiListParameterTemplatesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApi
     */
    listParameterTemplates(requestParameters, options) {
        return (0, exports.ParameterTemplateApiFp)(this.configuration).listParameterTemplates(requestParameters.orgName, requestParameters.partition, requestParameters.version, requestParameters.component, requestParameters.engineName, requestParameters.engineMode, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update parameter template
     * @param {ParameterTemplateApiPatchParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApi
     */
    patchParameterTemplate(requestParameters, options) {
        return (0, exports.ParameterTemplateApiFp)(this.configuration).patchParameterTemplate(requestParameters.orgName, requestParameters.parameterTemplateName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Get parameter template details
     * @param {ParameterTemplateApiReadParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApi
     */
    readParameterTemplate(requestParameters, options) {
        return (0, exports.ParameterTemplateApiFp)(this.configuration).readParameterTemplate(requestParameters.orgName, requestParameters.parameterTemplateName, requestParameters.partition, requestParameters.rawContent, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Get parameter template diff against default template
     * @param {ParameterTemplateApiReadParameterTemplateDiffRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApi
     */
    readParameterTemplateDiff(requestParameters, options) {
        return (0, exports.ParameterTemplateApiFp)(this.configuration).readParameterTemplateDiff(requestParameters.orgName, requestParameters.parameterTemplateName, requestParameters.partition, requestParameters.rawContent, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update cluster parameter template
     * @param {ParameterTemplateApiUpdateClusterParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApi
     */
    updateClusterParameterTemplate(requestParameters, options) {
        return (0, exports.ParameterTemplateApiFp)(this.configuration).updateClusterParameterTemplate(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.ParameterTemplateApi = ParameterTemplateApi;
//# sourceMappingURL=parameter-template-api.js.map