// 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';
/**
 * CustomersApi - axios parameter creator
 * @export
 */
export const CustomersApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary rpc GetCertificate(CertificateUsageRequest) returns (CertificateUsageResponse) {}
         * @param {string} [id] Available Filters  show by customer id; serial number (uuid)
         * @param {boolean} [valid] show if valid only!
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {Array<string>} [fields] Request Controls  serial,
         * @param {Array<string>} [sort]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCustomer: (id, valid, domainId, domainName, fields, sort, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/customer`;
            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 (id !== undefined) {
                localVarQueryParameter['id'] = id;
            }
            if (valid !== undefined) {
                localVarQueryParameter['valid'] = valid;
            }
            if (domainId !== undefined) {
                localVarQueryParameter['domain.id'] = domainId;
            }
            if (domainName !== undefined) {
                localVarQueryParameter['domain.name'] = domainName;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            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 rpc GetCertificate(CertificateUsageRequest) returns (CertificateUsageResponse) {}
         * @param {string} id Available Filters  show by customer id; serial number (uuid)
         * @param {boolean} [valid] show if valid only!
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {Array<string>} [fields] Request Controls  serial,
         * @param {Array<string>} [sort]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCustomer2: (id, valid, domainId, domainName, fields, sort, 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 getCustomer2.');
            }
            const localVarPath = `/customer/{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 (valid !== undefined) {
                localVarQueryParameter['valid'] = valid;
            }
            if (domainId !== undefined) {
                localVarQueryParameter['domain.id'] = domainId;
            }
            if (domainName !== undefined) {
                localVarQueryParameter['domain.name'] = domainName;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            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} customerId
         * @param {number} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [userId] identifier
         * @param {string} [userName] display name
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {Array<string>} [id] by serial number(s)
         * @param {Array<string>} [product] by product name(s)
         * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
         * @param {string} [q] filter: term of search
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsage: (customerId, size, page, fields, sort, userId, userName, domainId, domainName, id, product, valid, q, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'customerId' is not null or undefined
            if (customerId === null || customerId === undefined) {
                throw new RequiredError('customerId', 'Required parameter customerId was null or undefined when calling licenseUsage.');
            }
            const localVarPath = `/customer/{customer_id}/license`.replace(`{${'customer_id'}}`, encodeURIComponent(String(customerId)));
            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 (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (userId !== undefined) {
                localVarQueryParameter['user.id'] = userId;
            }
            if (userName !== undefined) {
                localVarQueryParameter['user.name'] = userName;
            }
            if (domainId !== undefined) {
                localVarQueryParameter['domain.id'] = domainId;
            }
            if (domainName !== undefined) {
                localVarQueryParameter['domain.name'] = domainName;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (product) {
                localVarQueryParameter['product'] = product;
            }
            if (valid !== undefined) {
                localVarQueryParameter['valid'] = valid;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            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} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [userId] identifier
         * @param {string} [userName] display name
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {string} [customerId]
         * @param {Array<string>} [id] by serial number(s)
         * @param {Array<string>} [product] by product name(s)
         * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
         * @param {string} [q] filter: term of search
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsage2: (size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/license`;
            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 (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (userId !== undefined) {
                localVarQueryParameter['user.id'] = userId;
            }
            if (userName !== undefined) {
                localVarQueryParameter['user.name'] = userName;
            }
            if (domainId !== undefined) {
                localVarQueryParameter['domain.id'] = domainId;
            }
            if (domainName !== undefined) {
                localVarQueryParameter['domain.name'] = domainName;
            }
            if (customerId !== undefined) {
                localVarQueryParameter['customer_id'] = customerId;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (product) {
                localVarQueryParameter['product'] = product;
            }
            if (valid !== undefined) {
                localVarQueryParameter['valid'] = valid;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            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} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [userId] identifier
         * @param {string} [userName] display name
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {string} [customerId]
         * @param {Array<string>} [id] by serial number(s)
         * @param {Array<string>} [product] by product name(s)
         * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
         * @param {string} [q] filter: term of search
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsage3: (size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/products`;
            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 (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (userId !== undefined) {
                localVarQueryParameter['user.id'] = userId;
            }
            if (userName !== undefined) {
                localVarQueryParameter['user.name'] = userName;
            }
            if (domainId !== undefined) {
                localVarQueryParameter['domain.id'] = domainId;
            }
            if (domainName !== undefined) {
                localVarQueryParameter['domain.name'] = domainName;
            }
            if (customerId !== undefined) {
                localVarQueryParameter['customer_id'] = customerId;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (product) {
                localVarQueryParameter['product'] = product;
            }
            if (valid !== undefined) {
                localVarQueryParameter['valid'] = valid;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            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} id ----- Search Filters ----- //  REQUIRED Product ID
         * @param {number} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [q] filter: term of search (username)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsers: (id, size, page, fields, sort, q, 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 licenseUsers.');
            }
            const localVarPath = `/products/{id}/users`.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 (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            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 {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        serverInfo: (options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/srvinfo`;
            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,
            };
        }),
        /**
         *
         * @param {string} [organization] [optional] e.g.: Example Org.
         * @param {string} [logoPicture] [optional] logo source image
         * @param {string} [certificate] [optional] raw bytes protobuf::base64.RawStdEncoding !&#x3D; certificate::base64.StdEncoding
         * @param {boolean} [revoke]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCustomer: (organization, logoPicture, certificate, revoke, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/customer`;
            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;
            }
            if (organization !== undefined) {
                localVarQueryParameter['organization'] = organization;
            }
            if (logoPicture !== undefined) {
                localVarQueryParameter['logo_picture'] = logoPicture;
            }
            if (certificate !== undefined) {
                localVarQueryParameter['certificate'] = certificate;
            }
            if (revoke !== undefined) {
                localVarQueryParameter['revoke'] = revoke;
            }
            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,
            };
        }),
    };
};
/**
 * CustomersApi - functional programming interface
 * @export
 */
export const CustomersApiFp = function (configuration) {
    return {
        /**
         *
         * @summary rpc GetCertificate(CertificateUsageRequest) returns (CertificateUsageResponse) {}
         * @param {string} [id] Available Filters  show by customer id; serial number (uuid)
         * @param {boolean} [valid] show if valid only!
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {Array<string>} [fields] Request Controls  serial,
         * @param {Array<string>} [sort]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCustomer(id, valid, domainId, domainName, fields, sort, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CustomersApiAxiosParamCreator(configuration).getCustomer(id, valid, domainId, domainName, fields, sort, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary rpc GetCertificate(CertificateUsageRequest) returns (CertificateUsageResponse) {}
         * @param {string} id Available Filters  show by customer id; serial number (uuid)
         * @param {boolean} [valid] show if valid only!
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {Array<string>} [fields] Request Controls  serial,
         * @param {Array<string>} [sort]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCustomer2(id, valid, domainId, domainName, fields, sort, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CustomersApiAxiosParamCreator(configuration).getCustomer2(id, valid, domainId, domainName, fields, sort, 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} customerId
         * @param {number} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [userId] identifier
         * @param {string} [userName] display name
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {Array<string>} [id] by serial number(s)
         * @param {Array<string>} [product] by product name(s)
         * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
         * @param {string} [q] filter: term of search
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsage(customerId, size, page, fields, sort, userId, userName, domainId, domainName, id, product, valid, q, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CustomersApiAxiosParamCreator(configuration).licenseUsage(customerId, size, page, fields, sort, userId, userName, domainId, domainName, id, product, valid, q, 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} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [userId] identifier
         * @param {string} [userName] display name
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {string} [customerId]
         * @param {Array<string>} [id] by serial number(s)
         * @param {Array<string>} [product] by product name(s)
         * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
         * @param {string} [q] filter: term of search
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsage2(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CustomersApiAxiosParamCreator(configuration).licenseUsage2(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, 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} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [userId] identifier
         * @param {string} [userName] display name
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {string} [customerId]
         * @param {Array<string>} [id] by serial number(s)
         * @param {Array<string>} [product] by product name(s)
         * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
         * @param {string} [q] filter: term of search
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsage3(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CustomersApiAxiosParamCreator(configuration).licenseUsage3(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, 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} id ----- Search Filters ----- //  REQUIRED Product ID
         * @param {number} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [q] filter: term of search (username)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsers(id, size, page, fields, sort, q, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CustomersApiAxiosParamCreator(configuration).licenseUsers(id, size, page, fields, sort, q, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        serverInfo(options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CustomersApiAxiosParamCreator(configuration).serverInfo(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} [organization] [optional] e.g.: Example Org.
         * @param {string} [logoPicture] [optional] logo source image
         * @param {string} [certificate] [optional] raw bytes protobuf::base64.RawStdEncoding !&#x3D; certificate::base64.StdEncoding
         * @param {boolean} [revoke]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCustomer(organization, logoPicture, certificate, revoke, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CustomersApiAxiosParamCreator(configuration).updateCustomer(organization, logoPicture, certificate, revoke, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * CustomersApi - factory interface
 * @export
 */
export const CustomersApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary rpc GetCertificate(CertificateUsageRequest) returns (CertificateUsageResponse) {}
         * @param {string} [id] Available Filters  show by customer id; serial number (uuid)
         * @param {boolean} [valid] show if valid only!
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {Array<string>} [fields] Request Controls  serial,
         * @param {Array<string>} [sort]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCustomer(id, valid, domainId, domainName, fields, sort, options) {
            return CustomersApiFp(configuration)
                .getCustomer(id, valid, domainId, domainName, fields, sort, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary rpc GetCertificate(CertificateUsageRequest) returns (CertificateUsageResponse) {}
         * @param {string} id Available Filters  show by customer id; serial number (uuid)
         * @param {boolean} [valid] show if valid only!
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {Array<string>} [fields] Request Controls  serial,
         * @param {Array<string>} [sort]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCustomer2(id, valid, domainId, domainName, fields, sort, options) {
            return CustomersApiFp(configuration)
                .getCustomer2(id, valid, domainId, domainName, fields, sort, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} customerId
         * @param {number} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [userId] identifier
         * @param {string} [userName] display name
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {Array<string>} [id] by serial number(s)
         * @param {Array<string>} [product] by product name(s)
         * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
         * @param {string} [q] filter: term of search
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsage(customerId, size, page, fields, sort, userId, userName, domainId, domainName, id, product, valid, q, options) {
            return CustomersApiFp(configuration)
                .licenseUsage(customerId, size, page, fields, sort, userId, userName, domainId, domainName, id, product, valid, q, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {number} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [userId] identifier
         * @param {string} [userName] display name
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {string} [customerId]
         * @param {Array<string>} [id] by serial number(s)
         * @param {Array<string>} [product] by product name(s)
         * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
         * @param {string} [q] filter: term of search
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsage2(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options) {
            return CustomersApiFp(configuration)
                .licenseUsage2(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {number} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [userId] identifier
         * @param {string} [userName] display name
         * @param {string} [domainId] identifier
         * @param {string} [domainName] display name
         * @param {string} [customerId]
         * @param {Array<string>} [id] by serial number(s)
         * @param {Array<string>} [product] by product name(s)
         * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
         * @param {string} [q] filter: term of search
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsage3(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options) {
            return CustomersApiFp(configuration)
                .licenseUsage3(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} id ----- Search Filters ----- //  REQUIRED Product ID
         * @param {number} [size] ----- Search Options ----- //  default: 16
         * @param {number} [page] default: 1
         * @param {Array<string>} [fields] set of output fields
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {string} [q] filter: term of search (username)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        licenseUsers(id, size, page, fields, sort, q, options) {
            return CustomersApiFp(configuration)
                .licenseUsers(id, size, page, fields, sort, q, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        serverInfo(options) {
            return CustomersApiFp(configuration)
                .serverInfo(options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} [organization] [optional] e.g.: Example Org.
         * @param {string} [logoPicture] [optional] logo source image
         * @param {string} [certificate] [optional] raw bytes protobuf::base64.RawStdEncoding !&#x3D; certificate::base64.StdEncoding
         * @param {boolean} [revoke]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCustomer(organization, logoPicture, certificate, revoke, options) {
            return CustomersApiFp(configuration)
                .updateCustomer(organization, logoPicture, certificate, revoke, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * CustomersApi - object-oriented interface
 * @export
 * @class CustomersApi
 * @extends {BaseAPI}
 */
export class CustomersApi extends BaseAPI {
    /**
     *
     * @summary rpc GetCertificate(CertificateUsageRequest) returns (CertificateUsageResponse) {}
     * @param {string} [id] Available Filters  show by customer id; serial number (uuid)
     * @param {boolean} [valid] show if valid only!
     * @param {string} [domainId] identifier
     * @param {string} [domainName] display name
     * @param {Array<string>} [fields] Request Controls  serial,
     * @param {Array<string>} [sort]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomersApi
     */
    getCustomer(id, valid, domainId, domainName, fields, sort, options) {
        return CustomersApiFp(this.configuration)
            .getCustomer(id, valid, domainId, domainName, fields, sort, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary rpc GetCertificate(CertificateUsageRequest) returns (CertificateUsageResponse) {}
     * @param {string} id Available Filters  show by customer id; serial number (uuid)
     * @param {boolean} [valid] show if valid only!
     * @param {string} [domainId] identifier
     * @param {string} [domainName] display name
     * @param {Array<string>} [fields] Request Controls  serial,
     * @param {Array<string>} [sort]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomersApi
     */
    getCustomer2(id, valid, domainId, domainName, fields, sort, options) {
        return CustomersApiFp(this.configuration)
            .getCustomer2(id, valid, domainId, domainName, fields, sort, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} customerId
     * @param {number} [size] ----- Search Options ----- //  default: 16
     * @param {number} [page] default: 1
     * @param {Array<string>} [fields] set of output fields
     * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
     * @param {string} [userId] identifier
     * @param {string} [userName] display name
     * @param {string} [domainId] identifier
     * @param {string} [domainName] display name
     * @param {Array<string>} [id] by serial number(s)
     * @param {Array<string>} [product] by product name(s)
     * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
     * @param {string} [q] filter: term of search
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomersApi
     */
    licenseUsage(customerId, size, page, fields, sort, userId, userName, domainId, domainName, id, product, valid, q, options) {
        return CustomersApiFp(this.configuration)
            .licenseUsage(customerId, size, page, fields, sort, userId, userName, domainId, domainName, id, product, valid, q, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {number} [size] ----- Search Options ----- //  default: 16
     * @param {number} [page] default: 1
     * @param {Array<string>} [fields] set of output fields
     * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
     * @param {string} [userId] identifier
     * @param {string} [userName] display name
     * @param {string} [domainId] identifier
     * @param {string} [domainName] display name
     * @param {string} [customerId]
     * @param {Array<string>} [id] by serial number(s)
     * @param {Array<string>} [product] by product name(s)
     * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
     * @param {string} [q] filter: term of search
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomersApi
     */
    licenseUsage2(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options) {
        return CustomersApiFp(this.configuration)
            .licenseUsage2(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {number} [size] ----- Search Options ----- //  default: 16
     * @param {number} [page] default: 1
     * @param {Array<string>} [fields] set of output fields
     * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
     * @param {string} [userId] identifier
     * @param {string} [userName] display name
     * @param {string} [domainId] identifier
     * @param {string} [domainName] display name
     * @param {string} [customerId]
     * @param {Array<string>} [id] by serial number(s)
     * @param {Array<string>} [product] by product name(s)
     * @param {boolean} [valid] view: all|valid|grantable  show: available to be granted
     * @param {string} [q] filter: term of search
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomersApi
     */
    licenseUsage3(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options) {
        return CustomersApiFp(this.configuration)
            .licenseUsage3(size, page, fields, sort, userId, userName, domainId, domainName, customerId, id, product, valid, q, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} id ----- Search Filters ----- //  REQUIRED Product ID
     * @param {number} [size] ----- Search Options ----- //  default: 16
     * @param {number} [page] default: 1
     * @param {Array<string>} [fields] set of output fields
     * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
     * @param {string} [q] filter: term of search (username)
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomersApi
     */
    licenseUsers(id, size, page, fields, sort, q, options) {
        return CustomersApiFp(this.configuration)
            .licenseUsers(id, size, page, fields, sort, q, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomersApi
     */
    serverInfo(options) {
        return CustomersApiFp(this.configuration)
            .serverInfo(options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} [organization] [optional] e.g.: Example Org.
     * @param {string} [logoPicture] [optional] logo source image
     * @param {string} [certificate] [optional] raw bytes protobuf::base64.RawStdEncoding !&#x3D; certificate::base64.StdEncoding
     * @param {boolean} [revoke]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CustomersApi
     */
    updateCustomer(organization, logoPicture, certificate, revoke, options) {
        return CustomersApiFp(this.configuration)
            .updateCustomer(organization, logoPicture, certificate, revoke, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=customers-api.js.map