Class: Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/contentwarehouse_v1/classes.rb,
lib/google/apis/contentwarehouse_v1/representations.rb,
lib/google/apis/contentwarehouse_v1/representations.rb

Overview

Represents a list of synonyms for a given context. For example a context " sales" could contain: Synonym 1: sale, invoice, bill, order Synonym 2: money, credit, finance, payment Synonym 3: shipping, freight, transport Each SynonymSets should be disjoint

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudContentwarehouseV1SynonymSet

Returns a new instance of GoogleCloudContentwarehouseV1SynonymSet.



3786
3787
3788
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3786

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

Instance Attribute Details

#contextString

This is a freeform field. Example contexts can be "sales," "engineering," " real estate," "accounting," etc. The context can be supplied during search requests. Corresponds to the JSON property context

Returns:

  • (String)


3773
3774
3775
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3773

def context
  @context
end

#nameString

The resource name of the SynonymSet This is mandatory for google.api.resource. Format: projects/project_number/locations/location/synonymSets/context. Corresponds to the JSON property name

Returns:

  • (String)


3779
3780
3781
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3779

def name
  @name
end

#synonymsArray<Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSetSynonym>

List of Synonyms for the context. Corresponds to the JSON property synonyms



3784
3785
3786
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3784

def synonyms
  @synonyms
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3791
3792
3793
3794
3795
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3791

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