Skip to main content

entity_types

Creates, updates, deletes, gets or lists an entity_types resource.

Overview

Nameentity_types
TypeResource
Idgoogle.dialogflow.entity_types

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. The unique identifier of the session entity type. Format: projects//locations//agents//sessions//entityTypes/ or projects//locations//agents//environments//sessions//entityTypes/. If Environment ID is not specified, we assume default 'draft' environment.
entitiesarrayRequired. The collection of entities to override or supplement the custom entity type.
entityOverrideModestringRequired. Indicates whether the additional data should override or supplement the custom entity type definition.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_agents_environments_sessions_entity_types_getselectprojectsId, locationsId, agentsId, environmentsId, sessionsId, entityTypesIdRetrieves the specified session entity type.
projects_locations_agents_sessions_entity_types_getselectprojectsId, locationsId, agentsId, sessionsId, entityTypesIdRetrieves the specified session entity type.
projects_locations_agents_environments_sessions_entity_types_listselectprojectsId, locationsId, agentsId, environmentsId, sessionsIdpageSize, pageTokenReturns the list of all session entity types in the specified session.
projects_locations_agents_entity_types_getselectprojectsId, locationsId, agentsId, entityTypesIdlanguageCodeRetrieves the specified entity type.
projects_locations_agents_sessions_entity_types_listselectprojectsId, locationsId, agentsId, sessionsIdpageSize, pageTokenReturns the list of all session entity types in the specified session.
projects_locations_agents_entity_types_listselectprojectsId, locationsId, agentsIdlanguageCode, pageSize, pageTokenReturns the list of all entity types in the specified agent.
projects_locations_agents_environments_sessions_entity_types_createinsertprojectsId, locationsId, agentsId, environmentsId, sessionsIdCreates a session entity type.
projects_locations_agents_sessions_entity_types_createinsertprojectsId, locationsId, agentsId, sessionsIdCreates a session entity type.
projects_locations_agents_entity_types_createinsertprojectsId, locationsId, agentsIdlanguageCodeCreates an entity type in the specified agent. Note: You should always train a flow prior to sending it queries. See the training documentation.
projects_locations_agents_environments_sessions_entity_types_patchupdateprojectsId, locationsId, agentsId, environmentsId, sessionsId, entityTypesIdupdateMaskUpdates the specified session entity type.
projects_locations_agents_sessions_entity_types_patchupdateprojectsId, locationsId, agentsId, sessionsId, entityTypesIdupdateMaskUpdates the specified session entity type.
projects_locations_agents_entity_types_patchupdateprojectsId, locationsId, agentsId, entityTypesIdlanguageCode, updateMaskUpdates the specified entity type. Note: You should always train a flow prior to sending it queries. See the training documentation.
projects_locations_agents_environments_sessions_entity_types_deletedeleteprojectsId, locationsId, agentsId, environmentsId, sessionsId, entityTypesIdDeletes the specified session entity type.
projects_locations_agents_sessions_entity_types_deletedeleteprojectsId, locationsId, agentsId, sessionsId, entityTypesIdDeletes the specified session entity type.
projects_locations_agents_entity_types_deletedeleteprojectsId, locationsId, agentsId, entityTypesIdforceDeletes the specified entity type. Note: You should always train a flow prior to sending it queries. See the training documentation.
projects_locations_agents_entity_types_exportexecprojectsId, locationsId, agentsIdExports the selected entity types.
projects_locations_agents_entity_types_importexecprojectsId, locationsId, agentsIdImports the specified entitytypes into the agent.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
agentsIdstring
entityTypesIdstring
environmentsIdstring
locationsIdstring
projectsIdstring
sessionsIdstring
forceboolean
languageCodestring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves the specified session entity type.

SELECT
name,
entities,
entityOverrideMode
FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND sessionsId = '{{ sessionsId }}' -- required
AND entityTypesId = '{{ entityTypesId }}' -- required;

INSERT examples

Creates a session entity type.

INSERT INTO google.dialogflow.entity_types (
data__name,
data__entityOverrideMode,
data__entities,
projectsId,
locationsId,
agentsId,
environmentsId,
sessionsId
)
SELECT
'{{ name }}',
'{{ entityOverrideMode }}',
'{{ entities }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}',
'{{ environmentsId }}',
'{{ sessionsId }}'
RETURNING
name,
entities,
entityOverrideMode
;

UPDATE examples

Updates the specified session entity type.

UPDATE google.dialogflow.entity_types
SET
data__name = '{{ name }}',
data__entityOverrideMode = '{{ entityOverrideMode }}',
data__entities = '{{ entities }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND sessionsId = '{{ sessionsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
entities,
entityOverrideMode;

DELETE examples

Deletes the specified session entity type.

DELETE FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND sessionsId = '{{ sessionsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required;

Lifecycle Methods

Exports the selected entity types.

EXEC google.dialogflow.entity_types.projects_locations_agents_entity_types_export 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required
@@json=
'{
"entityTypes": "{{ entityTypes }}",
"entityTypesUri": "{{ entityTypesUri }}",
"entityTypesContentInline": {{ entityTypesContentInline }},
"dataFormat": "{{ dataFormat }}",
"languageCode": "{{ languageCode }}"
}';