Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleReplacementAction
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleReplacementAction
- 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
Replaces a term in the query. Multiple replacement candidates can be specified.
All query_terms will be replaced with the replacement term. Example:
Replace "gShoe" with "google shoe".
Instance Attribute Summary collapse
-
#query_terms ⇒ Array<String>
Terms from the search query.
-
#replacement_term ⇒ String
Term that will be used for replacement.
-
#term ⇒ String
Will be [deprecated = true] post migration; Corresponds to the JSON property
term.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2betaRuleReplacementAction
constructor
A new instance of GoogleCloudRetailV2betaRuleReplacementAction.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2betaRuleReplacementAction
Returns a new instance of GoogleCloudRetailV2betaRuleReplacementAction.
3972 3973 3974 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3972 def initialize(**args) update!(**args) end |
Instance Attribute Details
#query_terms ⇒ Array<String>
Terms from the search query. Will be replaced by replacement term. Can specify
up to 100 terms.
Corresponds to the JSON property queryTerms
3960 3961 3962 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3960 def query_terms @query_terms end |
#replacement_term ⇒ String
Term that will be used for replacement.
Corresponds to the JSON property replacementTerm
3965 3966 3967 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3965 def replacement_term @replacement_term end |
#term ⇒ String
Will be [deprecated = true] post migration;
Corresponds to the JSON property term
3970 3971 3972 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3970 def term @term end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3977 3978 3979 3980 3981 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3977 def update!(**args) @query_terms = args[:query_terms] if args.key?(:query_terms) @replacement_term = args[:replacement_term] if args.key?(:replacement_term) @term = args[:term] if args.key?(:term) end |