Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType

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

Overview

Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the Entity guide.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2EntityType

Returns a new instance of GoogleCloudDialogflowV2EntityType.



9241
9242
9243
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 9241

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

Instance Attribute Details

#auto_expansion_modeString

Optional. Indicates whether the entity type can be automatically expanded. Corresponds to the JSON property autoExpansionMode

Returns:

  • (String)


9211
9212
9213
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 9211

def auto_expansion_mode
  @auto_expansion_mode
end

#display_nameString

Required. The name of the entity type. Corresponds to the JSON property displayName

Returns:

  • (String)


9216
9217
9218
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 9216

def display_name
  @display_name
end

#enable_fuzzy_extractionBoolean Also known as: enable_fuzzy_extraction?

Optional. Enables fuzzy entity extraction during classification. Corresponds to the JSON property enableFuzzyExtraction

Returns:

  • (Boolean)


9221
9222
9223
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 9221

def enable_fuzzy_extraction
  @enable_fuzzy_extraction
end

#entitiesArray<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeEntity>

Optional. The collection of entity entries associated with the entity type. Corresponds to the JSON property entities



9227
9228
9229
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 9227

def entities
  @entities
end

#kindString

Required. Indicates the kind of entity type. Corresponds to the JSON property kind

Returns:

  • (String)


9232
9233
9234
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 9232

def kind
  @kind
end

#nameString

The unique identifier of the entity type. Required for EntityTypes. UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: projects//agent/entityTypes/. Corresponds to the JSON property name

Returns:

  • (String)


9239
9240
9241
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 9239

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9246
9247
9248
9249
9250
9251
9252
9253
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 9246

def update!(**args)
  @auto_expansion_mode = args[:auto_expansion_mode] if args.key?(:auto_expansion_mode)
  @display_name = args[:display_name] if args.key?(:display_name)
  @enable_fuzzy_extraction = args[:enable_fuzzy_extraction] if args.key?(:enable_fuzzy_extraction)
  @entities = args[:entities] if args.key?(:entities)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
end