# Retail v2 API - Class CompletionConfig (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.CompletionConfig)
- [2.15.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.15.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.14.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.13.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.12.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.11.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.10.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.9.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.8.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.7.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.6.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.5.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.4.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.3.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.2.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.1.0/Google.Cloud.Retail.V2.CompletionConfig)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.0.0/Google.Cloud.Retail.V2.CompletionConfig)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.6.0/Google.Cloud.Retail.V2.CompletionConfig)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.5.0/Google.Cloud.Retail.V2.CompletionConfig)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.4.0/Google.Cloud.Retail.V2.CompletionConfig)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.3.0/Google.Cloud.Retail.V2.CompletionConfig)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.2.0/Google.Cloud.Retail.V2.CompletionConfig)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.1.0/Google.Cloud.Retail.V2.CompletionConfig)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.0.0/Google.Cloud.Retail.V2.CompletionConfig)

    public sealed class CompletionConfig : IMessage<CompletionConfig>, IEquatable<CompletionConfig>, IDeepCloneable<CompletionConfig>, IBufferMessage, IMessage

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

Catalog level autocomplete config for customers to customize autocomplete
feature's settings.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CompletionConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CompletionConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CompletionConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionConfig), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

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

## Constructors

### CompletionConfig()

    public CompletionConfig()

### CompletionConfig(CompletionConfig)

    public CompletionConfig(CompletionConfig other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionConfig` |

## Properties

### AllowlistInputConfig

    public CompletionDataInputConfig AllowlistInputConfig { get; set; }

Output only. The source data for the latest import of the autocomplete
allowlist phrases.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionDataInputConfig` |   |

### AutoLearning

    public bool AutoLearning { get; set; }

If set to true, the auto learning function is enabled. Auto learning uses
user data to generate suggestions using ML techniques. Default value is
false. Only after enabling auto learning can users use `cloud-retail`
data in
\[CompleteQueryRequest\]\[google.cloud.retail.v2.CompleteQueryRequest\].

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

### CompletionConfigName

    public CompletionConfigName CompletionConfigName { get; set; }

[CompletionConfigName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionConfigName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionConfig#Google_Cloud_Retail_V2_CompletionConfig_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionConfigName` |   |

### DenylistInputConfig

    public CompletionDataInputConfig DenylistInputConfig { get; set; }

Output only. The source data for the latest import of the autocomplete
denylist phrases.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionDataInputConfig` |   |

### LastAllowlistImportOperation

    public string LastAllowlistImportOperation { get; set; }

Output only. Name of the LRO corresponding to the latest allowlist import.

Can use \[GetOperation\]\[google.longrunning.Operations.GetOperation\] API to
retrieve the latest state of the Long Running Operation.

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

### LastDenylistImportOperation

    public string LastDenylistImportOperation { get; set; }

Output only. Name of the LRO corresponding to the latest denylist import.

Can use \[GetOperation\]\[google.longrunning.Operations.GetOperation\] API to
retrieve the latest state of the Long Running Operation.

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

### LastSuggestionsImportOperation

    public string LastSuggestionsImportOperation { get; set; }

Output only. Name of the LRO corresponding to the latest suggestion terms
list import.

Can use \[GetOperation\]\[google.longrunning.Operations.GetOperation\] API
method to retrieve the latest state of the Long Running Operation.

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

### MatchingOrder

    public string MatchingOrder { get; set; }

Specifies the matching order for autocomplete suggestions, e.g., a query
consisting of 'sh' with 'out-of-order' specified would suggest "women's
shoes", whereas a query of 'red s' with 'exact-prefix' specified would
suggest "red shoes". Currently supported values:

- 'out-of-order'
- 'exact-prefix'

Default value: 'exact-prefix'.

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

### MaxSuggestions

    public int MaxSuggestions { get; set; }

The maximum number of autocomplete suggestions returned per term. Default
value is 20. If left unset or set to 0, then will fallback to default
value.

Value range is 1 to 20.

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

### MinPrefixLength

    public int MinPrefixLength { get; set; }

The minimum number of characters needed to be typed in order to get
suggestions. Default value is 2. If left unset or set to 0, then will
fallback to default value.

Value range is 1 to 20.

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

### Name

    public string Name { get; set; }

Required. Immutable. Fully qualified name
`projects/*/locations/*/catalogs/*/completionConfig`

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

### SuggestionsInputConfig

    public CompletionDataInputConfig SuggestionsInputConfig { get; set; }

Output only. The source data for the latest import of the autocomplete
suggestion phrases.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CompletionDataInputConfig` |   |