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.v2.CompletionConfig
Static Fields
public static final int ALLOWLIST_INPUT_CONFIG_FIELD_NUMBER
Field Value
AUTO_LEARNING_FIELD_NUMBER
public static final int AUTO_LEARNING_FIELD_NUMBER
Field Value
public static final int DENYLIST_INPUT_CONFIG_FIELD_NUMBER
Field Value
LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER
public static final int LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER
Field Value
LAST_DENYLIST_IMPORT_OPERATION_FIELD_NUMBER
public static final int LAST_DENYLIST_IMPORT_OPERATION_FIELD_NUMBER
Field Value
LAST_SUGGESTIONS_IMPORT_OPERATION_FIELD_NUMBER
public static final int LAST_SUGGESTIONS_IMPORT_OPERATION_FIELD_NUMBER
Field Value
MATCHING_ORDER_FIELD_NUMBER
public static final int MATCHING_ORDER_FIELD_NUMBER
Field Value
MAX_SUGGESTIONS_FIELD_NUMBER
public static final int MAX_SUGGESTIONS_FIELD_NUMBER
Field Value
MIN_PREFIX_LENGTH_FIELD_NUMBER
public static final int MIN_PREFIX_LENGTH_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
public static final int SUGGESTIONS_INPUT_CONFIG_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static CompletionConfig getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static CompletionConfig.Builder newBuilder()
Returns
newBuilder(CompletionConfig prototype)
public static CompletionConfig.Builder newBuilder(CompletionConfig prototype)
Parameter
Returns
public static CompletionConfig parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static CompletionConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static CompletionConfig parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CompletionConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static CompletionConfig parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CompletionConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CompletionConfig parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static CompletionConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CompletionConfig parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static CompletionConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static CompletionConfig parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CompletionConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<CompletionConfig> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
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
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
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
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
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
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()
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
getParserForType()
public Parser<CompletionConfig> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
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
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
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
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
Type | Description |
boolean | Whether the allowlistInputConfig field is set.
|
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
Type | Description |
boolean | Whether the denylistInputConfig field is set.
|
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
Type | Description |
boolean | Whether the suggestionsInputConfig field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public CompletionConfig.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CompletionConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public CompletionConfig.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions