- [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Message#SCHEMA_REPRESENTATION)
- [Chunk](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Message#Chunk)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Message#Chunk.SCHEMA_REPRESENTATION)

A message within a conversation.

| JSON representation |
|---|
| ``` { "role": string, "chunks": [ { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Message#Chunk`) } ], "eventTime": string } ``` |

| Fields ||
|---|---|
| `role` | `string` Optional. The role within the conversation, e.g., user, agent. |
| `chunks[]` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Message#Chunk`)`` Optional. Content of the message as a series of chunks. |
| `eventTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Timestamp when the message was sent or received. Should not be used if the message is part of an `https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/projects.locations.apps.examples#Example`. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

## Chunk

A chunk of content within a message.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "text": string, "transcript": string, "blob": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Blob`) }, "payload": { object }, "image": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Image`) }, "toolCall": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/ToolCall`) }, "toolResponse": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/ToolResponse`) }, "agentTransfer": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/AgentTransfer`) }, "updatedVariables": { object }, "defaultVariables": { object } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| Chunk data. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `text` | `string` Optional. Text data. |
| `transcript` | `string` Optional. Transcript associated with the audio. |
| `blob` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Blob`)`` Optional. Blob data. |
| `payload` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. Custom payload data. |
| `image` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Image`)`` Optional. Image data. |
| `toolCall` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/ToolCall`)`` Optional. Tool execution request. |
| `toolResponse` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/ToolResponse`)`` Optional. Tool execution response. |
| `agentTransfer` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/AgentTransfer`)`` Optional. Agent transfer event. |
| `updatedVariables` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` A struct represents variables that were updated in the conversation, keyed by variable names. |
| `defaultVariables` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` A struct represents default variables at the start of the conversation, keyed by variable names. |
| End of mutually exclusive fields. ||