// 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';
/**
 * FilePoliciesServiceApi - axios parameter creator
 * @export
 */
export const FilePoliciesServiceApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create FilePolicy
         * @param {StorageCreateFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createFilePolicy: (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 createFilePolicy.');
            }
            const localVarPath = `/storage/file_policies`;
            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,
            };
        }),
        /**
         *
         * @summary Remove FilePolicy
         * @param {number} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteFilePolicy: (id, 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 deleteFilePolicy.');
            }
            const localVarPath = `/storage/file_policies/{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;
            }
            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} id
         * @param {StorageFilePolicyApplyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        filePolicyApply: (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 filePolicyApply.');
            }
            // 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 filePolicyApply.');
            }
            const localVarPath = `/storage/file_policies/{id}/apply`.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: '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,
            };
        }),
        /**
         *
         * @param {number} fromId
         * @param {number} toId
         * @param {StorageMovePositionFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        movePositionFilePolicy: (fromId, toId, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'fromId' is not null or undefined
            if (fromId === null || fromId === undefined) {
                throw new RequiredError('fromId', 'Required parameter fromId was null or undefined when calling movePositionFilePolicy.');
            }
            // verify required parameter 'toId' is not null or undefined
            if (toId === null || toId === undefined) {
                throw new RequiredError('toId', 'Required parameter toId was null or undefined when calling movePositionFilePolicy.');
            }
            // 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 movePositionFilePolicy.');
            }
            const localVarPath = `/storage/file_policies/{from_id}/to/{to_id}`
                .replace(`{${'from_id'}}`, encodeURIComponent(String(fromId)))
                .replace(`{${'to_id'}}`, encodeURIComponent(String(toId)));
            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,
            };
        }),
        /**
         *
         * @summary Patch FilePolicy
         * @param {number} id
         * @param {StoragePatchFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchFilePolicy: (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 patchFilePolicy.');
            }
            // 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 patchFilePolicy.');
            }
            const localVarPath = `/storage/file_policies/{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: '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,
            };
        }),
        /**
         *
         * @summary FilePolicy item
         * @param {number} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readFilePolicy: (id, 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 readFilePolicy.');
            }
            const localVarPath = `/storage/file_policies/{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;
            }
            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,
            };
        }),
        /**
         *
         * @summary List of FilePolicy
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchFilePolicies: (page, size, q, sort, fields, id, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/storage/file_policies`;
            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 (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            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,
            };
        }),
        /**
         *
         * @summary Update FilePolicy
         * @param {number} id
         * @param {StorageUpdateFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateFilePolicy: (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 updateFilePolicy.');
            }
            // 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 updateFilePolicy.');
            }
            const localVarPath = `/storage/file_policies/{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: '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,
            };
        }),
    };
};
/**
 * FilePoliciesServiceApi - functional programming interface
 * @export
 */
