# Retail v2 API - Class ServingConfigService.ServingConfigServiceBase (2.16.0)

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

- [2.16.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.15.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.15.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.14.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.13.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.12.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.11.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.10.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.9.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.8.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.7.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.6.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.5.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.4.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.3.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.2.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.1.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.0.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.6.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.5.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.4.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.3.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.2.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.1.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.0.0/Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceBase)

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

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

Base class for server-side implementations of ServingConfigService

## Inheritance

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

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

[Google.Cloud.Retail.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddControlRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CreateServingConfigRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.DeleteServingConfigRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | 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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.GetServingConfigRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ListServingConfigsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveControlRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.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** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.UpdateServingConfigRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ServingConfig` | The response to send back to the client (wrapped by a task). |