-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSessionEntityType.py
More file actions
37 lines (25 loc) · 1.27 KB
/
Copy pathSessionEntityType.py
File metadata and controls
37 lines (25 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from enum import Enum
from typing import List
from DialogFlowPy.Entity import Entity
class EntityOverrideMode(Enum):
ENTITY_OVERRIDE_MODE_UNSPECIFIED = 'ENTITY_OVERRIDE_MODE_UNSPECIFIED'
ENTITY_OVERRIDE_MODE_OVERRIDE = 'ENTITY_OVERRIDE_MODE_OVERRIDE'
ENTITY_OVERRIDE_MODE_SUPPLEMENT = 'ENTITY_OVERRIDE_MODE_SUPPLEMENT'
class SessionEntityType(dict):
"""
name
string
Required. The unique identifier of this session entity type. Format: projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>.
<Entity Type Display Name> must be the display name of an existing entity type in the same agent that will be overridden or supplemented.
entity_override_mode
EntityOverrideMode
Required. Indicates whether the additional data should override or supplement the developer entity type definition.
entities[]
Entity
Required. The collection of entities associated with this session entity type.
"""
def __init__(self, name: str, entity_overide_mode: EntityOverrideMode, entities: List[Entity]) -> None:
super().__init__()
self['name'] = name
self['entity_override_mode'] = entity_overide_mode.value
self['entities'] = entities