# coding: utf-8

"""
    Cherwell REST API

    Unofficial Python Cherwell REST API library.  # noqa: E501

    The version of the OpenAPI document: 9.3.2
    Contact: See AUTHORS.
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from pycherwell.api_client import ApiClient
from pycherwell.exceptions import (
    ApiTypeError,
    ApiValueError
)


class SearchesApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

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

    def searches_get_quick_search_configuration_for_bus_obs_v1(self, quick_search_configuration_request, **kwargs):  # noqa: E501
        """Get a Quick Search from a list of Business Object IDs  # noqa: E501

        Operation to build a Quick Search configuration that you can use to execute a Quick Search for multiple Business Objects. The configuration  includes supplied Business Object IDs and specific search items with the following options. Use the Option Key to determine if you can change the options. </br></br></br>ChangedOption</br></br>NonFinalStateOption</br></br>SearchAnyWordsOption</br></br>SearchAttachmentsOption</br></br>SearchRelatedOption</br></br>SortByOption</br></br></br>Option Key:</br></br>0 = None (Not selected and cannot select.)</br></br>1 = Use (Selected and cannot clear.)</br></br>2 = Display (Not selected and can select.)</br></br>3 = UseAndDisplay (Selected and can clear.)</br></br></br>SearchTargetType:</br></br>0 = BusOb (Business Object)</br></br>1 = DocRepository (Document Repository)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_quick_search_configuration_for_bus_obs_v1(quick_search_configuration_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QuickSearchConfigurationRequest quick_search_configuration_request: Request containing the Business Object IDs list. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: QuickSearchConfigurationResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_quick_search_configuration_for_bus_obs_v1_with_http_info(quick_search_configuration_request, **kwargs)  # noqa: E501

    def searches_get_quick_search_configuration_for_bus_obs_v1_with_http_info(self, quick_search_configuration_request, **kwargs):  # noqa: E501
        """Get a Quick Search from a list of Business Object IDs  # noqa: E501

        Operation to build a Quick Search configuration that you can use to execute a Quick Search for multiple Business Objects. The configuration  includes supplied Business Object IDs and specific search items with the following options. Use the Option Key to determine if you can change the options. </br></br></br>ChangedOption</br></br>NonFinalStateOption</br></br>SearchAnyWordsOption</br></br>SearchAttachmentsOption</br></br>SearchRelatedOption</br></br>SortByOption</br></br></br>Option Key:</br></br>0 = None (Not selected and cannot select.)</br></br>1 = Use (Selected and cannot clear.)</br></br>2 = Display (Not selected and can select.)</br></br>3 = UseAndDisplay (Selected and can clear.)</br></br></br>SearchTargetType:</br></br>0 = BusOb (Business Object)</br></br>1 = DocRepository (Document Repository)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_quick_search_configuration_for_bus_obs_v1_with_http_info(quick_search_configuration_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QuickSearchConfigurationRequest quick_search_configuration_request: Request containing the Business Object IDs list. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(QuickSearchConfigurationResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['quick_search_configuration_request']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_quick_search_configuration_for_bus_obs_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'quick_search_configuration_request' is set
        if self.api_client.client_side_validation and ('quick_search_configuration_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['quick_search_configuration_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `quick_search_configuration_request` when calling `searches_get_quick_search_configuration_for_bus_obs_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getquicksearchconfigurationforbusobs', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='QuickSearchConfigurationResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_quick_search_configuration_for_bus_obs_with_view_rights_v1(self, **kwargs):  # noqa: E501
        """Get a Quick Search by Business Objects with view rights  # noqa: E501

        Operation to get a Quick Search configuration that you can use to execute a Quick Search based the current user's Business Object view rights. The configuration  includes supplied Business Object IDs and specific search items with the following options. Use the Option Key to determine if you can change the options.</br></br>ChangedOption</br></br>NonFinalStateOption</br></br>SearchAnyWordsOption</br></br>SearchAttachmentsOption</br></br>SearchRelatedOption</br></br>SortByOption</br></br></br>Option Key:</br></br>0 = None (Not selected and cannot select.)</br></br>1 = Use (Selected and cannot clear.)</br></br>2 = Display (Not selected and can select.)</br></br>3 = UseAndDisplay (Selected and can clear.)</br></br></br>SearchTargetType:</br></br>0 = BusOb (Business Object)</br></br>1 = DocRepository (Document Repository)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_quick_search_configuration_for_bus_obs_with_view_rights_v1(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: QuickSearchConfigurationResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_quick_search_configuration_for_bus_obs_with_view_rights_v1_with_http_info(**kwargs)  # noqa: E501

    def searches_get_quick_search_configuration_for_bus_obs_with_view_rights_v1_with_http_info(self, **kwargs):  # noqa: E501
        """Get a Quick Search by Business Objects with view rights  # noqa: E501

        Operation to get a Quick Search configuration that you can use to execute a Quick Search based the current user's Business Object view rights. The configuration  includes supplied Business Object IDs and specific search items with the following options. Use the Option Key to determine if you can change the options.</br></br>ChangedOption</br></br>NonFinalStateOption</br></br>SearchAnyWordsOption</br></br>SearchAttachmentsOption</br></br>SearchRelatedOption</br></br>SortByOption</br></br></br>Option Key:</br></br>0 = None (Not selected and cannot select.)</br></br>1 = Use (Selected and cannot clear.)</br></br>2 = Display (Not selected and can select.)</br></br>3 = UseAndDisplay (Selected and can clear.)</br></br></br>SearchTargetType:</br></br>0 = BusOb (Business Object)</br></br>1 = DocRepository (Document Repository)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_quick_search_configuration_for_bus_obs_with_view_rights_v1_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(QuickSearchConfigurationResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_quick_search_configuration_for_bus_obs_with_view_rights_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getquicksearchconfigurationforbusobswithviewrights', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='QuickSearchConfigurationResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_quick_search_results_v1(self, quick_search_request, **kwargs):  # noqa: E501
        """Execute a Quick Search from a list of Business Object IDs and search text  # noqa: E501

        Operation to execute a Quick Search using a list of Business Object IDs and search text.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_quick_search_results_v1(quick_search_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QuickSearchRequest quick_search_request: Request object listing Business Object IDs and search text. Leave out the entire Business Object IDs parameter and all configured quick search Business Objects will be searched. (required)
        :param bool include_links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SimpleResultsList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_quick_search_results_v1_with_http_info(quick_search_request, **kwargs)  # noqa: E501

    def searches_get_quick_search_results_v1_with_http_info(self, quick_search_request, **kwargs):  # noqa: E501
        """Execute a Quick Search from a list of Business Object IDs and search text  # noqa: E501

        Operation to execute a Quick Search using a list of Business Object IDs and search text.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_quick_search_results_v1_with_http_info(quick_search_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QuickSearchRequest quick_search_request: Request object listing Business Object IDs and search text. Leave out the entire Business Object IDs parameter and all configured quick search Business Objects will be searched. (required)
        :param bool include_links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SimpleResultsList, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['quick_search_request', 'include_links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_quick_search_results_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'quick_search_request' is set
        if self.api_client.client_side_validation and ('quick_search_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['quick_search_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `quick_search_request` when calling `searches_get_quick_search_results_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'include_links' in local_var_params and local_var_params['include_links'] is not None:  # noqa: E501
            query_params.append(('includeLinks', local_var_params['include_links']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getquicksearchresults', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SimpleResultsList',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_quick_search_specific_results_v1(self, quick_search_specific_request, **kwargs):  # noqa: E501
        """Execute a Quick Search on a specific Business Object  # noqa: E501

        Operation to execute a Quick Search for a specific Business Object ID. Use \"Get a Quick Search from a list of Business Object IDs\" to find values for specific search item options, such as NonFinalStateOption.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_quick_search_specific_results_v1(quick_search_specific_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QuickSearchSpecificRequest quick_search_specific_request: Request object containing the parameters for specific Business Object Quick Search execution. (required)
        :param bool include_schema: Flag to include the schema for the results.
        :param bool include_location_fields: Flag to include location fields in the results.
        :param bool include_links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SearchResultsTableResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_quick_search_specific_results_v1_with_http_info(quick_search_specific_request, **kwargs)  # noqa: E501

    def searches_get_quick_search_specific_results_v1_with_http_info(self, quick_search_specific_request, **kwargs):  # noqa: E501
        """Execute a Quick Search on a specific Business Object  # noqa: E501

        Operation to execute a Quick Search for a specific Business Object ID. Use \"Get a Quick Search from a list of Business Object IDs\" to find values for specific search item options, such as NonFinalStateOption.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_quick_search_specific_results_v1_with_http_info(quick_search_specific_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QuickSearchSpecificRequest quick_search_specific_request: Request object containing the parameters for specific Business Object Quick Search execution. (required)
        :param bool include_schema: Flag to include the schema for the results.
        :param bool include_location_fields: Flag to include location fields in the results.
        :param bool include_links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SearchResultsTableResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['quick_search_specific_request', 'include_schema', 'include_location_fields', 'include_links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_quick_search_specific_results_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'quick_search_specific_request' is set
        if self.api_client.client_side_validation and ('quick_search_specific_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['quick_search_specific_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `quick_search_specific_request` when calling `searches_get_quick_search_specific_results_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'include_schema' in local_var_params and local_var_params['include_schema'] is not None:  # noqa: E501
            query_params.append(('includeSchema', local_var_params['include_schema']))  # noqa: E501
        if 'include_location_fields' in local_var_params and local_var_params['include_location_fields'] is not None:  # noqa: E501
            query_params.append(('includeLocationFields', local_var_params['include_location_fields']))  # noqa: E501
        if 'include_links' in local_var_params and local_var_params['include_links'] is not None:  # noqa: E501
            query_params.append(('includeLinks', local_var_params['include_links']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getquicksearchspecificresults', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchResultsTableResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_quick_search_specific_results_v2(self, quick_search_specific_request, **kwargs):  # noqa: E501
        """Execute a Quick Search on a specific Business Object  # noqa: E501

        Operation to execute a Quick Search for a specific Business Object ID. Use \"Get a Quick Search from a list of Business Object IDs\" to find values for specific search item options, such as NonFinalStateOption.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_quick_search_specific_results_v2(quick_search_specific_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QuickSearchSpecificRequest quick_search_specific_request: Request object containing the parameters for specific Business Object Quick Search execution. (required)
        :param bool include_schema: Flag to include the schema for the results.
        :param bool include_location_fields: Flag to include location fields in the results.
        :param bool include_links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: QuickSearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_quick_search_specific_results_v2_with_http_info(quick_search_specific_request, **kwargs)  # noqa: E501

    def searches_get_quick_search_specific_results_v2_with_http_info(self, quick_search_specific_request, **kwargs):  # noqa: E501
        """Execute a Quick Search on a specific Business Object  # noqa: E501

        Operation to execute a Quick Search for a specific Business Object ID. Use \"Get a Quick Search from a list of Business Object IDs\" to find values for specific search item options, such as NonFinalStateOption.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_quick_search_specific_results_v2_with_http_info(quick_search_specific_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QuickSearchSpecificRequest quick_search_specific_request: Request object containing the parameters for specific Business Object Quick Search execution. (required)
        :param bool include_schema: Flag to include the schema for the results.
        :param bool include_location_fields: Flag to include location fields in the results.
        :param bool include_links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(QuickSearchResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['quick_search_specific_request', 'include_schema', 'include_location_fields', 'include_links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_quick_search_specific_results_v2" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'quick_search_specific_request' is set
        if self.api_client.client_side_validation and ('quick_search_specific_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['quick_search_specific_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `quick_search_specific_request` when calling `searches_get_quick_search_specific_results_v2`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'include_schema' in local_var_params and local_var_params['include_schema'] is not None:  # noqa: E501
            query_params.append(('includeSchema', local_var_params['include_schema']))  # noqa: E501
        if 'include_location_fields' in local_var_params and local_var_params['include_location_fields'] is not None:  # noqa: E501
            query_params.append(('includeLocationFields', local_var_params['include_location_fields']))  # noqa: E501
        if 'include_links' in local_var_params and local_var_params['include_links'] is not None:  # noqa: E501
            query_params.append(('includeLinks', local_var_params['include_links']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V2/getquicksearchspecificresults', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='QuickSearchResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_items_by_association_scope_scope_owner_folder_v1(self, association, scope, scopeowner, folder, **kwargs):  # noqa: E501
        """Get all saved searches by Folder ID  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_scope_owner_folder_v1(association, scope, scopeowner, folder, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param str scopeowner: Use to filter results by scope owner ID. (required)
        :param str folder: Use to filter results by Search Group folder ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SearchItemResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_items_by_association_scope_scope_owner_folder_v1_with_http_info(association, scope, scopeowner, folder, **kwargs)  # noqa: E501

    def searches_get_search_items_by_association_scope_scope_owner_folder_v1_with_http_info(self, association, scope, scopeowner, folder, **kwargs):  # noqa: E501
        """Get all saved searches by Folder ID  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_scope_owner_folder_v1_with_http_info(association, scope, scopeowner, folder, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param str scopeowner: Use to filter results by scope owner ID. (required)
        :param str folder: Use to filter results by Search Group folder ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SearchItemResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'scope', 'scopeowner', 'folder', 'links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_items_by_association_scope_scope_owner_folder_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_items_by_association_scope_scope_owner_folder_v1`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `searches_get_search_items_by_association_scope_scope_owner_folder_v1`")  # noqa: E501
        # verify the required parameter 'scopeowner' is set
        if self.api_client.client_side_validation and ('scopeowner' not in local_var_params or  # noqa: E501
                                                        local_var_params['scopeowner'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scopeowner` when calling `searches_get_search_items_by_association_scope_scope_owner_folder_v1`")  # noqa: E501
        # verify the required parameter 'folder' is set
        if self.api_client.client_side_validation and ('folder' not in local_var_params or  # noqa: E501
                                                        local_var_params['folder'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `folder` when calling `searches_get_search_items_by_association_scope_scope_owner_folder_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501
        if 'scopeowner' in local_var_params:
            path_params['scopeowner'] = local_var_params['scopeowner']  # noqa: E501
        if 'folder' in local_var_params:
            path_params['folder'] = local_var_params['folder']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchitems/association/{association}/scope/{scope}/scopeowner/{scopeowner}/folder/{folder}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchItemResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_items_by_association_scope_scope_owner_folder_v2(self, association, scope, scopeowner, folder, **kwargs):  # noqa: E501
        """Get all saved searches by Folder ID  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_scope_owner_folder_v2(association, scope, scopeowner, folder, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param str scopeowner: Use to filter results by scope owner ID. (required)
        :param str folder: Use to filter results by Search Group folder ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ManagerData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_items_by_association_scope_scope_owner_folder_v2_with_http_info(association, scope, scopeowner, folder, **kwargs)  # noqa: E501

    def searches_get_search_items_by_association_scope_scope_owner_folder_v2_with_http_info(self, association, scope, scopeowner, folder, **kwargs):  # noqa: E501
        """Get all saved searches by Folder ID  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_scope_owner_folder_v2_with_http_info(association, scope, scopeowner, folder, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param str scopeowner: Use to filter results by scope owner ID. (required)
        :param str folder: Use to filter results by Search Group folder ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ManagerData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'scope', 'scopeowner', 'folder', 'links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_items_by_association_scope_scope_owner_folder_v2" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_items_by_association_scope_scope_owner_folder_v2`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `searches_get_search_items_by_association_scope_scope_owner_folder_v2`")  # noqa: E501
        # verify the required parameter 'scopeowner' is set
        if self.api_client.client_side_validation and ('scopeowner' not in local_var_params or  # noqa: E501
                                                        local_var_params['scopeowner'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scopeowner` when calling `searches_get_search_items_by_association_scope_scope_owner_folder_v2`")  # noqa: E501
        # verify the required parameter 'folder' is set
        if self.api_client.client_side_validation and ('folder' not in local_var_params or  # noqa: E501
                                                        local_var_params['folder'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `folder` when calling `searches_get_search_items_by_association_scope_scope_owner_folder_v2`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501
        if 'scopeowner' in local_var_params:
            path_params['scopeowner'] = local_var_params['scopeowner']  # noqa: E501
        if 'folder' in local_var_params:
            path_params['folder'] = local_var_params['folder']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V2/getsearchitems/association/{association}/scope/{scope}/scopeowner/{scopeowner}/folder/{folder}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ManagerData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_items_by_association_scope_scope_owner_v1(self, association, scope, scopeowner, **kwargs):  # noqa: E501
        """Get all saved searches by scope owner (sub scope)  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_scope_owner_v1(association, scope, scopeowner, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param str scopeowner: Use to filter results by scope owner ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SearchItemResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_items_by_association_scope_scope_owner_v1_with_http_info(association, scope, scopeowner, **kwargs)  # noqa: E501

    def searches_get_search_items_by_association_scope_scope_owner_v1_with_http_info(self, association, scope, scopeowner, **kwargs):  # noqa: E501
        """Get all saved searches by scope owner (sub scope)  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_scope_owner_v1_with_http_info(association, scope, scopeowner, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param str scopeowner: Use to filter results by scope owner ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SearchItemResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'scope', 'scopeowner', 'links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_items_by_association_scope_scope_owner_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_items_by_association_scope_scope_owner_v1`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `searches_get_search_items_by_association_scope_scope_owner_v1`")  # noqa: E501
        # verify the required parameter 'scopeowner' is set
        if self.api_client.client_side_validation and ('scopeowner' not in local_var_params or  # noqa: E501
                                                        local_var_params['scopeowner'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scopeowner` when calling `searches_get_search_items_by_association_scope_scope_owner_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501
        if 'scopeowner' in local_var_params:
            path_params['scopeowner'] = local_var_params['scopeowner']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchitems/association/{association}/scope/{scope}/scopeowner/{scopeowner}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchItemResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_items_by_association_scope_scope_owner_v2(self, association, scope, scopeowner, **kwargs):  # noqa: E501
        """Get all saved searches by scope owner (sub scope)  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_scope_owner_v2(association, scope, scopeowner, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param str scopeowner: Use to filter results by scope owner ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ManagerData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_items_by_association_scope_scope_owner_v2_with_http_info(association, scope, scopeowner, **kwargs)  # noqa: E501

    def searches_get_search_items_by_association_scope_scope_owner_v2_with_http_info(self, association, scope, scopeowner, **kwargs):  # noqa: E501
        """Get all saved searches by scope owner (sub scope)  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_scope_owner_v2_with_http_info(association, scope, scopeowner, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param str scopeowner: Use to filter results by scope owner ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ManagerData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'scope', 'scopeowner', 'links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_items_by_association_scope_scope_owner_v2" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_items_by_association_scope_scope_owner_v2`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `searches_get_search_items_by_association_scope_scope_owner_v2`")  # noqa: E501
        # verify the required parameter 'scopeowner' is set
        if self.api_client.client_side_validation and ('scopeowner' not in local_var_params or  # noqa: E501
                                                        local_var_params['scopeowner'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scopeowner` when calling `searches_get_search_items_by_association_scope_scope_owner_v2`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501
        if 'scopeowner' in local_var_params:
            path_params['scopeowner'] = local_var_params['scopeowner']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V2/getsearchitems/association/{association}/scope/{scope}/scopeowner/{scopeowner}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ManagerData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_items_by_association_scope_v1(self, association, scope, **kwargs):  # noqa: E501
        """Get all saved searches by scope  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_v1(association, scope, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SearchItemResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_items_by_association_scope_v1_with_http_info(association, scope, **kwargs)  # noqa: E501

    def searches_get_search_items_by_association_scope_v1_with_http_info(self, association, scope, **kwargs):  # noqa: E501
        """Get all saved searches by scope  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_v1_with_http_info(association, scope, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SearchItemResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'scope', 'links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_items_by_association_scope_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_items_by_association_scope_v1`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `searches_get_search_items_by_association_scope_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchitems/association/{association}/scope/{scope}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchItemResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_items_by_association_scope_v2(self, association, scope, **kwargs):  # noqa: E501
        """Get all saved searches by scope  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_v2(association, scope, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ManagerData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_items_by_association_scope_v2_with_http_info(association, scope, **kwargs)  # noqa: E501

    def searches_get_search_items_by_association_scope_v2_with_http_info(self, association, scope, **kwargs):  # noqa: E501
        """Get all saved searches by scope  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_scope_v2_with_http_info(association, scope, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param str scope: Use to filter results by scope name or ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ManagerData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'scope', 'links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_items_by_association_scope_v2" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_items_by_association_scope_v2`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `searches_get_search_items_by_association_scope_v2`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V2/getsearchitems/association/{association}/scope/{scope}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ManagerData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_items_by_association_v1(self, association, **kwargs):  # noqa: E501
        """Get all saved searches by Business Object association  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_v1(association, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SearchItemResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_items_by_association_v1_with_http_info(association, **kwargs)  # noqa: E501

    def searches_get_search_items_by_association_v1_with_http_info(self, association, **kwargs):  # noqa: E501
        """Get all saved searches by Business Object association  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_v1_with_http_info(association, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SearchItemResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_items_by_association_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_items_by_association_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchitems/association/{association}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchItemResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_items_by_association_v2(self, association, **kwargs):  # noqa: E501
        """Get all saved searches by Business Object association  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_v2(association, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ManagerData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_items_by_association_v2_with_http_info(association, **kwargs)  # noqa: E501

    def searches_get_search_items_by_association_v2_with_http_info(self, association, **kwargs):  # noqa: E501
        """Get all saved searches by Business Object association  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_by_association_v2_with_http_info(association, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Use to filter results by Business Object association ID. (required)
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ManagerData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_items_by_association_v2" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_items_by_association_v2`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V2/getsearchitems/association/{association}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ManagerData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_items_v1(self, **kwargs):  # noqa: E501
        """Get all saved searches by default Business Object association  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_v1(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SearchItemResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_items_v1_with_http_info(**kwargs)  # noqa: E501

    def searches_get_search_items_v1_with_http_info(self, **kwargs):  # noqa: E501
        """Get all saved searches by default Business Object association  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_v1_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SearchItemResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_items_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchitems', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchItemResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_items_v2(self, **kwargs):  # noqa: E501
        """Get all saved searches by default Business Object association  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_v2(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: ManagerData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_items_v2_with_http_info(**kwargs)  # noqa: E501

    def searches_get_search_items_v2_with_http_info(self, **kwargs):  # noqa: E501
        """Get all saved searches by default Business Object association  # noqa: E501

        Operation that returns a tree of saved queries, including scope, search name, IDs, and location within the tree.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_items_v2_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param bool links: Flag to include hyperlinks in results. Default is false. 
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ManagerData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['links']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_items_v2" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'links' in local_var_params and local_var_params['links'] is not None:  # noqa: E501
            query_params.append(('links', local_var_params['links']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V2/getsearchitems', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ManagerData',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_results_ad_hoc_v1(self, search_results_request, **kwargs):  # noqa: E501
        """Run an ad-hoc search  # noqa: E501

        Operation that runs an ad-hoc Business Object search. To execute a search with Prompts, the PromptId and Value are required in the Prompt request object.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_ad_hoc_v1(search_results_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param SearchResultsRequest search_results_request: Request object to specify search parameters. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SearchResultsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_results_ad_hoc_v1_with_http_info(search_results_request, **kwargs)  # noqa: E501

    def searches_get_search_results_ad_hoc_v1_with_http_info(self, search_results_request, **kwargs):  # noqa: E501
        """Run an ad-hoc search  # noqa: E501

        Operation that runs an ad-hoc Business Object search. To execute a search with Prompts, the PromptId and Value are required in the Prompt request object.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_ad_hoc_v1_with_http_info(search_results_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param SearchResultsRequest search_results_request: Request object to specify search parameters. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SearchResultsResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['search_results_request']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_results_ad_hoc_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'search_results_request' is set
        if self.api_client.client_side_validation and ('search_results_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['search_results_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `search_results_request` when calling `searches_get_search_results_ad_hoc_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchresults', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchResultsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_results_by_id_v1(self, association, scope, scopeowner, searchid, **kwargs):  # noqa: E501
        """Run a saved search by internal ID  # noqa: E501

        Operation that returns the paged results of a saved search. When the search contains Prompts, the response contains the Prompt. Send the Prompt and the original operation parameters to  SearchResultsRequest to the getsearchresults ad-hoc http post operation.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_by_id_v1(association, scope, scopeowner, searchid, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Specify the Business Object association ID for the saved search. (required)
        :param str scope: Specify the scope name or ID for the saved search. (required)
        :param str scopeowner: Specify the scope owner ID for the saved search. Use (None) when no scope owner exists. (required)
        :param str searchid: Specify the internal ID for the saved search. Use \"Run a saved search by name\" if you do not have the internal ID. (required)
        :param str search_term: Specify search text filter the results. Example: Use \"Service Request\" to filter Incident results to include only service requests.
        :param int pagenumber: Specify the page number of the result set to return.
        :param int pagesize: Specify the number of rows to return per page.
        :param bool includeschema: Use to include the table schema of the saved search. If false, results contain the fieldid and field value without field information. Default is false.
        :param bool results_as_simple_results_list: Indicates if the results should be returned in a simple results list format or a table format. Default is a table format.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SearchResultsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_results_by_id_v1_with_http_info(association, scope, scopeowner, searchid, **kwargs)  # noqa: E501

    def searches_get_search_results_by_id_v1_with_http_info(self, association, scope, scopeowner, searchid, **kwargs):  # noqa: E501
        """Run a saved search by internal ID  # noqa: E501

        Operation that returns the paged results of a saved search. When the search contains Prompts, the response contains the Prompt. Send the Prompt and the original operation parameters to  SearchResultsRequest to the getsearchresults ad-hoc http post operation.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_by_id_v1_with_http_info(association, scope, scopeowner, searchid, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Specify the Business Object association ID for the saved search. (required)
        :param str scope: Specify the scope name or ID for the saved search. (required)
        :param str scopeowner: Specify the scope owner ID for the saved search. Use (None) when no scope owner exists. (required)
        :param str searchid: Specify the internal ID for the saved search. Use \"Run a saved search by name\" if you do not have the internal ID. (required)
        :param str search_term: Specify search text filter the results. Example: Use \"Service Request\" to filter Incident results to include only service requests.
        :param int pagenumber: Specify the page number of the result set to return.
        :param int pagesize: Specify the number of rows to return per page.
        :param bool includeschema: Use to include the table schema of the saved search. If false, results contain the fieldid and field value without field information. Default is false.
        :param bool results_as_simple_results_list: Indicates if the results should be returned in a simple results list format or a table format. Default is a table format.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SearchResultsResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'scope', 'scopeowner', 'searchid', 'search_term', 'pagenumber', 'pagesize', 'includeschema', 'results_as_simple_results_list']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_results_by_id_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_results_by_id_v1`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `searches_get_search_results_by_id_v1`")  # noqa: E501
        # verify the required parameter 'scopeowner' is set
        if self.api_client.client_side_validation and ('scopeowner' not in local_var_params or  # noqa: E501
                                                        local_var_params['scopeowner'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scopeowner` when calling `searches_get_search_results_by_id_v1`")  # noqa: E501
        # verify the required parameter 'searchid' is set
        if self.api_client.client_side_validation and ('searchid' not in local_var_params or  # noqa: E501
                                                        local_var_params['searchid'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `searchid` when calling `searches_get_search_results_by_id_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501
        if 'scopeowner' in local_var_params:
            path_params['scopeowner'] = local_var_params['scopeowner']  # noqa: E501
        if 'searchid' in local_var_params:
            path_params['searchid'] = local_var_params['searchid']  # noqa: E501

        query_params = []
        if 'search_term' in local_var_params and local_var_params['search_term'] is not None:  # noqa: E501
            query_params.append(('searchTerm', local_var_params['search_term']))  # noqa: E501
        if 'pagenumber' in local_var_params and local_var_params['pagenumber'] is not None:  # noqa: E501
            query_params.append(('pagenumber', local_var_params['pagenumber']))  # noqa: E501
        if 'pagesize' in local_var_params and local_var_params['pagesize'] is not None:  # noqa: E501
            query_params.append(('pagesize', local_var_params['pagesize']))  # noqa: E501
        if 'includeschema' in local_var_params and local_var_params['includeschema'] is not None:  # noqa: E501
            query_params.append(('includeschema', local_var_params['includeschema']))  # noqa: E501
        if 'results_as_simple_results_list' in local_var_params and local_var_params['results_as_simple_results_list'] is not None:  # noqa: E501
            query_params.append(('resultsAsSimpleResultsList', local_var_params['results_as_simple_results_list']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchresults/association/{association}/scope/{scope}/scopeowner/{scopeowner}/searchid/{searchid}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchResultsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_results_by_name_v1(self, association, scope, scopeowner, searchname, **kwargs):  # noqa: E501
        """Run a saved search by name  # noqa: E501

        Operation that returns the paged results of a saved search. When the search contains Prompts, the response contains the Prompt. Send the Prompt and the original operation parameters to  SearchResultsRequest to the getsearchresults ad-hoc http post operation.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_by_name_v1(association, scope, scopeowner, searchname, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Specify the Business Object association ID for the saved search. (required)
        :param str scope: Specify the scope name or ID for the saved search. (required)
        :param str scopeowner: Specify the scope owner ID for the saved search. Use (None) when no scope owner exists. (required)
        :param str searchname: Specify the name of the saved search. (required)
        :param str search_term: Specify search text filter the results. Example: Use \"Service Request\" to filter Incident results to include only service requests.
        :param int pagenumber: Specify the page number of the result set to return.
        :param int pagesize: Specify the number of rows to return per page.
        :param bool includeschema: Use to include the table schema of the saved search. If false, results contain the fieldid and field value without field information. Default is false.
        :param bool results_as_simple_results_list: Indicates if the results should be returned in a simple results list format or a table format. Default is a table format.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: SearchResultsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_results_by_name_v1_with_http_info(association, scope, scopeowner, searchname, **kwargs)  # noqa: E501

    def searches_get_search_results_by_name_v1_with_http_info(self, association, scope, scopeowner, searchname, **kwargs):  # noqa: E501
        """Run a saved search by name  # noqa: E501

        Operation that returns the paged results of a saved search. When the search contains Prompts, the response contains the Prompt. Send the Prompt and the original operation parameters to  SearchResultsRequest to the getsearchresults ad-hoc http post operation.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_by_name_v1_with_http_info(association, scope, scopeowner, searchname, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Specify the Business Object association ID for the saved search. (required)
        :param str scope: Specify the scope name or ID for the saved search. (required)
        :param str scopeowner: Specify the scope owner ID for the saved search. Use (None) when no scope owner exists. (required)
        :param str searchname: Specify the name of the saved search. (required)
        :param str search_term: Specify search text filter the results. Example: Use \"Service Request\" to filter Incident results to include only service requests.
        :param int pagenumber: Specify the page number of the result set to return.
        :param int pagesize: Specify the number of rows to return per page.
        :param bool includeschema: Use to include the table schema of the saved search. If false, results contain the fieldid and field value without field information. Default is false.
        :param bool results_as_simple_results_list: Indicates if the results should be returned in a simple results list format or a table format. Default is a table format.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SearchResultsResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'scope', 'scopeowner', 'searchname', 'search_term', 'pagenumber', 'pagesize', 'includeschema', 'results_as_simple_results_list']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_results_by_name_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_results_by_name_v1`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `searches_get_search_results_by_name_v1`")  # noqa: E501
        # verify the required parameter 'scopeowner' is set
        if self.api_client.client_side_validation and ('scopeowner' not in local_var_params or  # noqa: E501
                                                        local_var_params['scopeowner'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scopeowner` when calling `searches_get_search_results_by_name_v1`")  # noqa: E501
        # verify the required parameter 'searchname' is set
        if self.api_client.client_side_validation and ('searchname' not in local_var_params or  # noqa: E501
                                                        local_var_params['searchname'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `searchname` when calling `searches_get_search_results_by_name_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501
        if 'scopeowner' in local_var_params:
            path_params['scopeowner'] = local_var_params['scopeowner']  # noqa: E501
        if 'searchname' in local_var_params:
            path_params['searchname'] = local_var_params['searchname']  # noqa: E501

        query_params = []
        if 'search_term' in local_var_params and local_var_params['search_term'] is not None:  # noqa: E501
            query_params.append(('searchTerm', local_var_params['search_term']))  # noqa: E501
        if 'pagenumber' in local_var_params and local_var_params['pagenumber'] is not None:  # noqa: E501
            query_params.append(('pagenumber', local_var_params['pagenumber']))  # noqa: E501
        if 'pagesize' in local_var_params and local_var_params['pagesize'] is not None:  # noqa: E501
            query_params.append(('pagesize', local_var_params['pagesize']))  # noqa: E501
        if 'includeschema' in local_var_params and local_var_params['includeschema'] is not None:  # noqa: E501
            query_params.append(('includeschema', local_var_params['includeschema']))  # noqa: E501
        if 'results_as_simple_results_list' in local_var_params and local_var_params['results_as_simple_results_list'] is not None:  # noqa: E501
            query_params.append(('resultsAsSimpleResultsList', local_var_params['results_as_simple_results_list']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchresults/association/{association}/scope/{scope}/scopeowner/{scopeowner}/searchname/{searchname}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchResultsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_results_export_ad_hoc_v1(self, export_search_results_request, **kwargs):  # noqa: E501
        """Export an ad-hoc search  # noqa: E501

        Operation that returns an ad-hoc search in a specified export format: 0=CSV, 1=Excel, 2=Tab, 3=Word, 4=Custom Separator, 5=Simple JSON. To execute a search with Prompts, the PromptId and Value are required in the Prompt request object.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_export_ad_hoc_v1(export_search_results_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param ExportSearchResultsRequest export_search_results_request: Request object to specify search parameters and export format. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_results_export_ad_hoc_v1_with_http_info(export_search_results_request, **kwargs)  # noqa: E501

    def searches_get_search_results_export_ad_hoc_v1_with_http_info(self, export_search_results_request, **kwargs):  # noqa: E501
        """Export an ad-hoc search  # noqa: E501

        Operation that returns an ad-hoc search in a specified export format: 0=CSV, 1=Excel, 2=Tab, 3=Word, 4=Custom Separator, 5=Simple JSON. To execute a search with Prompts, the PromptId and Value are required in the Prompt request object.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_export_ad_hoc_v1_with_http_info(export_search_results_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param ExportSearchResultsRequest export_search_results_request: Request object to specify search parameters and export format. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['export_search_results_request']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_results_export_ad_hoc_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'export_search_results_request' is set
        if self.api_client.client_side_validation and ('export_search_results_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['export_search_results_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `export_search_results_request` when calling `searches_get_search_results_export_ad_hoc_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchresultsexport', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_results_export_by_id_v1(self, association, scope, scopeowner, searchid, exportformat, **kwargs):  # noqa: E501
        """Export a saved search by ID  # noqa: E501

        Operation that returns the paged results of a saved search in a specified format. When the search contains Prompts, the response contains the Prompt. Send the Prompt and the original operation parameters to  SearchResultsRequest to the getsearchresultsexport ad-hoc http post operation.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_export_by_id_v1(association, scope, scopeowner, searchid, exportformat, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Specify the Business Object association ID for the saved search. (required)
        :param str scope: Specify the scope name or ID for the saved search. (required)
        :param str scopeowner: Specify the scope owner ID for the saved search. Use (None) when no scope owner exists. (required)
        :param str searchid: Specify the internal ID for the saved search. Use \"Run a saved search by name\" if you do not have the internal ID. (required)
        :param str exportformat: Specify the format of the export (required)
        :param str search_term: Specify search text filter the results. Example: Use \"Service Request\" to filter Incident results to include only service requests.
        :param int pagenumber: Specify the page number of the result set to return.
        :param int pagesize: Specify the number of rows to return per page.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_results_export_by_id_v1_with_http_info(association, scope, scopeowner, searchid, exportformat, **kwargs)  # noqa: E501

    def searches_get_search_results_export_by_id_v1_with_http_info(self, association, scope, scopeowner, searchid, exportformat, **kwargs):  # noqa: E501
        """Export a saved search by ID  # noqa: E501

        Operation that returns the paged results of a saved search in a specified format. When the search contains Prompts, the response contains the Prompt. Send the Prompt and the original operation parameters to  SearchResultsRequest to the getsearchresultsexport ad-hoc http post operation.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_export_by_id_v1_with_http_info(association, scope, scopeowner, searchid, exportformat, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Specify the Business Object association ID for the saved search. (required)
        :param str scope: Specify the scope name or ID for the saved search. (required)
        :param str scopeowner: Specify the scope owner ID for the saved search. Use (None) when no scope owner exists. (required)
        :param str searchid: Specify the internal ID for the saved search. Use \"Run a saved search by name\" if you do not have the internal ID. (required)
        :param str exportformat: Specify the format of the export (required)
        :param str search_term: Specify search text filter the results. Example: Use \"Service Request\" to filter Incident results to include only service requests.
        :param int pagenumber: Specify the page number of the result set to return.
        :param int pagesize: Specify the number of rows to return per page.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'scope', 'scopeowner', 'searchid', 'exportformat', 'search_term', 'pagenumber', 'pagesize']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_results_export_by_id_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_results_export_by_id_v1`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `searches_get_search_results_export_by_id_v1`")  # noqa: E501
        # verify the required parameter 'scopeowner' is set
        if self.api_client.client_side_validation and ('scopeowner' not in local_var_params or  # noqa: E501
                                                        local_var_params['scopeowner'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scopeowner` when calling `searches_get_search_results_export_by_id_v1`")  # noqa: E501
        # verify the required parameter 'searchid' is set
        if self.api_client.client_side_validation and ('searchid' not in local_var_params or  # noqa: E501
                                                        local_var_params['searchid'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `searchid` when calling `searches_get_search_results_export_by_id_v1`")  # noqa: E501
        # verify the required parameter 'exportformat' is set
        if self.api_client.client_side_validation and ('exportformat' not in local_var_params or  # noqa: E501
                                                        local_var_params['exportformat'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `exportformat` when calling `searches_get_search_results_export_by_id_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501
        if 'scopeowner' in local_var_params:
            path_params['scopeowner'] = local_var_params['scopeowner']  # noqa: E501
        if 'searchid' in local_var_params:
            path_params['searchid'] = local_var_params['searchid']  # noqa: E501
        if 'exportformat' in local_var_params:
            path_params['exportformat'] = local_var_params['exportformat']  # noqa: E501

        query_params = []
        if 'search_term' in local_var_params and local_var_params['search_term'] is not None:  # noqa: E501
            query_params.append(('searchTerm', local_var_params['search_term']))  # noqa: E501
        if 'pagenumber' in local_var_params and local_var_params['pagenumber'] is not None:  # noqa: E501
            query_params.append(('pagenumber', local_var_params['pagenumber']))  # noqa: E501
        if 'pagesize' in local_var_params and local_var_params['pagesize'] is not None:  # noqa: E501
            query_params.append(('pagesize', local_var_params['pagesize']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchresultsexport/association/{association}/scope/{scope}/scopeowner/{scopeowner}/searchid/{searchid}/exportformat/{exportformat}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def searches_get_search_results_export_by_name_v1(self, association, scope, scopeowner, searchname, exportformat, **kwargs):  # noqa: E501
        """Export a saved search by name  # noqa: E501

        Operation that returns the paged results of a saved search in a specified format. When the search contains Prompts, the response contains the Prompt. Send the Prompt and the original operation parameters to  SearchResultsRequest to the getsearchresultsexport ad-hoc http post operation.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_export_by_name_v1(association, scope, scopeowner, searchname, exportformat, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Specify the Business Object association ID for the saved search. (required)
        :param str scope: Specify the scope name or ID for the saved search. (required)
        :param str scopeowner: Specify the scope owner ID for the saved search. Use (None) when no scope owner exists. (required)
        :param str searchname: Specify the name of the saved search. (required)
        :param str exportformat: Specify the format of the export (required)
        :param str search_term: Specify search text filter the results. Example: Use \"Service Request\" to filter Incident results to include only service requests.
        :param int pagenumber: Specify the page number of the result set to return.
        :param int pagesize: Specify the number of rows to return per page.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.searches_get_search_results_export_by_name_v1_with_http_info(association, scope, scopeowner, searchname, exportformat, **kwargs)  # noqa: E501

    def searches_get_search_results_export_by_name_v1_with_http_info(self, association, scope, scopeowner, searchname, exportformat, **kwargs):  # noqa: E501
        """Export a saved search by name  # noqa: E501

        Operation that returns the paged results of a saved search in a specified format. When the search contains Prompts, the response contains the Prompt. Send the Prompt and the original operation parameters to  SearchResultsRequest to the getsearchresultsexport ad-hoc http post operation.</br></br>PromptType is a FieldSubType enum as described below:</br>FieldSubType</br>None = 0</br>Text = 1</br>Number = 2</br>DateTime = 3</br>Logical = 4</br>Binary = 5</br>DateOnly = 6</br>TimeOnly = 7</br>Json = 8</br>JsonArray = 9</br>Xml = 10</br>XmlCollection = 11</br>TimeValue = 12</br>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.searches_get_search_results_export_by_name_v1_with_http_info(association, scope, scopeowner, searchname, exportformat, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str association: Specify the Business Object association ID for the saved search. (required)
        :param str scope: Specify the scope name or ID for the saved search. (required)
        :param str scopeowner: Specify the scope owner ID for the saved search. Use (None) when no scope owner exists. (required)
        :param str searchname: Specify the name of the saved search. (required)
        :param str exportformat: Specify the format of the export (required)
        :param str search_term: Specify search text filter the results. Example: Use \"Service Request\" to filter Incident results to include only service requests.
        :param int pagenumber: Specify the page number of the result set to return.
        :param int pagesize: Specify the number of rows to return per page.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['association', 'scope', 'scopeowner', 'searchname', 'exportformat', 'search_term', 'pagenumber', 'pagesize']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method searches_get_search_results_export_by_name_v1" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'association' is set
        if self.api_client.client_side_validation and ('association' not in local_var_params or  # noqa: E501
                                                        local_var_params['association'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `association` when calling `searches_get_search_results_export_by_name_v1`")  # noqa: E501
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and ('scope' not in local_var_params or  # noqa: E501
                                                        local_var_params['scope'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scope` when calling `searches_get_search_results_export_by_name_v1`")  # noqa: E501
        # verify the required parameter 'scopeowner' is set
        if self.api_client.client_side_validation and ('scopeowner' not in local_var_params or  # noqa: E501
                                                        local_var_params['scopeowner'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `scopeowner` when calling `searches_get_search_results_export_by_name_v1`")  # noqa: E501
        # verify the required parameter 'searchname' is set
        if self.api_client.client_side_validation and ('searchname' not in local_var_params or  # noqa: E501
                                                        local_var_params['searchname'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `searchname` when calling `searches_get_search_results_export_by_name_v1`")  # noqa: E501
        # verify the required parameter 'exportformat' is set
        if self.api_client.client_side_validation and ('exportformat' not in local_var_params or  # noqa: E501
                                                        local_var_params['exportformat'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `exportformat` when calling `searches_get_search_results_export_by_name_v1`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'association' in local_var_params:
            path_params['association'] = local_var_params['association']  # noqa: E501
        if 'scope' in local_var_params:
            path_params['scope'] = local_var_params['scope']  # noqa: E501
        if 'scopeowner' in local_var_params:
            path_params['scopeowner'] = local_var_params['scopeowner']  # noqa: E501
        if 'searchname' in local_var_params:
            path_params['searchname'] = local_var_params['searchname']  # noqa: E501
        if 'exportformat' in local_var_params:
            path_params['exportformat'] = local_var_params['exportformat']  # noqa: E501

        query_params = []
        if 'search_term' in local_var_params and local_var_params['search_term'] is not None:  # noqa: E501
            query_params.append(('searchTerm', local_var_params['search_term']))  # noqa: E501
        if 'pagenumber' in local_var_params and local_var_params['pagenumber'] is not None:  # noqa: E501
            query_params.append(('pagenumber', local_var_params['pagenumber']))  # noqa: E501
        if 'pagesize' in local_var_params and local_var_params['pagesize'] is not None:  # noqa: E501
            query_params.append(('pagesize', local_var_params['pagesize']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/api/V1/getsearchresultsexport/association/{association}/scope/{scope}/scopeowner/{scopeowner}/searchname/{searchname}/exportformat/{exportformat}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
