Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleDoNotAssociateAction

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

Prevents query_term from being associated with specified terms during search. Example: Don't associate "gShoe" and "cheap".

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaRuleDoNotAssociateAction

Returns a new instance of GoogleCloudRetailV2betaRuleDoNotAssociateAction.



4893
4894
4895
# File 'lib/google/apis/retail_v2beta/classes.rb', line 4893

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

Instance Attribute Details

#do_not_associate_termsArray<String>

Cannot contain duplicates or the query term. Can specify up to 100 terms. Corresponds to the JSON property doNotAssociateTerms

Returns:

  • (Array<String>)


4880
4881
4882
# File 'lib/google/apis/retail_v2beta/classes.rb', line 4880

def do_not_associate_terms
  @do_not_associate_terms
end

#query_termsArray<String>

Terms from the search query. Will not consider do_not_associate_terms for search if in search query. Can specify up to 100 terms. Corresponds to the JSON property queryTerms

Returns:

  • (Array<String>)


4886
4887
4888
# File 'lib/google/apis/retail_v2beta/classes.rb', line 4886

def query_terms
  @query_terms
end

#termsArray<String>

Will be [deprecated = true] post migration; Corresponds to the JSON property terms

Returns:

  • (Array<String>)


4891
4892
4893
# File 'lib/google/apis/retail_v2beta/classes.rb', line 4891

def terms
  @terms
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4898
4899
4900
4901
4902
# File 'lib/google/apis/retail_v2beta/classes.rb', line 4898

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