Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class Message.
Represents a message posted into a conversation.
Generated from protobuf messagegoogle.cloud.dialogflow.v2.Message
Namespace
Google \ Cloud \ Dialogflow \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Optional. The unique identifier of the message. Format:projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.
↳ content
string
Required. The message content.
↳ language_code
string
Optional. The message language. This should be aBCP-47language tag. Example: "en-US".
↳ participant
string
Output only. The participant that sends this message.
[[["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 Message (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-dialogflow/latest/V2.Message)\n- [2.1.1](/php/docs/reference/cloud-dialogflow/2.1.1/V2.Message)\n- [2.0.1](/php/docs/reference/cloud-dialogflow/2.0.1/V2.Message)\n- [1.17.2](/php/docs/reference/cloud-dialogflow/1.17.2/V2.Message)\n- [1.16.0](/php/docs/reference/cloud-dialogflow/1.16.0/V2.Message)\n- [1.15.1](/php/docs/reference/cloud-dialogflow/1.15.1/V2.Message)\n- [1.14.0](/php/docs/reference/cloud-dialogflow/1.14.0/V2.Message)\n- [1.13.0](/php/docs/reference/cloud-dialogflow/1.13.0/V2.Message)\n- [1.12.3](/php/docs/reference/cloud-dialogflow/1.12.3/V2.Message)\n- [1.11.0](/php/docs/reference/cloud-dialogflow/1.11.0/V2.Message)\n- [1.10.2](/php/docs/reference/cloud-dialogflow/1.10.2/V2.Message)\n- [1.9.0](/php/docs/reference/cloud-dialogflow/1.9.0/V2.Message)\n- [1.8.0](/php/docs/reference/cloud-dialogflow/1.8.0/V2.Message)\n- [1.7.2](/php/docs/reference/cloud-dialogflow/1.7.2/V2.Message)\n- [1.6.0](/php/docs/reference/cloud-dialogflow/1.6.0/V2.Message)\n- [1.5.0](/php/docs/reference/cloud-dialogflow/1.5.0/V2.Message)\n- [1.4.0](/php/docs/reference/cloud-dialogflow/1.4.0/V2.Message)\n- [1.3.2](/php/docs/reference/cloud-dialogflow/1.3.2/V2.Message)\n- [1.2.0](/php/docs/reference/cloud-dialogflow/1.2.0/V2.Message)\n- [1.1.1](/php/docs/reference/cloud-dialogflow/1.1.1/V2.Message)\n- [1.0.1](/php/docs/reference/cloud-dialogflow/1.0.1/V2.Message) \nReference documentation and code samples for the Google Cloud Dialogflow V2 Client class Message.\n\nRepresents a message posted into a conversation.\n\nGenerated from protobuf message `google.cloud.dialogflow.v2.Message`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dialogflow \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOptional. The unique identifier of the message.\n\nFormat: `projects/\u003cProject ID\u003e/locations/\u003cLocation\nID\u003e/conversations/\u003cConversation ID\u003e/messages/\u003cMessage ID\u003e`.\n\n### setName\n\nOptional. The unique identifier of the message.\n\nFormat: `projects/\u003cProject ID\u003e/locations/\u003cLocation\nID\u003e/conversations/\u003cConversation ID\u003e/messages/\u003cMessage ID\u003e`.\n\n### getContent\n\nRequired. The message content.\n\n### setContent\n\nRequired. The message content.\n\n### getLanguageCode\n\nOptional. The message language.\n\nThis should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)\nlanguage tag. Example: \"en-US\".\n\n### setLanguageCode\n\nOptional. The message language.\n\nThis should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)\nlanguage tag. Example: \"en-US\".\n\n### getParticipant\n\nOutput only. The participant that sends this message.\n\n### setParticipant\n\nOutput only. The participant that sends this message.\n\n### getParticipantRole\n\nOutput only. The role of the participant.\n\n### setParticipantRole\n\nOutput only. The role of the participant.\n\n### getCreateTime\n\nOutput only. The time when the message was created in Contact Center AI.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The time when the message was created in Contact Center AI.\n\n### getSendTime\n\nOptional. The time when the message was sent. For voice messages, this is\nthe time when an utterance started.\n\n### hasSendTime\n\n### clearSendTime\n\n### setSendTime\n\nOptional. The time when the message was sent. For voice messages, this is\nthe time when an utterance started.\n\n### getMessageAnnotation\n\nOutput only. The annotation for the message.\n\n### hasMessageAnnotation\n\n### clearMessageAnnotation\n\n### setMessageAnnotation\n\nOutput only. The annotation for the message.\n\n### getSentimentAnalysis\n\nOutput only. The sentiment analysis result for the message.\n\n### hasSentimentAnalysis\n\n### clearSentimentAnalysis\n\n### setSentimentAnalysis\n\nOutput only. The sentiment analysis result for the message."]]