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

Represents a user's current availability information in Google Chat,
including their state (for example, Active, Away, Do Not Disturb) and any
custom status.

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

## 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 user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user\@example.com` or `users/me`. |
| `↳ state` | `int` Output only. The user's current availability state. |
| `↳ do_not_disturb_metadata` | `DoNotDisturbMetadata` Output only. Metadata if the user state is set to DO_NOT_DISTURB. |
| `↳ custom_status` | `CustomStatus` Optional. The user's custom status. |

### getName

Identifier. Resource name of the user's availability.

Format: `users/{user}/availability`
`{user}` is the id for the Person in the People API or Admin SDK directory
API. For example, `users/123456789`.
The user's email address or `me` can also be used as an alias to refer to
the caller. For example, `users/user\@example.com` or `users/me`.

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

### setName

Identifier. Resource name of the user's availability.

Format: `users/{user}/availability`
`{user}` is the id for the Person in the People API or Admin SDK directory
API. For example, `users/123456789`.
The user's email address or `me` can also be used as an alias to refer to
the caller. For example, `users/user\@example.com` or `users/me`.

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

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

### getState

Output only. The user's current availability state.

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

### setState

Output only. The user's current availability state.

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

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

### getDoNotDisturbMetadata

Output only. Metadata if the user state is set to DO_NOT_DISTURB.

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

### hasDoNotDisturbMetadata

### setDoNotDisturbMetadata

Output only. Metadata if the user state is set to DO_NOT_DISTURB.

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

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

### getCustomStatus

Optional. The user's custom status.

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

### hasCustomStatus

### clearCustomStatus

### setCustomStatus

Optional. The user's custom status.

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

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

### getStateMetadata

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