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 SearchMessageResult.

A single result item from a message search.

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

## Namespace

Google \\ Apps \\ Chat \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ message` | `Message` The matched message. |
| `↳ read` | `bool` Indicates if the matched message is read by the calling user. Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the calling credentials include one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.readstate.readonly` - `https://www.googleapis.com/auth/chat.users.readstate` |
| `↳ space_mute_setting` | `int` The mute setting of the calling user for the space where the message is posted. The caller app can use this information to decide how to process the message depending on whether the space is muted for the user or not. Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the calling credentials include the following [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.spacesettings` |

### getMessage

The matched message.

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

### hasMessage

### clearMessage

### setMessage

The matched message.

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

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

### getRead

Indicates if the matched message is read by the calling user.

Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
calling credentials include one of the following [authorization
scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):

- `https://www.googleapis.com/auth/chat.users.readstate.readonly`
- `https://www.googleapis.com/auth/chat.users.readstate`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasRead

### clearRead

### setRead

Indicates if the matched message is read by the calling user.

Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
calling credentials include one of the following [authorization
scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):

- `https://www.googleapis.com/auth/chat.users.readstate.readonly`
- `https://www.googleapis.com/auth/chat.users.readstate`

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

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

### getSpaceMuteSetting

The mute setting of the calling user for the space where the message is
posted. The caller app can use this information to decide how to process
the message depending on whether the space is muted for the user or not.

Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
calling credentials include the following [authorization
scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):

- `https://www.googleapis.com/auth/chat.users.spacesettings`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [MuteSetting](https://docs.cloud.google.com/php/docs/reference/apps-chat/latest/Chat.V1.SpaceNotificationSetting.MuteSetting.md.txt). |

### setSpaceMuteSetting

The mute setting of the calling user for the space where the message is
posted. The caller app can use this information to decide how to process
the message depending on whether the space is muted for the user or not.

Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
calling credentials include the following [authorization
scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):

- `https://www.googleapis.com/auth/chat.users.spacesettings`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [MuteSetting](https://docs.cloud.google.com/php/docs/reference/apps-chat/latest/Chat.V1.SpaceNotificationSetting.MuteSetting.md.txt). |

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