Class Rule.ForceReturnFacetAction

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

public static final class Rule.ForceReturnFacetAction extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

    • FACET_POSITION_ADJUSTMENTS_FIELD_NUMBER

      public static final int FACET_POSITION_ADJUSTMENTS_FIELD_NUMBER
      See Also:
  • 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
    • 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
    • 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
    • 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
    • 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
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • 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.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • 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 Rule.ForceReturnFacetAction parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

      public static Rule.ForceReturnFacetAction parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Rule.ForceReturnFacetAction parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Rule.ForceReturnFacetAction parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Rule.ForceReturnFacetAction parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Rule.ForceReturnFacetAction parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

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

      public static Rule.ForceReturnFacetAction.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Rule.ForceReturnFacetAction.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Rule.ForceReturnFacetAction getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Rule.ForceReturnFacetAction> parser()
    • getParserForType

      public com.google.protobuf.Parser<Rule.ForceReturnFacetAction> 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.GeneratedMessage
    • getDefaultInstanceForType

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