Retail v2 API - Class ServingConfigServiceClientImpl (2.8.0)

public sealed class ServingConfigServiceClientImpl : ServingConfigServiceClient

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

ServingConfigService client wrapper implementation, for convenient use.

Inheritance

object > ServingConfigServiceClient > ServingConfigServiceClientImpl

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Remarks

Service for modifying ServingConfig.

Constructors

ServingConfigServiceClientImpl(ServingConfigServiceClient, ServingConfigServiceSettings, ILogger)

public ServingConfigServiceClientImpl(ServingConfigService.ServingConfigServiceClient grpcClient, ServingConfigServiceSettings settings, ILogger logger)

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

Parameters
Name Description
grpcClient ServingConfigServiceServingConfigServiceClient

The underlying gRPC client.

settings ServingConfigServiceSettings

The base ServingConfigServiceSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override ServingConfigService.ServingConfigServiceClient GrpcClient { get; }

The underlying gRPC ServingConfigService client

Property Value
Type Description
ServingConfigServiceServingConfigServiceClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient
Overrides

Methods

AddControl(AddControlRequest, CallSettings)

public override ServingConfig AddControl(AddControlRequest request, CallSettings callSettings = null)

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

Parameters
Name Description
request AddControlRequest

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
ServingConfig

The RPC response.

Overrides

AddControlAsync(AddControlRequest, CallSettings)

public override Task<ServingConfig> AddControlAsync(AddControlRequest request, CallSettings callSettings = null)

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

Parameters
Name Description
request AddControlRequest

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
TaskServingConfig

A Task containing the RPC response.

Overrides

CreateServingConfig(CreateServingConfigRequest, CallSettings)

public override ServingConfig CreateServingConfig(CreateServingConfigRequest request, CallSettings callSettings = null)

Creates a ServingConfig.

A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.

Parameters
Name Description
request CreateServingConfigRequest

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
ServingConfig

The RPC response.

Overrides

CreateServingConfigAsync(CreateServingConfigRequest, CallSettings)

public override Task<ServingConfig> CreateServingConfigAsync(CreateServingConfigRequest request, CallSettings callSettings = null)

Creates a ServingConfig.

A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.

Parameters
Name Description
request CreateServingConfigRequest

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
TaskServingConfig

A Task containing the RPC response.

Overrides

DeleteServingConfig(DeleteServingConfigRequest, CallSettings)

public override void DeleteServingConfig(DeleteServingConfigRequest request, CallSettings callSettings = null)

Deletes a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request DeleteServingConfigRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteServingConfigAsync(DeleteServingConfigRequest, CallSettings)

public override Task DeleteServingConfigAsync(DeleteServingConfigRequest request, CallSettings callSettings = null)

Deletes a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request DeleteServingConfigRequest

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
Task

A Task containing the RPC response.

Overrides

GetServingConfig(GetServingConfigRequest, CallSettings)

public override ServingConfig GetServingConfig(GetServingConfigRequest request, CallSettings callSettings = null)

Gets a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request GetServingConfigRequest

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
ServingConfig

The RPC response.

Overrides

GetServingConfigAsync(GetServingConfigRequest, CallSettings)

public override Task<ServingConfig> GetServingConfigAsync(GetServingConfigRequest request, CallSettings callSettings = null)

Gets a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request GetServingConfigRequest

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
TaskServingConfig

A Task containing the RPC response.

Overrides

ListServingConfigs(ListServingConfigsRequest, CallSettings)

public override PagedEnumerable<ListServingConfigsResponse, ServingConfig> ListServingConfigs(ListServingConfigsRequest request, CallSettings callSettings = null)

Lists all ServingConfigs linked to this catalog.

Parameters
Name Description
request ListServingConfigsRequest

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
PagedEnumerableListServingConfigsResponseServingConfig

A pageable sequence of ServingConfig resources.

Overrides

ListServingConfigsAsync(ListServingConfigsRequest, CallSettings)

public override PagedAsyncEnumerable<ListServingConfigsResponse, ServingConfig> ListServingConfigsAsync(ListServingConfigsRequest request, CallSettings callSettings = null)

Lists all ServingConfigs linked to this catalog.

Parameters
Name Description
request ListServingConfigsRequest

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
PagedAsyncEnumerableListServingConfigsResponseServingConfig

A pageable asynchronous sequence of ServingConfig resources.

Overrides

RemoveControl(RemoveControlRequest, CallSettings)

public override ServingConfig RemoveControl(RemoveControlRequest request, CallSettings callSettings = null)

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

Parameters
Name Description
request RemoveControlRequest

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
ServingConfig

The RPC response.

Overrides

RemoveControlAsync(RemoveControlRequest, CallSettings)

public override Task<ServingConfig> RemoveControlAsync(RemoveControlRequest request, CallSettings callSettings = null)

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

Parameters
Name Description
request RemoveControlRequest

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
TaskServingConfig

A Task containing the RPC response.

Overrides

UpdateServingConfig(UpdateServingConfigRequest, CallSettings)

public override ServingConfig UpdateServingConfig(UpdateServingConfigRequest request, CallSettings callSettings = null)

Updates a ServingConfig.

Parameters
Name Description
request UpdateServingConfigRequest

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
ServingConfig

The RPC response.

Overrides

UpdateServingConfigAsync(UpdateServingConfigRequest, CallSettings)

public override Task<ServingConfig> UpdateServingConfigAsync(UpdateServingConfigRequest request, CallSettings callSettings = null)

Updates a ServingConfig.

Parameters
Name Description
request UpdateServingConfigRequest

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
TaskServingConfig

A Task containing the RPC response.

Overrides