/* tslint:disable */
/* eslint-disable */
/**
 * Admin API
 * The Admin API is used to manage the ApeCloud platform. 
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: support@apecloud.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { APIErrorResponse } from '../models';
// @ts-ignore
import type { DmTablespace } from '../models';
/**
 * DamengApi - axios parameter creator
 * @export
 */
export const DamengApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Create tablespace for a Dameng cluster.
         * @summary Create damengdb tablespace
         * @param {string} orgName Organization name
         * @param {string} clusterName Cluster name
         * @param {DmTablespace} [dmTablespace] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createTablespace: async (orgName: string, clusterName: string, dmTablespace?: DmTablespace, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('createTablespace', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('createTablespace', 'clusterName', clusterName)
            const localVarPath = `/admin/v1/data/damengdb/organizations/{orgName}/clusters/{clusterName}/tablespaces`
                .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(dmTablespace, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Delete tablespace for a Dameng cluster.
         * @summary Delete damengdb tablespace
         * @param {string} orgName Organization name
         * @param {string} clusterName Cluster name
         * @param {string} tablespaceName Tablespace name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteTablespace: async (orgName: string, clusterName: string, tablespaceName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('deleteTablespace', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('deleteTablespace', 'clusterName', clusterName)
            // verify required parameter 'tablespaceName' is not null or undefined
            assertParamExists('deleteTablespace', 'tablespaceName', tablespaceName)
            const localVarPath = `/admin/v1/data/damengdb/organizations/{orgName}/clusters/{clusterName}/tablespaces/{tablespaceName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"tablespaceName"}}`, encodeURIComponent(String(tablespaceName)));
            // 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 Get Dameng tablespace info
         * @param {string} orgName Organization name
         * @param {string} clusterName Cluster name
         * @param {string} tablespaceName Tablespace name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getTablespace: async (orgName: string, clusterName: string, tablespaceName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('getTablespace', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('getTablespace', 'clusterName', clusterName)
            // verify required parameter 'tablespaceName' is not null or undefined
            assertParamExists('getTablespace', 'tablespaceName', tablespaceName)
            const localVarPath = `/admin/v1/data/damengdb/organizations/{orgName}/clusters/{clusterName}/tablespaces/{tablespaceName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"tablespaceName"}}`, encodeURIComponent(String(tablespaceName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

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

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

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * List tablespaces for a Dameng cluster.
         * @summary List damengdb tablespaces
         * @param {string} orgName Organization name
         * @param {string} clusterName Cluster name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listTablespaces: async (orgName: string, clusterName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('listTablespaces', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('listTablespaces', 'clusterName', clusterName)
            const localVarPath = `/admin/v1/data/damengdb/organizations/{orgName}/clusters/{clusterName}/tablespaces`
                .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)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update tablespace for a Dameng cluster.
         * @summary Update damengdb tablespace
         * @param {string} orgName Organization name
         * @param {string} clusterName Cluster name
         * @param {string} tablespaceName Tablespace name
         * @param {DmTablespace} [dmTablespace] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateTablespace: async (orgName: string, clusterName: string, tablespaceName: string, dmTablespace?: DmTablespace, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('updateTablespace', 'orgName', orgName)
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('updateTablespace', 'clusterName', clusterName)
            // verify required parameter 'tablespaceName' is not null or undefined
            assertParamExists('updateTablespace', 'tablespaceName', tablespaceName)
            const localVarPath = `/admin/v1/data/damengdb/organizations/{orgName}/clusters/{clusterName}/tablespaces/{tablespaceName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"tablespaceName"}}`, encodeURIComponent(String(tablespaceName)));
            // 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(dmTablespace, localVarRequestOptions, configuration)

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

/**
 * DamengApi - functional programming interface
 * @export
 */
export const DamengApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = DamengApiAxiosParamCreator(configuration)
    return {
        /**
         * Create tablespace for a Dameng cluster.
         * @summary Create damengdb tablespace
         * @param {string} orgName Organization name
         * @param {string} clusterName Cluster name
         * @param {DmTablespace} [dmTablespace] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createTablespace(orgName: string, clusterName: string, dmTablespace?: DmTablespace, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DmTablespace>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createTablespace(orgName, clusterName, dmTablespace, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['DamengApi.createTablespace']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Delete tablespace for a Dameng cluster.
         * @summary Delete damengdb tablespace
         * @param {string} orgName Organization name
         * @param {string} clusterName Cluster name
         * @param {string} tablespaceName Tablespace name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteTablespace(orgName: string, clusterName: string, tablespaceName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTablespace(orgName, clusterName, tablespaceName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['DamengApi.deleteTablespace']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary Get Dameng tablespace info
         * @param {string} orgName Organization name
         * @param {string} clusterName Cluster name
         * @param {string} tablespaceName Tablespace name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getTablespace(orgName: string, clusterName: string, tablespaceName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DmTablespace>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getTablespace(orgName, clusterName, tablespaceName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['DamengApi.getTablespace']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List tablespaces for a Dameng cluster.
         * @summary List damengdb tablespaces
         * @param {string} orgName Organization name
         * @param {string} clusterName Cluster name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listTablespaces(orgName: string, clusterName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DmTablespace>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listTablespaces(orgName, clusterName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['DamengApi.listTablespaces']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update tablespace for a Dameng cluster.
         * @summary Update damengdb tablespace
         * @param {string} orgName Organization name
         * @param {string} clusterName Cluster name
         * @param {string} tablespaceName Tablespace name
         * @param {DmTablespace} [dmTablespace] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateTablespace(orgName: string, clusterName: string, tablespaceName: string, dmTablespace?: DmTablespace, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DmTablespace>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateTablespace(orgName, clusterName, tablespaceName, dmTablespace, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['DamengApi.updateTablespace']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * DamengApi - factory interface
 * @export
 */
export const DamengApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = DamengApiFp(configuration)
    return {
        /**
         * Create tablespace for a Dameng cluster.
         * @summary Create damengdb tablespace
         * @param {DamengApiCreateTablespaceRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createTablespace(requestParameters: DamengApiCreateTablespaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<DmTablespace> {
            return localVarFp.createTablespace(requestParameters.orgName, requestParameters.clusterName, requestParameters.dmTablespace, options).then((request) => request(axios, basePath));
        },
        /**
         * Delete tablespace for a Dameng cluster.
         * @summary Delete damengdb tablespace
         * @param {DamengApiDeleteTablespaceRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteTablespace(requestParameters: DamengApiDeleteTablespaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteTablespace(requestParameters.orgName, requestParameters.clusterName, requestParameters.tablespaceName, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Get Dameng tablespace info
         * @param {DamengApiGetTablespaceRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getTablespace(requestParameters: DamengApiGetTablespaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<DmTablespace> {
            return localVarFp.getTablespace(requestParameters.orgName, requestParameters.clusterName, requestParameters.tablespaceName, options).then((request) => request(axios, basePath));
        },
        /**
         * List tablespaces for a Dameng cluster.
         * @summary List damengdb tablespaces
         * @param {DamengApiListTablespacesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listTablespaces(requestParameters: DamengApiListTablespacesRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<DmTablespace>> {
            return localVarFp.listTablespaces(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath));
        },
        /**
         * Update tablespace for a Dameng cluster.
         * @summary Update damengdb tablespace
         * @param {DamengApiUpdateTablespaceRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateTablespace(requestParameters: DamengApiUpdateTablespaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<DmTablespace> {
            return localVarFp.updateTablespace(requestParameters.orgName, requestParameters.clusterName, requestParameters.tablespaceName, requestParameters.dmTablespace, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * DamengApi - interface
 * @export
 * @interface DamengApi
 */
export interface DamengApiInterface {
    /**
     * Create tablespace for a Dameng cluster.
     * @summary Create damengdb tablespace
     * @param {DamengApiCreateTablespaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DamengApiInterface
     */
    createTablespace(requestParameters: DamengApiCreateTablespaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<DmTablespace>;

    /**
     * Delete tablespace for a Dameng cluster.
     * @summary Delete damengdb tablespace
     * @param {DamengApiDeleteTablespaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DamengApiInterface
     */
    deleteTablespace(requestParameters: DamengApiDeleteTablespaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

    /**
     * 
     * @summary Get Dameng tablespace info
     * @param {DamengApiGetTablespaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DamengApiInterface
     */
    getTablespace(requestParameters: DamengApiGetTablespaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<DmTablespace>;

    /**
     * List tablespaces for a Dameng cluster.
     * @summary List damengdb tablespaces
     * @param {DamengApiListTablespacesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DamengApiInterface
     */
    listTablespaces(requestParameters: DamengApiListTablespacesRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<DmTablespace>>;

    /**
     * Update tablespace for a Dameng cluster.
     * @summary Update damengdb tablespace
     * @param {DamengApiUpdateTablespaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DamengApiInterface
     */
    updateTablespace(requestParameters: DamengApiUpdateTablespaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<DmTablespace>;

}

/**
 * Request parameters for createTablespace operation in DamengApi.
 * @export
 * @interface DamengApiCreateTablespaceRequest
 */
export interface DamengApiCreateTablespaceRequest {
    /**
     * Organization name
     * @type {string}
     * @memberof DamengApiCreateTablespace
     */
    readonly orgName: string

    /**
     * Cluster name
     * @type {string}
     * @memberof DamengApiCreateTablespace
     */
    readonly clusterName: string

    /**
     * 
     * @type {DmTablespace}
     * @memberof DamengApiCreateTablespace
     */
    readonly dmTablespace?: DmTablespace
}

/**
 * Request parameters for deleteTablespace operation in DamengApi.
 * @export
 * @interface DamengApiDeleteTablespaceRequest
 */
export interface DamengApiDeleteTablespaceRequest {
    /**
     * Organization name
     * @type {string}
     * @memberof DamengApiDeleteTablespace
     */
    readonly orgName: string

    /**
     * Cluster name
     * @type {string}
     * @memberof DamengApiDeleteTablespace
     */
    readonly clusterName: string

    /**
     * Tablespace name
     * @type {string}
     * @memberof DamengApiDeleteTablespace
     */
    readonly tablespaceName: string
}

/**
 * Request parameters for getTablespace operation in DamengApi.
 * @export
 * @interface DamengApiGetTablespaceRequest
 */
export interface DamengApiGetTablespaceRequest {
    /**
     * Organization name
     * @type {string}
     * @memberof DamengApiGetTablespace
     */
    readonly orgName: string

    /**
     * Cluster name
     * @type {string}
     * @memberof DamengApiGetTablespace
     */
    readonly clusterName: string

    /**
     * Tablespace name
     * @type {string}
     * @memberof DamengApiGetTablespace
     */
    readonly tablespaceName: string
}

/**
 * Request parameters for listTablespaces operation in DamengApi.
 * @export
 * @interface DamengApiListTablespacesRequest
 */
export interface DamengApiListTablespacesRequest {
    /**
     * Organization name
     * @type {string}
     * @memberof DamengApiListTablespaces
     */
    readonly orgName: string

    /**
     * Cluster name
     * @type {string}
     * @memberof DamengApiListTablespaces
     */
    readonly clusterName: string
}

/**
 * Request parameters for updateTablespace operation in DamengApi.
 * @export
 * @interface DamengApiUpdateTablespaceRequest
 */
export interface DamengApiUpdateTablespaceRequest {
    /**
     * Organization name
     * @type {string}
     * @memberof DamengApiUpdateTablespace
     */
    readonly orgName: string

    /**
     * Cluster name
     * @type {string}
     * @memberof DamengApiUpdateTablespace
     */
    readonly clusterName: string

    /**
     * Tablespace name
     * @type {string}
     * @memberof DamengApiUpdateTablespace
     */
    readonly tablespaceName: string

    /**
     * 
     * @type {DmTablespace}
     * @memberof DamengApiUpdateTablespace
     */
    readonly dmTablespace?: DmTablespace
}

/**
 * DamengApi - object-oriented interface
 * @export
 * @class DamengApi
 * @extends {BaseAPI}
 */
export class DamengApi extends BaseAPI implements DamengApiInterface {
    /**
     * Create tablespace for a Dameng cluster.
     * @summary Create damengdb tablespace
     * @param {DamengApiCreateTablespaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DamengApi
     */
    public createTablespace(requestParameters: DamengApiCreateTablespaceRequest, options?: RawAxiosRequestConfig) {
        return DamengApiFp(this.configuration).createTablespace(requestParameters.orgName, requestParameters.clusterName, requestParameters.dmTablespace, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Delete tablespace for a Dameng cluster.
     * @summary Delete damengdb tablespace
     * @param {DamengApiDeleteTablespaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DamengApi
     */
    public deleteTablespace(requestParameters: DamengApiDeleteTablespaceRequest, options?: RawAxiosRequestConfig) {
        return DamengApiFp(this.configuration).deleteTablespace(requestParameters.orgName, requestParameters.clusterName, requestParameters.tablespaceName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Get Dameng tablespace info
     * @param {DamengApiGetTablespaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DamengApi
     */
    public getTablespace(requestParameters: DamengApiGetTablespaceRequest, options?: RawAxiosRequestConfig) {
        return DamengApiFp(this.configuration).getTablespace(requestParameters.orgName, requestParameters.clusterName, requestParameters.tablespaceName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * List tablespaces for a Dameng cluster.
     * @summary List damengdb tablespaces
     * @param {DamengApiListTablespacesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DamengApi
     */
    public listTablespaces(requestParameters: DamengApiListTablespacesRequest, options?: RawAxiosRequestConfig) {
        return DamengApiFp(this.configuration).listTablespaces(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update tablespace for a Dameng cluster.
     * @summary Update damengdb tablespace
     * @param {DamengApiUpdateTablespaceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DamengApi
     */
    public updateTablespace(requestParameters: DamengApiUpdateTablespaceRequest, options?: RawAxiosRequestConfig) {
        return DamengApiFp(this.configuration).updateTablespace(requestParameters.orgName, requestParameters.clusterName, requestParameters.tablespaceName, requestParameters.dmTablespace, options).then((request) => request(this.axios, this.basePath));
    }
}

