# Google Cloud Ces V1 Client - Class Message (0.2.0)

0.2.0 (latest) 0.1.1 Reference documentation and code samples for the Google Cloud Ces V1 Client class Message.

A message within a conversation.

Generated from protobuf message `google.cloud.ces.v1.Message`

## Namespace

Google \\ Cloud \\ Ces \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ role` | `string` Optional. The role within the conversation, e.g., user, agent. |
| `↳ chunks` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.Chunk>` Optional. Content of the message as a series of chunks. |
| `↳ event_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Optional. Timestamp when the message was sent or received. Should not be used if the message is part of an [example](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.Example). |

### getRole

Optional. The role within the conversation, e.g., user, agent.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setRole

Optional. The role within the conversation, e.g., user, agent.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getChunks

Optional. Content of the message as a series of chunks.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.Chunk>` |   |

### setChunks

Optional. Content of the message as a series of chunks.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.Chunk>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEventTime

Optional. Timestamp when the message was sent or received. Should not be
used if the message is part of an [example](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.Example).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasEventTime

### clearEventTime

### setEventTime

Optional. Timestamp when the message was sent or received. Should not be
used if the message is part of an [example](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.Example).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |