/* tslint:disable */
/* eslint-disable */
/**
 * Synapse REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import * as runtime from '../runtime';
import { AsyncJobIdFromJSON, BindSearchConfigToEntityRequestToJSON, ColumnAnalyzerOverrideFromJSON, ColumnAnalyzerOverrideToJSON, ListColumnAnalyzerOverridesRequestToJSON, ListColumnAnalyzerOverridesResponseFromJSON, ListSearchConfigurationsRequestToJSON, ListSearchConfigurationsResponseFromJSON, ListSynonymSetsRequestToJSON, ListSynonymSetsResponseFromJSON, ListTextAnalyzersRequestToJSON, ListTextAnalyzersResponseFromJSON, SearchAutocompleteRequestToJSON, SearchConfigBindingFromJSON, SearchConfigurationFromJSON, SearchConfigurationToJSON, SearchIndexQueryToJSON, SearchQueryResultsFromJSON, SynonymSetFromJSON, SynonymSetToJSON, TextAnalyzerFromJSON, TextAnalyzerToJSON, } from '../models/index';
/**
 *
 */
export class SearchManagementServicesApi extends runtime.BaseAPI {
    /**
     */
    async deleteRepoV1EntityEntityIdSearchconfigBindingRaw(requestParameters, initOverrides) {
        if (requestParameters['entityId'] == null) {
            throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling deleteRepoV1EntityEntityIdSearchconfigBinding().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/entity/{entityId}/searchconfig/binding`;
        urlPath = urlPath.replace(`{${"entityId"}}`, encodeURIComponent(String(requestParameters['entityId'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async deleteRepoV1EntityEntityIdSearchconfigBinding(requestParameters, initOverrides) {
        await this.deleteRepoV1EntityEntityIdSearchconfigBindingRaw(requestParameters, initOverrides);
    }
    /**
     */
    async getRepoV1EntityEntityIdSearchconfigBindingRaw(requestParameters, initOverrides) {
        if (requestParameters['entityId'] == null) {
            throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling getRepoV1EntityEntityIdSearchconfigBinding().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/entity/{entityId}/searchconfig/binding`;
        urlPath = urlPath.replace(`{${"entityId"}}`, encodeURIComponent(String(requestParameters['entityId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SearchConfigBindingFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EntityEntityIdSearchconfigBinding(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityEntityIdSearchconfigBindingRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1SearchColumnAnalyzerOverrideColumnAnalyzerOverrideIdRaw(requestParameters, initOverrides) {
        if (requestParameters['columnAnalyzerOverrideId'] == null) {
            throw new runtime.RequiredError('columnAnalyzerOverrideId', 'Required parameter "columnAnalyzerOverrideId" was null or undefined when calling getRepoV1SearchColumnAnalyzerOverrideColumnAnalyzerOverrideId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/column/analyzer/override/{columnAnalyzerOverrideId}`;
        urlPath = urlPath.replace(`{${"columnAnalyzerOverrideId"}}`, encodeURIComponent(String(requestParameters['columnAnalyzerOverrideId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ColumnAnalyzerOverrideFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1SearchColumnAnalyzerOverrideColumnAnalyzerOverrideId(requestParameters, initOverrides) {
        const response = await this.getRepoV1SearchColumnAnalyzerOverrideColumnAnalyzerOverrideIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1SearchConfigurationSearchConfigurationIdRaw(requestParameters, initOverrides) {
        if (requestParameters['searchConfigurationId'] == null) {
            throw new runtime.RequiredError('searchConfigurationId', 'Required parameter "searchConfigurationId" was null or undefined when calling getRepoV1SearchConfigurationSearchConfigurationId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/configuration/{searchConfigurationId}`;
        urlPath = urlPath.replace(`{${"searchConfigurationId"}}`, encodeURIComponent(String(requestParameters['searchConfigurationId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SearchConfigurationFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1SearchConfigurationSearchConfigurationId(requestParameters, initOverrides) {
        const response = await this.getRepoV1SearchConfigurationSearchConfigurationIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1SearchQueryAsyncGetAsyncTokenRaw(requestParameters, initOverrides) {
        if (requestParameters['asyncToken'] == null) {
            throw new runtime.RequiredError('asyncToken', 'Required parameter "asyncToken" was null or undefined when calling getRepoV1SearchQueryAsyncGetAsyncToken().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/query/async/get/{asyncToken}`;
        urlPath = urlPath.replace(`{${"asyncToken"}}`, encodeURIComponent(String(requestParameters['asyncToken'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SearchQueryResultsFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1SearchQueryAsyncGetAsyncToken(requestParameters, initOverrides) {
        const response = await this.getRepoV1SearchQueryAsyncGetAsyncTokenRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1SearchSynonymSetSynonymSetIdRaw(requestParameters, initOverrides) {
        if (requestParameters['synonymSetId'] == null) {
            throw new runtime.RequiredError('synonymSetId', 'Required parameter "synonymSetId" was null or undefined when calling getRepoV1SearchSynonymSetSynonymSetId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/synonym/set/{synonymSetId}`;
        urlPath = urlPath.replace(`{${"synonymSetId"}}`, encodeURIComponent(String(requestParameters['synonymSetId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SynonymSetFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1SearchSynonymSetSynonymSetId(requestParameters, initOverrides) {
        const response = await this.getRepoV1SearchSynonymSetSynonymSetIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1SearchTextAnalyzerIdRaw(requestParameters, initOverrides) {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getRepoV1SearchTextAnalyzerId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/text/analyzer/{id}`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => TextAnalyzerFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1SearchTextAnalyzerId(requestParameters, initOverrides) {
        const response = await this.getRepoV1SearchTextAnalyzerIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1SearchAutocompleteRaw(requestParameters, initOverrides) {
        if (requestParameters['searchAutocompleteRequest'] == null) {
            throw new runtime.RequiredError('searchAutocompleteRequest', 'Required parameter "searchAutocompleteRequest" was null or undefined when calling postRepoV1SearchAutocomplete().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/autocomplete`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SearchAutocompleteRequestToJSON(requestParameters['searchAutocompleteRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SearchQueryResultsFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1SearchAutocomplete(requestParameters, initOverrides) {
        const response = await this.postRepoV1SearchAutocompleteRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1SearchColumnAnalyzerOverrideRaw(requestParameters, initOverrides) {
        if (requestParameters['columnAnalyzerOverride'] == null) {
            throw new runtime.RequiredError('columnAnalyzerOverride', 'Required parameter "columnAnalyzerOverride" was null or undefined when calling postRepoV1SearchColumnAnalyzerOverride().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/column/analyzer/override`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: ColumnAnalyzerOverrideToJSON(requestParameters['columnAnalyzerOverride']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ColumnAnalyzerOverrideFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1SearchColumnAnalyzerOverride(requestParameters, initOverrides) {
        const response = await this.postRepoV1SearchColumnAnalyzerOverrideRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1SearchColumnAnalyzerOverrideListRaw(requestParameters, initOverrides) {
        if (requestParameters['listColumnAnalyzerOverridesRequest'] == null) {
            throw new runtime.RequiredError('listColumnAnalyzerOverridesRequest', 'Required parameter "listColumnAnalyzerOverridesRequest" was null or undefined when calling postRepoV1SearchColumnAnalyzerOverrideList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/column/analyzer/override/list`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: ListColumnAnalyzerOverridesRequestToJSON(requestParameters['listColumnAnalyzerOverridesRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ListColumnAnalyzerOverridesResponseFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1SearchColumnAnalyzerOverrideList(requestParameters, initOverrides) {
        const response = await this.postRepoV1SearchColumnAnalyzerOverrideListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1SearchConfigurationRaw(requestParameters, initOverrides) {
        if (requestParameters['searchConfiguration'] == null) {
            throw new runtime.RequiredError('searchConfiguration', 'Required parameter "searchConfiguration" was null or undefined when calling postRepoV1SearchConfiguration().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/configuration`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SearchConfigurationToJSON(requestParameters['searchConfiguration']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SearchConfigurationFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1SearchConfiguration(requestParameters, initOverrides) {
        const response = await this.postRepoV1SearchConfigurationRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1SearchConfigurationListRaw(requestParameters, initOverrides) {
        if (requestParameters['listSearchConfigurationsRequest'] == null) {
            throw new runtime.RequiredError('listSearchConfigurationsRequest', 'Required parameter "listSearchConfigurationsRequest" was null or undefined when calling postRepoV1SearchConfigurationList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/configuration/list`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: ListSearchConfigurationsRequestToJSON(requestParameters['listSearchConfigurationsRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ListSearchConfigurationsResponseFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1SearchConfigurationList(requestParameters, initOverrides) {
        const response = await this.postRepoV1SearchConfigurationListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1SearchQueryAsyncStartRaw(requestParameters, initOverrides) {
        if (requestParameters['searchIndexQuery'] == null) {
            throw new runtime.RequiredError('searchIndexQuery', 'Required parameter "searchIndexQuery" was null or undefined when calling postRepoV1SearchQueryAsyncStart().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/query/async/start`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SearchIndexQueryToJSON(requestParameters['searchIndexQuery']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => AsyncJobIdFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1SearchQueryAsyncStart(requestParameters, initOverrides) {
        const response = await this.postRepoV1SearchQueryAsyncStartRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1SearchSynonymSetRaw(requestParameters, initOverrides) {
        if (requestParameters['synonymSet'] == null) {
            throw new runtime.RequiredError('synonymSet', 'Required parameter "synonymSet" was null or undefined when calling postRepoV1SearchSynonymSet().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/synonym/set`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SynonymSetToJSON(requestParameters['synonymSet']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SynonymSetFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1SearchSynonymSet(requestParameters, initOverrides) {
        const response = await this.postRepoV1SearchSynonymSetRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1SearchSynonymSetListRaw(requestParameters, initOverrides) {
        if (requestParameters['listSynonymSetsRequest'] == null) {
            throw new runtime.RequiredError('listSynonymSetsRequest', 'Required parameter "listSynonymSetsRequest" was null or undefined when calling postRepoV1SearchSynonymSetList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/synonym/set/list`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: ListSynonymSetsRequestToJSON(requestParameters['listSynonymSetsRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ListSynonymSetsResponseFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1SearchSynonymSetList(requestParameters, initOverrides) {
        const response = await this.postRepoV1SearchSynonymSetListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1SearchTextAnalyzerRaw(requestParameters, initOverrides) {
        if (requestParameters['textAnalyzer'] == null) {
            throw new runtime.RequiredError('textAnalyzer', 'Required parameter "textAnalyzer" was null or undefined when calling postRepoV1SearchTextAnalyzer().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/text/analyzer`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: TextAnalyzerToJSON(requestParameters['textAnalyzer']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => TextAnalyzerFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1SearchTextAnalyzer(requestParameters, initOverrides) {
        const response = await this.postRepoV1SearchTextAnalyzerRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1SearchTextAnalyzerListRaw(requestParameters, initOverrides) {
        if (requestParameters['listTextAnalyzersRequest'] == null) {
            throw new runtime.RequiredError('listTextAnalyzersRequest', 'Required parameter "listTextAnalyzersRequest" was null or undefined when calling postRepoV1SearchTextAnalyzerList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/text/analyzer/list`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: ListTextAnalyzersRequestToJSON(requestParameters['listTextAnalyzersRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ListTextAnalyzersResponseFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1SearchTextAnalyzerList(requestParameters, initOverrides) {
        const response = await this.postRepoV1SearchTextAnalyzerListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EntityEntityIdSearchconfigBindingRaw(requestParameters, initOverrides) {
        if (requestParameters['entityId'] == null) {
            throw new runtime.RequiredError('entityId', 'Required parameter "entityId" was null or undefined when calling putRepoV1EntityEntityIdSearchconfigBinding().');
        }
        if (requestParameters['bindSearchConfigToEntityRequest'] == null) {
            throw new runtime.RequiredError('bindSearchConfigToEntityRequest', 'Required parameter "bindSearchConfigToEntityRequest" was null or undefined when calling putRepoV1EntityEntityIdSearchconfigBinding().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/entity/{entityId}/searchconfig/binding`;
        urlPath = urlPath.replace(`{${"entityId"}}`, encodeURIComponent(String(requestParameters['entityId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: BindSearchConfigToEntityRequestToJSON(requestParameters['bindSearchConfigToEntityRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SearchConfigBindingFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EntityEntityIdSearchconfigBinding(requestParameters, initOverrides) {
        const response = await this.putRepoV1EntityEntityIdSearchconfigBindingRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1SearchColumnAnalyzerOverrideColumnAnalyzerOverrideIdRaw(requestParameters, initOverrides) {
        if (requestParameters['columnAnalyzerOverrideId'] == null) {
            throw new runtime.RequiredError('columnAnalyzerOverrideId', 'Required parameter "columnAnalyzerOverrideId" was null or undefined when calling putRepoV1SearchColumnAnalyzerOverrideColumnAnalyzerOverrideId().');
        }
        if (requestParameters['columnAnalyzerOverride'] == null) {
            throw new runtime.RequiredError('columnAnalyzerOverride', 'Required parameter "columnAnalyzerOverride" was null or undefined when calling putRepoV1SearchColumnAnalyzerOverrideColumnAnalyzerOverrideId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/column/analyzer/override/{columnAnalyzerOverrideId}`;
        urlPath = urlPath.replace(`{${"columnAnalyzerOverrideId"}}`, encodeURIComponent(String(requestParameters['columnAnalyzerOverrideId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: ColumnAnalyzerOverrideToJSON(requestParameters['columnAnalyzerOverride']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ColumnAnalyzerOverrideFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1SearchColumnAnalyzerOverrideColumnAnalyzerOverrideId(requestParameters, initOverrides) {
        const response = await this.putRepoV1SearchColumnAnalyzerOverrideColumnAnalyzerOverrideIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1SearchConfigurationSearchConfigurationIdRaw(requestParameters, initOverrides) {
        if (requestParameters['searchConfigurationId'] == null) {
            throw new runtime.RequiredError('searchConfigurationId', 'Required parameter "searchConfigurationId" was null or undefined when calling putRepoV1SearchConfigurationSearchConfigurationId().');
        }
        if (requestParameters['searchConfiguration'] == null) {
            throw new runtime.RequiredError('searchConfiguration', 'Required parameter "searchConfiguration" was null or undefined when calling putRepoV1SearchConfigurationSearchConfigurationId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/configuration/{searchConfigurationId}`;
        urlPath = urlPath.replace(`{${"searchConfigurationId"}}`, encodeURIComponent(String(requestParameters['searchConfigurationId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: SearchConfigurationToJSON(requestParameters['searchConfiguration']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SearchConfigurationFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1SearchConfigurationSearchConfigurationId(requestParameters, initOverrides) {
        const response = await this.putRepoV1SearchConfigurationSearchConfigurationIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1SearchSynonymSetSynonymSetIdRaw(requestParameters, initOverrides) {
        if (requestParameters['synonymSetId'] == null) {
            throw new runtime.RequiredError('synonymSetId', 'Required parameter "synonymSetId" was null or undefined when calling putRepoV1SearchSynonymSetSynonymSetId().');
        }
        if (requestParameters['synonymSet'] == null) {
            throw new runtime.RequiredError('synonymSet', 'Required parameter "synonymSet" was null or undefined when calling putRepoV1SearchSynonymSetSynonymSetId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/synonym/set/{synonymSetId}`;
        urlPath = urlPath.replace(`{${"synonymSetId"}}`, encodeURIComponent(String(requestParameters['synonymSetId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: SynonymSetToJSON(requestParameters['synonymSet']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SynonymSetFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1SearchSynonymSetSynonymSetId(requestParameters, initOverrides) {
        const response = await this.putRepoV1SearchSynonymSetSynonymSetIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1SearchTextAnalyzerIdRaw(requestParameters, initOverrides) {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling putRepoV1SearchTextAnalyzerId().');
        }
        if (requestParameters['textAnalyzer'] == null) {
            throw new runtime.RequiredError('textAnalyzer', 'Required parameter "textAnalyzer" was null or undefined when calling putRepoV1SearchTextAnalyzerId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/search/text/analyzer/{id}`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: TextAnalyzerToJSON(requestParameters['textAnalyzer']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => TextAnalyzerFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1SearchTextAnalyzerId(requestParameters, initOverrides) {
        const response = await this.putRepoV1SearchTextAnalyzerIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
//# sourceMappingURL=SearchManagementServicesApi.js.map