#[non_exhaustive]pub struct EntityType {
pub name: String,
pub display_name: String,
pub kind: Kind,
pub auto_expansion_mode: AutoExpansionMode,
pub entities: Vec<Entity>,
pub enable_fuzzy_extraction: bool,
/* private fields */
}entity-types or participants or session-entity-types or sessions only.Expand description
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe unique identifier of the entity type.
Required for
EntityTypes.UpdateEntityType
and
EntityTypes.BatchUpdateEntityTypes
methods. Format: projects/<Project ID>/agent/entityTypes/<Entity Type ID>.
display_name: StringRequired. The name of the entity type.
kind: KindRequired. Indicates the kind of entity type.
auto_expansion_mode: AutoExpansionModeOptional. Indicates whether the entity type can be automatically expanded.
entities: Vec<Entity>Optional. The collection of entity entries associated with the entity type.
enable_fuzzy_extraction: boolOptional. Enables fuzzy entity extraction during classification.
Implementations§
Source§impl EntityType
impl EntityType
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_auto_expansion_mode<T: Into<AutoExpansionMode>>(self, v: T) -> Self
pub fn set_auto_expansion_mode<T: Into<AutoExpansionMode>>(self, v: T) -> Self
Sets the value of auto_expansion_mode.
§Example
use google_cloud_dialogflow_v2::model::entity_type::AutoExpansionMode;
let x0 = EntityType::new().set_auto_expansion_mode(AutoExpansionMode::Default);Sourcepub fn set_entities<T, V>(self, v: T) -> Self
pub fn set_entities<T, V>(self, v: T) -> Self
Sourcepub fn set_enable_fuzzy_extraction<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_fuzzy_extraction<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_fuzzy_extraction.
§Example
let x = EntityType::new().set_enable_fuzzy_extraction(true);Trait Implementations§
Source§impl Clone for EntityType
impl Clone for EntityType
Source§fn clone(&self) -> EntityType
fn clone(&self) -> EntityType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more