// tslint:disable
/**
 * Webitel API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 24.04.0
 * Contact: support@webitel.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 { __awaiter } from "tslib";
import * as globalImportUrl from 'url';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, BaseAPI, RequiredError, } from '../base';
/**
 * DomainsApi - axios parameter creator
 * @export
 */
export const DomainsApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @param {ApiCreateDomainRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDomain: (body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'body' is not null or undefined
            if (body === null || body === undefined) {
                throw new RequiredError('body', 'Required parameter body was null or undefined when calling createDomain.');
            }
            const localVarPath = `/domains`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} [domain]
         * @param {string} [dc]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDomain: (domain, dc, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/domain`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (domain !== undefined) {
                localVarQueryParameter['domain'] = domain;
            }
            if (dc !== undefined) {
                localVarQueryParameter['dc'] = dc;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} dc
         * @param {string} [domain]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDomain2: (dc, domain, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'dc' is not null or undefined
            if (dc === null || dc === undefined) {
                throw new RequiredError('dc', 'Required parameter dc was null or undefined when calling deleteDomain2.');
            }
            const localVarPath = `/domains/{dc}`.replace(`{${'dc'}}`, encodeURIComponent(String(dc)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (domain !== undefined) {
                localVarQueryParameter['domain'] = domain;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} [domain]
         * @param {string} [dc]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readDomain: (domain, dc, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/domain`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (domain !== undefined) {
                localVarQueryParameter['domain'] = domain;
            }
            if (dc !== undefined) {
                localVarQueryParameter['dc'] = dc;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} dc
         * @param {string} [domain]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readDomain2: (dc, domain, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'dc' is not null or undefined
            if (dc === null || dc === undefined) {
                throw new RequiredError('dc', 'Required parameter dc was null or undefined when calling readDomain2.');
            }
            const localVarPath = `/domains/{dc}`.replace(`{${'dc'}}`, encodeURIComponent(String(dc)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (domain !== undefined) {
                localVarQueryParameter['domain'] = domain;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} [domain] like
         * @param {Array<string>} [fields] attrs
         * @param {Array<string>} [sort]
         * @param {string} [page]
         * @param {string} [size]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchDomains: (domain, fields, sort, page, size, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/domains`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (domain !== undefined) {
                localVarQueryParameter['domain'] = domain;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} domainDc component
         * @param {ApiDomainsUpdateDomainBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDomain: (domainDc, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'domainDc' is not null or undefined
            if (domainDc === null || domainDc === undefined) {
                throw new RequiredError('domainDc', 'Required parameter domainDc was null or undefined when calling updateDomain.');
            }
            // verify required parameter 'body' is not null or undefined
            if (body === null || body === undefined) {
                throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateDomain.');
            }
            const localVarPath = `/domains/{domain.dc}`.replace(`{${'domain.dc'}}`, encodeURIComponent(String(domainDc)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} domainDc component
         * @param {ApiDomainsUpdateDomainBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDomain2: (domainDc, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'domainDc' is not null or undefined
            if (domainDc === null || domainDc === undefined) {
                throw new RequiredError('domainDc', 'Required parameter domainDc was null or undefined when calling updateDomain2.');
            }
            // verify required parameter 'body' is not null or undefined
            if (body === null || body === undefined) {
                throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateDomain2.');
            }
            const localVarPath = `/domains/{domain.dc}`.replace(`{${'domain.dc'}}`, encodeURIComponent(String(domainDc)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
    };
};
/**
 * DomainsApi - functional programming interface
 * @export
 */
export const DomainsApiFp = function (configuration) {
    return {
        /**
         *
         * @param {ApiCreateDomainRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDomain(body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DomainsApiAxiosParamCreator(configuration).createDomain(body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} [domain]
         * @param {string} [dc]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDomain(domain, dc, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DomainsApiAxiosParamCreator(configuration).deleteDomain(domain, dc, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} dc
         * @param {string} [domain]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDomain2(dc, domain, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DomainsApiAxiosParamCreator(configuration).deleteDomain2(dc, domain, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} [domain]
         * @param {string} [dc]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readDomain(domain, dc, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DomainsApiAxiosParamCreator(configuration).readDomain(domain, dc, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} dc
         * @param {string} [domain]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readDomain2(dc, domain, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DomainsApiAxiosParamCreator(configuration).readDomain2(dc, domain, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} [domain] like
         * @param {Array<string>} [fields] attrs
         * @param {Array<string>} [sort]
         * @param {string} [page]
         * @param {string} [size]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchDomains(domain, fields, sort, page, size, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DomainsApiAxiosParamCreator(configuration).searchDomains(domain, fields, sort, page, size, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} domainDc component
         * @param {ApiDomainsUpdateDomainBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDomain(domainDc, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DomainsApiAxiosParamCreator(configuration).updateDomain(domainDc, body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} domainDc component
         * @param {ApiDomainsUpdateDomainBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDomain2(domainDc, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DomainsApiAxiosParamCreator(configuration).updateDomain2(domainDc, body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * DomainsApi - factory interface
 * @export
 */
export const DomainsApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @param {ApiCreateDomainRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDomain(body, options) {
            return DomainsApiFp(configuration)
                .createDomain(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} [domain]
         * @param {string} [dc]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDomain(domain, dc, options) {
            return DomainsApiFp(configuration)
                .deleteDomain(domain, dc, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} dc
         * @param {string} [domain]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDomain2(dc, domain, options) {
            return DomainsApiFp(configuration)
                .deleteDomain2(dc, domain, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} [domain]
         * @param {string} [dc]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readDomain(domain, dc, options) {
            return DomainsApiFp(configuration)
                .readDomain(domain, dc, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} dc
         * @param {string} [domain]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readDomain2(dc, domain, options) {
            return DomainsApiFp(configuration)
                .readDomain2(dc, domain, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} [domain] like
         * @param {Array<string>} [fields] attrs
         * @param {Array<string>} [sort]
         * @param {string} [page]
         * @param {string} [size]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchDomains(domain, fields, sort, page, size, options) {
            return DomainsApiFp(configuration)
                .searchDomains(domain, fields, sort, page, size, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} domainDc component
         * @param {ApiDomainsUpdateDomainBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDomain(domainDc, body, options) {
            return DomainsApiFp(configuration)
                .updateDomain(domainDc, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} domainDc component
         * @param {ApiDomainsUpdateDomainBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDomain2(domainDc, body, options) {
            return DomainsApiFp(configuration)
                .updateDomain2(domainDc, body, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * DomainsApi - object-oriented interface
 * @export
 * @class DomainsApi
 * @extends {BaseAPI}
 */
export class DomainsApi extends BaseAPI {
    /**
     *
     * @param {ApiCreateDomainRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DomainsApi
     */
    createDomain(body, options) {
        return DomainsApiFp(this.configuration)
            .createDomain(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} [domain]
     * @param {string} [dc]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DomainsApi
     */
    deleteDomain(domain, dc, options) {
        return DomainsApiFp(this.configuration)
            .deleteDomain(domain, dc, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} dc
     * @param {string} [domain]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DomainsApi
     */
    deleteDomain2(dc, domain, options) {
        return DomainsApiFp(this.configuration)
            .deleteDomain2(dc, domain, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} [domain]
     * @param {string} [dc]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DomainsApi
     */
    readDomain(domain, dc, options) {
        return DomainsApiFp(this.configuration)
            .readDomain(domain, dc, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} dc
     * @param {string} [domain]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DomainsApi
     */
    readDomain2(dc, domain, options) {
        return DomainsApiFp(this.configuration)
            .readDomain2(dc, domain, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} [domain] like
     * @param {Array<string>} [fields] attrs
     * @param {Array<string>} [sort]
     * @param {string} [page]
     * @param {string} [size]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DomainsApi
     */
    searchDomains(domain, fields, sort, page, size, options) {
        return DomainsApiFp(this.configuration)
            .searchDomains(domain, fields, sort, page, size, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} domainDc component
     * @param {ApiDomainsUpdateDomainBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DomainsApi
     */
    updateDomain(domainDc, body, options) {
        return DomainsApiFp(this.configuration)
            .updateDomain(domainDc, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} domainDc component
     * @param {ApiDomainsUpdateDomainBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DomainsApi
     */
    updateDomain2(domainDc, body, options) {
        return DomainsApiFp(this.configuration)
            .updateDomain2(domainDc, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=domains-api.js.map