Class Rule.BoostAction.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Rule.BoostAction.Builder>
com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder
All Implemented Interfaces:
Rule.BoostActionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Rule.BoostAction

public static final class Rule.BoostAction.Builder extends com.google.protobuf.GeneratedMessage.Builder<Rule.BoostAction.Builder> implements Rule.BoostActionOrBuilder
 A boost action to apply to results matching condition specified above.
 
Protobuf type google.cloud.retail.v2alpha.Rule.BoostAction
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    Strength of the condition boost, which must be in [-1, 1].
    The filter can have a max size of 5000 characters.
    float
    Strength of the condition boost, which must be in [-1, 1].
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The filter can have a max size of 5000 characters.
    com.google.protobuf.ByteString
    The filter can have a max size of 5000 characters.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setBoost(float value)
    Strength of the condition boost, which must be in [-1, 1].
    The filter can have a max size of 5000 characters.
    setProductsFilterBytes(com.google.protobuf.ByteString value)
    The filter can have a max size of 5000 characters.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Rule.BoostAction.Builder>
    • clear

      public Rule.BoostAction.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Rule.BoostAction.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Rule.BoostAction.Builder>
    • getDefaultInstanceForType

      public Rule.BoostAction getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Rule.BoostAction build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Rule.BoostAction buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Rule.BoostAction.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Rule.BoostAction.Builder>
    • mergeFrom

      public Rule.BoostAction.Builder mergeFrom(Rule.BoostAction other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Rule.BoostAction.Builder>
    • mergeFrom

      public Rule.BoostAction.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Rule.BoostAction.Builder>
      Throws:
      IOException
    • getBoost

      public float getBoost()
       Strength of the condition boost, which must be in [-1, 1]. Negative
       boost means demotion. Default is 0.0.
      
       Setting to 1.0 gives the item a big promotion. However, it does not
       necessarily mean that the boosted item will be the top result at all
       times, nor that other items will be excluded. Results could still be
       shown even when none of them matches the condition. And results that
       are significantly more relevant to the search query can still trump
       your heavily favored but irrelevant items.
      
       Setting to -1.0 gives the item a big demotion. However, results that
       are deeply relevant might still be shown. The item will have an
       upstream battle to get a fairly high ranking, but it is not blocked out
       completely.
      
       Setting to 0.0 means no boost applied. The boosting condition is
       ignored.
       
      float boost = 1;
      Specified by:
      getBoost in interface Rule.BoostActionOrBuilder
      Returns:
      The boost.
    • setBoost

      public Rule.BoostAction.Builder setBoost(float value)
       Strength of the condition boost, which must be in [-1, 1]. Negative
       boost means demotion. Default is 0.0.
      
       Setting to 1.0 gives the item a big promotion. However, it does not
       necessarily mean that the boosted item will be the top result at all
       times, nor that other items will be excluded. Results could still be
       shown even when none of them matches the condition. And results that
       are significantly more relevant to the search query can still trump
       your heavily favored but irrelevant items.
      
       Setting to -1.0 gives the item a big demotion. However, results that
       are deeply relevant might still be shown. The item will have an
       upstream battle to get a fairly high ranking, but it is not blocked out
       completely.
      
       Setting to 0.0 means no boost applied. The boosting condition is
       ignored.
       
      float boost = 1;
      Parameters:
      value - The boost to set.
      Returns:
      This builder for chaining.
    • clearBoost

      public Rule.BoostAction.Builder clearBoost()
       Strength of the condition boost, which must be in [-1, 1]. Negative
       boost means demotion. Default is 0.0.
      
       Setting to 1.0 gives the item a big promotion. However, it does not
       necessarily mean that the boosted item will be the top result at all
       times, nor that other items will be excluded. Results could still be
       shown even when none of them matches the condition. And results that
       are significantly more relevant to the search query can still trump
       your heavily favored but irrelevant items.
      
       Setting to -1.0 gives the item a big demotion. However, results that
       are deeply relevant might still be shown. The item will have an
       upstream battle to get a fairly high ranking, but it is not blocked out
       completely.
      
       Setting to 0.0 means no boost applied. The boosting condition is
       ignored.
       
      float boost = 1;
      Returns:
      This builder for chaining.
    • getProductsFilter

      public String getProductsFilter()
       The filter can have a max size of 5000 characters.
       An expression which specifies which products to apply an action to.
       The syntax and supported fields are the same as a filter expression. See
       [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
       for detail syntax and limitations.
      
       Examples:
      
       * To boost products with product ID "product_1" or "product_2", and
       color
       "Red" or "Blue":<br>
       *(id: ANY("product_1", "product_2"))<br>*
       *AND<br>*
       *(colorFamilies: ANY("Red", "Blue"))<br>*
       
      string products_filter = 2;
      Specified by:
      getProductsFilter in interface Rule.BoostActionOrBuilder
      Returns:
      The productsFilter.
    • getProductsFilterBytes

      public com.google.protobuf.ByteString getProductsFilterBytes()
       The filter can have a max size of 5000 characters.
       An expression which specifies which products to apply an action to.
       The syntax and supported fields are the same as a filter expression. See
       [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
       for detail syntax and limitations.
      
       Examples:
      
       * To boost products with product ID "product_1" or "product_2", and
       color
       "Red" or "Blue":<br>
       *(id: ANY("product_1", "product_2"))<br>*
       *AND<br>*
       *(colorFamilies: ANY("Red", "Blue"))<br>*
       
      string products_filter = 2;
      Specified by:
      getProductsFilterBytes in interface Rule.BoostActionOrBuilder
      Returns:
      The bytes for productsFilter.
    • setProductsFilter

      public Rule.BoostAction.Builder setProductsFilter(String value)
       The filter can have a max size of 5000 characters.
       An expression which specifies which products to apply an action to.
       The syntax and supported fields are the same as a filter expression. See
       [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
       for detail syntax and limitations.
      
       Examples:
      
       * To boost products with product ID "product_1" or "product_2", and
       color
       "Red" or "Blue":<br>
       *(id: ANY("product_1", "product_2"))<br>*
       *AND<br>*
       *(colorFamilies: ANY("Red", "Blue"))<br>*
       
      string products_filter = 2;
      Parameters:
      value - The productsFilter to set.
      Returns:
      This builder for chaining.
    • clearProductsFilter

      public Rule.BoostAction.Builder clearProductsFilter()
       The filter can have a max size of 5000 characters.
       An expression which specifies which products to apply an action to.
       The syntax and supported fields are the same as a filter expression. See
       [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
       for detail syntax and limitations.
      
       Examples:
      
       * To boost products with product ID "product_1" or "product_2", and
       color
       "Red" or "Blue":<br>
       *(id: ANY("product_1", "product_2"))<br>*
       *AND<br>*
       *(colorFamilies: ANY("Red", "Blue"))<br>*
       
      string products_filter = 2;
      Returns:
      This builder for chaining.
    • setProductsFilterBytes

      public Rule.BoostAction.Builder setProductsFilterBytes(com.google.protobuf.ByteString value)
       The filter can have a max size of 5000 characters.
       An expression which specifies which products to apply an action to.
       The syntax and supported fields are the same as a filter expression. See
       [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter]
       for detail syntax and limitations.
      
       Examples:
      
       * To boost products with product ID "product_1" or "product_2", and
       color
       "Red" or "Blue":<br>
       *(id: ANY("product_1", "product_2"))<br>*
       *AND<br>*
       *(colorFamilies: ANY("Red", "Blue"))<br>*
       
      string products_filter = 2;
      Parameters:
      value - The bytes for productsFilter to set.
      Returns:
      This builder for chaining.