Google Cloud Retail V2 Client - Class CompletionConfig (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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

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

↳ matching_order string

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

↳ max_suggestions int

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.

↳ min_prefix_length int

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.

↳ auto_learning bool

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.

↳ suggestions_input_config Google\Cloud\Retail\V2\CompletionDataInputConfig

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

↳ last_suggestions_import_operation string

Output only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.

↳ denylist_input_config Google\Cloud\Retail\V2\CompletionDataInputConfig

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

↳ last_denylist_import_operation string

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.

↳ allowlist_input_config Google\Cloud\Retail\V2\CompletionDataInputConfig

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

↳ last_allowlist_import_operation string

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.

getName

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

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
string

setName

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

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
var string
Returns
TypeDescription
$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'.

Generated from protobuf field string matching_order = 2;

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

Generated from protobuf field string matching_order = 2;

Parameter
NameDescription
var string
Returns
TypeDescription
$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.

Generated from protobuf field int32 max_suggestions = 3;

Returns
TypeDescription
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.

Generated from protobuf field int32 max_suggestions = 3;

Parameter
NameDescription
var int
Returns
TypeDescription
$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.

Generated from protobuf field int32 min_prefix_length = 4;

Returns
TypeDescription
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.

Generated from protobuf field int32 min_prefix_length = 4;

Parameter
NameDescription
var int
Returns
TypeDescription
$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.

Generated from protobuf field bool auto_learning = 11;

Returns
TypeDescription
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.

Generated from protobuf field bool auto_learning = 11;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getSuggestionsInputConfig

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

Generated from protobuf field .google.cloud.retail.v2.CompletionDataInputConfig suggestions_input_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Google\Cloud\Retail\V2\CompletionDataInputConfig|null

hasSuggestionsInputConfig

clearSuggestionsInputConfig

setSuggestionsInputConfig

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

Generated from protobuf field .google.cloud.retail.v2.CompletionDataInputConfig suggestions_input_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var Google\Cloud\Retail\V2\CompletionDataInputConfig
Returns
TypeDescription
$this

getLastSuggestionsImportOperation

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

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

Generated from protobuf field string last_suggestions_import_operation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
string

setLastSuggestionsImportOperation

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

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

Generated from protobuf field string last_suggestions_import_operation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDenylistInputConfig

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

Generated from protobuf field .google.cloud.retail.v2.CompletionDataInputConfig denylist_input_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Google\Cloud\Retail\V2\CompletionDataInputConfig|null

hasDenylistInputConfig

clearDenylistInputConfig

setDenylistInputConfig

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

Generated from protobuf field .google.cloud.retail.v2.CompletionDataInputConfig denylist_input_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var Google\Cloud\Retail\V2\CompletionDataInputConfig
Returns
TypeDescription
$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.

Generated from protobuf field string last_denylist_import_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
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.

Generated from protobuf field string last_denylist_import_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAllowlistInputConfig

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

Generated from protobuf field .google.cloud.retail.v2.CompletionDataInputConfig allowlist_input_config = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Google\Cloud\Retail\V2\CompletionDataInputConfig|null

hasAllowlistInputConfig

clearAllowlistInputConfig

setAllowlistInputConfig

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

Generated from protobuf field .google.cloud.retail.v2.CompletionDataInputConfig allowlist_input_config = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var Google\Cloud\Retail\V2\CompletionDataInputConfig
Returns
TypeDescription
$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.

Generated from protobuf field string last_allowlist_import_operation = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
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.

Generated from protobuf field string last_allowlist_import_operation = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
var string
Returns
TypeDescription
$this