Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::Rule.
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 with SOLUTION_TYPE_SEARCH.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#boost_action
def boost_action() -> ::Google::Cloud::Retail::V2::Rule::BoostAction-
(::Google::Cloud::Retail::V2::Rule::BoostAction) — A boost action.
Note: The following fields are mutually exclusive:
boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#boost_action=
def boost_action=(value) -> ::Google::Cloud::Retail::V2::Rule::BoostAction-
value (::Google::Cloud::Retail::V2::Rule::BoostAction) — A boost action.
Note: The following fields are mutually exclusive:
boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::BoostAction) — A boost action.
Note: The following fields are mutually exclusive:
boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#condition
def condition() -> ::Google::Cloud::Retail::V2::Condition- (::Google::Cloud::Retail::V2::Condition) — Required. The condition that triggers the rule. If the condition is empty, the rule will always apply.
#condition=
def condition=(value) -> ::Google::Cloud::Retail::V2::Condition- value (::Google::Cloud::Retail::V2::Condition) — Required. The condition that triggers the rule. If the condition is empty, the rule will always apply.
- (::Google::Cloud::Retail::V2::Condition) — Required. The condition that triggers the rule. If the condition is empty, the rule will always apply.
#do_not_associate_action
def do_not_associate_action() -> ::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction-
(::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction) — Prevents term from being associated with other terms.
Note: The following fields are mutually exclusive:
do_not_associate_action,boost_action,redirect_action,oneway_synonyms_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#do_not_associate_action=
def do_not_associate_action=(value) -> ::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction-
value (::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction) — Prevents term from being associated with other terms.
Note: The following fields are mutually exclusive:
do_not_associate_action,boost_action,redirect_action,oneway_synonyms_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction) — Prevents term from being associated with other terms.
Note: The following fields are mutually exclusive:
do_not_associate_action,boost_action,redirect_action,oneway_synonyms_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#filter_action
def filter_action() -> ::Google::Cloud::Retail::V2::Rule::FilterAction-
(::Google::Cloud::Retail::V2::Rule::FilterAction) — Filters results.
Note: The following fields are mutually exclusive:
filter_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#filter_action=
def filter_action=(value) -> ::Google::Cloud::Retail::V2::Rule::FilterAction-
value (::Google::Cloud::Retail::V2::Rule::FilterAction) — Filters results.
Note: The following fields are mutually exclusive:
filter_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::FilterAction) — Filters results.
Note: The following fields are mutually exclusive:
filter_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#force_return_facet_action
def force_return_facet_action() -> ::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction-
(::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction) — Force returns an attribute as a facet in the request.
Note: The following fields are mutually exclusive:
force_return_facet_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#force_return_facet_action=
def force_return_facet_action=(value) -> ::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction-
value (::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction) — Force returns an attribute as a facet in the request.
Note: The following fields are mutually exclusive:
force_return_facet_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction) — Force returns an attribute as a facet in the request.
Note: The following fields are mutually exclusive:
force_return_facet_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#ignore_action
def ignore_action() -> ::Google::Cloud::Retail::V2::Rule::IgnoreAction-
(::Google::Cloud::Retail::V2::Rule::IgnoreAction) — Ignores specific terms from query during search.
Note: The following fields are mutually exclusive:
ignore_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#ignore_action=
def ignore_action=(value) -> ::Google::Cloud::Retail::V2::Rule::IgnoreAction-
value (::Google::Cloud::Retail::V2::Rule::IgnoreAction) — Ignores specific terms from query during search.
Note: The following fields are mutually exclusive:
ignore_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::IgnoreAction) — Ignores specific terms from query during search.
Note: The following fields are mutually exclusive:
ignore_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#oneway_synonyms_action
def oneway_synonyms_action() -> ::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction-
(::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction) — Treats specific term as a synonym with a group of terms.
Group of terms will not be treated as synonyms with the specific term.
Note: The following fields are mutually exclusive:
oneway_synonyms_action,boost_action,redirect_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#oneway_synonyms_action=
def oneway_synonyms_action=(value) -> ::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction-
value (::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction) — Treats specific term as a synonym with a group of terms.
Group of terms will not be treated as synonyms with the specific term.
Note: The following fields are mutually exclusive:
oneway_synonyms_action,boost_action,redirect_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction) — Treats specific term as a synonym with a group of terms.
Group of terms will not be treated as synonyms with the specific term.
Note: The following fields are mutually exclusive:
oneway_synonyms_action,boost_action,redirect_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#pin_action
def pin_action() -> ::Google::Cloud::Retail::V2::Rule::PinAction-
(::Google::Cloud::Retail::V2::Rule::PinAction) — Pins one or more specified products to a specific position in the
results.
Note: The following fields are mutually exclusive:
pin_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#pin_action=
def pin_action=(value) -> ::Google::Cloud::Retail::V2::Rule::PinAction-
value (::Google::Cloud::Retail::V2::Rule::PinAction) — Pins one or more specified products to a specific position in the
results.
Note: The following fields are mutually exclusive:
pin_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::PinAction) — Pins one or more specified products to a specific position in the
results.
Note: The following fields are mutually exclusive:
pin_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#redirect_action
def redirect_action() -> ::Google::Cloud::Retail::V2::Rule::RedirectAction-
(::Google::Cloud::Retail::V2::Rule::RedirectAction) — Redirects a shopper to a specific page.
Note: The following fields are mutually exclusive:
redirect_action,boost_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#redirect_action=
def redirect_action=(value) -> ::Google::Cloud::Retail::V2::Rule::RedirectAction-
value (::Google::Cloud::Retail::V2::Rule::RedirectAction) — Redirects a shopper to a specific page.
Note: The following fields are mutually exclusive:
redirect_action,boost_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::RedirectAction) — Redirects a shopper to a specific page.
Note: The following fields are mutually exclusive:
redirect_action,boost_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#remove_facet_action
def remove_facet_action() -> ::Google::Cloud::Retail::V2::Rule::RemoveFacetAction-
(::Google::Cloud::Retail::V2::Rule::RemoveFacetAction) — Remove an attribute as a facet in the request (if present).
Note: The following fields are mutually exclusive:
remove_facet_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#remove_facet_action=
def remove_facet_action=(value) -> ::Google::Cloud::Retail::V2::Rule::RemoveFacetAction-
value (::Google::Cloud::Retail::V2::Rule::RemoveFacetAction) — Remove an attribute as a facet in the request (if present).
Note: The following fields are mutually exclusive:
remove_facet_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::RemoveFacetAction) — Remove an attribute as a facet in the request (if present).
Note: The following fields are mutually exclusive:
remove_facet_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#replacement_action
def replacement_action() -> ::Google::Cloud::Retail::V2::Rule::ReplacementAction-
(::Google::Cloud::Retail::V2::Rule::ReplacementAction) — Replaces specific terms in the query.
Note: The following fields are mutually exclusive:
replacement_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#replacement_action=
def replacement_action=(value) -> ::Google::Cloud::Retail::V2::Rule::ReplacementAction-
value (::Google::Cloud::Retail::V2::Rule::ReplacementAction) — Replaces specific terms in the query.
Note: The following fields are mutually exclusive:
replacement_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::ReplacementAction) — Replaces specific terms in the query.
Note: The following fields are mutually exclusive:
replacement_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,ignore_action,filter_action,twoway_synonyms_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#twoway_synonyms_action
def twoway_synonyms_action() -> ::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction-
(::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction) — Treats a set of terms as synonyms of one another.
Note: The following fields are mutually exclusive:
twoway_synonyms_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
#twoway_synonyms_action=
def twoway_synonyms_action=(value) -> ::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction-
value (::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction) — Treats a set of terms as synonyms of one another.
Note: The following fields are mutually exclusive:
twoway_synonyms_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction) — Treats a set of terms as synonyms of one another.
Note: The following fields are mutually exclusive:
twoway_synonyms_action,boost_action,redirect_action,oneway_synonyms_action,do_not_associate_action,replacement_action,ignore_action,filter_action,force_return_facet_action,remove_facet_action,pin_action. If a field in that set is populated, all other fields in the set will automatically be cleared.