Package com.google.cloud.retail.v2beta
Class Rule.BoostAction.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
- com.google.cloud.retail.v2beta.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.GeneratedMessageV3.Builder<Rule.BoostAction.Builder> implements Rule.BoostActionOrBuilder
A boost action to apply to results matching condition specified above.
Protobuf typegoogle.cloud.retail.v2beta.Rule.BoostAction
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.BoostAction.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Rule.BoostActionbuild()Rule.BoostActionbuildPartial()Rule.BoostAction.Builderclear()Rule.BoostAction.BuilderclearBoost()Strength of the condition boost, which must be in [-1, 1].Rule.BoostAction.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Rule.BoostAction.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Rule.BoostAction.BuilderclearProductsFilter()The filter can have a max size of 5000 characters.Rule.BoostAction.Builderclone()floatgetBoost()Strength of the condition boost, which must be in [-1, 1].Rule.BoostActiongetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetProductsFilter()The filter can have a max size of 5000 characters.com.google.protobuf.ByteStringgetProductsFilterBytes()The filter can have a max size of 5000 characters.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Rule.BoostAction.BuildermergeFrom(Rule.BoostAction other)Rule.BoostAction.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Rule.BoostAction.BuildermergeFrom(com.google.protobuf.Message other)Rule.BoostAction.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Rule.BoostAction.BuildersetBoost(float value)Strength of the condition boost, which must be in [-1, 1].Rule.BoostAction.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Rule.BoostAction.BuildersetProductsFilter(String value)The filter can have a max size of 5000 characters.Rule.BoostAction.BuildersetProductsFilterBytes(com.google.protobuf.ByteString value)The filter can have a max size of 5000 characters.Rule.BoostAction.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)Rule.BoostAction.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, 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
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
clear
public Rule.BoostAction.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
getDefaultInstanceForType
public Rule.BoostAction getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Rule.BoostAction build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Rule.BoostAction buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Rule.BoostAction.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
setField
public Rule.BoostAction.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
clearField
public Rule.BoostAction.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
clearOneof
public Rule.BoostAction.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
setRepeatedField
public Rule.BoostAction.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
addRepeatedField
public Rule.BoostAction.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
mergeFrom
public Rule.BoostAction.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Rule.BoostAction.Builder>
-
mergeFrom
public Rule.BoostAction.Builder mergeFrom(Rule.BoostAction other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
mergeFrom
public Rule.BoostAction.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
getBoostin interfaceRule.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.v2beta.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:
getProductsFilterin interfaceRule.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.v2beta.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:
getProductsFilterBytesin interfaceRule.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.v2beta.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.v2beta.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.v2beta.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.
-
setUnknownFields
public final Rule.BoostAction.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
mergeUnknownFields
public final Rule.BoostAction.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
-