Reference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::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.
(::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.
#name=
defname=(value)->::String
Parameter
value (::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.
Returns
(::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.
[[["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-09 UTC."],[],[],null,["# Dialogflow V2 API - Class Google::Cloud::Dialogflow::V2::SessionEntityType (v1.10.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.10.1 (latest)](/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.10.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.10.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.9.1](/ruby/docs/reference/google-cloud-dialogflow-v2/1.9.1/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.8.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.8.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.7.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.7.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.6.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.6.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.5.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.5.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.4.1](/ruby/docs/reference/google-cloud-dialogflow-v2/1.4.1/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.3.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.3.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.2.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.2.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.1.1](/ruby/docs/reference/google-cloud-dialogflow-v2/1.1.1/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [1.0.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.0.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.34.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.34.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.33.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.33.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.32.2](/ruby/docs/reference/google-cloud-dialogflow-v2/0.32.2/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.31.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.31.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.30.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.30.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.29.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.29.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.28.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.28.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.27.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.27.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.26.2](/ruby/docs/reference/google-cloud-dialogflow-v2/0.26.2/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.25.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.25.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.24.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.24.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.23.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.23.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.22.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.22.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.21.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.21.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.20.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.20.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.19.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.19.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.18.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.18.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.17.1](/ruby/docs/reference/google-cloud-dialogflow-v2/0.17.1/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.16.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.16.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.15.2](/ruby/docs/reference/google-cloud-dialogflow-v2/0.15.2/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.14.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.14.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.13.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.13.0/Google-Cloud-Dialogflow-V2-SessionEntityType)\n- [0.12.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.12.0/Google-Cloud-Dialogflow-V2-SessionEntityType) \nReference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::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\n\n\u003cbr /\u003e\n\nFor more information, see the [session entity\nguide](https://cloud.google.com/dialogflow/docs/entities-session). \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #entities\n\n def entities() -\u003e ::Array\u003c::Google::Cloud::Dialogflow::V2::EntityType::Entity\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Dialogflow::V2::EntityType::Entity](./Google-Cloud-Dialogflow-V2-EntityType-Entity)\\\u003e) --- Required. The collection of entities associated with this session entity type.\n\n### #entities=\n\n def entities=(value) -\u003e ::Array\u003c::Google::Cloud::Dialogflow::V2::EntityType::Entity\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::Dialogflow::V2::EntityType::Entity](./Google-Cloud-Dialogflow-V2-EntityType-Entity)\\\u003e) --- Required. The collection of entities associated with this session entity type. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Dialogflow::V2::EntityType::Entity](./Google-Cloud-Dialogflow-V2-EntityType-Entity)\\\u003e) --- Required. The collection of entities associated with this session entity type.\n\n### #entity_override_mode\n\n def entity_override_mode() -\u003e ::Google::Cloud::Dialogflow::V2::SessionEntityType::EntityOverrideMode\n\n**Returns**\n\n- ([::Google::Cloud::Dialogflow::V2::SessionEntityType::EntityOverrideMode](./Google-Cloud-Dialogflow-V2-SessionEntityType-EntityOverrideMode)) --- Required. Indicates whether the additional data should override or supplement the custom entity type definition.\n\n### #entity_override_mode=\n\n def entity_override_mode=(value) -\u003e ::Google::Cloud::Dialogflow::V2::SessionEntityType::EntityOverrideMode\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Dialogflow::V2::SessionEntityType::EntityOverrideMode](./Google-Cloud-Dialogflow-V2-SessionEntityType-EntityOverrideMode)) --- Required. Indicates whether the additional data should override or supplement the custom entity type definition. \n**Returns**\n\n- ([::Google::Cloud::Dialogflow::V2::SessionEntityType::EntityOverrideMode](./Google-Cloud-Dialogflow-V2-SessionEntityType-EntityOverrideMode)) --- Required. Indicates whether the additional data should override or supplement the custom entity type definition.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. The unique identifier of this session entity type. Format: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\n Display Name\u003e`, or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\n ID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\n Name\u003e`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.\n\n\n `\u003cEntity Type Display Name\u003e` must be the display name of an existing entity\n type in the same agent that will be overridden or supplemented.\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. The unique identifier of this session entity type. Format: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\n Display Name\u003e`, or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\n ID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\n Name\u003e`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.\n\n\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**Returns**\n\n- (::String) --- Required. The unique identifier of this session entity type. Format: `projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type\n Display Name\u003e`, or `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment\n ID\u003e/users/\u003cUser ID\u003e/sessions/\u003cSession ID\u003e/entityTypes/\u003cEntity Type Display\n Name\u003e`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.\n\n\n `\u003cEntity Type Display Name\u003e` must be the display name of an existing entity\n type in the same agent that will be overridden or supplemented."]]