Class CompletionConfig (2.45.0)

public final class CompletionConfig extends GeneratedMessageV3 implements CompletionConfigOrBuilder

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

Protobuf type google.cloud.retail.v2alpha.CompletionConfig

Static Fields

ALLOWLIST_INPUT_CONFIG_FIELD_NUMBER

public static final int ALLOWLIST_INPUT_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

AUTO_LEARNING_FIELD_NUMBER

public static final int AUTO_LEARNING_FIELD_NUMBER
Field Value
Type Description
int

DENYLIST_INPUT_CONFIG_FIELD_NUMBER

public static final int DENYLIST_INPUT_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER

public static final int LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER
Field Value
Type Description
int

LAST_DENYLIST_IMPORT_OPERATION_FIELD_NUMBER

public static final int LAST_DENYLIST_IMPORT_OPERATION_FIELD_NUMBER
Field Value
Type Description
int

LAST_SUGGESTIONS_IMPORT_OPERATION_FIELD_NUMBER

public static final int LAST_SUGGESTIONS_IMPORT_OPERATION_FIELD_NUMBER
Field Value
Type Description
int

MATCHING_ORDER_FIELD_NUMBER

public static final int MATCHING_ORDER_FIELD_NUMBER
Field Value
Type Description
int

MAX_SUGGESTIONS_FIELD_NUMBER

public static final int MAX_SUGGESTIONS_FIELD_NUMBER
Field Value
Type Description
int

MIN_PREFIX_LENGTH_FIELD_NUMBER

public static final int MIN_PREFIX_LENGTH_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

SUGGESTIONS_INPUT_CONFIG_FIELD_NUMBER

public static final int SUGGESTIONS_INPUT_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CompletionConfig getDefaultInstance()
Returns
Type Description
CompletionConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static CompletionConfig.Builder newBuilder()
Returns
Type Description
CompletionConfig.Builder

newBuilder(CompletionConfig prototype)

public static CompletionConfig.Builder newBuilder(CompletionConfig prototype)
Parameter
Name Description
prototype CompletionConfig
Returns
Type Description
CompletionConfig.Builder

parseDelimitedFrom(InputStream input)

public static CompletionConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CompletionConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CompletionConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CompletionConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CompletionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CompletionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CompletionConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CompletionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CompletionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CompletionConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CompletionConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CompletionConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CompletionConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CompletionConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CompletionConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CompletionConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CompletionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CompletionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CompletionConfig> parser()
Returns
Type Description
Parser<CompletionConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAllowlistInputConfig()

public CompletionDataInputConfig getAllowlistInputConfig()

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

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

Returns
Type Description
CompletionDataInputConfig

The allowlistInputConfig.

getAllowlistInputConfigOrBuilder()

public CompletionDataInputConfigOrBuilder getAllowlistInputConfigOrBuilder()

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

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

Returns
Type Description
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
Type Description
boolean

The autoLearning.

getDefaultInstanceForType()

public CompletionConfig getDefaultInstanceForType()
Returns
Type Description
CompletionConfig

getDenylistInputConfig()

public CompletionDataInputConfig getDenylistInputConfig()

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

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

Returns
Type Description
CompletionDataInputConfig

The denylistInputConfig.

getDenylistInputConfigOrBuilder()

public CompletionDataInputConfigOrBuilder getDenylistInputConfigOrBuilder()

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

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

Returns
Type Description
CompletionDataInputConfigOrBuilder

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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<CompletionConfig> getParserForType()
Returns
Type Description
Parser<CompletionConfig>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSuggestionsInputConfig()

public CompletionDataInputConfig getSuggestionsInputConfig()

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

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

Returns
Type Description
CompletionDataInputConfig

The suggestionsInputConfig.

getSuggestionsInputConfigOrBuilder()

public CompletionDataInputConfigOrBuilder getSuggestionsInputConfigOrBuilder()

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

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

Returns
Type Description
CompletionDataInputConfigOrBuilder

hasAllowlistInputConfig()

public boolean hasAllowlistInputConfig()

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

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

Returns
Type Description
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.v2alpha.CompletionDataInputConfig denylist_input_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
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.v2alpha.CompletionDataInputConfig suggestions_input_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the suggestionsInputConfig field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CompletionConfig.Builder newBuilderForType()
Returns
Type Description
CompletionConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CompletionConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CompletionConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public CompletionConfig.Builder toBuilder()
Returns
Type Description
CompletionConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException