3.2.0 (latest) 3.1.0 3.0.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public class Sessions.SessionsClient : ClientBase<Sessions.SessionsClient>

Reference documentation and code samples for the Dialogflow v3 API class Sessions.SessionsClient.

Client for Sessions

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.md.txt) \> [ClientBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.md.txt)[Sessions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Sessions.md.txt)[SessionsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Sessions.SessionsClient.md.txt) \> Sessions.SessionsClient

## Inherited Members

[ClientBase\<Sessions.SessionsClient\>.WithHost(string)](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.md.txt#Grpc_Core_ClientBase_1_WithHost_System_String_) [ClientBase.CallInvoker](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.md.txt#Grpc_Core_ClientBase_CallInvoker) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Dialogflow.Cx.V3](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.md.txt)

## Assembly

Google.Cloud.Dialogflow.Cx.V3.dll

## Constructors

### SessionsClient()

    protected SessionsClient()

Protected parameterless constructor to allow creation of test doubles.

### SessionsClient(CallInvoker)

    public SessionsClient(CallInvoker callInvoker)

Creates a new client for Sessions that uses a custom `CallInvoker`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `callInvoker` | `CallInvoker` The callInvoker to use to make remote calls. |

### SessionsClient(ChannelBase)

    public SessionsClient(ChannelBase channel)

Creates a new client for Sessions

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `ChannelBase` The channel to use to make remote calls. |

### SessionsClient(ClientBaseConfiguration)

    protected SessionsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `ClientBaseClientBaseConfiguration` The client configuration. |

## Methods

### CreateLocationsClient()

    public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of [Locations.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.md.txt) using the same call invoker as
this client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `LocationsLocationsClient` | A new [Locations.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.md.txt) for the same target as this client. |

### DetectIntent(DetectIntentRequest, CallOptions)

    public virtual DetectIntentResponse DetectIntent(DetectIntentRequest request, CallOptions options)

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.

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DetectIntentRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `DetectIntentResponse` | The response received from the server. |

### DetectIntent(DetectIntentRequest, Metadata, DateTime?, CancellationToken)

    public virtual DetectIntentResponse DetectIntent(DetectIntentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DetectIntentRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `DetectIntentResponse` | The response received from the server. |

### DetectIntentAsync(DetectIntentRequest, CallOptions)

    public virtual AsyncUnaryCall<DetectIntentResponse> DetectIntentAsync(DetectIntentRequest request, CallOptions options)

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.

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DetectIntentRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallDetectIntentResponse` | The call object. |

### DetectIntentAsync(DetectIntentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<DetectIntentResponse> DetectIntentAsync(DetectIntentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DetectIntentRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallDetectIntentResponse` | The call object. |

### FulfillIntent(FulfillIntentRequest, CallOptions)

    public virtual FulfillIntentResponse FulfillIntent(FulfillIntentRequest request, CallOptions options)

Fulfills a matched intent returned by
\[MatchIntent\]\[google.cloud.dialogflow.cx.v3.Sessions.MatchIntent\]. Must be
called after
\[MatchIntent\]\[google.cloud.dialogflow.cx.v3.Sessions.MatchIntent\], with
input from
\[MatchIntentResponse\]\[google.cloud.dialogflow.cx.v3.MatchIntentResponse\].
Otherwise, the behavior is undefined.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `FulfillIntentRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `FulfillIntentResponse` | The response received from the server. |

### FulfillIntent(FulfillIntentRequest, Metadata, DateTime?, CancellationToken)

    public virtual FulfillIntentResponse FulfillIntent(FulfillIntentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Fulfills a matched intent returned by
\[MatchIntent\]\[google.cloud.dialogflow.cx.v3.Sessions.MatchIntent\]. Must be
called after
\[MatchIntent\]\[google.cloud.dialogflow.cx.v3.Sessions.MatchIntent\], with
input from
\[MatchIntentResponse\]\[google.cloud.dialogflow.cx.v3.MatchIntentResponse\].
Otherwise, the behavior is undefined.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `FulfillIntentRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `FulfillIntentResponse` | The response received from the server. |

### FulfillIntentAsync(FulfillIntentRequest, CallOptions)

    public virtual AsyncUnaryCall<FulfillIntentResponse> FulfillIntentAsync(FulfillIntentRequest request, CallOptions options)

Fulfills a matched intent returned by
\[MatchIntent\]\[google.cloud.dialogflow.cx.v3.Sessions.MatchIntent\]. Must be
called after
\[MatchIntent\]\[google.cloud.dialogflow.cx.v3.Sessions.MatchIntent\], with
input from
\[MatchIntentResponse\]\[google.cloud.dialogflow.cx.v3.MatchIntentResponse\].
Otherwise, the behavior is undefined.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `FulfillIntentRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallFulfillIntentResponse` | The call object. |

### FulfillIntentAsync(FulfillIntentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<FulfillIntentResponse> FulfillIntentAsync(FulfillIntentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Fulfills a matched intent returned by
\[MatchIntent\]\[google.cloud.dialogflow.cx.v3.Sessions.MatchIntent\]. Must be
called after
\[MatchIntent\]\[google.cloud.dialogflow.cx.v3.Sessions.MatchIntent\], with
input from
\[MatchIntentResponse\]\[google.cloud.dialogflow.cx.v3.MatchIntentResponse\].
Otherwise, the behavior is undefined.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `FulfillIntentRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallFulfillIntentResponse` | The call object. |

### MatchIntent(MatchIntentRequest, CallOptions)

    public virtual MatchIntentResponse MatchIntent(MatchIntentRequest request, CallOptions options)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `MatchIntentRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `MatchIntentResponse` | The response received from the server. |

### MatchIntent(MatchIntentRequest, Metadata, DateTime?, CancellationToken)

    public virtual MatchIntentResponse MatchIntent(MatchIntentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `MatchIntentRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `MatchIntentResponse` | The response received from the server. |

### MatchIntentAsync(MatchIntentRequest, CallOptions)

    public virtual AsyncUnaryCall<MatchIntentResponse> MatchIntentAsync(MatchIntentRequest request, CallOptions options)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `MatchIntentRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallMatchIntentResponse` | The call object. |

### MatchIntentAsync(MatchIntentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<MatchIntentResponse> MatchIntentAsync(MatchIntentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `MatchIntentRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallMatchIntentResponse` | The call object. |

### NewInstance(ClientBaseConfiguration)

    protected override Sessions.SessionsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given `ClientBaseConfiguration`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `ClientBaseClientBaseConfiguration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `SessionsSessionsClient` |   |

**Overrides** Grpc.Core.ClientBase\<Google.Cloud.Dialogflow.Cx.V3.Sessions.SessionsClient\>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

### ServerStreamingDetectIntent(DetectIntentRequest, CallOptions)

    public virtual AsyncServerStreamingCall<DetectIntentResponse> ServerStreamingDetectIntent(DetectIntentRequest request, CallOptions options)

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.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DetectIntentRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncServerStreamingCallDetectIntentResponse` | The call object. |

### ServerStreamingDetectIntent(DetectIntentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncServerStreamingCall<DetectIntentResponse> ServerStreamingDetectIntent(DetectIntentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DetectIntentRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncServerStreamingCallDetectIntentResponse` | The call object. |

### StreamingDetectIntent(CallOptions)

    public virtual AsyncDuplexStreamingCall<StreamingDetectIntentRequest, StreamingDetectIntentResponse> StreamingDetectIntent(CallOptions options)

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).

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncDuplexStreamingCallStreamingDetectIntentRequestStreamingDetectIntentResponse` | The call object. |

### StreamingDetectIntent(Metadata, DateTime?, CancellationToken)

    public virtual AsyncDuplexStreamingCall<StreamingDetectIntentRequest, StreamingDetectIntentResponse> StreamingDetectIntent(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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).

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncDuplexStreamingCallStreamingDetectIntentRequestStreamingDetectIntentResponse` | The call object. |

### SubmitAnswerFeedback(SubmitAnswerFeedbackRequest, CallOptions)

    public virtual AnswerFeedback SubmitAnswerFeedback(SubmitAnswerFeedbackRequest request, CallOptions options)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `SubmitAnswerFeedbackRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AnswerFeedback` | The response received from the server. |

### SubmitAnswerFeedback(SubmitAnswerFeedbackRequest, Metadata, DateTime?, CancellationToken)

    public virtual AnswerFeedback SubmitAnswerFeedback(SubmitAnswerFeedbackRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `SubmitAnswerFeedbackRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AnswerFeedback` | The response received from the server. |

### SubmitAnswerFeedbackAsync(SubmitAnswerFeedbackRequest, CallOptions)

    public virtual AsyncUnaryCall<AnswerFeedback> SubmitAnswerFeedbackAsync(SubmitAnswerFeedbackRequest request, CallOptions options)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `SubmitAnswerFeedbackRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallAnswerFeedback` | The call object. |

### SubmitAnswerFeedbackAsync(SubmitAnswerFeedbackRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<AnswerFeedback> SubmitAnswerFeedbackAsync(SubmitAnswerFeedbackRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `SubmitAnswerFeedbackRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallAnswerFeedback` | The call object. |