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
Returns
- (::Google::Cloud::Retail::V2::Rule::BoostAction) — A boost action.
#boost_action=
def boost_action=(value) -> ::Google::Cloud::Retail::V2::Rule::BoostAction
Parameter
- value (::Google::Cloud::Retail::V2::Rule::BoostAction) — A boost action.
Returns
- (::Google::Cloud::Retail::V2::Rule::BoostAction) — A boost action.
#condition
def condition() -> ::Google::Cloud::Retail::V2::Condition
Returns
- (::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
Parameter
- value (::Google::Cloud::Retail::V2::Condition) — Required. The condition that triggers the rule. If the condition is empty, the rule will always apply.
Returns
- (::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
Returns
- (::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction) — Prevents term from being associated with other terms.
#do_not_associate_action=
def do_not_associate_action=(value) -> ::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction
Parameter
- value (::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction) — Prevents term from being associated with other terms.
Returns
- (::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction) — Prevents term from being associated with other terms.
#filter_action
def filter_action() -> ::Google::Cloud::Retail::V2::Rule::FilterAction
Returns
- (::Google::Cloud::Retail::V2::Rule::FilterAction) — Filters results.
#filter_action=
def filter_action=(value) -> ::Google::Cloud::Retail::V2::Rule::FilterAction
Parameter
- value (::Google::Cloud::Retail::V2::Rule::FilterAction) — Filters results.
Returns
- (::Google::Cloud::Retail::V2::Rule::FilterAction) — Filters results.
#force_return_facet_action
def force_return_facet_action() -> ::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction
Returns
- (::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction) — Force returns an attribute as a facet in the request.
#force_return_facet_action=
def force_return_facet_action=(value) -> ::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction
Parameter
- value (::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction) — Force returns an attribute as a facet in the request.
Returns
- (::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction) — Force returns an attribute as a facet in the request.
#ignore_action
def ignore_action() -> ::Google::Cloud::Retail::V2::Rule::IgnoreAction
Returns
- (::Google::Cloud::Retail::V2::Rule::IgnoreAction) — Ignores specific terms from query during search.
#ignore_action=
def ignore_action=(value) -> ::Google::Cloud::Retail::V2::Rule::IgnoreAction
Parameter
- value (::Google::Cloud::Retail::V2::Rule::IgnoreAction) — Ignores specific terms from query during search.
Returns
- (::Google::Cloud::Retail::V2::Rule::IgnoreAction) — Ignores specific terms from query during search.
#oneway_synonyms_action
def oneway_synonyms_action() -> ::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction
Returns
- (::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.
#oneway_synonyms_action=
def oneway_synonyms_action=(value) -> ::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction
Parameter
- 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.
Returns
- (::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.
#redirect_action
def redirect_action() -> ::Google::Cloud::Retail::V2::Rule::RedirectAction
Returns
- (::Google::Cloud::Retail::V2::Rule::RedirectAction) — Redirects a shopper to a specific page.
#redirect_action=
def redirect_action=(value) -> ::Google::Cloud::Retail::V2::Rule::RedirectAction
Parameter
- value (::Google::Cloud::Retail::V2::Rule::RedirectAction) — Redirects a shopper to a specific page.
Returns
- (::Google::Cloud::Retail::V2::Rule::RedirectAction) — Redirects a shopper to a specific page.
#remove_facet_action
def remove_facet_action() -> ::Google::Cloud::Retail::V2::Rule::RemoveFacetAction
Returns
- (::Google::Cloud::Retail::V2::Rule::RemoveFacetAction) — Remove an attribute as a facet in the request (if present).
#remove_facet_action=
def remove_facet_action=(value) -> ::Google::Cloud::Retail::V2::Rule::RemoveFacetAction
Parameter
- value (::Google::Cloud::Retail::V2::Rule::RemoveFacetAction) — Remove an attribute as a facet in the request (if present).
Returns
- (::Google::Cloud::Retail::V2::Rule::RemoveFacetAction) — Remove an attribute as a facet in the request (if present).
#replacement_action
def replacement_action() -> ::Google::Cloud::Retail::V2::Rule::ReplacementAction
Returns
- (::Google::Cloud::Retail::V2::Rule::ReplacementAction) — Replaces specific terms in the query.
#replacement_action=
def replacement_action=(value) -> ::Google::Cloud::Retail::V2::Rule::ReplacementAction
Parameter
- value (::Google::Cloud::Retail::V2::Rule::ReplacementAction) — Replaces specific terms in the query.
Returns
- (::Google::Cloud::Retail::V2::Rule::ReplacementAction) — Replaces specific terms in the query.
#twoway_synonyms_action
def twoway_synonyms_action() -> ::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction
Returns
- (::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction) — Treats a set of terms as synonyms of one another.
#twoway_synonyms_action=
def twoway_synonyms_action=(value) -> ::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction
Parameter
- value (::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction) — Treats a set of terms as synonyms of one another.
Returns
- (::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction) — Treats a set of terms as synonyms of one another.