# Google Cloud Dialogflow v2 API - Class ContextsClientImpl (4.30.0)

4.30.0 (latest) 4.29.0 4.28.0 4.27.0 4.26.0 4.25.0 4.24.0 4.23.0 4.22.0 4.21.0 4.20.0 4.19.0 4.18.0 4.17.0 4.16.0 4.15.0 4.14.0 4.13.0 4.12.0 4.11.0 4.10.0 4.9.0 4.8.0 4.7.0 4.6.0 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0

    public sealed class ContextsClientImpl : ContextsClient

Reference documentation and code samples for the Google Cloud Dialogflow v2 API class ContextsClientImpl.

Contexts client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ContextsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient) \> ContextsClientImpl

## Inherited Members

[ContextsClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DefaultEndpoint) [ContextsClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DefaultScopes) [ContextsClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_ServiceMetadata) [ContextsClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_CreateAsync_System_Threading_CancellationToken_) [ContextsClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_Create) [ContextsClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_ShutdownDefaultChannelsAsync) [ContextsClient.ListContexts(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_ListContexts_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.ListContextsAsync(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_ListContextsAsync_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.ListContexts(SessionName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_ListContexts_Google_Cloud_Dialogflow_V2_SessionName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.ListContextsAsync(SessionName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_ListContextsAsync_Google_Cloud_Dialogflow_V2_SessionName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.GetContextAsync(GetContextRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_GetContextAsync_Google_Cloud_Dialogflow_V2_GetContextRequest_System_Threading_CancellationToken_) [ContextsClient.GetContext(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_GetContext_System_String_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.GetContextAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_GetContextAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.GetContextAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_GetContextAsync_System_String_System_Threading_CancellationToken_) [ContextsClient.GetContext(ContextName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_GetContext_Google_Cloud_Dialogflow_V2_ContextName_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.GetContextAsync(ContextName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_GetContextAsync_Google_Cloud_Dialogflow_V2_ContextName_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.GetContextAsync(ContextName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_GetContextAsync_Google_Cloud_Dialogflow_V2_ContextName_System_Threading_CancellationToken_) [ContextsClient.CreateContextAsync(CreateContextRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_CreateContextAsync_Google_Cloud_Dialogflow_V2_CreateContextRequest_System_Threading_CancellationToken_) [ContextsClient.CreateContext(string, Context, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_CreateContext_System_String_Google_Cloud_Dialogflow_V2_Context_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.CreateContextAsync(string, Context, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_CreateContextAsync_System_String_Google_Cloud_Dialogflow_V2_Context_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.CreateContextAsync(string, Context, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_CreateContextAsync_System_String_Google_Cloud_Dialogflow_V2_Context_System_Threading_CancellationToken_) [ContextsClient.CreateContext(SessionName, Context, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_CreateContext_Google_Cloud_Dialogflow_V2_SessionName_Google_Cloud_Dialogflow_V2_Context_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.CreateContextAsync(SessionName, Context, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_CreateContextAsync_Google_Cloud_Dialogflow_V2_SessionName_Google_Cloud_Dialogflow_V2_Context_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.CreateContextAsync(SessionName, Context, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_CreateContextAsync_Google_Cloud_Dialogflow_V2_SessionName_Google_Cloud_Dialogflow_V2_Context_System_Threading_CancellationToken_) [ContextsClient.UpdateContextAsync(UpdateContextRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_UpdateContextAsync_Google_Cloud_Dialogflow_V2_UpdateContextRequest_System_Threading_CancellationToken_) [ContextsClient.UpdateContext(Context, FieldMask, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_UpdateContext_Google_Cloud_Dialogflow_V2_Context_Google_Protobuf_WellKnownTypes_FieldMask_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.UpdateContextAsync(Context, FieldMask, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_UpdateContextAsync_Google_Cloud_Dialogflow_V2_Context_Google_Protobuf_WellKnownTypes_FieldMask_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.UpdateContextAsync(Context, FieldMask, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_UpdateContextAsync_Google_Cloud_Dialogflow_V2_Context_Google_Protobuf_WellKnownTypes_FieldMask_System_Threading_CancellationToken_) [ContextsClient.DeleteContextAsync(DeleteContextRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteContextAsync_Google_Cloud_Dialogflow_V2_DeleteContextRequest_System_Threading_CancellationToken_) [ContextsClient.DeleteContext(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteContext_System_String_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.DeleteContextAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteContextAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.DeleteContextAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteContextAsync_System_String_System_Threading_CancellationToken_) [ContextsClient.DeleteContext(ContextName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteContext_Google_Cloud_Dialogflow_V2_ContextName_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.DeleteContextAsync(ContextName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteContextAsync_Google_Cloud_Dialogflow_V2_ContextName_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.DeleteContextAsync(ContextName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteContextAsync_Google_Cloud_Dialogflow_V2_ContextName_System_Threading_CancellationToken_) [ContextsClient.DeleteAllContextsAsync(DeleteAllContextsRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteAllContextsAsync_Google_Cloud_Dialogflow_V2_DeleteAllContextsRequest_System_Threading_CancellationToken_) [ContextsClient.DeleteAllContexts(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteAllContexts_System_String_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.DeleteAllContextsAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteAllContextsAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.DeleteAllContextsAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteAllContextsAsync_System_String_System_Threading_CancellationToken_) [ContextsClient.DeleteAllContexts(SessionName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteAllContexts_Google_Cloud_Dialogflow_V2_SessionName_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.DeleteAllContextsAsync(SessionName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteAllContextsAsync_Google_Cloud_Dialogflow_V2_SessionName_Google_Api_Gax_Grpc_CallSettings_) [ContextsClient.DeleteAllContextsAsync(SessionName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteAllContextsAsync_Google_Cloud_Dialogflow_V2_SessionName_System_Threading_CancellationToken_) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Dialogflow.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2)

## Assembly

Google.Cloud.Dialogflow.V2.dll

## Remarks

Service for managing \[Contexts\]\[google.cloud.dialogflow.v2.Context\].

## Constructors

### ContextsClientImpl(ContextsClient, ContextsSettings, ILogger)

    public ContextsClientImpl(Contexts.ContextsClient grpcClient, ContextsSettings settings, ILogger logger)

Constructs a client wrapper for the Contexts service, with the specified gRPC client and settings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Contextshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Contexts.ContextsClient` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsSettings` The base [ContextsSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsSettings) used within this client. |
| `logger` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override Contexts.ContextsClient GrpcClient { get; }

The underlying gRPC Contexts client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Contextshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Contexts.ContextsClient` |   |

**Overrides** [ContextsClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_GrpcClient)

### LocationsClient

    public override LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

**Overrides** [ContextsClient.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_LocationsClient)

## Methods

### CreateContext(CreateContextRequest, CallSettings)

    public override Context CreateContext(CreateContextRequest request, CallSettings callSettings = null)

Creates a context.

If the specified context already exists, overrides the context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.CreateContextRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Context` | The RPC response. |

**Overrides** [ContextsClient.CreateContext(CreateContextRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_CreateContext_Google_Cloud_Dialogflow_V2_CreateContextRequest_Google_Api_Gax_Grpc_CallSettings_)

### CreateContextAsync(CreateContextRequest, CallSettings)

    public override Task<Context> CreateContextAsync(CreateContextRequest request, CallSettings callSettings = null)

Creates a context.

If the specified context already exists, overrides the context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.CreateContextRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Context` | A Task containing the RPC response. |

**Overrides** [ContextsClient.CreateContextAsync(CreateContextRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_CreateContextAsync_Google_Cloud_Dialogflow_V2_CreateContextRequest_Google_Api_Gax_Grpc_CallSettings_)

### DeleteAllContexts(DeleteAllContextsRequest, CallSettings)

    public override void DeleteAllContexts(DeleteAllContextsRequest request, CallSettings callSettings = null)

Deletes all active contexts in the specified session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.DeleteAllContextsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Overrides** [ContextsClient.DeleteAllContexts(DeleteAllContextsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteAllContexts_Google_Cloud_Dialogflow_V2_DeleteAllContextsRequest_Google_Api_Gax_Grpc_CallSettings_)

### DeleteAllContextsAsync(DeleteAllContextsRequest, CallSettings)

    public override Task DeleteAllContextsAsync(DeleteAllContextsRequest request, CallSettings callSettings = null)

Deletes all active contexts in the specified session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.DeleteAllContextsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Overrides** [ContextsClient.DeleteAllContextsAsync(DeleteAllContextsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteAllContextsAsync_Google_Cloud_Dialogflow_V2_DeleteAllContextsRequest_Google_Api_Gax_Grpc_CallSettings_)

### DeleteContext(DeleteContextRequest, CallSettings)

    public override void DeleteContext(DeleteContextRequest request, CallSettings callSettings = null)

Deletes the specified context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.DeleteContextRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Overrides** [ContextsClient.DeleteContext(DeleteContextRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteContext_Google_Cloud_Dialogflow_V2_DeleteContextRequest_Google_Api_Gax_Grpc_CallSettings_)

### DeleteContextAsync(DeleteContextRequest, CallSettings)

    public override Task DeleteContextAsync(DeleteContextRequest request, CallSettings callSettings = null)

Deletes the specified context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.DeleteContextRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Overrides** [ContextsClient.DeleteContextAsync(DeleteContextRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_DeleteContextAsync_Google_Cloud_Dialogflow_V2_DeleteContextRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetContext(GetContextRequest, CallSettings)

    public override Context GetContext(GetContextRequest request, CallSettings callSettings = null)

Retrieves the specified context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.GetContextRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Context` | The RPC response. |

**Overrides** [ContextsClient.GetContext(GetContextRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_GetContext_Google_Cloud_Dialogflow_V2_GetContextRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetContextAsync(GetContextRequest, CallSettings)

    public override Task<Context> GetContextAsync(GetContextRequest request, CallSettings callSettings = null)

Retrieves the specified context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.GetContextRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Context` | A Task containing the RPC response. |

**Overrides** [ContextsClient.GetContextAsync(GetContextRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_GetContextAsync_Google_Cloud_Dialogflow_V2_GetContextRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListContexts(ListContextsRequest, CallSettings)

    public override PagedEnumerable<ListContextsResponse, Context> ListContexts(ListContextsRequest request, CallSettings callSettings = null)

Returns the list of all contexts in the specified session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ListContextsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ListContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Context` | A pageable sequence of [Context](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Context) resources. |

**Overrides** [ContextsClient.ListContexts(ListContextsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_ListContexts_Google_Cloud_Dialogflow_V2_ListContextsRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListContextsAsync(ListContextsRequest, CallSettings)

    public override PagedAsyncEnumerable<ListContextsResponse, Context> ListContextsAsync(ListContextsRequest request, CallSettings callSettings = null)

Returns the list of all contexts in the specified session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ListContextsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ListContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Context` | A pageable asynchronous sequence of [Context](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Context) resources. |

**Overrides** [ContextsClient.ListContextsAsync(ListContextsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_ListContextsAsync_Google_Cloud_Dialogflow_V2_ListContextsRequest_Google_Api_Gax_Grpc_CallSettings_)

### UpdateContext(UpdateContextRequest, CallSettings)

    public override Context UpdateContext(UpdateContextRequest request, CallSettings callSettings = null)

Updates the specified context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.UpdateContextRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Context` | The RPC response. |

**Overrides** [ContextsClient.UpdateContext(UpdateContextRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_UpdateContext_Google_Cloud_Dialogflow_V2_UpdateContextRequest_Google_Api_Gax_Grpc_CallSettings_)

### UpdateContextAsync(UpdateContextRequest, CallSettings)

    public override Task<Context> UpdateContextAsync(UpdateContextRequest request, CallSettings callSettings = null)

Updates the specified context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.UpdateContextRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.Context` | A Task containing the RPC response. |

**Overrides** [ContextsClient.UpdateContextAsync(UpdateContextRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextsClient#Google_Cloud_Dialogflow_V2_ContextsClient_UpdateContextAsync_Google_Cloud_Dialogflow_V2_UpdateContextRequest_Google_Api_Gax_Grpc_CallSettings_)