Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCondition

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/retail_v2beta/classes.rb,
lib/google/apis/retail_v2beta/representations.rb,
lib/google/apis/retail_v2beta/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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaCondition

Returns a new instance of GoogleCloudRetailV2betaCondition.



2523
2524
2525
# File 'lib/google/apis/retail_v2beta/classes.rb', line 2523

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#active_time_rangeArray<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaConditionTimeRange>

Range of time(s) specifying when Condition is active. Condition true if any time range matches. Corresponds to the JSON property activeTimeRange



2514
2515
2516
# File 'lib/google/apis/retail_v2beta/classes.rb', line 2514

def active_time_range
  @active_time_range
end

#query_termsArray<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaConditionQueryTerm>

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



2521
2522
2523
# File 'lib/google/apis/retail_v2beta/classes.rb', line 2521

def query_terms
  @query_terms
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2528
2529
2530
2531
# File 'lib/google/apis/retail_v2beta/classes.rb', line 2528

def update!(**args)
  @active_time_range = args[:active_time_range] if args.key?(:active_time_range)
  @query_terms = args[:query_terms] if args.key?(:query_terms)
end