Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleTwowaySynonymsAction

Inherits:
Object
  • Object
show all
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

Creates a set of terms that will be treated as synonyms of each other. Example: synonyms of "sneakers" and "shoes": * "sneakers" will use a synonym of "shoes" . * "shoes" will use a synonym of "sneakers".

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaRuleTwowaySynonymsAction

Returns a new instance of GoogleCloudRetailV2alphaRuleTwowaySynonymsAction.



6454
6455
6456
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 6454

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

Instance Attribute Details

#synonymsArray<String>

Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Corresponds to the JSON property synonyms

Returns:

  • (Array<String>)


6452
6453
6454
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 6452

def synonyms
  @synonyms
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6459
6460
6461
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 6459

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