/* 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.
 */


import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { APIErrorResponse } from '../models';
// @ts-ignore
import type { ParamTplApplyToClusterList } from '../models';
// @ts-ignore
import type { ParamTplCreate } from '../models';
// @ts-ignore
import type { ParamTplCreateFromCluster } from '../models';
// @ts-ignore
import type { ParamTplList } from '../models';
// @ts-ignore
import type { ParamTplListItem } from '../models';
// @ts-ignore
import type { ParamTplUpdate } from '../models';
// @ts-ignore
import type { ParamTplsItem } from '../models';
// @ts-ignore
import type { ParameterList } from '../models';
// @ts-ignore
import type { ParameterTemplateDiff } from '../models';
// @ts-ignore
import type { ParameterTemplatePartition } from '../models';
/**
 * ParameterTemplateApi - axios parameter creator
 * @export
 */
export const ParameterTemplateApiAxiosParamCreator = function (configuration?: 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: string, body: ParamTplCreate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('createParameterTemplate', 'orgName', orgName)
            // verify required parameter 'body' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 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: string, parameterTemplateName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('deleteParameterTemplate', 'orgName', orgName)
            // verify required parameter 'parameterTemplateName' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @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: string, clusterName: string, body: ParamTplCreateFromCluster, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('exportParameterTemplateFromCluster', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('exportParameterTemplateFromCluster', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary 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: string, clusterName: string, component?: string, engineName?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('getClusterParameterTemplate', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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

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

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


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

            return {
                url: 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: string, partition?: ParameterTemplatePartition, version?: string, component?: string, engineName?: string, engineMode?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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

            if (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;
            }


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

            return {
                url: 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: string, parameterTemplateName: string, body: ParamTplUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('patchParameterTemplate', 'orgName', orgName)
            // verify required parameter 'parameterTemplateName' is not null or undefined
            assertParamExists('patchParameterTemplate', 'parameterTemplateName', parameterTemplateName)
            // verify required parameter 'body' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

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

            return {
                url: 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: string, parameterTemplateName: string, partition?: ParameterTemplatePartition, rawContent?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('readParameterTemplate', 'orgName', orgName)
            // verify required parameter 'parameterTemplateName' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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

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

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


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

            return {
                url: 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: string, parameterTemplateName: string, partition?: ParameterTemplatePartition, rawContent?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('readParameterTemplateDiff', 'orgName', orgName)
            // verify required parameter 'parameterTemplateName' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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

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

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


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

            return {
                url: 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: string, clusterName: string, body: Array<ParamTplsItem>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('updateClusterParameterTemplate', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('updateClusterParameterTemplate', 'clusterName', clusterName)
            // verify required parameter 'body' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

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

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

/**
 * ParameterTemplateApi - functional programming interface
 * @export
 */
export const ParameterTemplateApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = 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: string, body: ParamTplCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ParamTplListItem>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createParameterTemplate(orgName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ParameterTemplateApi.createParameterTemplate']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, parameterTemplateName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteParameterTemplate(orgName, parameterTemplateName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ParameterTemplateApi.deleteParameterTemplate']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, clusterName: string, body: ParamTplCreateFromCluster, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.exportParameterTemplateFromCluster(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ParameterTemplateApi.exportParameterTemplateFromCluster']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, clusterName: string, component?: string, engineName?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ParamTplApplyToClusterList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getClusterParameterTemplate(orgName, clusterName, component, engineName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ParameterTemplateApi.getClusterParameterTemplate']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, partition?: ParameterTemplatePartition, version?: string, component?: string, engineName?: string, engineMode?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ParamTplList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listParameterTemplates(orgName, partition, version, component, engineName, engineMode, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ParameterTemplateApi.listParameterTemplates']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, parameterTemplateName: string, body: ParamTplUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ParamTplListItem>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchParameterTemplate(orgName, parameterTemplateName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ParameterTemplateApi.patchParameterTemplate']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, parameterTemplateName: string, partition?: ParameterTemplatePartition, rawContent?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ParameterList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.readParameterTemplate(orgName, parameterTemplateName, partition, rawContent, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ParameterTemplateApi.readParameterTemplate']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, parameterTemplateName: string, partition?: ParameterTemplatePartition, rawContent?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ParameterTemplateDiff>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.readParameterTemplateDiff(orgName, parameterTemplateName, partition, rawContent, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ParameterTemplateApi.readParameterTemplateDiff']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, clusterName: string, body: Array<ParamTplsItem>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateClusterParameterTemplate(orgName, clusterName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['ParameterTemplateApi.updateClusterParameterTemplate']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * ParameterTemplateApi - factory interface
 * @export
 */
export const ParameterTemplateApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = ParameterTemplateApiFp(configuration)
    return {
        /**
         * 
         * @summary Create parameter template
         * @param {ParameterTemplateApiCreateParameterTemplateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createParameterTemplate(requestParameters: ParameterTemplateApiCreateParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParamTplListItem> {
            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: ParameterTemplateApiDeleteParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            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: ParameterTemplateApiExportParameterTemplateFromClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            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: ParameterTemplateApiGetClusterParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParamTplApplyToClusterList> {
            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: ParameterTemplateApiListParameterTemplatesRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParamTplList> {
            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: ParameterTemplateApiPatchParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParamTplListItem> {
            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: ParameterTemplateApiReadParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParameterList> {
            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: ParameterTemplateApiReadParameterTemplateDiffRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParameterTemplateDiff> {
            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: ParameterTemplateApiUpdateClusterParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.updateClusterParameterTemplate(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * ParameterTemplateApi - interface
 * @export
 * @interface ParameterTemplateApi
 */
export interface ParameterTemplateApiInterface {
    /**
     * 
     * @summary Create parameter template
     * @param {ParameterTemplateApiCreateParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApiInterface
     */
    createParameterTemplate(requestParameters: ParameterTemplateApiCreateParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParamTplListItem>;

    /**
     * 
     * @summary Delete parameter template
     * @param {ParameterTemplateApiDeleteParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApiInterface
     */
    deleteParameterTemplate(requestParameters: ParameterTemplateApiDeleteParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

    /**
     * 
     * @summary Export parameter template from cluster
     * @param {ParameterTemplateApiExportParameterTemplateFromClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApiInterface
     */
    exportParameterTemplateFromCluster(requestParameters: ParameterTemplateApiExportParameterTemplateFromClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

    /**
     * 
     * @summary Get cluster parameter template
     * @param {ParameterTemplateApiGetClusterParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApiInterface
     */
    getClusterParameterTemplate(requestParameters: ParameterTemplateApiGetClusterParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParamTplApplyToClusterList>;

    /**
     * 
     * @summary List parameter templates in an Org
     * @param {ParameterTemplateApiListParameterTemplatesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApiInterface
     */
    listParameterTemplates(requestParameters: ParameterTemplateApiListParameterTemplatesRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParamTplList>;

    /**
     * 
     * @summary Update parameter template
     * @param {ParameterTemplateApiPatchParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApiInterface
     */
    patchParameterTemplate(requestParameters: ParameterTemplateApiPatchParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParamTplListItem>;

    /**
     * 
     * @summary Get parameter template details
     * @param {ParameterTemplateApiReadParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApiInterface
     */
    readParameterTemplate(requestParameters: ParameterTemplateApiReadParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParameterList>;

    /**
     * 
     * @summary Get parameter template diff against default template
     * @param {ParameterTemplateApiReadParameterTemplateDiffRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApiInterface
     */
    readParameterTemplateDiff(requestParameters: ParameterTemplateApiReadParameterTemplateDiffRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParameterTemplateDiff>;

    /**
     * 
     * @summary Update cluster parameter template
     * @param {ParameterTemplateApiUpdateClusterParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApiInterface
     */
    updateClusterParameterTemplate(requestParameters: ParameterTemplateApiUpdateClusterParameterTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

}

/**
 * Request parameters for createParameterTemplate operation in ParameterTemplateApi.
 * @export
 * @interface ParameterTemplateApiCreateParameterTemplateRequest
 */
export interface ParameterTemplateApiCreateParameterTemplateRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof ParameterTemplateApiCreateParameterTemplate
     */
    readonly orgName: string

    /**
     * 
     * @type {ParamTplCreate}
     * @memberof ParameterTemplateApiCreateParameterTemplate
     */
    readonly body: ParamTplCreate
}

/**
 * Request parameters for deleteParameterTemplate operation in ParameterTemplateApi.
 * @export
 * @interface ParameterTemplateApiDeleteParameterTemplateRequest
 */
export interface ParameterTemplateApiDeleteParameterTemplateRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof ParameterTemplateApiDeleteParameterTemplate
     */
    readonly orgName: string

    /**
     * name of the parameter template
     * @type {string}
     * @memberof ParameterTemplateApiDeleteParameterTemplate
     */
    readonly parameterTemplateName: string
}

/**
 * Request parameters for exportParameterTemplateFromCluster operation in ParameterTemplateApi.
 * @export
 * @interface ParameterTemplateApiExportParameterTemplateFromClusterRequest
 */
export interface ParameterTemplateApiExportParameterTemplateFromClusterRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof ParameterTemplateApiExportParameterTemplateFromCluster
     */
    readonly orgName: string

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

    /**
     * 
     * @type {ParamTplCreateFromCluster}
     * @memberof ParameterTemplateApiExportParameterTemplateFromCluster
     */
    readonly body: ParamTplCreateFromCluster
}

/**
 * Request parameters for getClusterParameterTemplate operation in ParameterTemplateApi.
 * @export
 * @interface ParameterTemplateApiGetClusterParameterTemplateRequest
 */
export interface ParameterTemplateApiGetClusterParameterTemplateRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof ParameterTemplateApiGetClusterParameterTemplate
     */
    readonly orgName: string

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

    /**
     * component type
     * @type {string}
     * @memberof ParameterTemplateApiGetClusterParameterTemplate
     */
    readonly component?: string

    /**
     * engine name
     * @type {string}
     * @memberof ParameterTemplateApiGetClusterParameterTemplate
     */
    readonly engineName?: string
}

/**
 * Request parameters for listParameterTemplates operation in ParameterTemplateApi.
 * @export
 * @interface ParameterTemplateApiListParameterTemplatesRequest
 */
export interface ParameterTemplateApiListParameterTemplatesRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof ParameterTemplateApiListParameterTemplates
     */
    readonly orgName: string

    /**
     * the template partition in listParamTpl request
     * @type {ParameterTemplatePartition}
     * @memberof ParameterTemplateApiListParameterTemplates
     */
    readonly partition?: ParameterTemplatePartition

    /**
     * Cluster Application Version
     * @type {string}
     * @memberof ParameterTemplateApiListParameterTemplates
     */
    readonly version?: string

    /**
     * component type
     * @type {string}
     * @memberof ParameterTemplateApiListParameterTemplates
     */
    readonly component?: string

    /**
     * engine Name
     * @type {string}
     * @memberof ParameterTemplateApiListParameterTemplates
     */
    readonly engineName?: string

    /**
     * engine mode
     * @type {string}
     * @memberof ParameterTemplateApiListParameterTemplates
     */
    readonly engineMode?: string
}

/**
 * Request parameters for patchParameterTemplate operation in ParameterTemplateApi.
 * @export
 * @interface ParameterTemplateApiPatchParameterTemplateRequest
 */
export interface ParameterTemplateApiPatchParameterTemplateRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof ParameterTemplateApiPatchParameterTemplate
     */
    readonly orgName: string

    /**
     * name of the parameter template
     * @type {string}
     * @memberof ParameterTemplateApiPatchParameterTemplate
     */
    readonly parameterTemplateName: string

    /**
     * 
     * @type {ParamTplUpdate}
     * @memberof ParameterTemplateApiPatchParameterTemplate
     */
    readonly body: ParamTplUpdate
}

/**
 * Request parameters for readParameterTemplate operation in ParameterTemplateApi.
 * @export
 * @interface ParameterTemplateApiReadParameterTemplateRequest
 */
export interface ParameterTemplateApiReadParameterTemplateRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof ParameterTemplateApiReadParameterTemplate
     */
    readonly orgName: string

    /**
     * name of the parameter template
     * @type {string}
     * @memberof ParameterTemplateApiReadParameterTemplate
     */
    readonly parameterTemplateName: string

    /**
     * the template partition in read paramTpl request
     * @type {ParameterTemplatePartition}
     * @memberof ParameterTemplateApiReadParameterTemplate
     */
    readonly partition?: ParameterTemplatePartition

    /**
     * whether to return the raw template content
     * @type {boolean}
     * @memberof ParameterTemplateApiReadParameterTemplate
     */
    readonly rawContent?: boolean
}

/**
 * Request parameters for readParameterTemplateDiff operation in ParameterTemplateApi.
 * @export
 * @interface ParameterTemplateApiReadParameterTemplateDiffRequest
 */
export interface ParameterTemplateApiReadParameterTemplateDiffRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof ParameterTemplateApiReadParameterTemplateDiff
     */
    readonly orgName: string

    /**
     * name of the parameter template
     * @type {string}
     * @memberof ParameterTemplateApiReadParameterTemplateDiff
     */
    readonly parameterTemplateName: string

    /**
     * the template partition in diff parameter template request
     * @type {ParameterTemplatePartition}
     * @memberof ParameterTemplateApiReadParameterTemplateDiff
     */
    readonly partition?: ParameterTemplatePartition

    /**
     * whether to compare raw template content
     * @type {boolean}
     * @memberof ParameterTemplateApiReadParameterTemplateDiff
     */
    readonly rawContent?: boolean
}

/**
 * Request parameters for updateClusterParameterTemplate operation in ParameterTemplateApi.
 * @export
 * @interface ParameterTemplateApiUpdateClusterParameterTemplateRequest
 */
export interface ParameterTemplateApiUpdateClusterParameterTemplateRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof ParameterTemplateApiUpdateClusterParameterTemplate
     */
    readonly orgName: string

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

    /**
     * 
     * @type {Array<ParamTplsItem>}
     * @memberof ParameterTemplateApiUpdateClusterParameterTemplate
     */
    readonly body: Array<ParamTplsItem>
}

/**
 * ParameterTemplateApi - object-oriented interface
 * @export
 * @class ParameterTemplateApi
 * @extends {BaseAPI}
 */
export class ParameterTemplateApi extends BaseAPI implements ParameterTemplateApiInterface {
    /**
     * 
     * @summary Create parameter template
     * @param {ParameterTemplateApiCreateParameterTemplateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ParameterTemplateApi
     */
    public createParameterTemplate(requestParameters: ParameterTemplateApiCreateParameterTemplateRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public deleteParameterTemplate(requestParameters: ParameterTemplateApiDeleteParameterTemplateRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public exportParameterTemplateFromCluster(requestParameters: ParameterTemplateApiExportParameterTemplateFromClusterRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public getClusterParameterTemplate(requestParameters: ParameterTemplateApiGetClusterParameterTemplateRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public listParameterTemplates(requestParameters: ParameterTemplateApiListParameterTemplatesRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public patchParameterTemplate(requestParameters: ParameterTemplateApiPatchParameterTemplateRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public readParameterTemplate(requestParameters: ParameterTemplateApiReadParameterTemplateRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public readParameterTemplateDiff(requestParameters: ParameterTemplateApiReadParameterTemplateDiffRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public updateClusterParameterTemplate(requestParameters: ParameterTemplateApiUpdateClusterParameterTemplateRequest, options?: RawAxiosRequestConfig) {
        return ParameterTemplateApiFp(this.configuration).updateClusterParameterTemplate(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}

