Class CompletionConfig

  • All Implemented Interfaces:
    CompletionConfigOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class CompletionConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements CompletionConfigOrBuilder
     Catalog level autocomplete config for customers to customize autocomplete
     feature's settings.
     
    Protobuf type google.cloud.retail.v2alpha.CompletionConfig
    See Also:
    Serialized Form
    • Field Detail

      • MATCHING_ORDER_FIELD_NUMBER

        public static final int MATCHING_ORDER_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MAX_SUGGESTIONS_FIELD_NUMBER

        public static final int MAX_SUGGESTIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MIN_PREFIX_LENGTH_FIELD_NUMBER

        public static final int MIN_PREFIX_LENGTH_FIELD_NUMBER
        See Also:
        Constant Field Values
      • AUTO_LEARNING_FIELD_NUMBER

        public static final int AUTO_LEARNING_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SUGGESTIONS_INPUT_CONFIG_FIELD_NUMBER

        public static final int SUGGESTIONS_INPUT_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LAST_SUGGESTIONS_IMPORT_OPERATION_FIELD_NUMBER

        public static final int LAST_SUGGESTIONS_IMPORT_OPERATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DENYLIST_INPUT_CONFIG_FIELD_NUMBER

        public static final int DENYLIST_INPUT_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LAST_DENYLIST_IMPORT_OPERATION_FIELD_NUMBER

        public static final int LAST_DENYLIST_IMPORT_OPERATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ALLOWLIST_INPUT_CONFIG_FIELD_NUMBER

        public static final int ALLOWLIST_INPUT_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER

        public static final int LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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];
        Specified by:
        getName in interface CompletionConfigOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Required. Immutable. Fully qualified name
         `projects/*/locations/*/catalogs/*/completionConfig`
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getNameBytes in interface CompletionConfigOrBuilder
        Returns:
        The bytes for name.
      • 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;
        Specified by:
        getMatchingOrder in interface CompletionConfigOrBuilder
        Returns:
        The matchingOrder.
      • getMatchingOrderBytes

        public com.google.protobuf.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;
        Specified by:
        getMatchingOrderBytes in interface CompletionConfigOrBuilder
        Returns:
        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;
        Specified by:
        getMaxSuggestions in interface CompletionConfigOrBuilder
        Returns:
        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;
        Specified by:
        getMinPrefixLength in interface CompletionConfigOrBuilder
        Returns:
        The minPrefixLength.
      • 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][google.cloud.retail.v2alpha.CompleteQueryRequest].
         
        bool auto_learning = 11;
        Specified by:
        getAutoLearning in interface CompletionConfigOrBuilder
        Returns:
        The autoLearning.
      • 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];
        Specified by:
        hasSuggestionsInputConfig in interface CompletionConfigOrBuilder
        Returns:
        Whether the suggestionsInputConfig field is set.
      • 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];
        Specified by:
        getSuggestionsInputConfig in interface CompletionConfigOrBuilder
        Returns:
        The suggestionsInputConfig.
      • getLastSuggestionsImportOperation

        public String getLastSuggestionsImportOperation()
         Output only. Name of the LRO corresponding to the latest suggestion terms
         list import.
        
         Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
         retrieve the latest state of the Long Running Operation.
         
        string last_suggestions_import_operation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLastSuggestionsImportOperation in interface CompletionConfigOrBuilder
        Returns:
        The lastSuggestionsImportOperation.
      • getLastSuggestionsImportOperationBytes

        public com.google.protobuf.ByteString getLastSuggestionsImportOperationBytes()
         Output only. Name of the LRO corresponding to the latest suggestion terms
         list import.
        
         Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
         retrieve the latest state of the Long Running Operation.
         
        string last_suggestions_import_operation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLastSuggestionsImportOperationBytes in interface CompletionConfigOrBuilder
        Returns:
        The bytes for lastSuggestionsImportOperation.
      • 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];
        Specified by:
        hasDenylistInputConfig in interface CompletionConfigOrBuilder
        Returns:
        Whether the denylistInputConfig field is set.
      • 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];
        Specified by:
        getDenylistInputConfig in interface CompletionConfigOrBuilder
        Returns:
        The denylistInputConfig.
      • getLastDenylistImportOperation

        public String getLastDenylistImportOperation()
         Output only. Name of the LRO corresponding to the latest denylist import.
        
         Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
         retrieve the latest state of the Long Running Operation.
         
        string last_denylist_import_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLastDenylistImportOperation in interface CompletionConfigOrBuilder
        Returns:
        The lastDenylistImportOperation.
      • getLastDenylistImportOperationBytes

        public com.google.protobuf.ByteString getLastDenylistImportOperationBytes()
         Output only. Name of the LRO corresponding to the latest denylist import.
        
         Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
         retrieve the latest state of the Long Running Operation.
         
        string last_denylist_import_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLastDenylistImportOperationBytes in interface CompletionConfigOrBuilder
        Returns:
        The bytes for lastDenylistImportOperation.
      • 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];
        Specified by:
        hasAllowlistInputConfig in interface CompletionConfigOrBuilder
        Returns:
        Whether the allowlistInputConfig field is set.
      • 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];
        Specified by:
        getAllowlistInputConfig in interface CompletionConfigOrBuilder
        Returns:
        The allowlistInputConfig.
      • getLastAllowlistImportOperation

        public String getLastAllowlistImportOperation()
         Output only. Name of the LRO corresponding to the latest allowlist import.
        
         Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
         retrieve the latest state of the Long Running Operation.
         
        string last_allowlist_import_operation = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLastAllowlistImportOperation in interface CompletionConfigOrBuilder
        Returns:
        The lastAllowlistImportOperation.
      • getLastAllowlistImportOperationBytes

        public com.google.protobuf.ByteString getLastAllowlistImportOperationBytes()
         Output only. Name of the LRO corresponding to the latest allowlist import.
        
         Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
         retrieve the latest state of the Long Running Operation.
         
        string last_allowlist_import_operation = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLastAllowlistImportOperationBytes in interface CompletionConfigOrBuilder
        Returns:
        The bytes for lastAllowlistImportOperation.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static CompletionConfig parseFrom​(ByteBuffer data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CompletionConfig parseFrom​(ByteBuffer data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CompletionConfig parseFrom​(com.google.protobuf.ByteString data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CompletionConfig parseFrom​(com.google.protobuf.ByteString data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CompletionConfig parseFrom​(byte[] data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CompletionConfig parseFrom​(byte[] data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CompletionConfig parseFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws IOException
        Throws:
        IOException
      • newBuilderForType

        public CompletionConfig.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public CompletionConfig.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected CompletionConfig.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<CompletionConfig> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public CompletionConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder