def detect_intent(self,<EOL>session,<EOL>query_input,<EOL>query_params=None,<EOL>input_audio=None,<EOL>retry=google.api_core.gapic_v1.method.DEFAULT,<EOL>timeout=google.api_core.gapic_v1.method.DEFAULT,<EOL>metadata=None):
<EOL>if '<STR_LIT>' not in self._inner_api_calls:<EOL><INDENT>self._inner_api_calls[<EOL>'<STR_LIT>'] = google.api_core.gapic_v1.method.wrap_method(<EOL>self.transport.detect_intent,<EOL>default_retry=self._method_configs['<STR_LIT>'].retry,<EOL>default_timeout=self._method_configs['<STR_LIT>']<EOL>.timeout,<EOL>client_info=self._client_info,<EOL>)<EOL><DEDENT>request = session_pb2.DetectIntentRequest(<EOL>session=session,<EOL>query_input=query_input,<EOL>query_params=query_params,<EOL>input_audio=input_audio,<EOL>)<EOL>return self._inner_api_calls['<STR_LIT>'](<EOL>request, retry=retry, timeout=timeout, metadata=metadata)<EOL>
Processes a natural language query and returns structured, actionable data
as a result. This method is not idempotent, because it may cause contexts
and session entity types to be updated, which in turn might affect
results of future queries.

Example:
    >>> import dialogflow_v2
    >>>
    >>> client = dialogflow_v2.SessionsClient()
    >>>
    >>> session = client.session_path('[PROJECT]', '[SESSION]')
    >>>
    >>> # TODO: Initialize ``query_input``:
    >>> query_input = {}
    >>>
    >>> response = client.detect_intent(session, query_input)

Args:
    session (str): Required. The name of the session this query is sent to. Format:
        ``projects/<Project ID>/agent/sessions/<Session ID>``. It's up to the API
        caller to choose an appropriate session ID. It can be a random number or
        some type of user identifier (preferably hashed). The length of the session
        ID must not exceed 36 bytes.
    query_input (Union[dict, ~google.cloud.dialogflow_v2.types.QueryInput]): Required. The input specification. It can be set to:

        1.  an audio config
        ::

            which instructs the speech recognizer how to process the speech audio,

        2.  a conversational query in the form of text, or

        3.  an event that specifies which intent to trigger.
        If a dict is provided, it must be of the same form as the protobuf
        message :class:`~google.cloud.dialogflow_v2.types.QueryInput`
    query_params (Union[dict, ~google.cloud.dialogflow_v2.types.QueryParameters]): Optional. The parameters of this query.
        If a dict is provided, it must be of the same form as the protobuf
        message :class:`~google.cloud.dialogflow_v2.types.QueryParameters`
    input_audio (bytes): Optional. The natural language speech audio to be processed. This field
        should be populated iff ``query_input`` is set to an input audio config.
        A single request can contain up to 1 minute of speech audio data.
    retry (Optional[google.api_core.retry.Retry]):  A retry object used
        to retry requests. If ``None`` is specified, requests will not
        be retried.
    timeout (Optional[float]): The amount of time, in seconds, to wait
        for the request to complete. Note that if ``retry`` is
        specified, the timeout applies to each individual attempt.
    metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
        that is provided to the method.

Returns:
    A :class:`~google.cloud.dialogflow_v2.types.DetectIntentResponse` instance.

Raises:
    google.api_core.exceptions.GoogleAPICallError: If the request
            failed for any reason.
    google.api_core.exceptions.RetryError: If the request failed due
            to a retryable error and retry attempts failed.
    ValueError: If the parameters are invalid.