1.1.0 (latest) 1.0.0

    public sealed class WidgetServiceClientImpl : WidgetServiceClient

Reference documentation and code samples for the Gemini Enterprise for Customer Experience v1 API class WidgetServiceClientImpl.

WidgetService client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [WidgetServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt) \> WidgetServiceClientImpl

## Inherited Members

[WidgetServiceClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_DefaultEndpoint) [WidgetServiceClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_DefaultScopes) [WidgetServiceClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_ServiceMetadata) [WidgetServiceClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_CreateAsync_System_Threading_CancellationToken_) [WidgetServiceClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_Create) [WidgetServiceClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_ShutdownDefaultChannelsAsync) [WidgetServiceClient.GenerateChatTokenAsync(GenerateChatTokenRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_GenerateChatTokenAsync_Google_Cloud_Ces_V1_GenerateChatTokenRequest_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.Ces.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.md.txt)

## Assembly

Google.Cloud.Ces.V1.dll

## Remarks

Provides APIs for widgets to interact with CES APIs.

## Constructors

### WidgetServiceClientImpl(WidgetServiceClient, WidgetServiceSettings, ILogger)

    public WidgetServiceClientImpl(WidgetService.WidgetServiceClient grpcClient, WidgetServiceSettings settings, ILogger logger)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `WidgetServiceWidgetServiceClient` The underlying gRPC client. |
| `settings` | `WidgetServiceSettings` The base [WidgetServiceSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceSettings.md.txt) used within this client. |
| `logger` | `ILogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override WidgetService.WidgetServiceClient GrpcClient { get; }

The underlying gRPC WidgetService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `WidgetServiceWidgetServiceClient` |   |

**Overrides** [WidgetServiceClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_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.md.txt) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `LocationsClient` |   |

**Overrides** [WidgetServiceClient.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_LocationsClient)

## Methods

### GenerateChatToken(GenerateChatTokenRequest, CallSettings)

    public override GenerateChatTokenResponse GenerateChatToken(GenerateChatTokenRequest request, CallSettings callSettings = null)

Generates a session scoped token for chat widget to authenticate with
Session APIs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GenerateChatTokenRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GenerateChatTokenResponse` | The RPC response. |

**Overrides** [WidgetServiceClient.GenerateChatToken(GenerateChatTokenRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_GenerateChatToken_Google_Cloud_Ces_V1_GenerateChatTokenRequest_Google_Api_Gax_Grpc_CallSettings_)

### GenerateChatTokenAsync(GenerateChatTokenRequest, CallSettings)

    public override Task<GenerateChatTokenResponse> GenerateChatTokenAsync(GenerateChatTokenRequest request, CallSettings callSettings = null)

Generates a session scoped token for chat widget to authenticate with
Session APIs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GenerateChatTokenRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskGenerateChatTokenResponse` | A Task containing the RPC response. |

**Overrides** [WidgetServiceClient.GenerateChatTokenAsync(GenerateChatTokenRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Ces.V1/latest/Google.Cloud.Ces.V1.WidgetServiceClient.md.txt#Google_Cloud_Ces_V1_WidgetServiceClient_GenerateChatTokenAsync_Google_Cloud_Ces_V1_GenerateChatTokenRequest_Google_Api_Gax_Grpc_CallSettings_)