# Discovery Engine v1 API - Class ServingConfigServiceClient (1.13.0)

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

- [1.13.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.12.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.11.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.10.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.9.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)
- [1.0.0-beta06](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient)

    public abstract class ServingConfigServiceClient

Reference documentation and code samples for the Discovery Engine v1 API class ServingConfigServiceClient.

ServingConfigService client wrapper, for convenient use.

## Inheritance

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

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

## Derived Types

[ServingConfigServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClientImpl)

## Namespace

[Google.Cloud.DiscoveryEngine.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1)

## Assembly

Google.Cloud.DiscoveryEngine.V1.dll

## Remarks

Service for operations related to
\[ServingConfig\]\[google.cloud.discoveryengine.v1.ServingConfig\].

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the ServingConfigService service, which is a host of
"discoveryengine.googleapis.com" and a port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default ServingConfigService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default ServingConfigService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

<br />

### GrpcClient

    public virtual ServingConfigService.ServingConfigServiceClient GrpcClient { get; }

The underlying gRPC ServingConfigService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigService.ServingConfigServiceClient` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### Create()

    public static ServingConfigServiceClient Create()

Synchronously creates a [ServingConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use
[ServingConfigServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient` | The created [ServingConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient). |

### CreateAsync(CancellationToken)

    public static Task<ServingConfigServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [ServingConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[ServingConfigServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient` | The task representing the created [ServingConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient). |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient#Google_Cloud_DiscoveryEngine_V1_ServingConfigServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient#Google_Cloud_DiscoveryEngine_V1_ServingConfigServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient#Google_Cloud_DiscoveryEngine_V1_ServingConfigServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfigServiceClient#Google_Cloud_DiscoveryEngine_V1_ServingConfigServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateServingConfig(ServingConfig, FieldMask, CallSettings)

    public virtual ServingConfig UpdateServingConfig(ServingConfig servingConfig, FieldMask updateMask, CallSettings callSettings = null)

Updates a ServingConfig.

Returns a NOT_FOUND error if the ServingConfig does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `servingConfig` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfig` Required. The ServingConfig to update. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which fields in the provided \[ServingConfig\]\[google.cloud.discoveryengine.v1.ServingConfig\] to update. The following are NOT supported: - \[ServingConfig.name\]\[google.cloud.discoveryengine.v1.ServingConfig.name\] If not set, all supported fields are updated. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfig` | The RPC response. |

**Example**

    // Create client
    ServingConfigServiceClient servingConfigServiceClient = ServingConfigServiceClient.Create();
    // Initialize request argument(s)
    ServingConfig servingConfig = new ServingConfig();
    FieldMask updateMask = new FieldMask();
    // Make the request
    ServingConfig response = servingConfigServiceClient.UpdateServingConfig(servingConfig, updateMask);

### UpdateServingConfig(UpdateServingConfigRequest, CallSettings)

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

Updates a ServingConfig.

Returns a NOT_FOUND error if the ServingConfig does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateServingConfigRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfig` | The RPC response. |

**Example**

    // Create client
    ServingConfigServiceClient servingConfigServiceClient = ServingConfigServiceClient.Create();
    // Initialize request argument(s)
    UpdateServingConfigRequest request = new UpdateServingConfigRequest
    {
        ServingConfig = new ServingConfig(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    ServingConfig response = servingConfigServiceClient.UpdateServingConfig(request);

### UpdateServingConfigAsync(ServingConfig, FieldMask, CallSettings)

    public virtual Task<ServingConfig> UpdateServingConfigAsync(ServingConfig servingConfig, FieldMask updateMask, CallSettings callSettings = null)

Updates a ServingConfig.

Returns a NOT_FOUND error if the ServingConfig does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `servingConfig` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfig` Required. The ServingConfig to update. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which fields in the provided \[ServingConfig\]\[google.cloud.discoveryengine.v1.ServingConfig\] to update. The following are NOT supported: - \[ServingConfig.name\]\[google.cloud.discoveryengine.v1.ServingConfig.name\] If not set, all supported fields are updated. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    ServingConfigServiceClient servingConfigServiceClient = await ServingConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    ServingConfig servingConfig = new ServingConfig();
    FieldMask updateMask = new FieldMask();
    // Make the request
    ServingConfig response = await servingConfigServiceClient.UpdateServingConfigAsync(servingConfig, updateMask);

### UpdateServingConfigAsync(ServingConfig, FieldMask, CancellationToken)

    public virtual Task<ServingConfig> UpdateServingConfigAsync(ServingConfig servingConfig, FieldMask updateMask, CancellationToken cancellationToken)

Updates a ServingConfig.

Returns a NOT_FOUND error if the ServingConfig does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `servingConfig` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfig` Required. The ServingConfig to update. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which fields in the provided \[ServingConfig\]\[google.cloud.discoveryengine.v1.ServingConfig\] to update. The following are NOT supported: - \[ServingConfig.name\]\[google.cloud.discoveryengine.v1.ServingConfig.name\] If not set, all supported fields are updated. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    ServingConfigServiceClient servingConfigServiceClient = await ServingConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    ServingConfig servingConfig = new ServingConfig();
    FieldMask updateMask = new FieldMask();
    // Make the request
    ServingConfig response = await servingConfigServiceClient.UpdateServingConfigAsync(servingConfig, updateMask);

### UpdateServingConfigAsync(UpdateServingConfigRequest, CallSettings)

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

Updates a ServingConfig.

Returns a NOT_FOUND error if the ServingConfig does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateServingConfigRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    ServingConfigServiceClient servingConfigServiceClient = await ServingConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateServingConfigRequest request = new UpdateServingConfigRequest
    {
        ServingConfig = new ServingConfig(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    ServingConfig response = await servingConfigServiceClient.UpdateServingConfigAsync(request);

### UpdateServingConfigAsync(UpdateServingConfigRequest, CancellationToken)

    public virtual Task<ServingConfig> UpdateServingConfigAsync(UpdateServingConfigRequest request, CancellationToken cancellationToken)

Updates a ServingConfig.

Returns a NOT_FOUND error if the ServingConfig does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateServingConfigRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ServingConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    ServingConfigServiceClient servingConfigServiceClient = await ServingConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateServingConfigRequest request = new UpdateServingConfigRequest
    {
        ServingConfig = new ServingConfig(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    ServingConfig response = await servingConfigServiceClient.UpdateServingConfigAsync(request);