public final class Rule extends com.google.protobuf.GeneratedMessageV3 implements RuleOrBuilder
A rule is a condition-action pair * A condition defines when a rule is to be triggered. * An action specifies what occurs on that trigger. Currently rules only work for [controls][google.cloud.retail.v2.Control] with [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2.SolutionType.SOLUTION_TYPE_SEARCH].Protobuf type
google.cloud.retail.v2.Rule| Modifier and Type | Class and Description |
|---|---|
static class |
Rule.ActionCase |
static class |
Rule.BoostAction
A boost action to apply to results matching condition specified above.
|
static interface |
Rule.BoostActionOrBuilder |
static class |
Rule.Builder
A rule is a condition-action pair
* A condition defines when a rule is to be triggered.
|
static class |
Rule.DoNotAssociateAction
Prevents `query_term` from being associated with specified terms during
search.
|
static interface |
Rule.DoNotAssociateActionOrBuilder |
static class |
Rule.FilterAction
* Rule Condition:
- No
[Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
provided is a global match.
|
static interface |
Rule.FilterActionOrBuilder |
static class |
Rule.IgnoreAction
Prevents a term in the query from being used in search.
|
static interface |
Rule.IgnoreActionOrBuilder |
static class |
Rule.OnewaySynonymsAction
Maps a set of terms to a set of synonyms.
|
static interface |
Rule.OnewaySynonymsActionOrBuilder |
static class |
Rule.RedirectAction
Redirects a shopper to a specific page.
|
static interface |
Rule.RedirectActionOrBuilder |
static class |
Rule.ReplacementAction
Replaces a term in the query.
|
static interface |
Rule.ReplacementActionOrBuilder |
static class |
Rule.TwowaySynonymsAction
Creates a set of terms that will be treated as synonyms of each other.
|
static interface |
Rule.TwowaySynonymsActionOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
BOOST_ACTION_FIELD_NUMBER |
static int |
CONDITION_FIELD_NUMBER |
static int |
DO_NOT_ASSOCIATE_ACTION_FIELD_NUMBER |
static int |
FILTER_ACTION_FIELD_NUMBER |
static int |
IGNORE_ACTION_FIELD_NUMBER |
static int |
ONEWAY_SYNONYMS_ACTION_FIELD_NUMBER |
static int |
REDIRECT_ACTION_FIELD_NUMBER |
static int |
REPLACEMENT_ACTION_FIELD_NUMBER |
static int |
TWOWAY_SYNONYMS_ACTION_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Rule.ActionCase |
getActionCase() |
Rule.BoostAction |
getBoostAction()
A boost action.
|
Rule.BoostActionOrBuilder |
getBoostActionOrBuilder()
A boost action.
|
Condition |
getCondition()
Required.
|
ConditionOrBuilder |
getConditionOrBuilder()
Required.
|
static Rule |
getDefaultInstance() |
Rule |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Rule.DoNotAssociateAction |
getDoNotAssociateAction()
Prevents term from being associated with other terms.
|
Rule.DoNotAssociateActionOrBuilder |
getDoNotAssociateActionOrBuilder()
Prevents term from being associated with other terms.
|
Rule.FilterAction |
getFilterAction()
Filters results.
|
Rule.FilterActionOrBuilder |
getFilterActionOrBuilder()
Filters results.
|
Rule.IgnoreAction |
getIgnoreAction()
Ignores specific terms from query during search.
|
Rule.IgnoreActionOrBuilder |
getIgnoreActionOrBuilder()
Ignores specific terms from query during search.
|
Rule.OnewaySynonymsAction |
getOnewaySynonymsAction()
Treats specific term as a synonym with a group of terms.
|
Rule.OnewaySynonymsActionOrBuilder |
getOnewaySynonymsActionOrBuilder()
Treats specific term as a synonym with a group of terms.
|
com.google.protobuf.Parser<Rule> |
getParserForType() |
Rule.RedirectAction |
getRedirectAction()
Redirects a shopper to a specific page.
|
Rule.RedirectActionOrBuilder |
getRedirectActionOrBuilder()
Redirects a shopper to a specific page.
|
Rule.ReplacementAction |
getReplacementAction()
Replaces specific terms in the query.
|
Rule.ReplacementActionOrBuilder |
getReplacementActionOrBuilder()
Replaces specific terms in the query.
|
int |
getSerializedSize() |
Rule.TwowaySynonymsAction |
getTwowaySynonymsAction()
Treats a set of terms as synonyms of one another.
|
Rule.TwowaySynonymsActionOrBuilder |
getTwowaySynonymsActionOrBuilder()
Treats a set of terms as synonyms of one another.
|
boolean |
hasBoostAction()
A boost action.
|
boolean |
hasCondition()
Required.
|
boolean |
hasDoNotAssociateAction()
Prevents term from being associated with other terms.
|
boolean |
hasFilterAction()
Filters results.
|
int |
hashCode() |
boolean |
hasIgnoreAction()
Ignores specific terms from query during search.
|
boolean |
hasOnewaySynonymsAction()
Treats specific term as a synonym with a group of terms.
|
boolean |
hasRedirectAction()
Redirects a shopper to a specific page.
|
boolean |
hasReplacementAction()
Replaces specific terms in the query.
|
boolean |
hasTwowaySynonymsAction()
Treats a set of terms as synonyms of one another.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Rule.Builder |
newBuilder() |
static Rule.Builder |
newBuilder(Rule prototype) |
Rule.Builder |
newBuilderForType() |
protected Rule.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Rule |
parseDelimitedFrom(InputStream input) |
static Rule |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Rule |
parseFrom(byte[] data) |
static Rule |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Rule |
parseFrom(ByteBuffer data) |
static Rule |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Rule |
parseFrom(com.google.protobuf.ByteString data) |
static Rule |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Rule |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Rule |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Rule |
parseFrom(InputStream input) |
static Rule |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Rule> |
parser() |
Rule.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int BOOST_ACTION_FIELD_NUMBER
public static final int REDIRECT_ACTION_FIELD_NUMBER
public static final int ONEWAY_SYNONYMS_ACTION_FIELD_NUMBER
public static final int DO_NOT_ASSOCIATE_ACTION_FIELD_NUMBER
public static final int REPLACEMENT_ACTION_FIELD_NUMBER
public static final int IGNORE_ACTION_FIELD_NUMBER
public static final int FILTER_ACTION_FIELD_NUMBER
public static final int TWOWAY_SYNONYMS_ACTION_FIELD_NUMBER
public static final int CONDITION_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public Rule.ActionCase getActionCase()
getActionCase in interface RuleOrBuilderpublic boolean hasBoostAction()
A boost action.
.google.cloud.retail.v2.Rule.BoostAction boost_action = 2;hasBoostAction in interface RuleOrBuilderpublic Rule.BoostAction getBoostAction()
A boost action.
.google.cloud.retail.v2.Rule.BoostAction boost_action = 2;getBoostAction in interface RuleOrBuilderpublic Rule.BoostActionOrBuilder getBoostActionOrBuilder()
A boost action.
.google.cloud.retail.v2.Rule.BoostAction boost_action = 2;getBoostActionOrBuilder in interface RuleOrBuilderpublic boolean hasRedirectAction()
Redirects a shopper to a specific page.
.google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3;hasRedirectAction in interface RuleOrBuilderpublic Rule.RedirectAction getRedirectAction()
Redirects a shopper to a specific page.
.google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3;getRedirectAction in interface RuleOrBuilderpublic Rule.RedirectActionOrBuilder getRedirectActionOrBuilder()
Redirects a shopper to a specific page.
.google.cloud.retail.v2.Rule.RedirectAction redirect_action = 3;getRedirectActionOrBuilder in interface RuleOrBuilderpublic boolean hasOnewaySynonymsAction()
Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term.
.google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6;hasOnewaySynonymsAction in interface RuleOrBuilderpublic Rule.OnewaySynonymsAction getOnewaySynonymsAction()
Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term.
.google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6;getOnewaySynonymsAction in interface RuleOrBuilderpublic Rule.OnewaySynonymsActionOrBuilder getOnewaySynonymsActionOrBuilder()
Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term.
.google.cloud.retail.v2.Rule.OnewaySynonymsAction oneway_synonyms_action = 6;getOnewaySynonymsActionOrBuilder in interface RuleOrBuilderpublic boolean hasDoNotAssociateAction()
Prevents term from being associated with other terms.
.google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7;hasDoNotAssociateAction in interface RuleOrBuilderpublic Rule.DoNotAssociateAction getDoNotAssociateAction()
Prevents term from being associated with other terms.
.google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7;getDoNotAssociateAction in interface RuleOrBuilderpublic Rule.DoNotAssociateActionOrBuilder getDoNotAssociateActionOrBuilder()
Prevents term from being associated with other terms.
.google.cloud.retail.v2.Rule.DoNotAssociateAction do_not_associate_action = 7;getDoNotAssociateActionOrBuilder in interface RuleOrBuilderpublic boolean hasReplacementAction()
Replaces specific terms in the query.
.google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8;hasReplacementAction in interface RuleOrBuilderpublic Rule.ReplacementAction getReplacementAction()
Replaces specific terms in the query.
.google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8;getReplacementAction in interface RuleOrBuilderpublic Rule.ReplacementActionOrBuilder getReplacementActionOrBuilder()
Replaces specific terms in the query.
.google.cloud.retail.v2.Rule.ReplacementAction replacement_action = 8;getReplacementActionOrBuilder in interface RuleOrBuilderpublic boolean hasIgnoreAction()
Ignores specific terms from query during search.
.google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9;hasIgnoreAction in interface RuleOrBuilderpublic Rule.IgnoreAction getIgnoreAction()
Ignores specific terms from query during search.
.google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9;getIgnoreAction in interface RuleOrBuilderpublic Rule.IgnoreActionOrBuilder getIgnoreActionOrBuilder()
Ignores specific terms from query during search.
.google.cloud.retail.v2.Rule.IgnoreAction ignore_action = 9;getIgnoreActionOrBuilder in interface RuleOrBuilderpublic boolean hasFilterAction()
Filters results.
.google.cloud.retail.v2.Rule.FilterAction filter_action = 10;hasFilterAction in interface RuleOrBuilderpublic Rule.FilterAction getFilterAction()
Filters results.
.google.cloud.retail.v2.Rule.FilterAction filter_action = 10;getFilterAction in interface RuleOrBuilderpublic Rule.FilterActionOrBuilder getFilterActionOrBuilder()
Filters results.
.google.cloud.retail.v2.Rule.FilterAction filter_action = 10;getFilterActionOrBuilder in interface RuleOrBuilderpublic boolean hasTwowaySynonymsAction()
Treats a set of terms as synonyms of one another.
.google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11;hasTwowaySynonymsAction in interface RuleOrBuilderpublic Rule.TwowaySynonymsAction getTwowaySynonymsAction()
Treats a set of terms as synonyms of one another.
.google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11;getTwowaySynonymsAction in interface RuleOrBuilderpublic Rule.TwowaySynonymsActionOrBuilder getTwowaySynonymsActionOrBuilder()
Treats a set of terms as synonyms of one another.
.google.cloud.retail.v2.Rule.TwowaySynonymsAction twoway_synonyms_action = 11;getTwowaySynonymsActionOrBuilder in interface RuleOrBuilderpublic boolean hasCondition()
Required. The condition that triggers the rule. If the condition is empty, the rule will always apply.
.google.cloud.retail.v2.Condition condition = 1 [(.google.api.field_behavior) = REQUIRED];
hasCondition in interface RuleOrBuilderpublic Condition getCondition()
Required. The condition that triggers the rule. If the condition is empty, the rule will always apply.
.google.cloud.retail.v2.Condition condition = 1 [(.google.api.field_behavior) = REQUIRED];
getCondition in interface RuleOrBuilderpublic ConditionOrBuilder getConditionOrBuilder()
Required. The condition that triggers the rule. If the condition is empty, the rule will always apply.
.google.cloud.retail.v2.Condition condition = 1 [(.google.api.field_behavior) = REQUIRED];
getConditionOrBuilder in interface RuleOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Rule parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rule parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rule parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rule parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rule parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Rule parseFrom(InputStream input) throws IOException
IOExceptionpublic static Rule parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Rule parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Rule parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Rule parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Rule parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Rule.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Rule.Builder newBuilder()
public static Rule.Builder newBuilder(Rule prototype)
public Rule.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Rule.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Rule getDefaultInstance()
public static com.google.protobuf.Parser<Rule> parser()
public com.google.protobuf.Parser<Rule> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Rule getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.