Reference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part.
Represents a part of a training phrase.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#alias
defalias()->::String
Returns
(::String) — Optional. The parameter name for the value extracted from the
annotated part of the example.
This field is required for annotated parts of the training phrase.
#alias=
defalias=(value)->::String
Parameter
value (::String) — Optional. The parameter name for the value extracted from the
annotated part of the example.
This field is required for annotated parts of the training phrase.
Returns
(::String) — Optional. The parameter name for the value extracted from the
annotated part of the example.
This field is required for annotated parts of the training phrase.
#entity_type
defentity_type()->::String
Returns
(::String) — Optional. The entity type name prefixed with @.
This field is required for annotated parts of the training phrase.
#entity_type=
defentity_type=(value)->::String
Parameter
value (::String) — Optional. The entity type name prefixed with @.
This field is required for annotated parts of the training phrase.
Returns
(::String) — Optional. The entity type name prefixed with @.
This field is required for annotated parts of the training phrase.
#text
deftext()->::String
Returns
(::String) — Required. The text for this part.
#text=
deftext=(value)->::String
Parameter
value (::String) — Required. The text for this part.
Returns
(::String) — Required. The text for this part.
#user_defined
defuser_defined()->::Boolean
Returns
(::Boolean) — Optional. Indicates whether the text was manually annotated.
This field is set to true when the Dialogflow Console is used to
manually annotate the part. When creating an annotated part with the
API, you must set this to true.
#user_defined=
defuser_defined=(value)->::Boolean
Parameter
value (::Boolean) — Optional. Indicates whether the text was manually annotated.
This field is set to true when the Dialogflow Console is used to
manually annotate the part. When creating an annotated part with the
API, you must set this to true.
Returns
(::Boolean) — Optional. Indicates whether the text was manually annotated.
This field is set to true when the Dialogflow Console is used to
manually annotate the part. When creating an annotated part with the
API, you must set this to true.
[[["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::Intent::TrainingPhrase::Part (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-Intent-TrainingPhrase-Part)\n- [1.10.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.10.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [1.9.1](/ruby/docs/reference/google-cloud-dialogflow-v2/1.9.1/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [1.8.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.8.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [1.7.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.7.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [1.6.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.6.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [1.5.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.5.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [1.4.1](/ruby/docs/reference/google-cloud-dialogflow-v2/1.4.1/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [1.3.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.3.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [1.2.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.2.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [1.1.1](/ruby/docs/reference/google-cloud-dialogflow-v2/1.1.1/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [1.0.0](/ruby/docs/reference/google-cloud-dialogflow-v2/1.0.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.34.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.34.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.33.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.33.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.32.2](/ruby/docs/reference/google-cloud-dialogflow-v2/0.32.2/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.31.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.31.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.30.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.30.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.29.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.29.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.28.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.28.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.27.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.27.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.26.2](/ruby/docs/reference/google-cloud-dialogflow-v2/0.26.2/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.25.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.25.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.24.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.24.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.23.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.23.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.22.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.22.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.21.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.21.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.20.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.20.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.19.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.19.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.18.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.18.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.17.1](/ruby/docs/reference/google-cloud-dialogflow-v2/0.17.1/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.16.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.16.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.15.2](/ruby/docs/reference/google-cloud-dialogflow-v2/0.15.2/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.14.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.14.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.13.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.13.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part)\n- [0.12.0](/ruby/docs/reference/google-cloud-dialogflow-v2/0.12.0/Google-Cloud-Dialogflow-V2-Intent-TrainingPhrase-Part) \nReference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part.\n\nRepresents a part of a training phrase. \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### #alias\n\n def alias() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase.\n\n### #alias=\n\n def alias=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase. \n**Returns**\n\n- (::String) --- Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase.\n\n### #entity_type\n\n def entity_type() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. The entity type name prefixed with `@`. This field is required for annotated parts of the training phrase.\n\n### #entity_type=\n\n def entity_type=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. The entity type name prefixed with `@`. This field is required for annotated parts of the training phrase. \n**Returns**\n\n- (::String) --- Optional. The entity type name prefixed with `@`. This field is required for annotated parts of the training phrase.\n\n### #text\n\n def text() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. The text for this part.\n\n### #text=\n\n def text=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. The text for this part. \n**Returns**\n\n- (::String) --- Required. The text for this part.\n\n### #user_defined\n\n def user_defined() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true.\n\n### #user_defined=\n\n def user_defined=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true. \n**Returns**\n\n- (::Boolean) --- Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true."]]