# Discovery Engine v1 API - Class ServiceCollectionExtensions (1.13.0)

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

- [1.13.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.12.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.11.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.10.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.9.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)
- [1.0.0-beta06](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)

    public static class ServiceCollectionExtensions

Reference documentation and code samples for the Discovery Engine v1 API class ServiceCollectionExtensions.

Static class to provide extension methods to configure API clients.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ServiceCollectionExtensions

## Inherited Members

[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

[Microsoft.Extensions.DependencyInjection](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Microsoft.Extensions.DependencyInjection)

## Assembly

Google.Cloud.DiscoveryEngine.V1.dll

## Methods

### AddAssistantServiceClient(IServiceCollection, Action\<AssistantServiceClientBuilder\>)

    public static IServiceCollection AddAssistantServiceClient(this IServiceCollection services, Action<AssistantServiceClientBuilder> action = null)

Adds a singleton [AssistantServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.AssistantServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.AssistantServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddAssistantServiceClient(IServiceCollection, Action\<IServiceProvider, AssistantServiceClientBuilder\>)

    public static IServiceCollection AddAssistantServiceClient(this IServiceCollection services, Action<IServiceProvider, AssistantServiceClientBuilder> action)

Adds a singleton [AssistantServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.AssistantServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.AssistantServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddCmekConfigServiceClient(IServiceCollection, Action\<CmekConfigServiceClientBuilder\>)

    public static IServiceCollection AddCmekConfigServiceClient(this IServiceCollection services, Action<CmekConfigServiceClientBuilder> action = null)

Adds a singleton [CmekConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddCmekConfigServiceClient(IServiceCollection, Action\<IServiceProvider, CmekConfigServiceClientBuilder\>)

    public static IServiceCollection AddCmekConfigServiceClient(this IServiceCollection services, Action<IServiceProvider, CmekConfigServiceClientBuilder> action)

Adds a singleton [CmekConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddCompletionServiceClient(IServiceCollection, Action\<CompletionServiceClientBuilder\>)

    public static IServiceCollection AddCompletionServiceClient(this IServiceCollection services, Action<CompletionServiceClientBuilder> action = null)

Adds a singleton [CompletionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddCompletionServiceClient(IServiceCollection, Action\<IServiceProvider, CompletionServiceClientBuilder\>)

    public static IServiceCollection AddCompletionServiceClient(this IServiceCollection services, Action<IServiceProvider, CompletionServiceClientBuilder> action)

Adds a singleton [CompletionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddControlServiceClient(IServiceCollection, Action\<ControlServiceClientBuilder\>)

    public static IServiceCollection AddControlServiceClient(this IServiceCollection services, Action<ControlServiceClientBuilder> action = null)

Adds a singleton [ControlServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ControlServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ControlServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddControlServiceClient(IServiceCollection, Action\<IServiceProvider, ControlServiceClientBuilder\>)

    public static IServiceCollection AddControlServiceClient(this IServiceCollection services, Action<IServiceProvider, ControlServiceClientBuilder> action)

Adds a singleton [ControlServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ControlServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ControlServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddConversationalSearchServiceClient(IServiceCollection, Action\<ConversationalSearchServiceClientBuilder\>)

    public static IServiceCollection AddConversationalSearchServiceClient(this IServiceCollection services, Action<ConversationalSearchServiceClientBuilder> action = null)

Adds a singleton [ConversationalSearchServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ConversationalSearchServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ConversationalSearchServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddConversationalSearchServiceClient(IServiceCollection, Action\<IServiceProvider, ConversationalSearchServiceClientBuilder\>)

    public static IServiceCollection AddConversationalSearchServiceClient(this IServiceCollection services, Action<IServiceProvider, ConversationalSearchServiceClientBuilder> action)

Adds a singleton [ConversationalSearchServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ConversationalSearchServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ConversationalSearchServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddDataStoreServiceClient(IServiceCollection, Action\<DataStoreServiceClientBuilder\>)

    public static IServiceCollection AddDataStoreServiceClient(this IServiceCollection services, Action<DataStoreServiceClientBuilder> action = null)

Adds a singleton [DataStoreServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DataStoreServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DataStoreServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddDataStoreServiceClient(IServiceCollection, Action\<IServiceProvider, DataStoreServiceClientBuilder\>)

    public static IServiceCollection AddDataStoreServiceClient(this IServiceCollection services, Action<IServiceProvider, DataStoreServiceClientBuilder> action)

Adds a singleton [DataStoreServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DataStoreServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DataStoreServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddDocumentServiceClient(IServiceCollection, Action\<DocumentServiceClientBuilder\>)

    public static IServiceCollection AddDocumentServiceClient(this IServiceCollection services, Action<DocumentServiceClientBuilder> action = null)

Adds a singleton [DocumentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DocumentServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DocumentServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddDocumentServiceClient(IServiceCollection, Action\<IServiceProvider, DocumentServiceClientBuilder\>)

    public static IServiceCollection AddDocumentServiceClient(this IServiceCollection services, Action<IServiceProvider, DocumentServiceClientBuilder> action)

Adds a singleton [DocumentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DocumentServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DocumentServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddEngineServiceClient(IServiceCollection, Action\<EngineServiceClientBuilder\>)

    public static IServiceCollection AddEngineServiceClient(this IServiceCollection services, Action<EngineServiceClientBuilder> action = null)

Adds a singleton [EngineServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.EngineServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.EngineServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddEngineServiceClient(IServiceCollection, Action\<IServiceProvider, EngineServiceClientBuilder\>)

    public static IServiceCollection AddEngineServiceClient(this IServiceCollection services, Action<IServiceProvider, EngineServiceClientBuilder> action)

Adds a singleton [EngineServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.EngineServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.EngineServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddGroundedGenerationServiceClient(IServiceCollection, Action\<GroundedGenerationServiceClientBuilder\>)

    public static IServiceCollection AddGroundedGenerationServiceClient(this IServiceCollection services, Action<GroundedGenerationServiceClientBuilder> action = null)

Adds a singleton [GroundedGenerationServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GroundedGenerationServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GroundedGenerationServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddGroundedGenerationServiceClient(IServiceCollection, Action\<IServiceProvider, GroundedGenerationServiceClientBuilder\>)

    public static IServiceCollection AddGroundedGenerationServiceClient(this IServiceCollection services, Action<IServiceProvider, GroundedGenerationServiceClientBuilder> action)

Adds a singleton [GroundedGenerationServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GroundedGenerationServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GroundedGenerationServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddIdentityMappingStoreServiceClient(IServiceCollection, Action\<IdentityMappingStoreServiceClientBuilder\>)

    public static IServiceCollection AddIdentityMappingStoreServiceClient(this IServiceCollection services, Action<IdentityMappingStoreServiceClientBuilder> action = null)

Adds a singleton [IdentityMappingStoreServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.IdentityMappingStoreServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.IdentityMappingStoreServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddIdentityMappingStoreServiceClient(IServiceCollection, Action\<IServiceProvider, IdentityMappingStoreServiceClientBuilder\>)

    public static IServiceCollection AddIdentityMappingStoreServiceClient(this IServiceCollection services, Action<IServiceProvider, IdentityMappingStoreServiceClientBuilder> action)

Adds a singleton [IdentityMappingStoreServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.IdentityMappingStoreServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.IdentityMappingStoreServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddProjectServiceClient(IServiceCollection, Action\<ProjectServiceClientBuilder\>)

    public static IServiceCollection AddProjectServiceClient(this IServiceCollection services, Action<ProjectServiceClientBuilder> action = null)

Adds a singleton [ProjectServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ProjectServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ProjectServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddProjectServiceClient(IServiceCollection, Action\<IServiceProvider, ProjectServiceClientBuilder\>)

    public static IServiceCollection AddProjectServiceClient(this IServiceCollection services, Action<IServiceProvider, ProjectServiceClientBuilder> action)

Adds a singleton [ProjectServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ProjectServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ProjectServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddRankServiceClient(IServiceCollection, Action\<RankServiceClientBuilder\>)

    public static IServiceCollection AddRankServiceClient(this IServiceCollection services, Action<RankServiceClientBuilder> action = null)

Adds a singleton [RankServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RankServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RankServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddRankServiceClient(IServiceCollection, Action\<IServiceProvider, RankServiceClientBuilder\>)

    public static IServiceCollection AddRankServiceClient(this IServiceCollection services, Action<IServiceProvider, RankServiceClientBuilder> action)

Adds a singleton [RankServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RankServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RankServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddRecommendationServiceClient(IServiceCollection, Action\<RecommendationServiceClientBuilder\>)

    public static IServiceCollection AddRecommendationServiceClient(this IServiceCollection services, Action<RecommendationServiceClientBuilder> action = null)

Adds a singleton [RecommendationServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RecommendationServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RecommendationServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddRecommendationServiceClient(IServiceCollection, Action\<IServiceProvider, RecommendationServiceClientBuilder\>)

    public static IServiceCollection AddRecommendationServiceClient(this IServiceCollection services, Action<IServiceProvider, RecommendationServiceClientBuilder> action)

Adds a singleton [RecommendationServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RecommendationServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RecommendationServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddSchemaServiceClient(IServiceCollection, Action\<SchemaServiceClientBuilder\>)

    public static IServiceCollection AddSchemaServiceClient(this IServiceCollection services, Action<SchemaServiceClientBuilder> action = null)

Adds a singleton [SchemaServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SchemaServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SchemaServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddSchemaServiceClient(IServiceCollection, Action\<IServiceProvider, SchemaServiceClientBuilder\>)

    public static IServiceCollection AddSchemaServiceClient(this IServiceCollection services, Action<IServiceProvider, SchemaServiceClientBuilder> action)

Adds a singleton [SchemaServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SchemaServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SchemaServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddSearchServiceClient(IServiceCollection, Action\<SearchServiceClientBuilder\>)

    public static IServiceCollection AddSearchServiceClient(this IServiceCollection services, Action<SearchServiceClientBuilder> action = null)

Adds a singleton [SearchServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SearchServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SearchServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddSearchServiceClient(IServiceCollection, Action\<IServiceProvider, SearchServiceClientBuilder\>)

    public static IServiceCollection AddSearchServiceClient(this IServiceCollection services, Action<IServiceProvider, SearchServiceClientBuilder> action)

Adds a singleton [SearchServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SearchServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SearchServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddSearchTuningServiceClient(IServiceCollection, Action\<SearchTuningServiceClientBuilder\>)

    public static IServiceCollection AddSearchTuningServiceClient(this IServiceCollection services, Action<SearchTuningServiceClientBuilder> action = null)

Adds a singleton [SearchTuningServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SearchTuningServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SearchTuningServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddSearchTuningServiceClient(IServiceCollection, Action\<IServiceProvider, SearchTuningServiceClientBuilder\>)

    public static IServiceCollection AddSearchTuningServiceClient(this IServiceCollection services, Action<IServiceProvider, SearchTuningServiceClientBuilder> action)

Adds a singleton [SearchTuningServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SearchTuningServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SearchTuningServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddServingConfigServiceClient(IServiceCollection, Action\<ServingConfigServiceClientBuilder\>)

    public static IServiceCollection AddServingConfigServiceClient(this IServiceCollection services, Action<ServingConfigServiceClientBuilder> action = null)

Adds a singleton [ServingConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddServingConfigServiceClient(IServiceCollection, Action\<IServiceProvider, ServingConfigServiceClientBuilder\>)

    public static IServiceCollection AddServingConfigServiceClient(this IServiceCollection services, Action<IServiceProvider, ServingConfigServiceClientBuilder> action)

Adds a singleton [ServingConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddSessionServiceClient(IServiceCollection, Action\<SessionServiceClientBuilder\>)

    public static IServiceCollection AddSessionServiceClient(this IServiceCollection services, Action<SessionServiceClientBuilder> action = null)

Adds a singleton [SessionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SessionServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SessionServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddSessionServiceClient(IServiceCollection, Action\<IServiceProvider, SessionServiceClientBuilder\>)

    public static IServiceCollection AddSessionServiceClient(this IServiceCollection services, Action<IServiceProvider, SessionServiceClientBuilder> action)

Adds a singleton [SessionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SessionServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SessionServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddSiteSearchEngineServiceClient(IServiceCollection, Action\<SiteSearchEngineServiceClientBuilder\>)

    public static IServiceCollection AddSiteSearchEngineServiceClient(this IServiceCollection services, Action<SiteSearchEngineServiceClientBuilder> action = null)

Adds a singleton [SiteSearchEngineServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SiteSearchEngineServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SiteSearchEngineServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddSiteSearchEngineServiceClient(IServiceCollection, Action\<IServiceProvider, SiteSearchEngineServiceClientBuilder\>)

    public static IServiceCollection AddSiteSearchEngineServiceClient(this IServiceCollection services, Action<IServiceProvider, SiteSearchEngineServiceClientBuilder> action)

Adds a singleton [SiteSearchEngineServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SiteSearchEngineServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.SiteSearchEngineServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddUserEventServiceClient(IServiceCollection, Action\<UserEventServiceClientBuilder\>)

    public static IServiceCollection AddUserEventServiceClient(this IServiceCollection services, Action<UserEventServiceClientBuilder> action = null)

Adds a singleton [UserEventServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UserEventServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UserEventServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddUserEventServiceClient(IServiceCollection, Action\<IServiceProvider, UserEventServiceClientBuilder\>)

    public static IServiceCollection AddUserEventServiceClient(this IServiceCollection services, Action<IServiceProvider, UserEventServiceClientBuilder> action)

Adds a singleton [UserEventServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UserEventServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UserEventServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddUserLicenseServiceClient(IServiceCollection, Action\<UserLicenseServiceClientBuilder\>)

    public static IServiceCollection AddUserLicenseServiceClient(this IServiceCollection services, Action<UserLicenseServiceClientBuilder> action = null)

Adds a singleton [UserLicenseServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UserLicenseServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UserLicenseServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddUserLicenseServiceClient(IServiceCollection, Action\<IServiceProvider, UserLicenseServiceClientBuilder\>)

    public static IServiceCollection AddUserLicenseServiceClient(this IServiceCollection services, Action<IServiceProvider, UserLicenseServiceClientBuilder> action)

Adds a singleton [UserLicenseServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UserLicenseServiceClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UserLicenseServiceClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |