Class CompletionConfig (2.2.2)

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
TypeDescription
int

AUTO_LEARNING_FIELD_NUMBER

public static final int AUTO_LEARNING_FIELD_NUMBER
Field Value
TypeDescription
int

DENYLIST_INPUT_CONFIG_FIELD_NUMBER

public static final int DENYLIST_INPUT_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER

public static final int LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER
Field Value
TypeDescription
int

LAST_DENYLIST_IMPORT_OPERATION_FIELD_NUMBER

public static final int LAST_DENYLIST_IMPORT_OPERATION_FIELD_NUMBER
Field Value
TypeDescription
int

LAST_SUGGESTIONS_IMPORT_OPERATION_FIELD_NUMBER

public static final int LAST_SUGGESTIONS_IMPORT_OPERATION_FIELD_NUMBER
Field Value
TypeDescription
int

MATCHING_ORDER_FIELD_NUMBER

public static final int MATCHING_ORDER_FIELD_NUMBER
Field Value
TypeDescription
int

MAX_SUGGESTIONS_FIELD_NUMBER

public static final int MAX_SUGGESTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

MIN_PREFIX_LENGTH_FIELD_NUMBER

public static final int MIN_PREFIX_LENGTH_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

SUGGESTIONS_INPUT_CONFIG_FIELD_NUMBER

public static final int SUGGESTIONS_INPUT_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CompletionConfig getDefaultInstance()
Returns
TypeDescription
CompletionConfig

getDescriptor()

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

newBuilder()

public static CompletionConfig.Builder newBuilder()
Returns
TypeDescription
CompletionConfig.Builder

newBuilder(CompletionConfig prototype)

public static CompletionConfig.Builder newBuilder(CompletionConfig prototype)
Parameter
NameDescription
prototypeCompletionConfig
Returns
TypeDescription
CompletionConfig.Builder

parseDelimitedFrom(InputStream input)

public static CompletionConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static CompletionConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CompletionConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CompletionConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static CompletionConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static CompletionConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CompletionConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CompletionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<CompletionConfig> parser()
Returns
TypeDescription
Parser<CompletionConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAllowlistInputConfig()

public CompletionDataInputConfig getAllowlistInputConfig()

Output only. The input config for the import of the source data that contains the autocomplete allowlist phrases uploaded by the customer.

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

Returns
TypeDescription
CompletionDataInputConfig

The allowlistInputConfig.

getAllowlistInputConfigOrBuilder()

public CompletionDataInputConfigOrBuilder getAllowlistInputConfigOrBuilder()

Output only. The input config for the import of the source data that contains the autocomplete allowlist phrases uploaded by the customer.

.google.cloud.retail.v2alpha.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 input config for the import of the source data that contains the / autocomplete denylist phrases uploaded by the customer.

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

Returns
TypeDescription
CompletionDataInputConfig

The denylistInputConfig.

getDenylistInputConfigOrBuilder()

public CompletionDataInputConfigOrBuilder getDenylistInputConfigOrBuilder()

Output only. The input config for the import of the source data that contains the / autocomplete denylist phrases uploaded by the customer.

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

Returns
TypeDescription
CompletionDataInputConfigOrBuilder

getLastAllowlistImportOperation()

public String getLastAllowlistImportOperation()

Output only. 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. 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. 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. 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. The maximum allowed max suggestions is 20. Default value is 20. If left unset or set to 0, then will fallback to default value.

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.

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.

getParserForType()

public Parser<CompletionConfig> getParserForType()
Returns
TypeDescription
Parser<CompletionConfig>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSuggestionsInputConfig()

public CompletionDataInputConfig getSuggestionsInputConfig()

Output only. The input config for the import of the source data that contains the autocomplete phrases uploaded by the customer.

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

Returns
TypeDescription
CompletionDataInputConfig

The suggestionsInputConfig.

getSuggestionsInputConfigOrBuilder()

public CompletionDataInputConfigOrBuilder getSuggestionsInputConfigOrBuilder()

Output only. The input config for the import of the source data that contains the autocomplete phrases uploaded by the customer.

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

Returns
TypeDescription
CompletionDataInputConfigOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasAllowlistInputConfig()

public boolean hasAllowlistInputConfig()

Output only. The input config for the import of the source data that contains the autocomplete allowlist phrases uploaded by the customer.

.google.cloud.retail.v2alpha.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 input config for the import of the source data that contains the / autocomplete denylist phrases uploaded by the customer.

.google.cloud.retail.v2alpha.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 input config for the import of the source data that contains the autocomplete phrases uploaded by the customer.

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

Returns
TypeDescription
boolean

Whether the suggestionsInputConfig field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public CompletionConfig.Builder newBuilderForType()
Returns
TypeDescription
CompletionConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CompletionConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
CompletionConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public CompletionConfig.Builder toBuilder()
Returns
TypeDescription
CompletionConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException