Class CompletionConfig.Builder (2.20.0)

public static final class CompletionConfig.Builder extends GeneratedMessageV3.Builder<CompletionConfig.Builder> implements CompletionConfigOrBuilder

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

Protobuf type google.cloud.retail.v2.CompletionConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CompletionConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CompletionConfig.Builder
Overrides

build()

public CompletionConfig build()
Returns
TypeDescription
CompletionConfig

buildPartial()

public CompletionConfig buildPartial()
Returns
TypeDescription
CompletionConfig

clear()

public CompletionConfig.Builder clear()
Returns
TypeDescription
CompletionConfig.Builder
Overrides

clearAllowlistInputConfig()

public CompletionConfig.Builder clearAllowlistInputConfig()

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

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

Returns
TypeDescription
CompletionConfig.Builder

clearAutoLearning()

public CompletionConfig.Builder clearAutoLearning()

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.

bool auto_learning = 11;

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

clearDenylistInputConfig()

public CompletionConfig.Builder clearDenylistInputConfig()

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

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

Returns
TypeDescription
CompletionConfig.Builder

clearField(Descriptors.FieldDescriptor field)

public CompletionConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
CompletionConfig.Builder
Overrides

clearLastAllowlistImportOperation()

public CompletionConfig.Builder clearLastAllowlistImportOperation()

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.

string last_allowlist_import_operation = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

clearLastDenylistImportOperation()

public CompletionConfig.Builder clearLastDenylistImportOperation()

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.

string last_denylist_import_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

clearLastSuggestionsImportOperation()

public CompletionConfig.Builder clearLastSuggestionsImportOperation()

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.

string last_suggestions_import_operation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

clearMatchingOrder()

public CompletionConfig.Builder clearMatchingOrder()

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

string matching_order = 2;

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

clearMaxSuggestions()

public CompletionConfig.Builder clearMaxSuggestions()

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.

int32 max_suggestions = 3;

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

clearMinPrefixLength()

public CompletionConfig.Builder clearMinPrefixLength()

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.

int32 min_prefix_length = 4;

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

clearName()

public CompletionConfig.Builder clearName()

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

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

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CompletionConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
CompletionConfig.Builder
Overrides

clearSuggestionsInputConfig()

public CompletionConfig.Builder clearSuggestionsInputConfig()

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

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

Returns
TypeDescription
CompletionConfig.Builder

clone()

public CompletionConfig.Builder clone()
Returns
TypeDescription
CompletionConfig.Builder
Overrides

getAllowlistInputConfig()

public CompletionDataInputConfig getAllowlistInputConfig()

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

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

Returns
TypeDescription
CompletionDataInputConfig

The allowlistInputConfig.

getAllowlistInputConfigBuilder()

public CompletionDataInputConfig.Builder getAllowlistInputConfigBuilder()

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

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

Returns
TypeDescription
CompletionDataInputConfig.Builder

getAllowlistInputConfigOrBuilder()

public CompletionDataInputConfigOrBuilder getAllowlistInputConfigOrBuilder()

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

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

Returns
TypeDescription
CompletionDataInputConfigOrBuilder

getAutoLearning()

public boolean 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.

bool auto_learning = 11;

Returns
TypeDescription
boolean

The autoLearning.

getDefaultInstanceForType()

public CompletionConfig getDefaultInstanceForType()
Returns
TypeDescription
CompletionConfig

getDenylistInputConfig()

public CompletionDataInputConfig getDenylistInputConfig()

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

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

Returns
TypeDescription
CompletionDataInputConfig

The denylistInputConfig.

getDenylistInputConfigBuilder()

public CompletionDataInputConfig.Builder getDenylistInputConfigBuilder()

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

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

Returns
TypeDescription
CompletionDataInputConfig.Builder

getDenylistInputConfigOrBuilder()

public CompletionDataInputConfigOrBuilder getDenylistInputConfigOrBuilder()

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

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

Returns
TypeDescription
CompletionDataInputConfigOrBuilder

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLastAllowlistImportOperation()

public String 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.

string last_allowlist_import_operation = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The lastAllowlistImportOperation.

getLastAllowlistImportOperationBytes()

public ByteString getLastAllowlistImportOperationBytes()

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.

