Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class AnnotatedMessagePart.
Represents a part of a message possibly annotated with an entity. The part
can be an entity or purely a part of the message between two entities or
message start/end.
Generated from protobuf message google.cloud.dialogflow.v2.AnnotatedMessagePart
Namespace
Google \ Cloud \ Dialogflow \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ text
string
A part of a message possibly annotated with an entity.
↳ entity_type
string
The Dialogflow system entity type of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
[[["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 AnnotatedMessagePart (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-dialogflow/latest/V2.AnnotatedMessagePart)\n- [2.1.1](/php/docs/reference/cloud-dialogflow/2.1.1/V2.AnnotatedMessagePart)\n- [2.0.1](/php/docs/reference/cloud-dialogflow/2.0.1/V2.AnnotatedMessagePart)\n- [1.17.2](/php/docs/reference/cloud-dialogflow/1.17.2/V2.AnnotatedMessagePart)\n- [1.16.0](/php/docs/reference/cloud-dialogflow/1.16.0/V2.AnnotatedMessagePart)\n- [1.15.1](/php/docs/reference/cloud-dialogflow/1.15.1/V2.AnnotatedMessagePart)\n- [1.14.0](/php/docs/reference/cloud-dialogflow/1.14.0/V2.AnnotatedMessagePart)\n- [1.13.0](/php/docs/reference/cloud-dialogflow/1.13.0/V2.AnnotatedMessagePart)\n- [1.12.3](/php/docs/reference/cloud-dialogflow/1.12.3/V2.AnnotatedMessagePart)\n- [1.11.0](/php/docs/reference/cloud-dialogflow/1.11.0/V2.AnnotatedMessagePart)\n- [1.10.2](/php/docs/reference/cloud-dialogflow/1.10.2/V2.AnnotatedMessagePart)\n- [1.9.0](/php/docs/reference/cloud-dialogflow/1.9.0/V2.AnnotatedMessagePart)\n- [1.8.0](/php/docs/reference/cloud-dialogflow/1.8.0/V2.AnnotatedMessagePart)\n- [1.7.2](/php/docs/reference/cloud-dialogflow/1.7.2/V2.AnnotatedMessagePart)\n- [1.6.0](/php/docs/reference/cloud-dialogflow/1.6.0/V2.AnnotatedMessagePart)\n- [1.5.0](/php/docs/reference/cloud-dialogflow/1.5.0/V2.AnnotatedMessagePart)\n- [1.4.0](/php/docs/reference/cloud-dialogflow/1.4.0/V2.AnnotatedMessagePart)\n- [1.3.2](/php/docs/reference/cloud-dialogflow/1.3.2/V2.AnnotatedMessagePart)\n- [1.2.0](/php/docs/reference/cloud-dialogflow/1.2.0/V2.AnnotatedMessagePart)\n- [1.1.1](/php/docs/reference/cloud-dialogflow/1.1.1/V2.AnnotatedMessagePart)\n- [1.0.1](/php/docs/reference/cloud-dialogflow/1.0.1/V2.AnnotatedMessagePart) \nReference documentation and code samples for the Google Cloud Dialogflow V2 Client class AnnotatedMessagePart.\n\nRepresents a part of a message possibly annotated with an entity. The part\ncan be an entity or purely a part of the message between two entities or\nmessage start/end.\n\nGenerated from protobuf message `google.cloud.dialogflow.v2.AnnotatedMessagePart`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dialogflow \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getText\n\nA part of a message possibly annotated with an entity.\n\n### setText\n\nA part of a message possibly annotated with an entity.\n\n### getEntityType\n\nThe [Dialogflow system entity\ntype](https://cloud.google.com/dialogflow/docs/reference/system-entities)\nof this message part. If this is empty, Dialogflow could not annotate the\nphrase part with a system entity.\n\n### setEntityType\n\nThe [Dialogflow system entity\ntype](https://cloud.google.com/dialogflow/docs/reference/system-entities)\nof this message part. If this is empty, Dialogflow could not annotate the\nphrase part with a system entity.\n\n### getFormattedValue\n\nThe [Dialogflow system entity formatted value](https://cloud.google.com/dialogflow/docs/reference/system-entities) of\nthis message part. For example for a system entity of type\n`@sys.unit-currency`, this may contain: \n\n```\n{\n \"amount\": 5,\n \"currency\": \"USD\"\n}\n```\n\n### hasFormattedValue\n\n### clearFormattedValue\n\n### setFormattedValue\n\nThe [Dialogflow system entity formatted value](https://cloud.google.com/dialogflow/docs/reference/system-entities) of\nthis message part. For example for a system entity of type\n`@sys.unit-currency`, this may contain: \n\n```\n{\n \"amount\": 5,\n \"currency\": \"USD\"\n}\n```"]]