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

A thread in a Google Chat space. For example usage, see
[Start or reply to a message
thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).

If you specify a thread when creating a message, you can set the
[`messageReplyOption`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption)
field to determine what happens if no matching thread is found.

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

## Namespace

Google \\ Apps \\ Chat \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. Resource name of the thread. Example: `spaces/{space}/threads/{thread}` |
| `↳ thread_key` | `string` Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters. This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread `name` field instead. |

### getName

Identifier. Resource name of the thread.

Example: `spaces/{space}/threads/{thread}`

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

### setName

Identifier. Resource name of the thread.

Example: `spaces/{space}/threads/{thread}`

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

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

### getThreadKey

Optional. Input for creating or updating a thread. Otherwise, output only.

ID for the thread. Supports up to 4000 characters.
This ID is unique to the Chat app that sets it. For example, if
multiple Chat apps create a message using the same thread key,
the messages are posted in different threads. To reply in a
thread created by a person or another Chat app, specify the thread `name`
field instead.

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

### setThreadKey

Optional. Input for creating or updating a thread. Otherwise, output only.

ID for the thread. Supports up to 4000 characters.
This ID is unique to the Chat app that sets it. For example, if
multiple Chat apps create a message using the same thread key,
the messages are posted in different threads. To reply in a
thread created by a person or another Chat app, specify the thread `name`
field instead.

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

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