string last_allowlist_import_operation = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for lastAllowlistImportOperation.

getLastDenylistImportOperation()

public String 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.

string last_denylist_import_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The lastDenylistImportOperation.

getLastDenylistImportOperationBytes()

public ByteString getLastDenylistImportOperationBytes()

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.

string last_denylist_import_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for lastDenylistImportOperation.

getLastSuggestionsImportOperation()

public String 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.

string last_suggestions_import_operation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The lastSuggestionsImportOperation.

getLastSuggestionsImportOperationBytes()

public ByteString getLastSuggestionsImportOperationBytes()

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.

string last_suggestions_import_operation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for lastSuggestionsImportOperation.

getMatchingOrder()

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

string matching_order = 2;

Returns
TypeDescription
String

The matchingOrder.

getMatchingOrderBytes()

public ByteString getMatchingOrderBytes()

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

string matching_order = 2;

Returns
TypeDescription
ByteString

The bytes for matchingOrder.

getMaxSuggestions()

public int 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.

int32 max_suggestions = 3;

Returns
TypeDescription
int

The maxSuggestions.

getMinPrefixLength()

public int 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.

int32 min_prefix_length = 4;

Returns
TypeDescription
int

The minPrefixLength.

getName()

public String getName()

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

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

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

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

Returns
TypeDescription
ByteString

The bytes for name.

getSuggestionsInputConfig()

public CompletionDataInputConfig getSuggestionsInputConfig()

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

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

Returns
TypeDescription
CompletionDataInputConfig

The suggestionsInputConfig.

getSuggestionsInputConfigBuilder()

public CompletionDataInputConfig.Builder getSuggestionsInputConfigBuilder()

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

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

Returns
TypeDescription
CompletionDataInputConfig.Builder

getSuggestionsInputConfigOrBuilder()

public CompletionDataInputConfigOrBuilder getSuggestionsInputConfigOrBuilder()

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

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

Returns
TypeDescription
CompletionDataInputConfigOrBuilder

hasAllowlistInputConfig()

public boolean hasAllowlistInputConfig()

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

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

Returns
TypeDescription
boolean

Whether the allowlistInputConfig field is set.

hasDenylistInputConfig()

public boolean hasDenylistInputConfig()

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

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

Returns
TypeDescription
boolean

Whether the denylistInputConfig field is set.

hasSuggestionsInputConfig()

public boolean hasSuggestionsInputConfig()

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

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

Returns
TypeDescription
boolean

Whether the suggestionsInputConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAllowlistInputConfig(CompletionDataInputConfig value)

public CompletionConfig.Builder mergeAllowlistInputConfig(CompletionDataInputConfig value)

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

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

Parameter
NameDescription
valueCompletionDataInputConfig
Returns
TypeDescription
CompletionConfig.Builder

mergeDenylistInputConfig(CompletionDataInputConfig value)

public CompletionConfig.Builder mergeDenylistInputConfig(CompletionDataInputConfig value)

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

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

Parameter
NameDescription
valueCompletionDataInputConfig
Returns
TypeDescription
CompletionConfig.Builder

mergeFrom(CompletionConfig other)

public CompletionConfig.Builder mergeFrom(CompletionConfig other)
Parameter
NameDescription
otherCompletionConfig
Returns
TypeDescription
CompletionConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CompletionConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CompletionConfig.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CompletionConfig.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
CompletionConfig.Builder
Overrides

mergeSuggestionsInputConfig(CompletionDataInputConfig value)

public CompletionConfig.Builder mergeSuggestionsInputConfig(CompletionDataInputConfig value)

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

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

Parameter
NameDescription
valueCompletionDataInputConfig
Returns
TypeDescription
CompletionConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CompletionConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CompletionConfig.Builder
Overrides

setAllowlistInputConfig(CompletionDataInputConfig value)

public CompletionConfig.Builder setAllowlistInputConfig(CompletionDataInputConfig value)

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

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

Parameter
NameDescription
valueCompletionDataInputConfig
Returns
TypeDescription
CompletionConfig.Builder

setAllowlistInputConfig(CompletionDataInputConfig.Builder builderForValue)

