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

`Part` represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON).

| JSON representation |
|---|
| ``` { "metadata": { object }, "filename": string, "mediaType": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "text": string, "raw": string, "url": string, "data": value // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `metadata` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. metadata associated with this part. |
| `filename` | `string` An optional `filename` for the file (e.g., "document.pdf"). |
| `mediaType` | `string` The `mediaType` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png"). This field is available for all part types. |
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `text` | `string` The string content of the `text` part. |
| `raw` | `string (https://developers.google.com/discovery/v1/type-format format)` The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string. A base64-encoded string. |
| `url` | `string` A `url` pointing to the file's content. |
| `data` | ``value (`https://protobuf.dev/reference/protobuf/google.protobuf#value` format)`` Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null). |
| End of mutually exclusive fields. ||