public static final class Rule.ForceReturnFacetAction.Builder extends GeneratedMessageV3.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
(for search only) or
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 is
"shoes", the
ForceReturnFacetAction.FacetPositionAdjustment.attribute_name
is "size" and the
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.v2.Rule.ForceReturnFacetAction
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addAllFacetPositionAdjustments(Iterable<? extends Rule.ForceReturnFacetAction.FacetPositionAdjustment> values)
public Rule.ForceReturnFacetAction.Builder addAllFacetPositionAdjustments(Iterable<? extends Rule.ForceReturnFacetAction.FacetPositionAdjustment> values)
Each instance corresponds to a force return attribute for the given
condition. There can't be more 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
Parameter |
Name |
Description |
values |
Iterable<? extends com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment>
|
addFacetPositionAdjustments(Rule.ForceReturnFacetAction.FacetPositionAdjustment value)
public Rule.ForceReturnFacetAction.Builder addFacetPositionAdjustments(Rule.ForceReturnFacetAction.FacetPositionAdjustment value)
Each instance corresponds to a force return attribute for the given
condition. There can't be more 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
addFacetPositionAdjustments(Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder builderForValue)
public Rule.ForceReturnFacetAction.Builder addFacetPositionAdjustments(Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder builderForValue)
Each instance corresponds to a force return attribute for the given
condition. There can't be more 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
addFacetPositionAdjustments(int index, Rule.ForceReturnFacetAction.FacetPositionAdjustment value)
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 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
addFacetPositionAdjustments(int index, Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder builderForValue)
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 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
addFacetPositionAdjustmentsBuilder()
public Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder addFacetPositionAdjustmentsBuilder()
Each instance corresponds to a force return attribute for the given
condition. There can't be more 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
addFacetPositionAdjustmentsBuilder(int index)
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 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
Parameter |
Name |
Description |
index |
int
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Rule.ForceReturnFacetAction.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public Rule.ForceReturnFacetAction build()
buildPartial()
public Rule.ForceReturnFacetAction buildPartial()
clear()
public Rule.ForceReturnFacetAction.Builder clear()
Overrides
clearFacetPositionAdjustments()
public Rule.ForceReturnFacetAction.Builder clearFacetPositionAdjustments()
Each instance corresponds to a force return attribute for the given
condition. There can't be more 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
clearField(Descriptors.FieldDescriptor field)
public Rule.ForceReturnFacetAction.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Rule.ForceReturnFacetAction.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public Rule.ForceReturnFacetAction.Builder clone()
Overrides
getDefaultInstanceForType()
public Rule.ForceReturnFacetAction getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getFacetPositionAdjustments(int index)
public Rule.ForceReturnFacetAction.FacetPositionAdjustment getFacetPositionAdjustments(int index)
Each instance corresponds to a force return attribute for the given
condition. There can't be more 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
Parameter |
Name |
Description |
index |
int
|
getFacetPositionAdjustmentsBuilder(int index)
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 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
Parameter |
Name |
Description |
index |
int
|
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 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
getFacetPositionAdjustmentsCount()
public int getFacetPositionAdjustmentsCount()
Each instance corresponds to a force return attribute for the given
condition. There can't be more 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
Returns |
Type |
Description |
int |
|
getFacetPositionAdjustmentsList()
public List<Rule.ForceReturnFacetAction.FacetPositionAdjustment> getFacetPositionAdjustmentsList()
Each instance corresponds to a force return attribute for the given
condition. There can't be more 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
getFacetPositionAdjustmentsOrBuilder(int index)
public Rule.ForceReturnFacetAction.FacetPositionAdjustmentOrBuilder getFacetPositionAdjustmentsOrBuilder(int index)
Each instance corresponds to a force return attribute for the given
condition. There can't be more 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
Parameter |
Name |
Description |
index |
int
|
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 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
Returns |
Type |
Description |
List<? extends com.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustmentOrBuilder> |
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(Rule.ForceReturnFacetAction other)
public Rule.ForceReturnFacetAction.Builder mergeFrom(Rule.ForceReturnFacetAction other)
public Rule.ForceReturnFacetAction.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Rule.ForceReturnFacetAction.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Rule.ForceReturnFacetAction.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
removeFacetPositionAdjustments(int index)
public Rule.ForceReturnFacetAction.Builder removeFacetPositionAdjustments(int index)
Each instance corresponds to a force return attribute for the given
condition. There can't be more 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
Parameter |
Name |
Description |
index |
int
|
setFacetPositionAdjustments(int index, Rule.ForceReturnFacetAction.FacetPositionAdjustment value)
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 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
setFacetPositionAdjustments(int index, Rule.ForceReturnFacetAction.FacetPositionAdjustment.Builder builderForValue)
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 3 instances here.
repeated .google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment facet_position_adjustments = 1;
setField(Descriptors.FieldDescriptor field, Object value)
public Rule.ForceReturnFacetAction.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Rule.ForceReturnFacetAction.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Rule.ForceReturnFacetAction.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides