Retail v2 API - Class ServingConfigService.ServingConfigServiceBase (2.3.0)

[BindServiceMethod(typeof(ServingConfigService), "BindService")]
public abstract class ServingConfigServiceBase

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

Base class for server-side implementations of ServingConfigService

Inheritance

Object > ServingConfigService.ServingConfigServiceBase

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Methods

AddControl(AddControlRequest, ServerCallContext)

public virtual Task<ServingConfig> AddControl(AddControlRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ServingConfig>

The response to send back to the client (wrapped by a task).

CreateServingConfig(CreateServingConfigRequest, ServerCallContext)

public virtual Task<ServingConfig> CreateServingConfig(CreateServingConfigRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ServingConfig>

The response to send back to the client (wrapped by a task).

DeleteServingConfig(DeleteServingConfigRequest, ServerCallContext)

public virtual Task<Empty> DeleteServingConfig(DeleteServingConfigRequest request, ServerCallContext context)

Deletes a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
NameDescription
requestDeleteServingConfigRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Empty>

The response to send back to the client (wrapped by a task).

GetServingConfig(GetServingConfigRequest, ServerCallContext)

public virtual Task<ServingConfig> GetServingConfig(GetServingConfigRequest request, ServerCallContext context)

Gets a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
NameDescription
requestGetServingConfigRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ServingConfig>

The response to send back to the client (wrapped by a task).

ListServingConfigs(ListServingConfigsRequest, ServerCallContext)

public virtual Task<ListServingConfigsResponse> ListServingConfigs(ListServingConfigsRequest request, ServerCallContext context)

Lists all ServingConfigs linked to this catalog.

Parameters
NameDescription
requestListServingConfigsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ListServingConfigsResponse>

The response to send back to the client (wrapped by a task).

RemoveControl(RemoveControlRequest, ServerCallContext)

public virtual Task<ServingConfig> RemoveControl(RemoveControlRequest request, ServerCallContext context)

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 received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ServingConfig>

The response to send back to the client (wrapped by a task).

UpdateServingConfig(UpdateServingConfigRequest, ServerCallContext)

public virtual Task<ServingConfig> UpdateServingConfig(UpdateServingConfigRequest request, ServerCallContext context)

Updates a ServingConfig.

Parameters
NameDescription
requestUpdateServingConfigRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ServingConfig>

The response to send back to the client (wrapped by a task).