Package com.google.cloud.retail.v2alpha
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.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.GeneratedMessageV3.Builder<Rule.BoostAction.Builder> implements Rule.BoostActionOrBuilder
A boost action to apply to results matching condition specified above.
Protobuf typegoogle.cloud.retail.v2alpha.Rule.BoostAction
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.BoostAction.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Rule.BoostAction
build()
Rule.BoostAction
buildPartial()
Rule.BoostAction.Builder
clear()
Rule.BoostAction.Builder
clearBoost()
Strength of the condition boost, which must be in [-1, 1].Rule.BoostAction.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Rule.BoostAction.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Rule.BoostAction.Builder
clearProductsFilter()
The filter can have a max size of 5000 characters.Rule.BoostAction.Builder
clone()
float
getBoost()
Strength of the condition boost, which must be in [-1, 1].Rule.BoostAction
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getProductsFilter()
The filter can have a max size of 5000 characters.com.google.protobuf.ByteString
getProductsFilterBytes()
The filter can have a max size of 5000 characters.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
Rule.BoostAction.Builder
mergeFrom(Rule.BoostAction other)
Rule.BoostAction.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Rule.BoostAction.Builder
mergeFrom(com.google.protobuf.Message other)
Rule.BoostAction.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Rule.BoostAction.Builder
setBoost(float value)
Strength of the condition boost, which must be in [-1, 1].Rule.BoostAction.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Rule.BoostAction.Builder
setProductsFilter(String value)
The filter can have a max size of 5000 characters.Rule.BoostAction.Builder
setProductsFilterBytes(com.google.protobuf.ByteString value)
The filter can have a max size of 5000 characters.Rule.BoostAction.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
Rule.BoostAction.Builder
setUnknownFields(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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
clear
public Rule.BoostAction.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
getDefaultInstanceForType
public Rule.BoostAction getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Rule.BoostAction build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Rule.BoostAction buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Rule.BoostAction.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
setField
public Rule.BoostAction.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
clearField
public Rule.BoostAction.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
clearOneof
public Rule.BoostAction.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in 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:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
addRepeatedField
public Rule.BoostAction.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
mergeFrom
public Rule.BoostAction.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.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 interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
getBoost
in 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.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 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.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 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.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.
-
setUnknownFields
public final Rule.BoostAction.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
mergeUnknownFields
public final Rule.BoostAction.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Rule.BoostAction.Builder>
-
-