Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCondition
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCondition
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/representations.rb
Overview
Metadata that is used to define a condition that triggers an action. A valid condition must specify at least one of 'query_terms' or 'products_filter'. If multiple fields are specified, the condition is met if all the fields are satisfied e.g. if a set of query terms and product_filter are set, then only items matching the product_filter for requests with a query matching the query terms wil get boosted.
Instance Attribute Summary collapse
-
#active_time_range ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaConditionTimeRange>
Range of time(s) specifying when Condition is active.
-
#page_categories ⇒ Array<String>
Used to support browse uses cases.
-
#query_terms ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaConditionQueryTerm>
A list (up to 10 entries) of terms to match the query on.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2alphaCondition
constructor
A new instance of GoogleCloudRetailV2alphaCondition.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2alphaCondition
Returns a new instance of GoogleCloudRetailV2alphaCondition.
2642 2643 2644 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2642 def initialize(**args) update!(**args) end |
Instance Attribute Details
#active_time_range ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaConditionTimeRange>
Range of time(s) specifying when Condition is active. Condition true if any
time range matches.
Corresponds to the JSON property activeTimeRange
2627 2628 2629 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2627 def active_time_range @active_time_range end |
#page_categories ⇒ Array<String>
Used to support browse uses cases. A list (up to 10 entries) of categories or
departments. The format should be the same as UserEvent.page_categories;
Corresponds to the JSON property pageCategories
2633 2634 2635 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2633 def page_categories @page_categories end |
#query_terms ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaConditionQueryTerm>
A list (up to 10 entries) of terms to match the query on. If not specified,
match all queries. If many query terms are specified, the condition is matched
if any of the terms is a match (i.e. using the OR operator).
Corresponds to the JSON property queryTerms
2640 2641 2642 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2640 def query_terms @query_terms end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2647 2648 2649 2650 2651 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2647 def update!(**args) @active_time_range = args[:active_time_range] if args.key?(:active_time_range) @page_categories = args[:page_categories] if args.key?(:page_categories) @query_terms = args[:query_terms] if args.key?(:query_terms) end |