Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class SessionEntityType.
A session represents a conversation between a Dialogflow agent and an
end-user. You can create special entities, called session entities, during a
session. Session entities can extend or replace custom entity types and only
exist during the session that they were created for. All session data,
including session entities, is stored by Dialogflow for 20 minutes.
Generated from protobuf message google.cloud.dialogflow.v2.SessionEntityType
Namespace
Google \ Cloud \ Dialogflow \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Required. The unique identifier of this session entity type. Format: projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>, or projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>. If Environment ID is not specified, we assume default 'draft' environment. If User ID is not specified, we assume default '-' user. <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
int
Required. Indicates whether the additional data should override or supplement the custom entity type definition.
Required. The collection of entities associated with this session entity type.
getName
Required. The unique identifier of this session entity type. Format:
projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
Display Name>, or projects/<Project ID>/agent/environments/<Environment
ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
Name>.
If Environment ID is not specified, we assume default 'draft'
environment. If User ID is not specified, we assume default '-' user.
<Entity Type Display Name> must be the display name of an existing entity
type in the same agent that will be overridden or supplemented.
Returns
Type
Description
string
setName
Required. The unique identifier of this session entity type. Format:
projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
Display Name>, or projects/<Project ID>/agent/environments/<Environment
ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
Name>.
If Environment ID is not specified, we assume default 'draft'
environment. If User ID is not specified, we assume default '-' user.
<Entity Type Display Name> must be the display name of an existing entity
type in the same agent that will be overridden or supplemented.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getEntityOverrideMode
Required. Indicates whether the additional data should override or
supplement the custom entity type definition.
Returns
Type
Description
int
setEntityOverrideMode
Required. Indicates whether the additional data should override or
supplement the custom entity type definition.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getEntities
Required. The collection of entities associated with this session entity
type.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Dialogflow V2 Client - Class SessionEntityType (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-dialogflow/latest/V2.SessionEntityType)\n- [2.1.1](/php/docs/reference/cloud-dialogflow/2.1.1/V2.SessionEntityType)\n- [2.0.1](/php/docs/reference/cloud-dialogflow/2.0.1/V2.SessionEntityType)\n- [1.17.2](/php/docs/reference/cloud-dialogflow/1.17.2/V2.SessionEntityType)\n- [1.16.0](/php/docs/reference/cloud-dialogflow/1.16.0/V2.SessionEntityType)\n- [1.15.1](/php/docs/reference/cloud-dialogflow/1.15.1/V2.SessionEntityType)\n- [1.14.0](/php/docs/reference/cloud-dialogflow/1.14.0/V2.SessionEntityType)\n- [1.13.0](/php/docs/reference/cloud-dialogflow/1.13.0/V2.SessionEntityType)\n- [1.12.3](/php/docs/reference/cloud-dialogflow/1.12.3/V2.SessionEntityType)\n- [1.11.0](/php/docs/reference/cloud-dialogflow/1.11.0/V2.SessionEntityType)\n- [1.10.2](/php/docs/reference/cloud-dialogflow/1.10.2/V2.SessionEntityType)\n- [1.9.0](/php/docs/reference/cloud-dialogflow/1.9.0/V2.SessionEntityType)\n- [1.8.0](/php/docs/reference/cloud-dialogflow/1.8.0/V2.SessionEntityType)\n- [1.7.2](/php/docs/reference/cloud-dialogflow/1.7.2/V2.SessionEntityType)\n- [1.6.0](/php/docs/reference/cloud-dialogflow/1.6.0/V2.SessionEntityType)\n- [1.5.0](/php/docs/reference/cloud-dialogflow/1.5.0/V2.SessionEntityType)\n- [1.4.0](/php/docs/reference/cloud-dialogflow/1.4.0/V2.SessionEntityType)\n- [1.3.2](/php/docs/reference/cloud-dialogflow/1.3.2/V2.SessionEntityType)\n- [1.2.0](/php/docs/reference/cloud-dialogflow/1.2.0/V2.SessionEntityType)\n- [1.1.1](/php/docs/reference/cloud-dialogflow/1.1.1/V2.SessionEntityType)\n- [1.0.1](/php/docs/reference/cloud-dialogflow/1.0.1/V2.SessionEntityType) \nReference documentation and code samples for the Google Cloud Dialogflow V2 Client class SessionEntityType.\n\nA session represents a conversation between a Dialogflow agent and an\nend-user. You can create special entities, called session entities, during a\nsession. Session entities can extend or replace custom entity types and only\nexist during the session that they were created for. All session data,\nincluding session entities, is stored by Dialogflow for 20 minutes.\n\nFor more information, see the [session entity\nguide](https://cloud.google.com/dialogflow/docs/entities-session).\n\nGenerated from protobuf message `google.cloud.dialogflow.v2.SessionEntityType`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dialogflow \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nRequired. The unique identifier of this session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e`, or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n`\u003cEntity Type Display Name\u003e` must be the display name of an existing entity\ntype in the same agent that will be overridden or supplemented.\n\n### setName\n\nRequired. The unique identifier of this session entity type. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\nDisplay Name\u003e`, or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\nID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\nName\u003e`.\n\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user.\n`\u003cEntity Type Display Name\u003e` must be the display name of an existing entity\ntype in the same agent that will be overridden or supplemented.\n\n### getEntityOverrideMode\n\nRequired. Indicates whether the additional data should override or\nsupplement the custom entity type definition.\n\n### setEntityOverrideMode\n\nRequired. Indicates whether the additional data should override or\nsupplement the custom entity type definition.\n\n### getEntities\n\nRequired. The collection of entities associated with this session entity\ntype.\n\n### setEntities\n\nRequired. The collection of entities associated with this session entity\ntype."]]