Class Rule.ForceReturnFacetAction.Builder

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

public static final class Rule.ForceReturnFacetAction.Builder extends com.google.protobuf.GeneratedMessage.Builder<Rule.ForceReturnFacetAction.Builder> implements Rule.ForceReturnFacetActionOrBuilder
 Force returns an attribute/facet in the request around a certain position
 or above.

 * Rule Condition:
 Must specify non-empty
 [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
 (for search only) or
 [Condition.page_categories][google.cloud.retail.v2alpha.Condition.page_categories]
 (for browse only), but can't specify both.

 * Action Inputs: attribute name, position

 * Action Result: Will force return a facet key around a certain position
 or above if the condition is satisfied.

 Example: Suppose the query is "shoes", the
 [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
 is "shoes", the
 [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name]
 is "size" and the
 [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment.position]
 is 8.

 Two cases: a) The facet key "size" is not already in the top 8 slots, then
 the facet "size" will appear at a position close to 8. b) The facet key
 "size" in among the top 8 positions in the request, then it will stay at
 its current rank.
 
Protobuf type google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction
  • 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.ForceReturnFacetAction.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.ForceReturnFacetAction.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.ForceReturnFacetAction.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public Rule.ForceReturnFacetAction.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.ForceReturnFacetAction.Builder>
    • mergeFrom

    • isInitialized

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

      public Rule.ForceReturnFacetAction.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.ForceReturnFacetAction.Builder>
      Throws:
      IOException
    • getFacetPositionAdjustmentsList

      public List<Rule.ForceReturnFacetAction.FacetPositionAdjustment> getFacetPositionAdjustmentsList()
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
      Specified by:
      getFacetPositionAdjustmentsList in interface Rule.ForceReturnFacetActionOrBuilder
    • getFacetPositionAdjustmentsCount

      public int getFacetPositionAdjustmentsCount()
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
      Specified by:
      getFacetPositionAdjustmentsCount in interface Rule.ForceReturnFacetActionOrBuilder
    • getFacetPositionAdjustments

      public Rule.ForceReturnFacetAction.FacetPositionAdjustment getFacetPositionAdjustments(int index)
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
      Specified by:
      getFacetPositionAdjustments in interface Rule.ForceReturnFacetActionOrBuilder
    • setFacetPositionAdjustments

      public Rule.ForceReturnFacetAction.Builder setFacetPositionAdjustments(int index, Rule.ForceReturnFacetAction.FacetPositionAdjustment value)
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • setFacetPositionAdjustments

      public Rule.ForceReturnFacetAction.Builder setFacetPositionAdjustments(int index, Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder builderForValue)
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • addFacetPositionAdjustments

       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • addFacetPositionAdjustments

      public Rule.ForceReturnFacetAction.Builder addFacetPositionAdjustments(int index, Rule.ForceReturnFacetAction.FacetPositionAdjustment value)
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • addFacetPositionAdjustments

       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • addFacetPositionAdjustments

      public Rule.ForceReturnFacetAction.Builder addFacetPositionAdjustments(int index, Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder builderForValue)
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • addAllFacetPositionAdjustments

       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • clearFacetPositionAdjustments

      public Rule.ForceReturnFacetAction.Builder clearFacetPositionAdjustments()
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • removeFacetPositionAdjustments

      public Rule.ForceReturnFacetAction.Builder removeFacetPositionAdjustments(int index)
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • getFacetPositionAdjustmentsBuilder

      public Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder getFacetPositionAdjustmentsBuilder(int index)
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • getFacetPositionAdjustmentsOrBuilder

      public Rule.ForceReturnFacetAction.FacetPositionAdjustmentOrBuilder getFacetPositionAdjustmentsOrBuilder(int index)
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
      Specified by:
      getFacetPositionAdjustmentsOrBuilder in interface Rule.ForceReturnFacetActionOrBuilder
    • getFacetPositionAdjustmentsOrBuilderList

      public List<? extends Rule.ForceReturnFacetAction.FacetPositionAdjustmentOrBuilder> getFacetPositionAdjustmentsOrBuilderList()
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
      Specified by:
      getFacetPositionAdjustmentsOrBuilderList in interface Rule.ForceReturnFacetActionOrBuilder
    • addFacetPositionAdjustmentsBuilder

      public Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder addFacetPositionAdjustmentsBuilder()
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • addFacetPositionAdjustmentsBuilder

      public Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder addFacetPositionAdjustmentsBuilder(int index)
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
    • getFacetPositionAdjustmentsBuilderList

      public List<Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder> getFacetPositionAdjustmentsBuilderList()
       Each instance corresponds to a force return attribute for the given
       condition. There can't be more 15 instances here.
       
      repeated .google.cloud.retail.v2alpha.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;