# Google Cloud Retail V2 Client - Class CompletionConfig (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.1 2.2.1 2.1.3 2.0.0 1.7.0 1.6.4 1.5.0 1.4.2 1.3.1 1.2.1 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Retail V2 Client class CompletionConfig.

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

Generated from protobuf message `google.cloud.retail.v2.CompletionConfig`

## Namespace

Google \\ Cloud \\ Retail \\ V2

## Methods

### __construct

Constructor.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `mixed` |

### getName

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMatchingOrder

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setMatchingOrder

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMaxSuggestions

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setMaxSuggestions

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMinPrefixLength

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setMinPrefixLength

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAutoLearning

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setAutoLearning

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSuggestionsInputConfig

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.CompletionDataInputConfig|null` |   |

### hasSuggestionsInputConfig

### clearSuggestionsInputConfig

### setSuggestionsInputConfig

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.CompletionDataInputConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLastSuggestionsImportOperation

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

Can use GetOperation API
method to retrieve the latest state of the Long Running Operation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setLastSuggestionsImportOperation

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

Can use GetOperation API
method to retrieve the latest state of the Long Running Operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDenylistInputConfig

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.CompletionDataInputConfig|null` |   |

### hasDenylistInputConfig

### clearDenylistInputConfig

### setDenylistInputConfig

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.CompletionDataInputConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLastDenylistImportOperation

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

Can use GetOperation API to
retrieve the latest state of the Long Running Operation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setLastDenylistImportOperation

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

Can use GetOperation API to
retrieve the latest state of the Long Running Operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAllowlistInputConfig

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.CompletionDataInputConfig|null` |   |

### hasAllowlistInputConfig

### clearAllowlistInputConfig

### setAllowlistInputConfig

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.CompletionDataInputConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLastAllowlistImportOperation

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

Can use GetOperation API to
retrieve the latest state of the Long Running Operation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setLastAllowlistImportOperation

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

Can use GetOperation API to
retrieve the latest state of the Long Running Operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |