1.15.0 (latest) 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0-beta06

    public abstract class CompletionServiceClient

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

CompletionService client wrapper, for convenient use.

## Inheritance

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

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

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

## 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 Auto-Completion.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the CompletionService 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 CompletionService 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 CompletionService scopes are:

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

### GrpcClient

    public virtual CompletionService.CompletionServiceClient GrpcClient { get; }

The underlying gRPC CompletionService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionService.CompletionServiceClient` |   |

### ImportCompletionSuggestionsOperationsClient

    public virtual OperationsClient ImportCompletionSuggestionsOperationsClient { get; }

The long-running operations client for `ImportCompletionSuggestions`.

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

### ImportSuggestionDenyListEntriesOperationsClient

    public virtual OperationsClient ImportSuggestionDenyListEntriesOperationsClient { get; }

The long-running operations client for `ImportSuggestionDenyListEntries`.

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

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

### PurgeCompletionSuggestionsOperationsClient

    public virtual OperationsClient PurgeCompletionSuggestionsOperationsClient { get; }

The long-running operations client for `PurgeCompletionSuggestions`.

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

### PurgeSuggestionDenyListEntriesOperationsClient

    public virtual OperationsClient PurgeSuggestionDenyListEntriesOperationsClient { get; }

The long-running operations client for `PurgeSuggestionDenyListEntries`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.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

### CompleteQuery(CompleteQueryRequest, CallSettings)

    public virtual CompleteQueryResponse CompleteQuery(CompleteQueryRequest request, CallSettings callSettings = null)

Completes the specified user input with keyword suggestions.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest` 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.CompleteQueryResponse` | The RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = CompletionServiceClient.Create();
    // Initialize request argument(s)
    CompleteQueryRequest request = new CompleteQueryRequest
    {
        DataStoreAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
        Query = "",
        QueryModel = "",
        UserPseudoId = "",
        IncludeTailSuggestions = false,
    };
    // Make the request
    CompleteQueryResponse response = completionServiceClient.CompleteQuery(request);

### CompleteQueryAsync(CompleteQueryRequest, CallSettings)

    public virtual Task<CompleteQueryResponse> CompleteQueryAsync(CompleteQueryRequest request, CallSettings callSettings = null)

Completes the specified user input with keyword suggestions.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest` 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.CompleteQueryResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
    // Initialize request argument(s)
    CompleteQueryRequest request = new CompleteQueryRequest
    {
        DataStoreAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
        Query = "",
        QueryModel = "",
        UserPseudoId = "",
        IncludeTailSuggestions = false,
    };
    // Make the request
    CompleteQueryResponse response = await completionServiceClient.CompleteQueryAsync(request);

### CompleteQueryAsync(CompleteQueryRequest, CancellationToken)

    public virtual Task<CompleteQueryResponse> CompleteQueryAsync(CompleteQueryRequest request, CancellationToken cancellationToken)

Completes the specified user input with keyword suggestions.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompleteQueryRequest` 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.CompleteQueryResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
    // Initialize request argument(s)
    CompleteQueryRequest request = new CompleteQueryRequest
    {
        DataStoreAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
        Query = "",
        QueryModel = "",
        UserPseudoId = "",
        IncludeTailSuggestions = false,
    };
    // Make the request
    CompleteQueryResponse response = await completionServiceClient.CompleteQueryAsync(request);

### Create()

    public static CompletionServiceClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

| **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.CompletionServiceClient` | The task representing the created [CompletionServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionServiceClient). |

### ImportCompletionSuggestions(ImportCompletionSuggestionsRequest, CallSettings)

    public virtual Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> ImportCompletionSuggestions(ImportCompletionSuggestionsRequest request, CallSettings callSettings = null)

