Message

Represents a message posted into a conversation.

JSON representation
{
  "name": string,
  "content": string,
  "languageCode": string,
  "participant": string,
  "participantRole": enum (Role),
  "createTime": string,
  "messageAnnotation": {
    object (MessageAnnotation)
  }
}
Fields
name

string

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.

languageCode

string

Optional. The message language. This should be a BCP-47 language tag. Example: "en-US".

participant

string

Output only. The participant that sends this message.

participantRole

enum (Role)

Output only. The role of the participant.

createTime

string (Timestamp format)

Output only. The time when the message was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

messageAnnotation

object (MessageAnnotation)

Output only. The annotation for the message.

MessageAnnotation

Represents the result of annotation for the message.

JSON representation
{
  "parts": [
    {
      object (AnnotatedMessagePart)
    }
  ],
  "containEntities": boolean
}
Fields
parts[]

object (AnnotatedMessagePart)

The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].

containEntities

boolean

Indicates whether the text message contains entities.

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.

JSON representation
{
  "text": string,
  "entityType": string,
  "formattedValue": value
}
Fields
text

string

A part of a message possibly annotated with an entity.

entityType

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.

formattedValue

value (Value format)

The Dialogflow system entity formatted value of this message part. For example for a system entity of type @sys.unit-currency, this may contain:

{
  "amount": 5,
  "currency": "USD"
}