// 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';
/**
 * CaseCommentsApi - axios parameter creator
 * @export
 */
export const CaseCommentsApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Delete a specific comment by its etag
         * @param {string} etag Identifier of the comment to delete.
         * @param {Array<string>} [fields] Fields to return after deletion.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteComment: (etag, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'etag' is not null or undefined
            if (etag === null || etag === undefined) {
                throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling deleteComment.');
            }
            const localVarPath = `/cases/comments/{etag}`.replace(`{${'etag'}}`, encodeURIComponent(String(etag)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 Retrieve a list of comments associated with a specific case
         * @param {string} caseEtag Etag or ID of the case for which comments are requested.
         * @param {number} [page] Page number for pagination.
         * @param {number} [size] Number of comments per page.
         * @param {string} [q] Query string for search.
         * @param {Array<string>} [ids] Array of requested id.
         * @param {string} [sort] Sorting order.
         * @param {Array<string>} [fields] Fields to return for each comment.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listComments: (caseEtag, page, size, q, ids, sort, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'caseEtag' is not null or undefined
            if (caseEtag === null || caseEtag === undefined) {
                throw new RequiredError('caseEtag', 'Required parameter caseEtag was null or undefined when calling listComments.');
            }
            const localVarPath = `/cases/{case_etag}/comments`.replace(`{${'case_etag'}}`, encodeURIComponent(String(caseEtag)));
            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 (ids) {
                localVarQueryParameter['ids'] = ids;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 Retrieve a specific comment by its etag
         * @param {string} etag Identifier of the comment to retrieve.
         * @param {Array<string>} [fields] Specific fields to return for the comment.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateComment: (etag, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'etag' is not null or undefined
            if (etag === null || etag === undefined) {
                throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling locateComment.');
            }
            const localVarPath = `/cases/comments/{etag}`.replace(`{${'etag'}}`, encodeURIComponent(String(etag)));
            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 (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 Publish comment into a specific case
         * @param {string} caseEtag Etag or ID of the case to which comments belong.
         * @param {WebitelCasesInputCaseComment} input Comment to publish.
         * @param {Array<string>} [fields] Result fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publishComment: (caseEtag, input, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'caseEtag' is not null or undefined
            if (caseEtag === null || caseEtag === undefined) {
                throw new RequiredError('caseEtag', 'Required parameter caseEtag was null or undefined when calling publishComment.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling publishComment.');
            }
            const localVarPath = `/cases/{case_etag}/comments`.replace(`{${'case_etag'}}`, encodeURIComponent(String(caseEtag)));
            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;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @summary Update a specific comment by its etag
         * @param {string} inputEtag Identifier for the comment.
         * @param {DataForTheCommentToUpdate} input
         * @param {Array<string>} [fields] Fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateComment: (inputEtag, input, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'inputEtag' is not null or undefined
            if (inputEtag === null || inputEtag === undefined) {
                throw new RequiredError('inputEtag', 'Required parameter inputEtag was null or undefined when calling updateComment.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling updateComment.');
            }
            const localVarPath = `/cases/comments/{input.etag}`.replace(`{${'input.etag'}}`, encodeURIComponent(String(inputEtag)));
            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 (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @summary Update a specific comment by its etag
         * @param {string} inputEtag Identifier for the comment.
         * @param {DataForTheCommentToUpdate1} input
         * @param {Array<string>} [fields] Fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateComment2: (inputEtag, input, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'inputEtag' is not null or undefined
            if (inputEtag === null || inputEtag === undefined) {
                throw new RequiredError('inputEtag', 'Required parameter inputEtag was null or undefined when calling updateComment2.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling updateComment2.');
            }
            const localVarPath = `/cases/comments/{input.etag}`.replace(`{${'input.etag'}}`, encodeURIComponent(String(inputEtag)));
            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;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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 input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
    };
};
/**
 * CaseCommentsApi - functional programming interface
 * @export
 */
export const CaseCommentsApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Delete a specific comment by its etag
         * @param {string} etag Identifier of the comment to delete.
         * @param {Array<string>} [fields] Fields to return after deletion.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteComment(etag, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CaseCommentsApiAxiosParamCreator(configuration).deleteComment(etag, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Retrieve a list of comments associated with a specific case
         * @param {string} caseEtag Etag or ID of the case for which comments are requested.
         * @param {number} [page] Page number for pagination.
         * @param {number} [size] Number of comments per page.
         * @param {string} [q] Query string for search.
         * @param {Array<string>} [ids] Array of requested id.
         * @param {string} [sort] Sorting order.
         * @param {Array<string>} [fields] Fields to return for each comment.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listComments(caseEtag, page, size, q, ids, sort, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CaseCommentsApiAxiosParamCreator(configuration).listComments(caseEtag, page, size, q, ids, sort, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Retrieve a specific comment by its etag
         * @param {string} etag Identifier of the comment to retrieve.
         * @param {Array<string>} [fields] Specific fields to return for the comment.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateComment(etag, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CaseCommentsApiAxiosParamCreator(configuration).locateComment(etag, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Publish comment into a specific case
         * @param {string} caseEtag Etag or ID of the case to which comments belong.
         * @param {WebitelCasesInputCaseComment} input Comment to publish.
         * @param {Array<string>} [fields] Result fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publishComment(caseEtag, input, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CaseCommentsApiAxiosParamCreator(configuration).publishComment(caseEtag, input, fields, 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 a specific comment by its etag
         * @param {string} inputEtag Identifier for the comment.
         * @param {DataForTheCommentToUpdate} input
         * @param {Array<string>} [fields] Fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateComment(inputEtag, input, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CaseCommentsApiAxiosParamCreator(configuration).updateComment(inputEtag, input, fields, 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 a specific comment by its etag
         * @param {string} inputEtag Identifier for the comment.
         * @param {DataForTheCommentToUpdate1} input
         * @param {Array<string>} [fields] Fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateComment2(inputEtag, input, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CaseCommentsApiAxiosParamCreator(configuration).updateComment2(inputEtag, input, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * CaseCommentsApi - factory interface
 * @export
 */
export const CaseCommentsApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Delete a specific comment by its etag
         * @param {string} etag Identifier of the comment to delete.
         * @param {Array<string>} [fields] Fields to return after deletion.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteComment(etag, fields, options) {
            return CaseCommentsApiFp(configuration)
                .deleteComment(etag, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Retrieve a list of comments associated with a specific case
         * @param {string} caseEtag Etag or ID of the case for which comments are requested.
         * @param {number} [page] Page number for pagination.
         * @param {number} [size] Number of comments per page.
         * @param {string} [q] Query string for search.
         * @param {Array<string>} [ids] Array of requested id.
         * @param {string} [sort] Sorting order.
         * @param {Array<string>} [fields] Fields to return for each comment.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listComments(caseEtag, page, size, q, ids, sort, fields, options) {
            return CaseCommentsApiFp(configuration)
                .listComments(caseEtag, page, size, q, ids, sort, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Retrieve a specific comment by its etag
         * @param {string} etag Identifier of the comment to retrieve.
         * @param {Array<string>} [fields] Specific fields to return for the comment.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateComment(etag, fields, options) {
            return CaseCommentsApiFp(configuration)
                .locateComment(etag, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Publish comment into a specific case
         * @param {string} caseEtag Etag or ID of the case to which comments belong.
         * @param {WebitelCasesInputCaseComment} input Comment to publish.
         * @param {Array<string>} [fields] Result fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publishComment(caseEtag, input, fields, options) {
            return CaseCommentsApiFp(configuration)
                .publishComment(caseEtag, input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update a specific comment by its etag
         * @param {string} inputEtag Identifier for the comment.
         * @param {DataForTheCommentToUpdate} input
         * @param {Array<string>} [fields] Fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateComment(inputEtag, input, fields, options) {
            return CaseCommentsApiFp(configuration)
                .updateComment(inputEtag, input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update a specific comment by its etag
         * @param {string} inputEtag Identifier for the comment.
         * @param {DataForTheCommentToUpdate1} input
         * @param {Array<string>} [fields] Fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateComment2(inputEtag, input, fields, options) {
            return CaseCommentsApiFp(configuration)
                .updateComment2(inputEtag, input, fields, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * CaseCommentsApi - object-oriented interface
 * @export
 * @class CaseCommentsApi
 * @extends {BaseAPI}
 */
export class CaseCommentsApi extends BaseAPI {
    /**
     *
     * @summary Delete a specific comment by its etag
     * @param {string} etag Identifier of the comment to delete.
     * @param {Array<string>} [fields] Fields to return after deletion.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CaseCommentsApi
     */
    deleteComment(etag, fields, options) {
        return CaseCommentsApiFp(this.configuration)
            .deleteComment(etag, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Retrieve a list of comments associated with a specific case
     * @param {string} caseEtag Etag or ID of the case for which comments are requested.
     * @param {number} [page] Page number for pagination.
     * @param {number} [size] Number of comments per page.
     * @param {string} [q] Query string for search.
     * @param {Array<string>} [ids] Array of requested id.
     * @param {string} [sort] Sorting order.
     * @param {Array<string>} [fields] Fields to return for each comment.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CaseCommentsApi
     */
    listComments(caseEtag, page, size, q, ids, sort, fields, options) {
        return CaseCommentsApiFp(this.configuration)
            .listComments(caseEtag, page, size, q, ids, sort, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Retrieve a specific comment by its etag
     * @param {string} etag Identifier of the comment to retrieve.
     * @param {Array<string>} [fields] Specific fields to return for the comment.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CaseCommentsApi
     */
    locateComment(etag, fields, options) {
        return CaseCommentsApiFp(this.configuration)
            .locateComment(etag, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Publish comment into a specific case
     * @param {string} caseEtag Etag or ID of the case to which comments belong.
     * @param {WebitelCasesInputCaseComment} input Comment to publish.
     * @param {Array<string>} [fields] Result fields to include in the response.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CaseCommentsApi
     */
    publishComment(caseEtag, input, fields, options) {
        return CaseCommentsApiFp(this.configuration)
            .publishComment(caseEtag, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update a specific comment by its etag
     * @param {string} inputEtag Identifier for the comment.
     * @param {DataForTheCommentToUpdate} input
     * @param {Array<string>} [fields] Fields to include in the response.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CaseCommentsApi
     */
    updateComment(inputEtag, input, fields, options) {
        return CaseCommentsApiFp(this.configuration)
            .updateComment(inputEtag, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update a specific comment by its etag
     * @param {string} inputEtag Identifier for the comment.
     * @param {DataForTheCommentToUpdate1} input
     * @param {Array<string>} [fields] Fields to include in the response.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CaseCommentsApi
     */
    updateComment2(inputEtag, input, fields, options) {
        return CaseCommentsApiFp(this.configuration)
            .updateComment2(inputEtag, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=case-comments-api.js.map