Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeEntity

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/dialogflow_v2/classes.rb,
generated/google/apis/dialogflow_v2/representations.rb,
generated/google/apis/dialogflow_v2/representations.rb

Overview

An entity entry for an associated entity type.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2EntityTypeEntity

Returns a new instance of GoogleCloudDialogflowV2EntityTypeEntity.



744
745
746
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 744

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

Instance Attribute Details

#synonymsArray<String>

Required. A collection of value synonyms. For example, if the entity type is vegetable, and value is scallions, a synonym could be green onions. For KIND_LIST entity types:

  • This collection must contain exactly one synonym equal to value. Corresponds to the JSON property synonyms

Returns:

  • (Array<String>)


730
731
732
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 730

def synonyms
  @synonyms
end

#valueString

Required. The primary value associated with this entity entry. For example, if the entity type is vegetable, the value could be scallions. For KIND_MAP entity types:

  • A reference value to be used in place of synonyms. For KIND_LIST entity types:
  • A string that can contain references to other entity types (with or without aliases). Corresponds to the JSON property value

Returns:

  • (String)


742
743
744
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 742

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



749
750
751
752
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 749

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