# Dialogflow CX V3 API - Class Google::Cloud::Dialogflow::CX::V3::Sessions::Client (v1.12.1)

1.12.1 (latest) 1.12.0 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.26.0 0.25.0 0.24.2 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.1 0.14.0 0.13.0 0.12.0 0.11.0 0.10.2 0.9.0 0.8.1 0.7.1 0.6.0 0.5.0 0.4.0 Reference documentation and code samples for the Dialogflow CX V3 API class Google::Cloud::Dialogflow::CX::V3::Sessions::Client.

Client for the Sessions service.


<br />

A session represents an interaction with a user. You retrieve user input
and pass it to the
[DetectIntent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client#Google__Cloud__Dialogflow__CX__V3__Sessions__Client_detect_intent_instance_ "Google::Cloud::Dialogflow::CX::V3::Sessions::Client#detect_intent (method)") method to
determine user intent and respond.

## Inherits

- Object

## Includes

- [Google::Cloud::Dialogflow::CX::V3::Sessions::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the Sessions Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client-Configuration "Google::Cloud::Dialogflow::CX::V3::Sessions::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all Sessions clients
::Google::Cloud::Dialogflow::CX::V3::Sessions::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the Sessions Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client#Google__Cloud__Dialogflow__CX__V3__Sessions__Client_configure_class_ "Google::Cloud::Dialogflow::CX::V3::Sessions::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client-Configuration "Google::Cloud::Dialogflow::CX::V3::Sessions::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client-Configuration))

### #detect_intent

    def detect_intent(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse
    def detect_intent(session: nil, query_params: nil, query_input: nil, output_audio_config: nil, response_view: nil) -> ::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse

Processes a natural language query and returns structured, actionable data
as a result. This method is not idempotent, because it may cause session
entity types to be updated, which in turn might affect results of future
queries.


<br />

Note: Always use agent versions for production traffic.
See [Versions and
environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
**Overloads**

    def detect_intent(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse

Pass arguments to `detect_intent` via a request object, either of type [DetectIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentRequest "Google::Cloud::Dialogflow::CX::V3::DetectIntentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::DetectIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def detect_intent(session: nil, query_params: nil, query_input: nil, output_audio_config: nil, response_view: nil) -> ::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse

Pass arguments to `detect_intent` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **session** (::String) --- Required. The name of the session this query is sent to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/sessions/<Session
  ID>` or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/sessions/<SessionID>`. If `Environment ID` is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length of the `Session ID` must not exceed 36 characters.


  For more information, see the [sessions
  guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).

  Note: Always use agent versions for production traffic.
  See [Versions and
  environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
- **query_params** ([::Google::Cloud::Dialogflow::CX::V3::QueryParameters](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-QueryParameters), ::Hash) --- The parameters of this query.
- **query_input** ([::Google::Cloud::Dialogflow::CX::V3::QueryInput](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-QueryInput), ::Hash) --- Required. The input specification.
- **output_audio_config** ([::Google::Cloud::Dialogflow::CX::V3::OutputAudioConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-OutputAudioConfig), ::Hash) --- Instructs the speech synthesizer how to generate the output audio.
- **response_view** ([::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponseView](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentResponseView)) --- Optional. Specifies which fields in the [QueryResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-QueryResult "Google::Cloud::Dialogflow::CX::V3::QueryResult (class)") to return. If not set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::DetectIntentRequest.new

# Call the detect_intent method.
result = client.detect_intent request

# The returned object is of type Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse.
p result
```

### #fulfill_intent

    def fulfill_intent(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::FulfillIntentResponse
    def fulfill_intent(match_intent_request: nil, match: nil, output_audio_config: nil) -> ::Google::Cloud::Dialogflow::CX::V3::FulfillIntentResponse

Fulfills a matched intent returned by
[MatchIntent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client#Google__Cloud__Dialogflow__CX__V3__Sessions__Client_match_intent_instance_ "Google::Cloud::Dialogflow::CX::V3::Sessions::Client#match_intent (method)"). Must be
called after
[MatchIntent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client#Google__Cloud__Dialogflow__CX__V3__Sessions__Client_match_intent_instance_ "Google::Cloud::Dialogflow::CX::V3::Sessions::Client#match_intent (method)"), with
input from
[MatchIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-MatchIntentResponse "Google::Cloud::Dialogflow::CX::V3::MatchIntentResponse (class)").
Otherwise, the behavior is undefined.
**Overloads**

    def fulfill_intent(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::FulfillIntentResponse

Pass arguments to `fulfill_intent` via a request object, either of type [FulfillIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-FulfillIntentRequest "Google::Cloud::Dialogflow::CX::V3::FulfillIntentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::FulfillIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-FulfillIntentRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def fulfill_intent(match_intent_request: nil, match: nil, output_audio_config: nil) -> ::Google::Cloud::Dialogflow::CX::V3::FulfillIntentResponse

Pass arguments to `fulfill_intent` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **match_intent_request** ([::Google::Cloud::Dialogflow::CX::V3::MatchIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-MatchIntentRequest), ::Hash) --- Must be same as the corresponding MatchIntent request, otherwise the behavior is undefined.
- **match** ([::Google::Cloud::Dialogflow::CX::V3::Match](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Match), ::Hash) --- The matched intent/event to fulfill.
- **output_audio_config** ([::Google::Cloud::Dialogflow::CX::V3::OutputAudioConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-OutputAudioConfig), ::Hash) --- Instructs the speech synthesizer how to generate output audio.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dialogflow::CX::V3::FulfillIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-FulfillIntentResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::FulfillIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-FulfillIntentResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::FulfillIntentRequest.new

# Call the fulfill_intent method.
result = client.fulfill_intent request

# The returned object is of type Google::Cloud::Dialogflow::CX::V3::FulfillIntentResponse.
p result
```

### #initialize

    def initialize() { |config| ... } -> Client

Create a new Sessions client object.
**Yields**

- (config) --- Configure the Sessions client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Sessions-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new do |config|
  config.timeout = 10.0
end
```

### #location_client

    def location_client() -> Google::Cloud::Location::Locations::Client

Get the associated client for mix-in of the Locations.
**Returns**

- (Google::Cloud::Location::Locations::Client)

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #match_intent

    def match_intent(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::MatchIntentResponse
    def match_intent(session: nil, query_params: nil, query_input: nil, persist_parameter_changes: nil) -> ::Google::Cloud::Dialogflow::CX::V3::MatchIntentResponse

Returns preliminary intent match results, doesn't change the session
status.
**Overloads**

    def match_intent(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::MatchIntentResponse

Pass arguments to `match_intent` via a request object, either of type [MatchIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-MatchIntentRequest "Google::Cloud::Dialogflow::CX::V3::MatchIntentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::MatchIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-MatchIntentRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def match_intent(session: nil, query_params: nil, query_input: nil, persist_parameter_changes: nil) -> ::Google::Cloud::Dialogflow::CX::V3::MatchIntentResponse

Pass arguments to `match_intent` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **session** (::String) --- Required. The name of the session this query is sent to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/sessions/<SessionID>` or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/sessions/<SessionID>`. If `Environment ID` is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length of the `Session ID` must not exceed 36 characters.


  For more information, see the [sessions
  guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
- **query_params** ([::Google::Cloud::Dialogflow::CX::V3::QueryParameters](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-QueryParameters), ::Hash) --- The parameters of this query.
- **query_input** ([::Google::Cloud::Dialogflow::CX::V3::QueryInput](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-QueryInput), ::Hash) --- Required. The input specification.
- **persist_parameter_changes** (::Boolean) --- Persist session parameter changes from `query_params`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dialogflow::CX::V3::MatchIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-MatchIntentResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::MatchIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-MatchIntentResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::MatchIntentRequest.new

# Call the match_intent method.
result = client.match_intent request

# The returned object is of type Google::Cloud::Dialogflow::CX::V3::MatchIntentResponse.
p result
```

### #server_streaming_detect_intent

    def server_streaming_detect_intent(request, options = nil) -> ::Enumerable<::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse>
    def server_streaming_detect_intent(session: nil, query_params: nil, query_input: nil, output_audio_config: nil, response_view: nil) -> ::Enumerable<::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse>

Processes a natural language query and returns structured, actionable data
as a result through server-side streaming. Server-side streaming allows
Dialogflow to send [partial
responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response)
earlier in a single request.
**Overloads**

    def server_streaming_detect_intent(request, options = nil) -> ::Enumerable<::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse>

Pass arguments to `server_streaming_detect_intent` via a request object, either of type [DetectIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentRequest "Google::Cloud::Dialogflow::CX::V3::DetectIntentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::DetectIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def server_streaming_detect_intent(session: nil, query_params: nil, query_input: nil, output_audio_config: nil, response_view: nil) -> ::Enumerable<::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse>

Pass arguments to `server_streaming_detect_intent` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **session** (::String) --- Required. The name of the session this query is sent to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/sessions/<Session
  ID>` or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/sessions/<SessionID>`. If `Environment ID` is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length of the `Session ID` must not exceed 36 characters.


  For more information, see the [sessions
  guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).

  Note: Always use agent versions for production traffic.
  See [Versions and
  environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
- **query_params** ([::Google::Cloud::Dialogflow::CX::V3::QueryParameters](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-QueryParameters), ::Hash) --- The parameters of this query.
- **query_input** ([::Google::Cloud::Dialogflow::CX::V3::QueryInput](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-QueryInput), ::Hash) --- Required. The input specification.
- **output_audio_config** ([::Google::Cloud::Dialogflow::CX::V3::OutputAudioConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-OutputAudioConfig), ::Hash) --- Instructs the speech synthesizer how to generate the output audio.
- **response_view** ([::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponseView](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentResponseView)) --- Optional. Specifies which fields in the [QueryResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-QueryResult "Google::Cloud::Dialogflow::CX::V3::QueryResult (class)") to return. If not set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Enumerable\<[::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentResponse)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Enumerable\<[::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DetectIntentResponse)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::DetectIntentRequest.new

# Call the server_streaming_detect_intent method to start streaming.
output = client.server_streaming_detect_intent request

# The returned object is a streamed enumerable yielding elements of type
# ::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse
output.each do |current_response|
  p current_response
end
```

### #streaming_detect_intent

    def streaming_detect_intent(request, options = nil) { |response, operation| ... } -> ::Enumerable<::Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentResponse>

Processes a natural language query in audio format in a streaming fashion
and returns structured, actionable data as a result. This method is only
available via the gRPC API (not REST).


<br />

Note: Always use agent versions for production traffic.
See [Versions and
environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
**Parameters**

- **request** (::Gapic::StreamInput, ::Enumerable\<[::Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-StreamingDetectIntentRequest), ::Hash\>) --- An enumerable of [Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-StreamingDetectIntentRequest "Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentRequest (class)") instances.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Enumerable\<[::Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-StreamingDetectIntentResponse)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Enumerable\<[::Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-StreamingDetectIntentResponse)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new

# Create an input stream.
input = Gapic::StreamInput.new

# Call the streaming_detect_intent method to start streaming.
output = client.streaming_detect_intent input

# Send requests on the stream. For each request object, set fields by
# passing keyword arguments. Be sure to close the stream when done.
input << Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentRequest.new
input << Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentRequest.new
input.close

# The returned object is a streamed enumerable yielding elements of type
# ::Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentResponse
output.each do |current_response|
  p current_response
end
```

### #submit_answer_feedback

    def submit_answer_feedback(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback
    def submit_answer_feedback(session: nil, response_id: nil, answer_feedback: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback

Updates the feedback received from the user for a single turn of the bot
response.
**Overloads**

    def submit_answer_feedback(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback

Pass arguments to `submit_answer_feedback` via a request object, either of type [Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-SubmitAnswerFeedbackRequest "Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-SubmitAnswerFeedbackRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def submit_answer_feedback(session: nil, response_id: nil, answer_feedback: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback

Pass arguments to `submit_answer_feedback` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **session** (::String) --- Required. The name of the session the feedback was sent to.
- **response_id** (::String) --- Required. ID of the response to update its feedback. This is the same as DetectIntentResponse.response_id.
- **answer_feedback** ([::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-AnswerFeedback), ::Hash) --- Required. Feedback provided for a bot answer.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Protobuf-FieldMask), ::Hash) --- Optional. The mask to control which fields to update. If the mask is not present, all fields will be updated.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-AnswerFeedback))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-AnswerFeedback))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest.new

# Call the submit_answer_feedback method.
result = client.submit_answer_feedback request

# The returned object is of type Google::Cloud::Dialogflow::CX::V3::AnswerFeedback.
p result
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)