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

Represents a [section](https://support.google.com/chat/answer/16059854) in
Google Chat. Sections help users organize their spaces. There are two types
of sections:

1. **System Sections:** These are predefined sections managed by Google Chat.

Their resource names are fixed, and they cannot be created, deleted, or
have their `display_name` modified. Examples include:

- `users/{user}/sections/default-direct-messages`
- `users/{user}/sections/default-spaces`
- `users/{user}/sections/default-apps`
  1. **Custom Sections:** These are sections created and managed by the user. Creating a custom section using `CreateSection` **requires** a `display_name`. Custom sections can be updated using `UpdateSection` and deleted using `DeleteSection`.

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

## 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 section. For system sections, the section ID is a constant string: - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` - DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` |
| `↳ display_name` | `string` Optional. The section's display name. Only populated for sections of type `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a `CUSTOM_SECTION`. |
| `↳ sort_order` | `int` Output only. The order of the section in relation to other sections. Sections with a lower `sort_order` value appear before sections with a higher value. |
| `↳ type` | `int` Required. The type of the section. |

### getName

Identifier. Resource name of the section.

For system sections, the section ID is a constant string:

- DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
- DEFAULT_SPACES: `users/{user}/sections/default-spaces`
- DEFAULT_APPS: `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}`

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

### setName

Identifier. Resource name of the section.

For system sections, the section ID is a constant string:

- DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
- DEFAULT_SPACES: `users/{user}/sections/default-spaces`
- DEFAULT_APPS: `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}`

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

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

### getDisplayName

Optional. The section's display name. Only populated for sections of type
`CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
`CUSTOM_SECTION`.

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

### setDisplayName

Optional. The section's display name. Only populated for sections of type
`CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
`CUSTOM_SECTION`.

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

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

### getSortOrder

Output only. The order of the section in relation to other sections.

Sections with a lower `sort_order` value appear before sections with a
higher value.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setSortOrder

Output only. The order of the section in relation to other sections.

Sections with a lower `sort_order` value appear before sections with a
higher value.

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

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

### getType

Required. The type of the section.

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

### setType

Required. The type of the section.

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

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