public CompletionConfig.Builder setAllowlistInputConfig(CompletionDataInputConfig.Builder builderForValue)

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

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

Parameter
NameDescription
builderForValueCompletionDataInputConfig.Builder
Returns
TypeDescription
CompletionConfig.Builder

setAutoLearning(boolean value)

public CompletionConfig.Builder setAutoLearning(boolean value)

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.

bool auto_learning = 11;

Parameter
NameDescription
valueboolean

The autoLearning to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setDenylistInputConfig(CompletionDataInputConfig value)

public CompletionConfig.Builder setDenylistInputConfig(CompletionDataInputConfig value)

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

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

Parameter
NameDescription
valueCompletionDataInputConfig
Returns
TypeDescription
CompletionConfig.Builder

setDenylistInputConfig(CompletionDataInputConfig.Builder builderForValue)

public CompletionConfig.Builder setDenylistInputConfig(CompletionDataInputConfig.Builder builderForValue)

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

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

Parameter
NameDescription
builderForValueCompletionDataInputConfig.Builder
Returns
TypeDescription
CompletionConfig.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public CompletionConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CompletionConfig.Builder
Overrides

setLastAllowlistImportOperation(String value)

public CompletionConfig.Builder setLastAllowlistImportOperation(String value)

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.

string last_allowlist_import_operation = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The lastAllowlistImportOperation to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setLastAllowlistImportOperationBytes(ByteString value)

public CompletionConfig.Builder setLastAllowlistImportOperationBytes(ByteString value)

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.

string last_allowlist_import_operation = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for lastAllowlistImportOperation to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setLastDenylistImportOperation(String value)

public CompletionConfig.Builder setLastDenylistImportOperation(String value)

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.

string last_denylist_import_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The lastDenylistImportOperation to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setLastDenylistImportOperationBytes(ByteString value)

public CompletionConfig.Builder setLastDenylistImportOperationBytes(ByteString value)

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.

string last_denylist_import_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for lastDenylistImportOperation to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setLastSuggestionsImportOperation(String value)

public CompletionConfig.Builder setLastSuggestionsImportOperation(String value)

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.

string last_suggestions_import_operation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The lastSuggestionsImportOperation to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setLastSuggestionsImportOperationBytes(ByteString value)

public CompletionConfig.Builder setLastSuggestionsImportOperationBytes(ByteString value)

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.

string last_suggestions_import_operation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for lastSuggestionsImportOperation to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setMatchingOrder(String value)

public CompletionConfig.Builder setMatchingOrder(String value)

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

string matching_order = 2;

Parameter
NameDescription
valueString

The matchingOrder to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setMatchingOrderBytes(ByteString value)

public CompletionConfig.Builder setMatchingOrderBytes(ByteString value)

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

string matching_order = 2;

Parameter
NameDescription
valueByteString

The bytes for matchingOrder to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setMaxSuggestions(int value)

public CompletionConfig.Builder setMaxSuggestions(int value)

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.

int32 max_suggestions = 3;

Parameter
NameDescription
valueint

The maxSuggestions to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setMinPrefixLength(int value)

public CompletionConfig.Builder setMinPrefixLength(int value)

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.

int32 min_prefix_length = 4;

Parameter
NameDescription
valueint

The minPrefixLength to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setName(String value)

public CompletionConfig.Builder setName(String value)

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

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

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setNameBytes(ByteString value)

public CompletionConfig.Builder setNameBytes(ByteString value)

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

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

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
CompletionConfig.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CompletionConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CompletionConfig.Builder
Overrides

setSuggestionsInputConfig(CompletionDataInputConfig value)

public CompletionConfig.Builder setSuggestionsInputConfig(CompletionDataInputConfig value)

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

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

Parameter
NameDescription
valueCompletionDataInputConfig
Returns
TypeDescription
CompletionConfig.Builder

setSuggestionsInputConfig(CompletionDataInputConfig.Builder builderForValue)

public CompletionConfig.Builder setSuggestionsInputConfig(CompletionDataInputConfig.Builder builderForValue)

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

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

Parameter
NameDescription
builderForValueCompletionDataInputConfig.Builder
Returns
TypeDescription
CompletionConfig.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final CompletionConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CompletionConfig.Builder
Overrides