# Retail v2 API - Class CompletionServiceClientBuilder (2.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.16.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.15.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.15.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.14.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.13.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.12.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.11.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.10.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.9.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.8.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.7.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.6.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.5.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.4.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.3.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.2.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.1.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.0.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.6.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.5.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.4.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.3.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.2.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.1.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.0.0/Google.Cloud.Retail.V2.CompletionServiceClientBuilder)

    public sealed class CompletionServiceClientBuilder : ClientBuilderBase<CompletionServiceClient>

Reference documentation and code samples for the Retail v2 API class CompletionServiceClientBuilder.

Builder class for [CompletionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionServiceClient) to provide simple configuration of credentials, endpoint
etc.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBuilderBase](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html)[CompletionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionServiceClient) \> CompletionServiceClientBuilder

## Inherited Members

[ClientBuilderBase\<CompletionServiceClient\>.Build(IServiceProvider)](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_Build_System_IServiceProvider_) [ClientBuilderBase\<CompletionServiceClient\>.BuildAsync(IServiceProvider, CancellationToken)](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_BuildAsync_System_IServiceProvider_System_Threading_CancellationToken_) [ClientBuilderBase\<CompletionServiceClient\>.UniverseDomain](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_UniverseDomain) [ClientBuilderBase\<CompletionServiceClient\>.Endpoint](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_Endpoint) [ClientBuilderBase\<CompletionServiceClient\>.Logger](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_Logger) [ClientBuilderBase\<CompletionServiceClient\>.Scopes](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_Scopes) [ClientBuilderBase\<CompletionServiceClient\>.ChannelCredentials](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_ChannelCredentials) [ClientBuilderBase\<CompletionServiceClient\>.CredentialsPath](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_CredentialsPath) [ClientBuilderBase\<CompletionServiceClient\>.JsonCredentials](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_JsonCredentials) [ClientBuilderBase\<CompletionServiceClient\>.GoogleCredential](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_GoogleCredential) [ClientBuilderBase\<CompletionServiceClient\>.Credential](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_Credential) [ClientBuilderBase\<CompletionServiceClient\>.TokenAccessMethod](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_TokenAccessMethod) [ClientBuilderBase\<CompletionServiceClient\>.CallInvoker](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_CallInvoker) [ClientBuilderBase\<CompletionServiceClient\>.UserAgent](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_UserAgent) [ClientBuilderBase\<CompletionServiceClient\>.GrpcAdapter](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_GrpcAdapter) [ClientBuilderBase\<CompletionServiceClient\>.ApiKey](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_ApiKey) [ClientBuilderBase\<CompletionServiceClient\>.QuotaProject](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_QuotaProject) [ClientBuilderBase\<CompletionServiceClient\>.GrpcChannelOptions](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_GrpcChannelOptions) [ClientBuilderBase\<CompletionServiceClient\>.LastCreatedChannel](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_LastCreatedChannel) [ClientBuilderBase\<CompletionServiceClient\>.UseJwtAccessWithScopes](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_UseJwtAccessWithScopes) [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.Retail.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2)

## Assembly

Google.Cloud.Retail.V2.dll

## Constructors

### CompletionServiceClientBuilder()

    public CompletionServiceClientBuilder()

Creates a new builder with default settings.

## Properties

### Settings

    public CompletionServiceSettings Settings { get; set; }

The settings to use for RPCs, or `null` for the default settings.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionServiceSettings` |   |

## Methods

### Build()

    public override CompletionServiceClient Build()

Builds the resulting client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionServiceClient` |   |

**Overrides** Google.Api.Gax.Grpc.ClientBuilderBase\<Google.Cloud.Retail.V2.CompletionServiceClient\>.Build()

### BuildAsync(CancellationToken)

    public override Task<CompletionServiceClient> BuildAsync(CancellationToken cancellationToken = default)

Builds the resulting client asynchronously.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionServiceClient` |   |

**Overrides** Google.Api.Gax.Grpc.ClientBuilderBase\<Google.Cloud.Retail.V2.CompletionServiceClient\>.BuildAsync(System.Threading.CancellationToken)

### GetChannelPool()

    protected override ChannelPool GetChannelPool()

Returns the channel pool to use when no other options are specified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ChannelPool.html` |   |

**Overrides** Google.Api.Gax.Grpc.ClientBuilderBase\<Google.Cloud.Retail.V2.CompletionServiceClient\>.GetChannelPool()