Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only thePart.textfield set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: -Part.textis set to a part of the phrase that has no parameters. -Part.textis set to a part of the phrase that you want to annotate, and theparameter_idfield is set.
↳ repeat_count
int
Indicates how many times this example was added to the intent.
getId
Output only. The unique identifier of the training phrase.
Returns
Type
Description
string
setId
Output only. The unique identifier of the training phrase.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getParts
Required. The ordered list of training phrase parts.
The parts are concatenated in order to form the training phrase.
Note: The API does not automatically annotate training phrases like the
Dialogflow Console does.
Note: Do not forget to include whitespace at part boundaries, so the
training phrase is well formatted when the parts are concatenated.
If the training phrase does not need to be annotated with parameters,
you just need a single part with only thePart.textfield set.
If you want to annotate the training phrase, you must create multiple
parts, where the fields of each part are populated in one of two ways:
Part.textis set to a part of the phrase that has no parameters.
Part.textis set to a part of the phrase that you want to annotate,
and theparameter_idfield is set.
Required. The ordered list of training phrase parts.
The parts are concatenated in order to form the training phrase.
Note: The API does not automatically annotate training phrases like the
Dialogflow Console does.
Note: Do not forget to include whitespace at part boundaries, so the
training phrase is well formatted when the parts are concatenated.
If the training phrase does not need to be annotated with parameters,
you just need a single part with only thePart.textfield set.
If you want to annotate the training phrase, you must create multiple
parts, where the fields of each part are populated in one of two ways:
Part.textis set to a part of the phrase that has no parameters.
Part.textis set to a part of the phrase that you want to annotate,
and theparameter_idfield is set.
[[["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 Cx V3 Client - Class TrainingPhrase (0.8.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.8.1 (latest)](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Intent.TrainingPhrase)\n- [0.8.0](/php/docs/reference/cloud-dialogflow-cx/0.8.0/V3.Intent.TrainingPhrase)\n- [0.7.2](/php/docs/reference/cloud-dialogflow-cx/0.7.2/V3.Intent.TrainingPhrase)\n- [0.6.0](/php/docs/reference/cloud-dialogflow-cx/0.6.0/V3.Intent.TrainingPhrase)\n- [0.5.2](/php/docs/reference/cloud-dialogflow-cx/0.5.2/V3.Intent.TrainingPhrase)\n- [0.4.1](/php/docs/reference/cloud-dialogflow-cx/0.4.1/V3.Intent.TrainingPhrase)\n- [0.3.4](/php/docs/reference/cloud-dialogflow-cx/0.3.4/V3.Intent.TrainingPhrase)\n- [0.2.1](/php/docs/reference/cloud-dialogflow-cx/0.2.1/V3.Intent.TrainingPhrase)\n- [0.1.1](/php/docs/reference/cloud-dialogflow-cx/0.1.1/V3.Intent.TrainingPhrase) \nReference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class TrainingPhrase.\n\nRepresents an example that the agent is trained on to identify the intent.\n\nGenerated from protobuf message `google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dialogflow \\\\ Cx \\\\ V3 \\\\ Intent\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getId\n\nOutput only. The unique identifier of the training phrase.\n\n### setId\n\nOutput only. The unique identifier of the training phrase.\n\n### getParts\n\nRequired. The ordered list of training phrase parts.\n\nThe parts are concatenated in order to form the training phrase.\nNote: The API does not automatically annotate training phrases like the\nDialogflow Console does.\nNote: Do not forget to include whitespace at part boundaries, so the\ntraining phrase is well formatted when the parts are concatenated.\nIf the training phrase does not need to be annotated with parameters,\nyou just need a single part with only the\n[Part.text](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Intent.TrainingPhrase.Part#_Google_Cloud_Dialogflow_Cx_V3_Intent_TrainingPhrase_Part__getText__)\nfield set.\nIf you want to annotate the training phrase, you must create multiple\nparts, where the fields of each part are populated in one of two ways:\n\n- `Part.text` is set to a part of the phrase that has no parameters.\n- `Part.text` is set to a part of the phrase that you want to annotate, and the `parameter_id` field is set.\n\n### setParts\n\nRequired. The ordered list of training phrase parts.\n\nThe parts are concatenated in order to form the training phrase.\nNote: The API does not automatically annotate training phrases like the\nDialogflow Console does.\nNote: Do not forget to include whitespace at part boundaries, so the\ntraining phrase is well formatted when the parts are concatenated.\nIf the training phrase does not need to be annotated with parameters,\nyou just need a single part with only the\n[Part.text](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Intent.TrainingPhrase.Part#_Google_Cloud_Dialogflow_Cx_V3_Intent_TrainingPhrase_Part__getText__)\nfield set.\nIf you want to annotate the training phrase, you must create multiple\nparts, where the fields of each part are populated in one of two ways:\n\n- `Part.text` is set to a part of the phrase that has no parameters.\n- `Part.text` is set to a part of the phrase that you want to annotate, and the `parameter_id` field is set.\n\n### getRepeatCount\n\nIndicates how many times this example was added to the intent.\n\n### setRepeatCount\n\nIndicates how many times this example was added to the intent."]]