/* 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 { Org } from '../models';
// @ts-ignore
import type { OrgCreate } from '../models';
// @ts-ignore
import type { OrgUpdate } from '../models';
// @ts-ignore
import type { UserOrgList } from '../models';
/**
 * OrganizationApi - axios parameter creator
 * @export
 */
export const OrganizationApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Create a new organization
         * @summary Create organization
         * @param {OrgCreate} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOrg: async (body: OrgCreate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'body' is not null or undefined
            assertParamExists('createOrg', 'body', body)
            const localVarPath = `/api/v1/organizations`;
            // 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,
            };
        },
        /**
         * partially delete the specified org
         * @summary Delete organization
         * @param {string} orgName name of the Org
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOrg: async (orgName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('deleteOrg', 'orgName', orgName)
            const localVarPath = `/api/v1/organizations/{orgName}`
                .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: '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,
            };
        },
        /**
         * freeze the member in org
         * @summary freeze the member in org
         * @param {string} orgName name of the Org
         * @param {string} memberId ID of the member
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        freezeMember: async (orgName: string, memberId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('freezeMember', 'orgName', orgName)
            // verify required parameter 'memberId' is not null or undefined
            assertParamExists('freezeMember', 'memberId', memberId)
            const localVarPath = `/api/v1/organizations/{orgName}/members/{memberId}/freeze`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"memberId"}}`, encodeURIComponent(String(memberId)));
            // 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)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * List organizations of current user
         * @summary List organizations of current user
         * @param {string} [pageToken] The pagination token in the List request
         * @param {string} [pageSize] The pagination size in the List request.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listOrg: async (pageToken?: string, pageSize?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/organizations`;
            // 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 (pageToken !== undefined) {
                localVarQueryParameter['pageToken'] = pageToken;
            }

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * partially update the specified Org
         * @summary Update organization
         * @param {string} orgName name of the Org
         * @param {OrgUpdate} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchOrg: async (orgName: string, body: OrgUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('patchOrg', 'orgName', orgName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('patchOrg', 'body', body)
            const localVarPath = `/api/v1/organizations/{orgName}`
                .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: '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,
            };
        },
        /**
         * read the specified Org
         * @summary Get organization
         * @param {string} orgName name of the Org
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readOrg: async (orgName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('readOrg', 'orgName', orgName)
            const localVarPath = `/api/v1/organizations/{orgName}`
                .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)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * unfreeze the member in org
         * @summary unfreeze the member in org
         * @param {string} orgName name of the Org
         * @param {string} memberId ID of the member
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        unfreezeMember: async (orgName: string, memberId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('unfreezeMember', 'orgName', orgName)
            // verify required parameter 'memberId' is not null or undefined
            assertParamExists('unfreezeMember', 'memberId', memberId)
            const localVarPath = `/api/v1/organizations/{orgName}/members/{memberId}/unfreeze`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"memberId"}}`, encodeURIComponent(String(memberId)));
            // 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)


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

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

/**
 * OrganizationApi - functional programming interface
 * @export
 */