export const FilePoliciesServiceApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Create FilePolicy
         * @param {StorageCreateFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createFilePolicy(body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield FilePoliciesServiceApiAxiosParamCreator(configuration).createFilePolicy(body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Remove FilePolicy
         * @param {number} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteFilePolicy(id, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield FilePoliciesServiceApiAxiosParamCreator(configuration).deleteFilePolicy(id, 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} id
         * @param {StorageFilePolicyApplyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        filePolicyApply(id, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield FilePoliciesServiceApiAxiosParamCreator(configuration).filePolicyApply(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 {number} fromId
         * @param {number} toId
         * @param {StorageMovePositionFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        movePositionFilePolicy(fromId, toId, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield FilePoliciesServiceApiAxiosParamCreator(configuration).movePositionFilePolicy(fromId, toId, body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Patch FilePolicy
         * @param {number} id
         * @param {StoragePatchFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchFilePolicy(id, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield FilePoliciesServiceApiAxiosParamCreator(configuration).patchFilePolicy(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);
                };
            });
        },
        /**
         *
         * @summary FilePolicy item
         * @param {number} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readFilePolicy(id, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield FilePoliciesServiceApiAxiosParamCreator(configuration).readFilePolicy(id, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary List of FilePolicy
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchFilePolicies(page, size, q, sort, fields, id, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield FilePoliciesServiceApiAxiosParamCreator(configuration).searchFilePolicies(page, size, q, sort, fields, id, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Update FilePolicy
         * @param {number} id
         * @param {StorageUpdateFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateFilePolicy(id, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield FilePoliciesServiceApiAxiosParamCreator(configuration).updateFilePolicy(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);
                };
            });
        },
    };
};
/**
 * FilePoliciesServiceApi - factory interface
 * @export
 */
export const FilePoliciesServiceApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Create FilePolicy
         * @param {StorageCreateFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createFilePolicy(body, options) {
            return FilePoliciesServiceApiFp(configuration)
                .createFilePolicy(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Remove FilePolicy
         * @param {number} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteFilePolicy(id, options) {
            return FilePoliciesServiceApiFp(configuration)
                .deleteFilePolicy(id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {number} id
         * @param {StorageFilePolicyApplyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        filePolicyApply(id, body, options) {
            return FilePoliciesServiceApiFp(configuration)
                .filePolicyApply(id, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {number} fromId
         * @param {number} toId
         * @param {StorageMovePositionFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        movePositionFilePolicy(fromId, toId, body, options) {
            return FilePoliciesServiceApiFp(configuration)
                .movePositionFilePolicy(fromId, toId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Patch FilePolicy
         * @param {number} id
         * @param {StoragePatchFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchFilePolicy(id, body, options) {
            return FilePoliciesServiceApiFp(configuration)
                .patchFilePolicy(id, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary FilePolicy item
         * @param {number} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readFilePolicy(id, options) {
            return FilePoliciesServiceApiFp(configuration)
                .readFilePolicy(id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List of FilePolicy
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchFilePolicies(page, size, q, sort, fields, id, options) {
            return FilePoliciesServiceApiFp(configuration)
                .searchFilePolicies(page, size, q, sort, fields, id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update FilePolicy
         * @param {number} id
         * @param {StorageUpdateFilePolicyRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateFilePolicy(id, body, options) {
            return FilePoliciesServiceApiFp(configuration)
                .updateFilePolicy(id, body, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * FilePoliciesServiceApi - object-oriented interface
 * @export
 * @class FilePoliciesServiceApi
 * @extends {BaseAPI}
 */
export class FilePoliciesServiceApi extends BaseAPI {
    /**
     *
     * @summary Create FilePolicy
     * @param {StorageCreateFilePolicyRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilePoliciesServiceApi
     */
    createFilePolicy(body, options) {
        return FilePoliciesServiceApiFp(this.configuration)
            .createFilePolicy(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Remove FilePolicy
     * @param {number} id
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilePoliciesServiceApi
     */
    deleteFilePolicy(id, options) {
        return FilePoliciesServiceApiFp(this.configuration)
            .deleteFilePolicy(id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {number} id
     * @param {StorageFilePolicyApplyRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilePoliciesServiceApi
     */
    filePolicyApply(id, body, options) {
        return FilePoliciesServiceApiFp(this.configuration)
            .filePolicyApply(id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {number} fromId
     * @param {number} toId
     * @param {StorageMovePositionFilePolicyRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilePoliciesServiceApi
     */
    movePositionFilePolicy(fromId, toId, body, options) {
        return FilePoliciesServiceApiFp(this.configuration)
            .movePositionFilePolicy(fromId, toId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Patch FilePolicy
     * @param {number} id
     * @param {StoragePatchFilePolicyRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilePoliciesServiceApi
     */
    patchFilePolicy(id, body, options) {
        return FilePoliciesServiceApiFp(this.configuration)
            .patchFilePolicy(id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary FilePolicy item
     * @param {number} id
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilePoliciesServiceApi
     */
    readFilePolicy(id, options) {
        return FilePoliciesServiceApiFp(this.configuration)
            .readFilePolicy(id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List of FilePolicy
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [q]
     * @param {string} [sort]
     * @param {Array<string>} [fields]
     * @param {Array<number>} [id]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilePoliciesServiceApi
     */
    searchFilePolicies(page, size, q, sort, fields, id, options) {
        return FilePoliciesServiceApiFp(this.configuration)
            .searchFilePolicies(page, size, q, sort, fields, id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update FilePolicy
     * @param {number} id
     * @param {StorageUpdateFilePolicyRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilePoliciesServiceApi
     */
    updateFilePolicy(id, body, options) {
        return FilePoliciesServiceApiFp(this.configuration)
            .updateFilePolicy(id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=file-policies-service-api.js.map