<gh_stars>0
# coding: utf-8

"""
   Copyright 2019 Alibaba Group Holding Limited

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from opensearch.api_client import ApiClient


class DefaultApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post(self, app_name, collector_name, **kwargs):  # noqa: E501
        """数据采集  # noqa: E501

        为了给客户提供更高质量的搜索效果，opensearch目前支持客户通过server端上传点击数据。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post(app_name, collector_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str collector_name: 数据采集名称 (required)
        :param list[Behavior] behavior:
        :return: Response
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post_with_http_info(app_name, collector_name, **kwargs)  # noqa: E501
        else:
            (data) = self.v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post_with_http_info(app_name, collector_name, **kwargs)  # noqa: E501
            return data

    def v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post_with_http_info(self, app_name, collector_name, **kwargs):  # noqa: E501
        """数据采集  # noqa: E501

        为了给客户提供更高质量的搜索效果，opensearch目前支持客户通过server端上传点击数据。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post_with_http_info(app_name, collector_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str collector_name: 数据采集名称 (required)
        :param list[Behavior] behavior:
        :return: Response
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app_name', 'collector_name', 'behavior']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app_name' is set
        if ('app_name' not in params or
                params['app_name'] is None):
            raise ValueError("Missing the required parameter `app_name` when calling `v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post`")  # noqa: E501
        # verify the required parameter 'collector_name' is set
        if ('collector_name' not in params or
                params['collector_name'] is None):
            raise ValueError("Missing the required parameter `collector_name` when calling `v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'app_name' in params:
            path_params['app_name'] = params['app_name']  # noqa: E501
        if 'collector_name' in params:
            path_params['collector_name'] = params['collector_name']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'behavior' in params:
            body_params = params['behavior']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['opensearch']  # noqa: E501

        return self.api_client.call_api(
            '/v3/openapi/app-groups/{app_name}/data-collections/{collector_name}/actions/bulk', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Response',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def v3_openapi_apps_app_name_search_get(self, app_name, query, **kwargs):  # noqa: E501
        """搜索处理  # noqa: E501

        系统提供了丰富的搜索语法以满足用户各种场景下的搜索需求。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_search_get(app_name, query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str query: 搜索主体，不能为空。主要支持子句有 config子句、query子句、sort子句、filter子句、aggregate子句、distinct子句 、kvpairs子句。 (required)
        :param str fetch_fields: 表示本次查询需要召回哪些字段值，多个字段之间通过英文分号;分隔，对应控制台中的默认展示字段功能。默认使用全部可展示字段。
        :param str qp: 指定要使用的查询分析规则，多个规则使用英文逗号,分隔。默认使用已上线规则
        :param str disable: 关闭指定已生效的参数功能。
        :param str first_rank_name: 设置粗排表达式名字。
        :param str second_rank_name: 设置精排表达式名字。
        :param str user_id: 用来标识发起当前搜索请求的终端用户。该值可以设置为下列值，优先级从高到低：1. 终端用户的长登录会员ID；2. 终端用户的移动设备imei标识；3. 终端用户的client_ip
        :param str abtest: 使用A/B Test功能时需要设置该参数。
        :param str category_prediction: 通过类目预测功能搜索时需要设置该参数。
        :param str raw_query: 终端用户输入的query，用于类目预测相关模型训练。
        :param str summary: 搜索结果摘要配置，可以指定某些字段进行飘红、截断等操作。
        :return: SearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.v3_openapi_apps_app_name_search_get_with_http_info(app_name, query, **kwargs)  # noqa: E501
        else:
            (data) = self.v3_openapi_apps_app_name_search_get_with_http_info(app_name, query, **kwargs)  # noqa: E501
            return data

    def v3_openapi_apps_app_name_search_get_with_http_info(self, app_name, query, **kwargs):  # noqa: E501
        """搜索处理  # noqa: E501

        系统提供了丰富的搜索语法以满足用户各种场景下的搜索需求。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_search_get_with_http_info(app_name, query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str query: 搜索主体，不能为空。主要支持子句有 config子句、query子句、sort子句、filter子句、aggregate子句、distinct子句 、kvpairs子句。 (required)
        :param str fetch_fields: 表示本次查询需要召回哪些字段值，多个字段之间通过英文分号;分隔，对应控制台中的默认展示字段功能。默认使用全部可展示字段。
        :param str qp: 指定要使用的查询分析规则，多个规则使用英文逗号,分隔。默认使用已上线规则
        :param str disable: 关闭指定已生效的参数功能。
        :param str first_rank_name: 设置粗排表达式名字。
        :param str second_rank_name: 设置精排表达式名字。
        :param str user_id: 用来标识发起当前搜索请求的终端用户。该值可以设置为下列值，优先级从高到低：1. 终端用户的长登录会员ID；2. 终端用户的移动设备imei标识；3. 终端用户的client_ip
        :param str abtest: 使用A/B Test功能时需要设置该参数。
        :param str category_prediction: 通过类目预测功能搜索时需要设置该参数。
        :param str raw_query: 终端用户输入的query，用于类目预测相关模型训练。
        :param str summary: 搜索结果摘要配置，可以指定某些字段进行飘红、截断等操作。
        :return: SearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app_name', 'query', 'fetch_fields', 'qp', 'disable', 'first_rank_name', 'second_rank_name', 'user_id', 'abtest', 'category_prediction', 'raw_query', 'summary']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v3_openapi_apps_app_name_search_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app_name' is set
        if ('app_name' not in params or
                params['app_name'] is None):
            raise ValueError("Missing the required parameter `app_name` when calling `v3_openapi_apps_app_name_search_get`")  # noqa: E501
        # verify the required parameter 'query' is set
        if ('query' not in params or
                params['query'] is None):
            raise ValueError("Missing the required parameter `query` when calling `v3_openapi_apps_app_name_search_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'app_name' in params:
            path_params['app_name'] = params['app_name']  # noqa: E501

        query_params = []
        if 'query' in params:
            query_params.append(('query', params['query']))  # noqa: E501
        if 'fetch_fields' in params:
            query_params.append(('fetch_fields', params['fetch_fields']))  # noqa: E501
        if 'qp' in params:
            query_params.append(('qp', params['qp']))  # noqa: E501
        if 'disable' in params:
            query_params.append(('disable', params['disable']))  # noqa: E501
        if 'first_rank_name' in params:
            query_params.append(('first_rank_name', params['first_rank_name']))  # noqa: E501
        if 'second_rank_name' in params:
            query_params.append(('second_rank_name', params['second_rank_name']))  # noqa: E501
        if 'user_id' in params:
            query_params.append(('user_id', params['user_id']))  # noqa: E501
        if 'abtest' in params:
            query_params.append(('abtest', params['abtest']))  # noqa: E501
        if 'category_prediction' in params:
            query_params.append(('category_prediction', params['category_prediction']))  # noqa: E501
        if 'raw_query' in params:
            query_params.append(('raw_query', params['raw_query']))  # noqa: E501
        if 'summary' in params:
            query_params.append(('summary', params['summary']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['opensearch']  # noqa: E501

        return self.api_client.call_api(
            '/v3/openapi/apps/{app_name}/search', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def v3_openapi_apps_app_name_suggest_model_name_search_get(self, app_name, model_name, query, **kwargs):  # noqa: E501
        """下拉提示  # noqa: E501

        下拉提示是搜索服务的基础功能，在用户输入查询词的过程中，智能推荐候选query，减少用户输入，帮助用户尽快找到想要的内容。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_suggest_model_name_search_get(app_name, model_name, query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str model_name: 下拉提示名称 (required)
        :param str query: 搜索关键词（包含中文需进行urlencode编码） (required)
        :param int hit: 下拉提示条数
        :return: SuggestionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.v3_openapi_apps_app_name_suggest_model_name_search_get_with_http_info(app_name, model_name, query, **kwargs)  # noqa: E501
        else:
            (data) = self.v3_openapi_apps_app_name_suggest_model_name_search_get_with_http_info(app_name, model_name, query, **kwargs)  # noqa: E501
            return data

    def v3_openapi_apps_app_name_suggest_model_name_search_get_with_http_info(self, app_name, model_name, query, **kwargs):  # noqa: E501
        """下拉提示  # noqa: E501

        下拉提示是搜索服务的基础功能，在用户输入查询词的过程中，智能推荐候选query，减少用户输入，帮助用户尽快找到想要的内容。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_suggest_model_name_search_get_with_http_info(app_name, model_name, query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str model_name: 下拉提示名称 (required)
        :param str query: 搜索关键词（包含中文需进行urlencode编码） (required)
        :param int hit: 下拉提示条数
        :return: SuggestionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app_name', 'model_name', 'query', 'hit']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v3_openapi_apps_app_name_suggest_model_name_search_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app_name' is set
        if ('app_name' not in params or
                params['app_name'] is None):
            raise ValueError("Missing the required parameter `app_name` when calling `v3_openapi_apps_app_name_suggest_model_name_search_get`")  # noqa: E501
        # verify the required parameter 'model_name' is set
        if ('model_name' not in params or
                params['model_name'] is None):
            raise ValueError("Missing the required parameter `model_name` when calling `v3_openapi_apps_app_name_suggest_model_name_search_get`")  # noqa: E501
        # verify the required parameter 'query' is set
        if ('query' not in params or
                params['query'] is None):
            raise ValueError("Missing the required parameter `query` when calling `v3_openapi_apps_app_name_suggest_model_name_search_get`")  # noqa: E501

        if 'hit' in params and params['hit'] > 10:  # noqa: E501
            raise ValueError("Invalid value for parameter `hit` when calling `v3_openapi_apps_app_name_suggest_model_name_search_get`, must be a value less than or equal to `10`")  # noqa: E501
        if 'hit' in params and params['hit'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `hit` when calling `v3_openapi_apps_app_name_suggest_model_name_search_get`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'app_name' in params:
            path_params['app_name'] = params['app_name']  # noqa: E501
        if 'model_name' in params:
            path_params['model_name'] = params['model_name']  # noqa: E501

        query_params = []
        if 'query' in params:
            query_params.append(('query', params['query']))  # noqa: E501
        if 'hit' in params:
            query_params.append(('hit', params['hit']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['opensearch']  # noqa: E501

        return self.api_client.call_api(
            '/v3/openapi/apps/{app_name}/suggest/{model_name}/search', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SuggestionResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def v3_openapi_apps_app_name_table_name_actions_bulk_post(self, app_name, table_name, **kwargs):  # noqa: E501
        """数据处理  # noqa: E501

        支持新增、更新、删除 等操作，以及对应批量操作  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_table_name_actions_bulk_post(app_name, table_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str table_name: 要将数据推送到应用中的表名 (required)
        :param list[Document] document:
        :return: Response
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.v3_openapi_apps_app_name_table_name_actions_bulk_post_with_http_info(app_name, table_name, **kwargs)  # noqa: E501
        else:
            (data) = self.v3_openapi_apps_app_name_table_name_actions_bulk_post_with_http_info(app_name, table_name, **kwargs)  # noqa: E501
            return data

    def v3_openapi_apps_app_name_table_name_actions_bulk_post_with_http_info(self, app_name, table_name, **kwargs):  # noqa: E501
        """数据处理  # noqa: E501

        支持新增、更新、删除 等操作，以及对应批量操作  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_table_name_actions_bulk_post_with_http_info(app_name, table_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str table_name: 要将数据推送到应用中的表名 (required)
        :param list[Document] document:
        :return: Response
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app_name', 'table_name', 'document']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v3_openapi_apps_app_name_table_name_actions_bulk_post" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app_name' is set
        if ('app_name' not in params or
                params['app_name'] is None):
            raise ValueError("Missing the required parameter `app_name` when calling `v3_openapi_apps_app_name_table_name_actions_bulk_post`")  # noqa: E501
        # verify the required parameter 'table_name' is set
        if ('table_name' not in params or
                params['table_name'] is None):
            raise ValueError("Missing the required parameter `table_name` when calling `v3_openapi_apps_app_name_table_name_actions_bulk_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'app_name' in params:
            path_params['app_name'] = params['app_name']  # noqa: E501
        if 'table_name' in params:
            path_params['table_name'] = params['table_name']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'document' in params:
            body_params = params['document']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['opensearch']  # noqa: E501

        return self.api_client.call_api(
            '/v3/openapi/apps/{app_name}/{table_name}/actions/bulk', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Response',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

# coding: utf-8

"""
   Copyright 2019 Alibaba Group Holding Limited

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from opensearch.api_client import ApiClient


class DefaultApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post(self, app_name, collector_name, **kwargs):  # noqa: E501
        """数据采集  # noqa: E501

        为了给客户提供更高质量的搜索效果，opensearch目前支持客户通过server端上传点击数据。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post(app_name, collector_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str collector_name: 数据采集名称 (required)
        :param list[Behavior] behavior:
        :return: Response
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post_with_http_info(app_name, collector_name, **kwargs)  # noqa: E501
        else:
            (data) = self.v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post_with_http_info(app_name, collector_name, **kwargs)  # noqa: E501
            return data

    def v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post_with_http_info(self, app_name, collector_name, **kwargs):  # noqa: E501
        """数据采集  # noqa: E501

        为了给客户提供更高质量的搜索效果，opensearch目前支持客户通过server端上传点击数据。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post_with_http_info(app_name, collector_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str collector_name: 数据采集名称 (required)
        :param list[Behavior] behavior:
        :return: Response
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app_name', 'collector_name', 'behavior']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app_name' is set
        if ('app_name' not in params or
                params['app_name'] is None):
            raise ValueError("Missing the required parameter `app_name` when calling `v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post`")  # noqa: E501
        # verify the required parameter 'collector_name' is set
        if ('collector_name' not in params or
                params['collector_name'] is None):
            raise ValueError("Missing the required parameter `collector_name` when calling `v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'app_name' in params:
            path_params['app_name'] = params['app_name']  # noqa: E501
        if 'collector_name' in params:
            path_params['collector_name'] = params['collector_name']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'behavior' in params:
            body_params = params['behavior']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['opensearch']  # noqa: E501

        return self.api_client.call_api(
            '/v3/openapi/app-groups/{app_name}/data-collections/{collector_name}/actions/bulk', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Response',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def v3_openapi_apps_app_name_search_get(self, app_name, query, **kwargs):  # noqa: E501
        """搜索处理  # noqa: E501

        系统提供了丰富的搜索语法以满足用户各种场景下的搜索需求。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_search_get(app_name, query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str query: 搜索主体，不能为空。主要支持子句有 config子句、query子句、sort子句、filter子句、aggregate子句、distinct子句 、kvpairs子句。 (required)
        :param str fetch_fields: 表示本次查询需要召回哪些字段值，多个字段之间通过英文分号;分隔，对应控制台中的默认展示字段功能。默认使用全部可展示字段。
        :param str qp: 指定要使用的查询分析规则，多个规则使用英文逗号,分隔。默认使用已上线规则
        :param str disable: 关闭指定已生效的参数功能。
        :param str first_rank_name: 设置粗排表达式名字。
        :param str second_rank_name: 设置精排表达式名字。
        :param str user_id: 用来标识发起当前搜索请求的终端用户。该值可以设置为下列值，优先级从高到低：1. 终端用户的长登录会员ID；2. 终端用户的移动设备imei标识；3. 终端用户的client_ip
        :param str abtest: 使用A/B Test功能时需要设置该参数。
        :param str category_prediction: 通过类目预测功能搜索时需要设置该参数。
        :param str raw_query: 终端用户输入的query，用于类目预测相关模型训练。
        :param str summary: 搜索结果摘要配置，可以指定某些字段进行飘红、截断等操作。
        :return: SearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.v3_openapi_apps_app_name_search_get_with_http_info(app_name, query, **kwargs)  # noqa: E501
        else:
            (data) = self.v3_openapi_apps_app_name_search_get_with_http_info(app_name, query, **kwargs)  # noqa: E501
            return data

    def v3_openapi_apps_app_name_search_get_with_http_info(self, app_name, query, **kwargs):  # noqa: E501
        """搜索处理  # noqa: E501

        系统提供了丰富的搜索语法以满足用户各种场景下的搜索需求。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_search_get_with_http_info(app_name, query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str query: 搜索主体，不能为空。主要支持子句有 config子句、query子句、sort子句、filter子句、aggregate子句、distinct子句 、kvpairs子句。 (required)
        :param str fetch_fields: 表示本次查询需要召回哪些字段值，多个字段之间通过英文分号;分隔，对应控制台中的默认展示字段功能。默认使用全部可展示字段。
        :param str qp: 指定要使用的查询分析规则，多个规则使用英文逗号,分隔。默认使用已上线规则
        :param str disable: 关闭指定已生效的参数功能。
        :param str first_rank_name: 设置粗排表达式名字。
        :param str second_rank_name: 设置精排表达式名字。
        :param str user_id: 用来标识发起当前搜索请求的终端用户。该值可以设置为下列值，优先级从高到低：1. 终端用户的长登录会员ID；2. 终端用户的移动设备imei标识；3. 终端用户的client_ip
        :param str abtest: 使用A/B Test功能时需要设置该参数。
        :param str category_prediction: 通过类目预测功能搜索时需要设置该参数。
        :param str raw_query: 终端用户输入的query，用于类目预测相关模型训练。
        :param str summary: 搜索结果摘要配置，可以指定某些字段进行飘红、截断等操作。
        :return: SearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app_name', 'query', 'fetch_fields', 'qp', 'disable', 'first_rank_name', 'second_rank_name', 'user_id', 'abtest', 'category_prediction', 'raw_query', 'summary']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v3_openapi_apps_app_name_search_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app_name' is set
        if ('app_name' not in params or
                params['app_name'] is None):
            raise ValueError("Missing the required parameter `app_name` when calling `v3_openapi_apps_app_name_search_get`")  # noqa: E501
        # verify the required parameter 'query' is set
        if ('query' not in params or
                params['query'] is None):
            raise ValueError("Missing the required parameter `query` when calling `v3_openapi_apps_app_name_search_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'app_name' in params:
            path_params['app_name'] = params['app_name']  # noqa: E501

        query_params = []
        if 'query' in params:
            query_params.append(('query', params['query']))  # noqa: E501
        if 'fetch_fields' in params:
            query_params.append(('fetch_fields', params['fetch_fields']))  # noqa: E501
        if 'qp' in params:
            query_params.append(('qp', params['qp']))  # noqa: E501
        if 'disable' in params:
            query_params.append(('disable', params['disable']))  # noqa: E501
        if 'first_rank_name' in params:
            query_params.append(('first_rank_name', params['first_rank_name']))  # noqa: E501
        if 'second_rank_name' in params:
            query_params.append(('second_rank_name', params['second_rank_name']))  # noqa: E501
        if 'user_id' in params:
            query_params.append(('user_id', params['user_id']))  # noqa: E501
        if 'abtest' in params:
            query_params.append(('abtest', params['abtest']))  # noqa: E501
        if 'category_prediction' in params:
            query_params.append(('category_prediction', params['category_prediction']))  # noqa: E501
        if 'raw_query' in params:
            query_params.append(('raw_query', params['raw_query']))  # noqa: E501
        if 'summary' in params:
            query_params.append(('summary', params['summary']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['opensearch']  # noqa: E501

        return self.api_client.call_api(
            '/v3/openapi/apps/{app_name}/search', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def v3_openapi_apps_app_name_suggest_model_name_search_get(self, app_name, model_name, query, **kwargs):  # noqa: E501
        """下拉提示  # noqa: E501

        下拉提示是搜索服务的基础功能，在用户输入查询词的过程中，智能推荐候选query，减少用户输入，帮助用户尽快找到想要的内容。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_suggest_model_name_search_get(app_name, model_name, query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str model_name: 下拉提示名称 (required)
        :param str query: 搜索关键词（包含中文需进行urlencode编码） (required)
        :param int hit: 下拉提示条数
        :return: SuggestionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.v3_openapi_apps_app_name_suggest_model_name_search_get_with_http_info(app_name, model_name, query, **kwargs)  # noqa: E501
        else:
            (data) = self.v3_openapi_apps_app_name_suggest_model_name_search_get_with_http_info(app_name, model_name, query, **kwargs)  # noqa: E501
            return data

    def v3_openapi_apps_app_name_suggest_model_name_search_get_with_http_info(self, app_name, model_name, query, **kwargs):  # noqa: E501
        """下拉提示  # noqa: E501

        下拉提示是搜索服务的基础功能，在用户输入查询词的过程中，智能推荐候选query，减少用户输入，帮助用户尽快找到想要的内容。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_suggest_model_name_search_get_with_http_info(app_name, model_name, query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str model_name: 下拉提示名称 (required)
        :param str query: 搜索关键词（包含中文需进行urlencode编码） (required)
        :param int hit: 下拉提示条数
        :return: SuggestionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app_name', 'model_name', 'query', 'hit']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v3_openapi_apps_app_name_suggest_model_name_search_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app_name' is set
        if ('app_name' not in params or
                params['app_name'] is None):
            raise ValueError("Missing the required parameter `app_name` when calling `v3_openapi_apps_app_name_suggest_model_name_search_get`")  # noqa: E501
        # verify the required parameter 'model_name' is set
        if ('model_name' not in params or
                params['model_name'] is None):
            raise ValueError("Missing the required parameter `model_name` when calling `v3_openapi_apps_app_name_suggest_model_name_search_get`")  # noqa: E501
        # verify the required parameter 'query' is set
        if ('query' not in params or
                params['query'] is None):
            raise ValueError("Missing the required parameter `query` when calling `v3_openapi_apps_app_name_suggest_model_name_search_get`")  # noqa: E501

        if 'hit' in params and params['hit'] > 10:  # noqa: E501
            raise ValueError("Invalid value for parameter `hit` when calling `v3_openapi_apps_app_name_suggest_model_name_search_get`, must be a value less than or equal to `10`")  # noqa: E501
        if 'hit' in params and params['hit'] < 1:  # noqa: E501
            raise ValueError("Invalid value for parameter `hit` when calling `v3_openapi_apps_app_name_suggest_model_name_search_get`, must be a value greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'app_name' in params:
            path_params['app_name'] = params['app_name']  # noqa: E501
        if 'model_name' in params:
            path_params['model_name'] = params['model_name']  # noqa: E501

        query_params = []
        if 'query' in params:
            query_params.append(('query', params['query']))  # noqa: E501
        if 'hit' in params:
            query_params.append(('hit', params['hit']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['opensearch']  # noqa: E501

        return self.api_client.call_api(
            '/v3/openapi/apps/{app_name}/suggest/{model_name}/search', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SuggestionResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def v3_openapi_apps_app_name_table_name_actions_bulk_post(self, app_name, table_name, **kwargs):  # noqa: E501
        """数据处理  # noqa: E501

        支持新增、更新、删除 等操作，以及对应批量操作  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_table_name_actions_bulk_post(app_name, table_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str table_name: 要将数据推送到应用中的表名 (required)
        :param list[Document] document:
        :return: Response
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.v3_openapi_apps_app_name_table_name_actions_bulk_post_with_http_info(app_name, table_name, **kwargs)  # noqa: E501
        else:
            (data) = self.v3_openapi_apps_app_name_table_name_actions_bulk_post_with_http_info(app_name, table_name, **kwargs)  # noqa: E501
            return data

    def v3_openapi_apps_app_name_table_name_actions_bulk_post_with_http_info(self, app_name, table_name, **kwargs):  # noqa: E501
        """数据处理  # noqa: E501

        支持新增、更新、删除 等操作，以及对应批量操作  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.v3_openapi_apps_app_name_table_name_actions_bulk_post_with_http_info(app_name, table_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)
        :param str table_name: 要将数据推送到应用中的表名 (required)
        :param list[Document] document:
        :return: Response
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['app_name', 'table_name', 'document']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method v3_openapi_apps_app_name_table_name_actions_bulk_post" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'app_name' is set
        if ('app_name' not in params or
                params['app_name'] is None):
            raise ValueError("Missing the required parameter `app_name` when calling `v3_openapi_apps_app_name_table_name_actions_bulk_post`")  # noqa: E501
        # verify the required parameter 'table_name' is set
        if ('table_name' not in params or
                params['table_name'] is None):
            raise ValueError("Missing the required parameter `table_name` when calling `v3_openapi_apps_app_name_table_name_actions_bulk_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'app_name' in params:
            path_params['app_name'] = params['app_name']  # noqa: E501
        if 'table_name' in params:
            path_params['table_name'] = params['table_name']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'document' in params:
            body_params = params['document']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['opensearch']  # noqa: E501

        return self.api_client.call_api(
            '/v3/openapi/apps/{app_name}/{table_name}/actions/bulk', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='Response',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
# coding: utf-8 Copyright 2019 Alibaba Group Holding Limited     Licensed under the Apache License, Version 2.0 (the "License");    you may not use this file except in compliance with the License.    You may obtain a copy of the License at         http://www.apache.org/licenses/LICENSE-2.0     Unless required by applicable law or agreed to in writing, software    distributed under the License is distributed on an "AS IS" BASIS,    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    See the License for the specific language governing permissions and    limitations under the License. # noqa: F401 # python 2 and python 3 compatibility library NOTE: This class is auto generated by the swagger code generator program.      Do not edit the class manually.     Ref: https://github.com/swagger-api/swagger-codegen # noqa: E501 数据采集  # noqa: E501          为了给客户提供更高质量的搜索效果，opensearch目前支持客户通过server端上传点击数据。  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post(app_name, collector_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)         :param str collector_name: 数据采集名称 (required)         :param list[Behavior] behavior:         :return: Response                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 数据采集  # noqa: E501          为了给客户提供更高质量的搜索效果，opensearch目前支持客户通过server端上传点击数据。  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.v3_openapi_app_groups_app_name_data_collections_collector_name_actions_bulk_post_with_http_info(app_name, collector_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)         :param str collector_name: 数据采集名称 (required)         :param list[Behavior] behavior:         :return: Response                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'app_name' is set # noqa: E501 # verify the required parameter 'collector_name' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 搜索处理  # noqa: E501          系统提供了丰富的搜索语法以满足用户各种场景下的搜索需求。  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.v3_openapi_apps_app_name_search_get(app_name, query, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)         :param str query: 搜索主体，不能为空。主要支持子句有 config子句、query子句、sort子句、filter子句、aggregate子句、distinct子句 、kvpairs子句。 (required)         :param str fetch_fields: 表示本次查询需要召回哪些字段值，多个字段之间通过英文分号;分隔，对应控制台中的默认展示字段功能。默认使用全部可展示字段。         :param str qp: 指定要使用的查询分析规则，多个规则使用英文逗号,分隔。默认使用已上线规则         :param str disable: 关闭指定已生效的参数功能。         :param str first_rank_name: 设置粗排表达式名字。         :param str second_rank_name: 设置精排表达式名字。         :param str user_id: 用来标识发起当前搜索请求的终端用户。该值可以设置为下列值，优先级从高到低：1. 终端用户的长登录会员ID；2. 终端用户的移动设备imei标识；3. 终端用户的client_ip         :param str abtest: 使用A/B Test功能时需要设置该参数。         :param str category_prediction: 通过类目预测功能搜索时需要设置该参数。         :param str raw_query: 终端用户输入的query，用于类目预测相关模型训练。         :param str summary: 搜索结果摘要配置，可以指定某些字段进行飘红、截断等操作。         :return: SearchResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 搜索处理  # noqa: E501          系统提供了丰富的搜索语法以满足用户各种场景下的搜索需求。  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.v3_openapi_apps_app_name_search_get_with_http_info(app_name, query, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)         :param str query: 搜索主体，不能为空。主要支持子句有 config子句、query子句、sort子句、filter子句、aggregate子句、distinct子句 、kvpairs子句。 (required)         :param str fetch_fields: 表示本次查询需要召回哪些字段值，多个字段之间通过英文分号;分隔，对应控制台中的默认展示字段功能。默认使用全部可展示字段。         :param str qp: 指定要使用的查询分析规则，多个规则使用英文逗号,分隔。默认使用已上线规则         :param str disable: 关闭指定已生效的参数功能。         :param str first_rank_name: 设置粗排表达式名字。         :param str second_rank_name: 设置精排表达式名字。         :param str user_id: 用来标识发起当前搜索请求的终端用户。该值可以设置为下列值，优先级从高到低：1. 终端用户的长登录会员ID；2. 终端用户的移动设备imei标识；3. 终端用户的client_ip         :param str abtest: 使用A/B Test功能时需要设置该参数。         :param str category_prediction: 通过类目预测功能搜索时需要设置该参数。         :param str raw_query: 终端用户输入的query，用于类目预测相关模型训练。         :param str summary: 搜索结果摘要配置，可以指定某些字段进行飘红、截断等操作。         :return: SearchResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'app_name' is set # noqa: E501 # verify the required parameter 'query' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 下拉提示  # noqa: E501          下拉提示是搜索服务的基础功能，在用户输入查询词的过程中，智能推荐候选query，减少用户输入，帮助用户尽快找到想要的内容。  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.v3_openapi_apps_app_name_suggest_model_name_search_get(app_name, model_name, query, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)         :param str model_name: 下拉提示名称 (required)         :param str query: 搜索关键词（包含中文需进行urlencode编码） (required)         :param int hit: 下拉提示条数         :return: SuggestionResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 下拉提示  # noqa: E501          下拉提示是搜索服务的基础功能，在用户输入查询词的过程中，智能推荐候选query，减少用户输入，帮助用户尽快找到想要的内容。  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.v3_openapi_apps_app_name_suggest_model_name_search_get_with_http_info(app_name, model_name, query, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)         :param str model_name: 下拉提示名称 (required)         :param str query: 搜索关键词（包含中文需进行urlencode编码） (required)         :param int hit: 下拉提示条数         :return: SuggestionResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'app_name' is set # noqa: E501 # verify the required parameter 'model_name' is set # noqa: E501 # verify the required parameter 'query' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 数据处理  # noqa: E501          支持新增、更新、删除 等操作，以及对应批量操作  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.v3_openapi_apps_app_name_table_name_actions_bulk_post(app_name, table_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)         :param str table_name: 要将数据推送到应用中的表名 (required)         :param list[Document] document:         :return: Response                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 数据处理  # noqa: E501          支持新增、更新、删除 等操作，以及对应批量操作  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.v3_openapi_apps_app_name_table_name_actions_bulk_post_with_http_info(app_name, table_name, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str app_name: 表示应用名（新高级版/标准版是多应用版本类型，需要指定应用名访问，主要针对服务中的应用版本）。 (required)         :param str table_name: 要将数据推送到应用中的表名 (required)         :param list[Document] document:         :return: Response                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'app_name' is set # noqa: E501 # verify the required parameter 'table_name' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501