export const OrganizationApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = OrganizationApiAxiosParamCreator(configuration)
    return {
        /**
         * Create a new organization
         * @summary Create organization
         * @param {OrgCreate} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createOrg(body: OrgCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Org>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createOrg(body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OrganizationApi.createOrg']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * partially delete the specified org
         * @summary Delete organization
         * @param {string} orgName name of the Org
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteOrg(orgName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrg(orgName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OrganizationApi.deleteOrg']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * freeze the member in org
         * @summary freeze the member in org
         * @param {string} orgName name of the Org
         * @param {string} memberId ID of the member
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async freezeMember(orgName: string, memberId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.freezeMember(orgName, memberId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OrganizationApi.freezeMember']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List organizations of current user
         * @summary List organizations of current user
         * @param {string} [pageToken] The pagination token in the List request
         * @param {string} [pageSize] The pagination size in the List request.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listOrg(pageToken?: string, pageSize?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserOrgList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listOrg(pageToken, pageSize, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OrganizationApi.listOrg']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * partially update the specified Org
         * @summary Update organization
         * @param {string} orgName name of the Org
         * @param {OrgUpdate} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchOrg(orgName: string, body: OrgUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Org>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchOrg(orgName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OrganizationApi.patchOrg']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * read the specified Org
         * @summary Get organization
         * @param {string} orgName name of the Org
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async readOrg(orgName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Org>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.readOrg(orgName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OrganizationApi.readOrg']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * unfreeze the member in org
         * @summary unfreeze the member in org
         * @param {string} orgName name of the Org
         * @param {string} memberId ID of the member
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async unfreezeMember(orgName: string, memberId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.unfreezeMember(orgName, memberId, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['OrganizationApi.unfreezeMember']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * OrganizationApi - factory interface
 * @export
 */
export const OrganizationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = OrganizationApiFp(configuration)
    return {
        /**
         * Create a new organization
         * @summary Create organization
         * @param {OrganizationApiCreateOrgRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOrg(requestParameters: OrganizationApiCreateOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<Org> {
            return localVarFp.createOrg(requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * partially delete the specified org
         * @summary Delete organization
         * @param {OrganizationApiDeleteOrgRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOrg(requestParameters: OrganizationApiDeleteOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteOrg(requestParameters.orgName, options).then((request) => request(axios, basePath));
        },
        /**
         * freeze the member in org
         * @summary freeze the member in org
         * @param {OrganizationApiFreezeMemberRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        freezeMember(requestParameters: OrganizationApiFreezeMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.freezeMember(requestParameters.orgName, requestParameters.memberId, options).then((request) => request(axios, basePath));
        },
        /**
         * List organizations of current user
         * @summary List organizations of current user
         * @param {OrganizationApiListOrgRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listOrg(requestParameters: OrganizationApiListOrgRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<UserOrgList> {
            return localVarFp.listOrg(requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(axios, basePath));
        },
        /**
         * partially update the specified Org
         * @summary Update organization
         * @param {OrganizationApiPatchOrgRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchOrg(requestParameters: OrganizationApiPatchOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<Org> {
            return localVarFp.patchOrg(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * read the specified Org
         * @summary Get organization
         * @param {OrganizationApiReadOrgRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readOrg(requestParameters: OrganizationApiReadOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<Org> {
            return localVarFp.readOrg(requestParameters.orgName, options).then((request) => request(axios, basePath));
        },
        /**
         * unfreeze the member in org
         * @summary unfreeze the member in org
         * @param {OrganizationApiUnfreezeMemberRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        unfreezeMember(requestParameters: OrganizationApiUnfreezeMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.unfreezeMember(requestParameters.orgName, requestParameters.memberId, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * OrganizationApi - interface
 * @export
 * @interface OrganizationApi
 */
export interface OrganizationApiInterface {
    /**
     * Create a new organization
     * @summary Create organization
     * @param {OrganizationApiCreateOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApiInterface
     */
    createOrg(requestParameters: OrganizationApiCreateOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<Org>;

    /**
     * partially delete the specified org
     * @summary Delete organization
     * @param {OrganizationApiDeleteOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApiInterface
     */
    deleteOrg(requestParameters: OrganizationApiDeleteOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

    /**
     * freeze the member in org
     * @summary freeze the member in org
     * @param {OrganizationApiFreezeMemberRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApiInterface
     */
    freezeMember(requestParameters: OrganizationApiFreezeMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

    /**
     * List organizations of current user
     * @summary List organizations of current user
     * @param {OrganizationApiListOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApiInterface
     */
    listOrg(requestParameters?: OrganizationApiListOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<UserOrgList>;

    /**
     * partially update the specified Org
     * @summary Update organization
     * @param {OrganizationApiPatchOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApiInterface
     */
    patchOrg(requestParameters: OrganizationApiPatchOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<Org>;

    /**
     * read the specified Org
     * @summary Get organization
     * @param {OrganizationApiReadOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApiInterface
     */
    readOrg(requestParameters: OrganizationApiReadOrgRequest, options?: RawAxiosRequestConfig): AxiosPromise<Org>;

    /**
     * unfreeze the member in org
     * @summary unfreeze the member in org
     * @param {OrganizationApiUnfreezeMemberRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApiInterface
     */
    unfreezeMember(requestParameters: OrganizationApiUnfreezeMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

}

/**
 * Request parameters for createOrg operation in OrganizationApi.
 * @export
 * @interface OrganizationApiCreateOrgRequest
 */
export interface OrganizationApiCreateOrgRequest {
    /**
     * 
     * @type {OrgCreate}
     * @memberof OrganizationApiCreateOrg
     */
    readonly body: OrgCreate
}

/**
 * Request parameters for deleteOrg operation in OrganizationApi.
 * @export
 * @interface OrganizationApiDeleteOrgRequest
 */
export interface OrganizationApiDeleteOrgRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OrganizationApiDeleteOrg
     */
    readonly orgName: string
}

/**
 * Request parameters for freezeMember operation in OrganizationApi.
 * @export
 * @interface OrganizationApiFreezeMemberRequest
 */
export interface OrganizationApiFreezeMemberRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OrganizationApiFreezeMember
     */
    readonly orgName: string

    /**
     * ID of the member
     * @type {string}
     * @memberof OrganizationApiFreezeMember
     */
    readonly memberId: string
}

/**
 * Request parameters for listOrg operation in OrganizationApi.
 * @export
 * @interface OrganizationApiListOrgRequest
 */
export interface OrganizationApiListOrgRequest {
    /**
     * The pagination token in the List request
     * @type {string}
     * @memberof OrganizationApiListOrg
     */
    readonly pageToken?: string

    /**
     * The pagination size in the List request.
     * @type {string}
     * @memberof OrganizationApiListOrg
     */
    readonly pageSize?: string
}

/**
 * Request parameters for patchOrg operation in OrganizationApi.
 * @export
 * @interface OrganizationApiPatchOrgRequest
 */
export interface OrganizationApiPatchOrgRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OrganizationApiPatchOrg
     */
    readonly orgName: string

    /**
     * 
     * @type {OrgUpdate}
     * @memberof OrganizationApiPatchOrg
     */
    readonly body: OrgUpdate
}

/**
 * Request parameters for readOrg operation in OrganizationApi.
 * @export
 * @interface OrganizationApiReadOrgRequest
 */
export interface OrganizationApiReadOrgRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OrganizationApiReadOrg
     */
    readonly orgName: string
}

/**
 * Request parameters for unfreezeMember operation in OrganizationApi.
 * @export
 * @interface OrganizationApiUnfreezeMemberRequest
 */
export interface OrganizationApiUnfreezeMemberRequest {
    /**
     * name of the Org
     * @type {string}
     * @memberof OrganizationApiUnfreezeMember
     */
    readonly orgName: string

    /**
     * ID of the member
     * @type {string}
     * @memberof OrganizationApiUnfreezeMember
     */
    readonly memberId: string
}

/**
 * OrganizationApi - object-oriented interface
 * @export
 * @class OrganizationApi
 * @extends {BaseAPI}
 */
export class OrganizationApi extends BaseAPI implements OrganizationApiInterface {
    /**
     * Create a new organization
     * @summary Create organization
     * @param {OrganizationApiCreateOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApi
     */
    public createOrg(requestParameters: OrganizationApiCreateOrgRequest, options?: RawAxiosRequestConfig) {
        return OrganizationApiFp(this.configuration).createOrg(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * partially delete the specified org
     * @summary Delete organization
     * @param {OrganizationApiDeleteOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApi
     */
    public deleteOrg(requestParameters: OrganizationApiDeleteOrgRequest, options?: RawAxiosRequestConfig) {
        return OrganizationApiFp(this.configuration).deleteOrg(requestParameters.orgName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * freeze the member in org
     * @summary freeze the member in org
     * @param {OrganizationApiFreezeMemberRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApi
     */
    public freezeMember(requestParameters: OrganizationApiFreezeMemberRequest, options?: RawAxiosRequestConfig) {
        return OrganizationApiFp(this.configuration).freezeMember(requestParameters.orgName, requestParameters.memberId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * List organizations of current user
     * @summary List organizations of current user
     * @param {OrganizationApiListOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApi
     */
    public listOrg(requestParameters: OrganizationApiListOrgRequest = {}, options?: RawAxiosRequestConfig) {
        return OrganizationApiFp(this.configuration).listOrg(requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * partially update the specified Org
     * @summary Update organization
     * @param {OrganizationApiPatchOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApi
     */
    public patchOrg(requestParameters: OrganizationApiPatchOrgRequest, options?: RawAxiosRequestConfig) {
        return OrganizationApiFp(this.configuration).patchOrg(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * read the specified Org
     * @summary Get organization
     * @param {OrganizationApiReadOrgRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApi
     */
    public readOrg(requestParameters: OrganizationApiReadOrgRequest, options?: RawAxiosRequestConfig) {
        return OrganizationApiFp(this.configuration).readOrg(requestParameters.orgName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * unfreeze the member in org
     * @summary unfreeze the member in org
     * @param {OrganizationApiUnfreezeMemberRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OrganizationApi
     */
    public unfreezeMember(requestParameters: OrganizationApiUnfreezeMemberRequest, options?: RawAxiosRequestConfig) {
        return OrganizationApiFp(this.configuration).unfreezeMember(requestParameters.orgName, requestParameters.memberId, options).then((request) => request(this.axios, this.basePath));
    }
}

