# coding: utf-8

"""
    IncQuery Server Web API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.19.0
    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 iqs_client.api_client import ApiClient
from iqs_client.exceptions import (
    ApiTypeError,
    ApiValueError
)


class QueryExecutionApi(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 execute_query(self, execute_query_request, **kwargs):  # noqa: E501
        """Execute query on loaded revision  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.execute_query(execute_query_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param ExecuteQueryRequest execute_query_request: Revision descriptor, query fully qualified name and optional binding and query mode enforcement  (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: QueryExecutionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.execute_query_with_http_info(execute_query_request, **kwargs)  # noqa: E501

    def execute_query_with_http_info(self, execute_query_request, **kwargs):  # noqa: E501
        """Execute query on loaded revision  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.execute_query_with_http_info(execute_query_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param ExecuteQueryRequest execute_query_request: Revision descriptor, query fully qualified name and optional binding and query mode enforcement  (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(QueryExecutionResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['execute_query_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 execute_query" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'execute_query_request' is set
        if self.api_client.client_side_validation and ('execute_query_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['execute_query_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `execute_query_request` when calling `execute_query`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'execute_query_request' in local_var_params:
            body_params = local_var_params['execute_query_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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/query-execution.executeQuery', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='QueryExecutionResponse',  # 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 execute_query_on_model_compartment(self, execute_query_on_compartment_request, **kwargs):  # noqa: E501
        """Execute query on loaded model compartment  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.execute_query_on_model_compartment(execute_query_on_compartment_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param ExecuteQueryOnCompartmentRequest execute_query_on_compartment_request: Model compartment descriptor, query fully qualified name and optional binding and query mode enforcement  (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: QueryExecutionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.execute_query_on_model_compartment_with_http_info(execute_query_on_compartment_request, **kwargs)  # noqa: E501

    def execute_query_on_model_compartment_with_http_info(self, execute_query_on_compartment_request, **kwargs):  # noqa: E501
        """Execute query on loaded model compartment  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.execute_query_on_model_compartment_with_http_info(execute_query_on_compartment_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param ExecuteQueryOnCompartmentRequest execute_query_on_compartment_request: Model compartment descriptor, query fully qualified name and optional binding and query mode enforcement  (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(QueryExecutionResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['execute_query_on_compartment_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 execute_query_on_model_compartment" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'execute_query_on_compartment_request' is set
        if self.api_client.client_side_validation and ('execute_query_on_compartment_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['execute_query_on_compartment_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `execute_query_on_compartment_request` when calling `execute_query_on_model_compartment`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'execute_query_on_compartment_request' in local_var_params:
            body_params = local_var_params['execute_query_on_compartment_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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/generic-query-execution.executeQuery', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='QueryExecutionResponse',  # 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 get_standing_query_results(self, standing_query_result_request, **kwargs):  # noqa: E501
        """Retrieve query results for prepared standing query  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_standing_query_results(standing_query_result_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param StandingQueryResultRequest standing_query_result_request: Revision descriptor, query fully qualified name and optional parameter binding  (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: QueryExecutionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_standing_query_results_with_http_info(standing_query_result_request, **kwargs)  # noqa: E501

    def get_standing_query_results_with_http_info(self, standing_query_result_request, **kwargs):  # noqa: E501
        """Retrieve query results for prepared standing query  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_standing_query_results_with_http_info(standing_query_result_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param StandingQueryResultRequest standing_query_result_request: Revision descriptor, query fully qualified name and optional parameter binding  (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(QueryExecutionResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['standing_query_result_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 get_standing_query_results" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'standing_query_result_request' is set
        if self.api_client.client_side_validation and ('standing_query_result_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['standing_query_result_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `standing_query_result_request` when calling `get_standing_query_results`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'standing_query_result_request' in local_var_params:
            body_params = local_var_params['standing_query_result_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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/query-execution.getStandingQueryResults', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='QueryExecutionResponse',  # 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 get_standing_query_results_on_model_compartment(self, standing_query_result_on_model_compartment_request, **kwargs):  # noqa: E501
        """Retrieve query results for prepared standing query  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_standing_query_results_on_model_compartment(standing_query_result_on_model_compartment_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param StandingQueryResultOnModelCompartmentRequest standing_query_result_on_model_compartment_request: Model compartment descriptor, query fully qualified name and optional parameter binding  (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: QueryExecutionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.get_standing_query_results_on_model_compartment_with_http_info(standing_query_result_on_model_compartment_request, **kwargs)  # noqa: E501

    def get_standing_query_results_on_model_compartment_with_http_info(self, standing_query_result_on_model_compartment_request, **kwargs):  # noqa: E501
        """Retrieve query results for prepared standing query  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_standing_query_results_on_model_compartment_with_http_info(standing_query_result_on_model_compartment_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param StandingQueryResultOnModelCompartmentRequest standing_query_result_on_model_compartment_request: Model compartment descriptor, query fully qualified name and optional parameter binding  (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(QueryExecutionResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['standing_query_result_on_model_compartment_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 get_standing_query_results_on_model_compartment" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'standing_query_result_on_model_compartment_request' is set
        if self.api_client.client_side_validation and ('standing_query_result_on_model_compartment_request' not in local_var_params or  # noqa: E501
                                                        local_var_params['standing_query_result_on_model_compartment_request'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `standing_query_result_on_model_compartment_request` when calling `get_standing_query_results_on_model_compartment`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'standing_query_result_on_model_compartment_request' in local_var_params:
            body_params = local_var_params['standing_query_result_on_model_compartment_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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/generic-query-execution.getStandingQueryResults', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='QueryExecutionResponse',  # 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 prepare_search_based_queries(self, query_fqn_list_with_revision_descriptor, **kwargs):  # noqa: E501
        """Prepare search-based query on loaded revision  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.prepare_search_based_queries(query_fqn_list_with_revision_descriptor, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QueryFQNListWithRevisionDescriptor query_fqn_list_with_revision_descriptor: Revision descriptor and list of query fully qualified names  (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: SimpleMessage
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.prepare_search_based_queries_with_http_info(query_fqn_list_with_revision_descriptor, **kwargs)  # noqa: E501

    def prepare_search_based_queries_with_http_info(self, query_fqn_list_with_revision_descriptor, **kwargs):  # noqa: E501
        """Prepare search-based query on loaded revision  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.prepare_search_based_queries_with_http_info(query_fqn_list_with_revision_descriptor, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QueryFQNListWithRevisionDescriptor query_fqn_list_with_revision_descriptor: Revision descriptor and list of query fully qualified names  (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(SimpleMessage, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['query_fqn_list_with_revision_descriptor']  # 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 prepare_search_based_queries" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'query_fqn_list_with_revision_descriptor' is set
        if self.api_client.client_side_validation and ('query_fqn_list_with_revision_descriptor' not in local_var_params or  # noqa: E501
                                                        local_var_params['query_fqn_list_with_revision_descriptor'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `query_fqn_list_with_revision_descriptor` when calling `prepare_search_based_queries`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'query_fqn_list_with_revision_descriptor' in local_var_params:
            body_params = local_var_params['query_fqn_list_with_revision_descriptor']
        # 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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/query-execution.prepareSearchBasedQueries', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SimpleMessage',  # 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 prepare_search_based_queries_on_model_compartment(self, query_fqn_list_with_model_compartment, **kwargs):  # noqa: E501
        """Prepare search-based query on loaded model compartment  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.prepare_search_based_queries_on_model_compartment(query_fqn_list_with_model_compartment, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QueryFQNListWithModelCompartment query_fqn_list_with_model_compartment: Model compartment descriptor and list of query fully qualified names  (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: SimpleMessage
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.prepare_search_based_queries_on_model_compartment_with_http_info(query_fqn_list_with_model_compartment, **kwargs)  # noqa: E501

    def prepare_search_based_queries_on_model_compartment_with_http_info(self, query_fqn_list_with_model_compartment, **kwargs):  # noqa: E501
        """Prepare search-based query on loaded model compartment  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.prepare_search_based_queries_on_model_compartment_with_http_info(query_fqn_list_with_model_compartment, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QueryFQNListWithModelCompartment query_fqn_list_with_model_compartment: Model compartment descriptor and list of query fully qualified names  (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(SimpleMessage, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['query_fqn_list_with_model_compartment']  # 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 prepare_search_based_queries_on_model_compartment" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'query_fqn_list_with_model_compartment' is set
        if self.api_client.client_side_validation and ('query_fqn_list_with_model_compartment' not in local_var_params or  # noqa: E501
                                                        local_var_params['query_fqn_list_with_model_compartment'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `query_fqn_list_with_model_compartment` when calling `prepare_search_based_queries_on_model_compartment`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'query_fqn_list_with_model_compartment' in local_var_params:
            body_params = local_var_params['query_fqn_list_with_model_compartment']
        # 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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/generic-query-execution.prepareSearchBasedQueries', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SimpleMessage',  # 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 prepare_standing_queries(self, query_fqn_list_with_revision_descriptor, **kwargs):  # noqa: E501
        """Prepare standing query on loaded revision  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.prepare_standing_queries(query_fqn_list_with_revision_descriptor, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QueryFQNListWithRevisionDescriptor query_fqn_list_with_revision_descriptor: Revision descriptor and list of query fully qualified names  (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: SimpleMessage
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.prepare_standing_queries_with_http_info(query_fqn_list_with_revision_descriptor, **kwargs)  # noqa: E501

    def prepare_standing_queries_with_http_info(self, query_fqn_list_with_revision_descriptor, **kwargs):  # noqa: E501
        """Prepare standing query on loaded revision  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.prepare_standing_queries_with_http_info(query_fqn_list_with_revision_descriptor, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QueryFQNListWithRevisionDescriptor query_fqn_list_with_revision_descriptor: Revision descriptor and list of query fully qualified names  (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(SimpleMessage, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['query_fqn_list_with_revision_descriptor']  # 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 prepare_standing_queries" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'query_fqn_list_with_revision_descriptor' is set
        if self.api_client.client_side_validation and ('query_fqn_list_with_revision_descriptor' not in local_var_params or  # noqa: E501
                                                        local_var_params['query_fqn_list_with_revision_descriptor'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `query_fqn_list_with_revision_descriptor` when calling `prepare_standing_queries`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'query_fqn_list_with_revision_descriptor' in local_var_params:
            body_params = local_var_params['query_fqn_list_with_revision_descriptor']
        # 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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/query-execution.prepareStandingQueries', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SimpleMessage',  # 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 prepare_standing_queries_on_model_compartment(self, query_fqn_list_with_model_compartment, **kwargs):  # noqa: E501
        """Prepare standing query on loaded model compartment  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.prepare_standing_queries_on_model_compartment(query_fqn_list_with_model_compartment, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QueryFQNListWithModelCompartment query_fqn_list_with_model_compartment: Model compartment descriptor and list of query fully qualified names  (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: SimpleMessage
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.prepare_standing_queries_on_model_compartment_with_http_info(query_fqn_list_with_model_compartment, **kwargs)  # noqa: E501

    def prepare_standing_queries_on_model_compartment_with_http_info(self, query_fqn_list_with_model_compartment, **kwargs):  # noqa: E501
        """Prepare standing query on loaded model compartment  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.prepare_standing_queries_on_model_compartment_with_http_info(query_fqn_list_with_model_compartment, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QueryFQNListWithModelCompartment query_fqn_list_with_model_compartment: Model compartment descriptor and list of query fully qualified names  (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(SimpleMessage, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['query_fqn_list_with_model_compartment']  # 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 prepare_standing_queries_on_model_compartment" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'query_fqn_list_with_model_compartment' is set
        if self.api_client.client_side_validation and ('query_fqn_list_with_model_compartment' not in local_var_params or  # noqa: E501
                                                        local_var_params['query_fqn_list_with_model_compartment'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `query_fqn_list_with_model_compartment` when calling `prepare_standing_queries_on_model_compartment`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'query_fqn_list_with_model_compartment' in local_var_params:
            body_params = local_var_params['query_fqn_list_with_model_compartment']
        # 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 = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/generic-query-execution.prepareStandingQueries', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SimpleMessage',  # 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)