Imports
\[CompletionSuggestion\]\[google.cloud.discoveryengine.v1.CompletionSuggestion\]s
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsMetadata` | The RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = CompletionServiceClient.Create();
    // Initialize request argument(s)
    ImportCompletionSuggestionsRequest request = new ImportCompletionSuggestionsRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
        InlineSource = new ImportCompletionSuggestionsRequest.Types.InlineSource(),
        ErrorConfig = new ImportErrorConfig(),
    };
    // Make the request
    Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> response = completionServiceClient.ImportCompletionSuggestions(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    ImportCompletionSuggestionsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> retrievedResponse = completionServiceClient.PollOnceImportCompletionSuggestions(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
    }

### ImportCompletionSuggestionsAsync(ImportCompletionSuggestionsRequest, CallSettings)

    public virtual Task<Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata>> ImportCompletionSuggestionsAsync(ImportCompletionSuggestionsRequest request, CallSettings callSettings = null)

Imports
\[CompletionSuggestion\]\[google.cloud.discoveryengine.v1.CompletionSuggestion\]s
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
    // Initialize request argument(s)
    ImportCompletionSuggestionsRequest request = new ImportCompletionSuggestionsRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
        InlineSource = new ImportCompletionSuggestionsRequest.Types.InlineSource(),
        ErrorConfig = new ImportErrorConfig(),
    };
    // Make the request
    Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> response = await completionServiceClient.ImportCompletionSuggestionsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ImportCompletionSuggestionsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> retrievedResponse = await completionServiceClient.PollOnceImportCompletionSuggestionsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
    }

### ImportCompletionSuggestionsAsync(ImportCompletionSuggestionsRequest, CancellationToken)

    public virtual Task<Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata>> ImportCompletionSuggestionsAsync(ImportCompletionSuggestionsRequest request, CancellationToken cancellationToken)

Imports
\[CompletionSuggestion\]\[google.cloud.discoveryengine.v1.CompletionSuggestion\]s
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
    // Initialize request argument(s)
    ImportCompletionSuggestionsRequest request = new ImportCompletionSuggestionsRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
        InlineSource = new ImportCompletionSuggestionsRequest.Types.InlineSource(),
        ErrorConfig = new ImportErrorConfig(),
    };
    // Make the request
    Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> response = await completionServiceClient.ImportCompletionSuggestionsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ImportCompletionSuggestionsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> retrievedResponse = await completionServiceClient.PollOnceImportCompletionSuggestionsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
    }

### ImportSuggestionDenyListEntries(ImportSuggestionDenyListEntriesRequest, CallSettings)

    public virtual Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> ImportSuggestionDenyListEntries(ImportSuggestionDenyListEntriesRequest request, CallSettings callSettings = null)

Imports all
\[SuggestionDenyListEntry\]\[google.cloud.discoveryengine.v1.SuggestionDenyListEntry\]
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesMetadata` | The RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = CompletionServiceClient.Create();
    // Initialize request argument(s)
    ImportSuggestionDenyListEntriesRequest request = new ImportSuggestionDenyListEntriesRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
        InlineSource = new ImportSuggestionDenyListEntriesRequest.Types.InlineSource(),
    };
    // Make the request
    Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> response = completionServiceClient.ImportSuggestionDenyListEntries(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    ImportSuggestionDenyListEntriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> retrievedResponse = completionServiceClient.PollOnceImportSuggestionDenyListEntries(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
    }

### ImportSuggestionDenyListEntriesAsync(ImportSuggestionDenyListEntriesRequest, CallSettings)

    public virtual Task<Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata>> ImportSuggestionDenyListEntriesAsync(ImportSuggestionDenyListEntriesRequest request, CallSettings callSettings = null)

Imports all
\[SuggestionDenyListEntry\]\[google.cloud.discoveryengine.v1.SuggestionDenyListEntry\]
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
    // Initialize request argument(s)
    ImportSuggestionDenyListEntriesRequest request = new ImportSuggestionDenyListEntriesRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
        InlineSource = new ImportSuggestionDenyListEntriesRequest.Types.InlineSource(),
    };
    // Make the request
    Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> response = await completionServiceClient.ImportSuggestionDenyListEntriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ImportSuggestionDenyListEntriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> retrievedResponse = await completionServiceClient.PollOnceImportSuggestionDenyListEntriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
    }

### ImportSuggestionDenyListEntriesAsync(ImportSuggestionDenyListEntriesRequest, CancellationToken)

    public virtual Task<Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata>> ImportSuggestionDenyListEntriesAsync(ImportSuggestionDenyListEntriesRequest request, CancellationToken cancellationToken)

