Discovery Engine v1 API - Class ServiceCollectionExtensions (1.1.0)

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 > ServiceCollectionExtensions

Namespace

Microsoft.Extensions.DependencyInjection

Assembly

Google.Cloud.DiscoveryEngine.V1.dll

Methods

AddCompletionServiceClient(IServiceCollection, Action<CompletionServiceClientBuilder>)

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

Adds a singleton CompletionServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionCompletionServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddCompletionServiceClient(IServiceCollection, Action<IServiceProvider, CompletionServiceClientBuilder>)

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

Adds a singleton CompletionServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderCompletionServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddControlServiceClient(IServiceCollection, Action<ControlServiceClientBuilder>)

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

Adds a singleton ControlServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionControlServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddControlServiceClient(IServiceCollection, Action<IServiceProvider, ControlServiceClientBuilder>)

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

Adds a singleton ControlServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderControlServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddConversationalSearchServiceClient(IServiceCollection, Action<ConversationalSearchServiceClientBuilder>)

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

Adds a singleton ConversationalSearchServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionConversationalSearchServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddConversationalSearchServiceClient(IServiceCollection, Action<IServiceProvider, ConversationalSearchServiceClientBuilder>)

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

Adds a singleton ConversationalSearchServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderConversationalSearchServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddDataStoreServiceClient(IServiceCollection, Action<DataStoreServiceClientBuilder>)

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

Adds a singleton DataStoreServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionDataStoreServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddDataStoreServiceClient(IServiceCollection, Action<IServiceProvider, DataStoreServiceClientBuilder>)

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

Adds a singleton DataStoreServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderDataStoreServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddDocumentServiceClient(IServiceCollection, Action<DocumentServiceClientBuilder>)

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

Adds a singleton DocumentServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionDocumentServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddDocumentServiceClient(IServiceCollection, Action<IServiceProvider, DocumentServiceClientBuilder>)

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

Adds a singleton DocumentServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderDocumentServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddEngineServiceClient(IServiceCollection, Action<EngineServiceClientBuilder>)

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

Adds a singleton EngineServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionEngineServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddEngineServiceClient(IServiceCollection, Action<IServiceProvider, EngineServiceClientBuilder>)

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

Adds a singleton EngineServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderEngineServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddGroundedGenerationServiceClient(IServiceCollection, Action<GroundedGenerationServiceClientBuilder>)

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

Adds a singleton GroundedGenerationServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionGroundedGenerationServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddGroundedGenerationServiceClient(IServiceCollection, Action<IServiceProvider, GroundedGenerationServiceClientBuilder>)

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

Adds a singleton GroundedGenerationServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderGroundedGenerationServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddProjectServiceClient(IServiceCollection, Action<ProjectServiceClientBuilder>)

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

Adds a singleton ProjectServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionProjectServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddProjectServiceClient(IServiceCollection, Action<IServiceProvider, ProjectServiceClientBuilder>)

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

Adds a singleton ProjectServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderProjectServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddRankServiceClient(IServiceCollection, Action<RankServiceClientBuilder>)

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

Adds a singleton RankServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionRankServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddRankServiceClient(IServiceCollection, Action<IServiceProvider, RankServiceClientBuilder>)

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

Adds a singleton RankServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderRankServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddRecommendationServiceClient(IServiceCollection, Action<RecommendationServiceClientBuilder>)

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

Adds a singleton RecommendationServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionRecommendationServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddRecommendationServiceClient(IServiceCollection, Action<IServiceProvider, RecommendationServiceClientBuilder>)

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

Adds a singleton RecommendationServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderRecommendationServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddSchemaServiceClient(IServiceCollection, Action<SchemaServiceClientBuilder>)

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

Adds a singleton SchemaServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionSchemaServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddSchemaServiceClient(IServiceCollection, Action<IServiceProvider, SchemaServiceClientBuilder>)

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

Adds a singleton SchemaServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderSchemaServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddSearchServiceClient(IServiceCollection, Action<SearchServiceClientBuilder>)

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

Adds a singleton SearchServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionSearchServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddSearchServiceClient(IServiceCollection, Action<IServiceProvider, SearchServiceClientBuilder>)

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

Adds a singleton SearchServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderSearchServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddSiteSearchEngineServiceClient(IServiceCollection, Action<SiteSearchEngineServiceClientBuilder>)

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

Adds a singleton SiteSearchEngineServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionSiteSearchEngineServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddSiteSearchEngineServiceClient(IServiceCollection, Action<IServiceProvider, SiteSearchEngineServiceClientBuilder>)

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

Adds a singleton SiteSearchEngineServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderSiteSearchEngineServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddUserEventServiceClient(IServiceCollection, Action<UserEventServiceClientBuilder>)

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

Adds a singleton UserEventServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionUserEventServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection

AddUserEventServiceClient(IServiceCollection, Action<IServiceProvider, UserEventServiceClientBuilder>)

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

Adds a singleton UserEventServiceClient to services.

Parameters
Name Description
services IServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

action ActionIServiceProviderUserEventServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection