0.31.0 (latest) 0.30.0 0.29.0 0.28.0 0.27.0 0.23.0 0.20.0 0.19.0 0.18.0 0.17.1 0.16.1 0.15.0 0.14.0 0.13.1 0.12.1 0.11.2 0.10.0 0.9.0 0.8.1 0.7.2 0.6.1 0.5.0 0.4.0 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Google Apps Chat V1 Client class UpdateSpaceReadStateRequest.

Request message for UpdateSpaceReadState API.

Generated from protobuf message `google.chat.v1.UpdateSpaceReadStateRequest`

## Namespace

Google \\ Apps \\ Chat \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ space_read_state` | `SpaceReadState` Required. The space read state and fields to update. Only supports updating read state for the calling user. To refer to the calling user, set one of the following: - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - Their Workspace email address. For example, `users/user\@example.com/spaces/{space}/spaceReadState`. - Their user id. For example, `users/123456789/spaces/{space}/spaceReadState`. Format: users/{user}/spaces/{space}/spaceReadState |
| `↳ update_mask` | `Google\Protobuf\FieldMask` Required. The field paths to update. Currently supported field paths: - `last_read_time` When the `last_read_time` is before the latest message create time, the space appears as unread in the UI. To mark the space as read, set `last_read_time` to any value later (larger) than the latest message create time. The `last_read_time` is coerced to match the latest message create time. Note that the space read state only affects the read state of messages that are visible in the space's top-level conversation. Replies in threads are unaffected by this timestamp, and instead rely on the thread read state. |

### getSpaceReadState

Required. The space read state and fields to update.

Only supports updating read state for the calling user.
To refer to the calling user, set one of the following:

- The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
- Their Workspace email address. For example, `users/user\@example.com/spaces/{space}/spaceReadState`.
- Their user id. For example, `users/123456789/spaces/{space}/spaceReadState`. Format: users/{user}/spaces/{space}/spaceReadState

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `SpaceReadState|null` |   |

### hasSpaceReadState

### clearSpaceReadState

### setSpaceReadState

Required. The space read state and fields to update.

Only supports updating read state for the calling user.
To refer to the calling user, set one of the following:

- The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
- Their Workspace email address. For example, `users/user\@example.com/spaces/{space}/spaceReadState`.
- Their user id. For example, `users/123456789/spaces/{space}/spaceReadState`. Format: users/{user}/spaces/{space}/spaceReadState

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

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

### getUpdateMask

Required. The field paths to update. Currently supported field paths:

- `last_read_time` When the `last_read_time` is before the latest message create time, the space appears as unread in the UI.

To mark the space as read, set `last_read_time` to any value later (larger)
than the latest message create time. The `last_read_time` is coerced to
match the latest message create time. Note that the space read state only
affects the read state of messages that are visible in the space's
top-level conversation. Replies in threads are unaffected by this
timestamp, and instead rely on the thread read state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\FieldMask|null` |   |

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

Required. The field paths to update. Currently supported field paths:

- `last_read_time` When the `last_read_time` is before the latest message create time, the space appears as unread in the UI.

To mark the space as read, set `last_read_time` to any value later (larger)
than the latest message create time. The `last_read_time` is coerced to
match the latest message create time. Note that the space read state only
affects the read state of messages that are visible in the space's
top-level conversation. Replies in threads are unaffected by this
timestamp, and instead rely on the thread read state.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\FieldMask` |

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `spaceReadState` | `SpaceReadState` Required. The space read state and fields to update. Only supports updating read state for the calling user. To refer to the calling user, set one of the following: - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - Their Workspace email address. For example, `users/user@example.com/spaces/{space}/spaceReadState`. - Their user id. For example, `users/123456789/spaces/{space}/spaceReadState`. Format: users/{user}/spaces/{space}/spaceReadState |
| `updateMask` | `Google\Protobuf\FieldMask` Required. The field paths to update. Currently supported field paths: - `last_read_time` When the `last_read_time` is before the latest message create time, the space appears as unread in the UI. To mark the space as read, set `last_read_time` to any value later (larger) than the latest message create time. The `last_read_time` is coerced to match the latest message create time. Note that the space read state only affects the read state of messages that are visible in the space's top-level conversation. Replies in threads are unaffected by this timestamp, and instead rely on the thread read state. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `UpdateSpaceReadStateRequest` |   |