Imports all
\[SuggestionDenyListEntry\]\[google.cloud.discoveryengine.v1.SuggestionDenyListEntry\]
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
    // Initialize request argument(s)
    ImportSuggestionDenyListEntriesRequest request = new ImportSuggestionDenyListEntriesRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
        InlineSource = new ImportSuggestionDenyListEntriesRequest.Types.InlineSource(),
    };
    // Make the request
    Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> response = await completionServiceClient.ImportSuggestionDenyListEntriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ImportSuggestionDenyListEntriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> retrievedResponse = await completionServiceClient.PollOnceImportSuggestionDenyListEntriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
    }

### PollOnceImportCompletionSuggestions(string, CallSettings)

    public virtual Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> PollOnceImportCompletionSuggestions(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of
`ImportCompletionSuggestions`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsMetadata` | The result of polling the operation. |

### PollOnceImportCompletionSuggestionsAsync(string, CallSettings)

    public virtual Task<Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata>> PollOnceImportCompletionSuggestionsAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`ImportCompletionSuggestions`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportCompletionSuggestionsMetadata` | A task representing the result of polling the operation. |

### PollOnceImportSuggestionDenyListEntries(string, CallSettings)

    public virtual Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> PollOnceImportSuggestionDenyListEntries(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of
`ImportSuggestionDenyListEntries`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesMetadata` | The result of polling the operation. |

### PollOnceImportSuggestionDenyListEntriesAsync(string, CallSettings)

    public virtual Task<Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata>> PollOnceImportSuggestionDenyListEntriesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`ImportSuggestionDenyListEntries`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ImportSuggestionDenyListEntriesMetadata` | A task representing the result of polling the operation. |

### PollOncePurgeCompletionSuggestions(string, CallSettings)

    public virtual Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> PollOncePurgeCompletionSuggestions(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of
`PurgeCompletionSuggestions`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsMetadata` | The result of polling the operation. |

### PollOncePurgeCompletionSuggestionsAsync(string, CallSettings)

    public virtual Task<Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata>> PollOncePurgeCompletionSuggestionsAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`PurgeCompletionSuggestions`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsMetadata` | A task representing the result of polling the operation. |

### PollOncePurgeSuggestionDenyListEntries(string, CallSettings)

    public virtual Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> PollOncePurgeSuggestionDenyListEntries(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of
`PurgeSuggestionDenyListEntries`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesMetadata` | The result of polling the operation. |

### PollOncePurgeSuggestionDenyListEntriesAsync(string, CallSettings)

    public virtual Task<Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata>> PollOncePurgeSuggestionDenyListEntriesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`PurgeSuggestionDenyListEntries`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesMetadata` | A task representing the result of polling the operation. |

### PurgeCompletionSuggestions(PurgeCompletionSuggestionsRequest, CallSettings)

    public virtual Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> PurgeCompletionSuggestions(PurgeCompletionSuggestionsRequest request, CallSettings callSettings = null)

Permanently deletes all
\[CompletionSuggestion\]\[google.cloud.discoveryengine.v1.CompletionSuggestion\]s
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsMetadata` | The RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = CompletionServiceClient.Create();
    // Initialize request argument(s)
    PurgeCompletionSuggestionsRequest request = new PurgeCompletionSuggestionsRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    };
    // Make the request
    Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> response = completionServiceClient.PurgeCompletionSuggestions(request);

    // Poll until the returned long-running operation is complete
    Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    PurgeCompletionSuggestionsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> retrievedResponse = completionServiceClient.PollOncePurgeCompletionSuggestions(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        PurgeCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
    }

### PurgeCompletionSuggestionsAsync(PurgeCompletionSuggestionsRequest, CallSettings)

    public virtual Task<Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata>> PurgeCompletionSuggestionsAsync(PurgeCompletionSuggestionsRequest request, CallSettings callSettings = null)

Permanently deletes all
\[CompletionSuggestion\]\[google.cloud.discoveryengine.v1.CompletionSuggestion\]s
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
    // Initialize request argument(s)
    PurgeCompletionSuggestionsRequest request = new PurgeCompletionSuggestionsRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    };
    // Make the request
    Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> response = await completionServiceClient.PurgeCompletionSuggestionsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    PurgeCompletionSuggestionsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> retrievedResponse = await completionServiceClient.PollOncePurgeCompletionSuggestionsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        PurgeCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
    }

### PurgeCompletionSuggestionsAsync(PurgeCompletionSuggestionsRequest, CancellationToken)

    public virtual Task<Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata>> PurgeCompletionSuggestionsAsync(PurgeCompletionSuggestionsRequest request, CancellationToken cancellationToken)

Permanently deletes all
\[CompletionSuggestion\]\[google.cloud.discoveryengine.v1.CompletionSuggestion\]s
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeCompletionSuggestionsMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
    // Initialize request argument(s)
    PurgeCompletionSuggestionsRequest request = new PurgeCompletionSuggestionsRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    };
    // Make the request
    Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> response = await completionServiceClient.PurgeCompletionSuggestionsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    PurgeCompletionSuggestionsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> retrievedResponse = await completionServiceClient.PollOncePurgeCompletionSuggestionsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        PurgeCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
    }

### PurgeSuggestionDenyListEntries(PurgeSuggestionDenyListEntriesRequest, CallSettings)

    public virtual Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> PurgeSuggestionDenyListEntries(PurgeSuggestionDenyListEntriesRequest request, CallSettings callSettings = null)

Permanently deletes all
\[SuggestionDenyListEntry\]\[google.cloud.discoveryengine.v1.SuggestionDenyListEntry\]
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesMetadata` | The RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = CompletionServiceClient.Create();
    // Initialize request argument(s)
    PurgeSuggestionDenyListEntriesRequest request = new PurgeSuggestionDenyListEntriesRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    };
    // Make the request
    Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> response = completionServiceClient.PurgeSuggestionDenyListEntries(request);

    // Poll until the returned long-running operation is complete
    Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    PurgeSuggestionDenyListEntriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> retrievedResponse = completionServiceClient.PollOncePurgeSuggestionDenyListEntries(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        PurgeSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
    }

### PurgeSuggestionDenyListEntriesAsync(PurgeSuggestionDenyListEntriesRequest, CallSettings)

    public virtual Task<Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata>> PurgeSuggestionDenyListEntriesAsync(PurgeSuggestionDenyListEntriesRequest request, CallSettings callSettings = null)

Permanently deletes all
\[SuggestionDenyListEntry\]\[google.cloud.discoveryengine.v1.SuggestionDenyListEntry\]
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
    // Initialize request argument(s)
    PurgeSuggestionDenyListEntriesRequest request = new PurgeSuggestionDenyListEntriesRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    };
    // Make the request
    Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> response = await completionServiceClient.PurgeSuggestionDenyListEntriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    PurgeSuggestionDenyListEntriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> retrievedResponse = await completionServiceClient.PollOncePurgeSuggestionDenyListEntriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        PurgeSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
    }

### PurgeSuggestionDenyListEntriesAsync(PurgeSuggestionDenyListEntriesRequest, CancellationToken)

    public virtual Task<Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata>> PurgeSuggestionDenyListEntriesAsync(PurgeSuggestionDenyListEntriesRequest request, CancellationToken cancellationToken)

Permanently deletes all
\[SuggestionDenyListEntry\]\[google.cloud.discoveryengine.v1.SuggestionDenyListEntry\]
for a DataStore.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeSuggestionDenyListEntriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
    // Initialize request argument(s)
    PurgeSuggestionDenyListEntriesRequest request = new PurgeSuggestionDenyListEntriesRequest
    {
        ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    };
    // Make the request
    Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> response = await completionServiceClient.PurgeSuggestionDenyListEntriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    PurgeSuggestionDenyListEntriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> retrievedResponse = await completionServiceClient.PollOncePurgeSuggestionDenyListEntriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        PurgeSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
    }

### 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.CompletionServiceClient#Google_Cloud_DiscoveryEngine_V1_CompletionServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionServiceClient#Google_Cloud_DiscoveryEngine_V1_CompletionServiceClient_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.CompletionServiceClient#Google_Cloud_DiscoveryEngine_V1_CompletionServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionServiceClient#Google_Cloud_DiscoveryEngine_V1_CompletionServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.