// 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';
/**
 * OAuth2FederationApi - axios parameter creator
 * @export
 */
export const OAuth2FederationApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @param {ApiOAuthService} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOAuthService: (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 createOAuthService.');
            }
            const localVarPath = `/oauth/apps`;
            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 {ApiDeleteOAuthServiceRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOAuthService: (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 deleteOAuthService.');
            }
            const localVarPath = `/oauth/apps`;
            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;
            }
            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 {Array<string>} id
         * @param {ApiOAuth2FederationDeleteOAuthServiceBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOAuthService2: (id, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'id' is not null or undefined
            if (id === null || id === undefined) {
                throw new RequiredError('id', 'Required parameter id was null or undefined when calling deleteOAuthService2.');
            }
            // 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 deleteOAuthService2.');
            }
            const localVarPath = `/oauth/apps/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            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;
            }
            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 {Array<string>} id ----- Search Basic Filters ---------------------------  selection: by unique identifier
         * @param {number} [page] ----- Select Options -------------------------  default: 1
         * @param {number} [size] default: 16
         * @param {Array<string>} [fields] attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [q] term-of-search: lookup[name]
         * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
         * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
         * @param {boolean} [enabled] ----- OAuthService-Specific Filters ----------------
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateOAuthService: (id, page, size, fields, sort, q, name, access, enabled, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'id' is not null or undefined
            if (id === null || id === undefined) {
                throw new RequiredError('id', 'Required parameter id was null or undefined when calling locateOAuthService.');
            }
            const localVarPath = `/oauth/apps/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            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 (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (name !== undefined) {
                localVarQueryParameter['name'] = name;
            }
            if (access !== undefined) {
                localVarQueryParameter['access'] = access;
            }
            if (enabled !== undefined) {
                localVarQueryParameter['enabled'] = enabled;
            }
            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 {number} [page] ----- Select Options -------------------------  default: 1
         * @param {number} [size] default: 16
         * @param {Array<string>} [fields] attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {Array<string>} [id] ----- Search Basic Filters ---------------------------  selection: by unique identifier
         * @param {string} [q] term-of-search: lookup[name]
         * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
         * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
         * @param {boolean} [enabled] ----- OAuthService-Specific Filters ----------------
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchOAuthService: (page, size, fields, sort, id, q, name, access, enabled, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/oauth/apps`;
            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 (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (name !== undefined) {
                localVarQueryParameter['name'] = name;
            }
            if (access !== undefined) {
                localVarQueryParameter['access'] = access;
            }
            if (enabled !== undefined) {
                localVarQueryParameter['enabled'] = enabled;
            }
            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} changesId
         * @param {ApiOAuth2FederationUpdateOAuthServiceBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateOAuthService: (changesId, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'changesId' is not null or undefined
            if (changesId === null || changesId === undefined) {
                throw new RequiredError('changesId', 'Required parameter changesId was null or undefined when calling updateOAuthService.');
            }
            // 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 updateOAuthService.');
            }
            const localVarPath = `/oauth/apps/{changes.id}`.replace(`{${'changes.id'}}`, encodeURIComponent(String(changesId)));
            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} changesId
         * @param {ApiOAuth2FederationUpdateOAuthServiceBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateOAuthService2: (changesId, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'changesId' is not null or undefined
            if (changesId === null || changesId === undefined) {
                throw new RequiredError('changesId', 'Required parameter changesId was null or undefined when calling updateOAuthService2.');
            }
            // 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 updateOAuthService2.');
            }
            const localVarPath = `/oauth/apps/{changes.id}`.replace(`{${'changes.id'}}`, encodeURIComponent(String(changesId)));
            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,
            };
        }),
    };
};
/**
 * OAuth2FederationApi - functional programming interface
 * @export
 */
export const OAuth2FederationApiFp = function (configuration) {
    return {
        /**
         *
         * @param {ApiOAuthService} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOAuthService(body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield OAuth2FederationApiAxiosParamCreator(configuration).createOAuthService(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 {ApiDeleteOAuthServiceRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOAuthService(body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield OAuth2FederationApiAxiosParamCreator(configuration).deleteOAuthService(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 {Array<string>} id
         * @param {ApiOAuth2FederationDeleteOAuthServiceBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOAuthService2(id, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield OAuth2FederationApiAxiosParamCreator(configuration).deleteOAuthService2(id, 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 {Array<string>} id ----- Search Basic Filters ---------------------------  selection: by unique identifier
         * @param {number} [page] ----- Select Options -------------------------  default: 1
         * @param {number} [size] default: 16
         * @param {Array<string>} [fields] attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [q] term-of-search: lookup[name]
         * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
         * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
         * @param {boolean} [enabled] ----- OAuthService-Specific Filters ----------------
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateOAuthService(id, page, size, fields, sort, q, name, access, enabled, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield OAuth2FederationApiAxiosParamCreator(configuration).locateOAuthService(id, page, size, fields, sort, q, name, access, enabled, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {number} [page] ----- Select Options -------------------------  default: 1
         * @param {number} [size] default: 16
         * @param {Array<string>} [fields] attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {Array<string>} [id] ----- Search Basic Filters ---------------------------  selection: by unique identifier
         * @param {string} [q] term-of-search: lookup[name]
         * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
         * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
         * @param {boolean} [enabled] ----- OAuthService-Specific Filters ----------------
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchOAuthService(page, size, fields, sort, id, q, name, access, enabled, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield OAuth2FederationApiAxiosParamCreator(configuration).searchOAuthService(page, size, fields, sort, id, q, name, access, enabled, 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} changesId
         * @param {ApiOAuth2FederationUpdateOAuthServiceBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateOAuthService(changesId, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield OAuth2FederationApiAxiosParamCreator(configuration).updateOAuthService(changesId, 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} changesId
         * @param {ApiOAuth2FederationUpdateOAuthServiceBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateOAuthService2(changesId, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield OAuth2FederationApiAxiosParamCreator(configuration).updateOAuthService2(changesId, body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * OAuth2FederationApi - factory interface
 * @export
 */
export const OAuth2FederationApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @param {ApiOAuthService} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createOAuthService(body, options) {
            return OAuth2FederationApiFp(configuration)
                .createOAuthService(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {ApiDeleteOAuthServiceRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOAuthService(body, options) {
            return OAuth2FederationApiFp(configuration)
                .deleteOAuthService(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {Array<string>} id
         * @param {ApiOAuth2FederationDeleteOAuthServiceBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteOAuthService2(id, body, options) {
            return OAuth2FederationApiFp(configuration)
                .deleteOAuthService2(id, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {Array<string>} id ----- Search Basic Filters ---------------------------  selection: by unique identifier
         * @param {number} [page] ----- Select Options -------------------------  default: 1
         * @param {number} [size] default: 16
         * @param {Array<string>} [fields] attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [q] term-of-search: lookup[name]
         * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
         * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
         * @param {boolean} [enabled] ----- OAuthService-Specific Filters ----------------
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateOAuthService(id, page, size, fields, sort, q, name, access, enabled, options) {
            return OAuth2FederationApiFp(configuration)
                .locateOAuthService(id, page, size, fields, sort, q, name, access, enabled, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {number} [page] ----- Select Options -------------------------  default: 1
         * @param {number} [size] default: 16
         * @param {Array<string>} [fields] attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {Array<string>} [id] ----- Search Basic Filters ---------------------------  selection: by unique identifier
         * @param {string} [q] term-of-search: lookup[name]
         * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
         * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
         * @param {boolean} [enabled] ----- OAuthService-Specific Filters ----------------
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchOAuthService(page, size, fields, sort, id, q, name, access, enabled, options) {
            return OAuth2FederationApiFp(configuration)
                .searchOAuthService(page, size, fields, sort, id, q, name, access, enabled, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} changesId
         * @param {ApiOAuth2FederationUpdateOAuthServiceBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateOAuthService(changesId, body, options) {
            return OAuth2FederationApiFp(configuration)
                .updateOAuthService(changesId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} changesId
         * @param {ApiOAuth2FederationUpdateOAuthServiceBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateOAuthService2(changesId, body, options) {
            return OAuth2FederationApiFp(configuration)
                .updateOAuthService2(changesId, body, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * OAuth2FederationApi - object-oriented interface
 * @export
 * @class OAuth2FederationApi
 * @extends {BaseAPI}
 */
export class OAuth2FederationApi extends BaseAPI {
    /**
     *
     * @param {ApiOAuthService} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OAuth2FederationApi
     */
    createOAuthService(body, options) {
        return OAuth2FederationApiFp(this.configuration)
            .createOAuthService(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {ApiDeleteOAuthServiceRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OAuth2FederationApi
     */
    deleteOAuthService(body, options) {
        return OAuth2FederationApiFp(this.configuration)
            .deleteOAuthService(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {Array<string>} id
     * @param {ApiOAuth2FederationDeleteOAuthServiceBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OAuth2FederationApi
     */
    deleteOAuthService2(id, body, options) {
        return OAuth2FederationApiFp(this.configuration)
            .deleteOAuthService2(id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {Array<string>} id ----- Search Basic Filters ---------------------------  selection: by unique identifier
     * @param {number} [page] ----- Select Options -------------------------  default: 1
     * @param {number} [size] default: 16
     * @param {Array<string>} [fields] attributes list
     * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
     * @param {string} [q] term-of-search: lookup[name]
     * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
     * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
     * @param {boolean} [enabled] ----- OAuthService-Specific Filters ----------------
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OAuth2FederationApi
     */
    locateOAuthService(id, page, size, fields, sort, q, name, access, enabled, options) {
        return OAuth2FederationApiFp(this.configuration)
            .locateOAuthService(id, page, size, fields, sort, q, name, access, enabled, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {number} [page] ----- Select Options -------------------------  default: 1
     * @param {number} [size] default: 16
     * @param {Array<string>} [fields] attributes list
     * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
     * @param {Array<string>} [id] ----- Search Basic Filters ---------------------------  selection: by unique identifier
     * @param {string} [q] term-of-search: lookup[name]
     * @param {string} [name] case-ignore substring match: ILIKE \&#39;*\&#39; - any; \&#39;?\&#39; - one
     * @param {string} [access] [M]andatory[A]ccess[C]ontrol: with access mode (action) granted!
     * @param {boolean} [enabled] ----- OAuthService-Specific Filters ----------------
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OAuth2FederationApi
     */
    searchOAuthService(page, size, fields, sort, id, q, name, access, enabled, options) {
        return OAuth2FederationApiFp(this.configuration)
            .searchOAuthService(page, size, fields, sort, id, q, name, access, enabled, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} changesId
     * @param {ApiOAuth2FederationUpdateOAuthServiceBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OAuth2FederationApi
     */
    updateOAuthService(changesId, body, options) {
        return OAuth2FederationApiFp(this.configuration)
            .updateOAuthService(changesId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} changesId
     * @param {ApiOAuth2FederationUpdateOAuthServiceBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OAuth2FederationApi
     */
    updateOAuthService2(changesId, body, options) {
        return OAuth2FederationApiFp(this.configuration)
            .updateOAuthService2(changesId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=oauth2-federation-api.js.map