Retail v2 API - Class ServingConfigServiceClientImpl (2.3.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(ServingConfigService.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
NameDescription
grpcClientServingConfigService.ServingConfigServiceClient

The underlying gRPC client.

settingsServingConfigServiceSettings

The base ServingConfigServiceSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override ServingConfigService.ServingConfigServiceClient GrpcClient { get; }

The underlying gRPC ServingConfigService client

Property Value
TypeDescription
ServingConfigService.ServingConfigServiceClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
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
NameDescription
requestAddControlRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestAddControlRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ServingConfig>

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
NameDescription
requestCreateServingConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateServingConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ServingConfig>

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
NameDescription
requestDeleteServingConfigRequest

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

callSettingsCallSettings

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
NameDescription
requestDeleteServingConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetServingConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetServingConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ServingConfig>

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
NameDescription
requestListServingConfigsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListServingConfigsResponse, ServingConfig>

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
NameDescription
requestListServingConfigsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListServingConfigsResponse, ServingConfig>

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
NameDescription
requestRemoveControlRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestRemoveControlRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ServingConfig>

A Task containing the RPC response.

Overrides

UpdateServingConfig(UpdateServingConfigRequest, CallSettings)

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

Updates a ServingConfig.

Parameters
NameDescription
requestUpdateServingConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ServingConfig

The RPC response.

Overrides

UpdateServingConfigAsync(UpdateServingConfigRequest, CallSettings)

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

Updates a ServingConfig.

Parameters
NameDescription
requestUpdateServingConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ServingConfig>

A Task containing the RPC response.

Overrides