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

Represents the [access
setting](https://support.google.com/chat/answer/11971020) of the space.

Generated from protobuf message `google.chat.v1.Space.AccessSettings`

## Namespace

Google \\ Apps \\ Chat \\ V1 \\ Space

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ access_state` | `int` Output only. Indicates the access state of the space. |
| `↳ audience` | `string` Optional. The resource name of the [target audience](https://support.google.com/a/answer/9934697) who can discover the space, join the space, and preview the messages in the space. If unset, only users or Google Groups who have been individually invited or added to the space can access it. For details, see [Make a space discoverable to a target audience](https://developers.google.com/workspace/chat/space-target-audience). Format: `audiences/{audience}` To use the default target audience for the Google Workspace organization, set to `audiences/default`. Reading the target audience supports: - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope. This field is not populated when using the `chat.bot` scope with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). Setting the target audience requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). |
| `↳ access_permission_settings` | `AccessPermissionSettings` Optional. Access permission settings for the space. To set the target audience when creating a space, specify the `accessSettings.audience` field in your request. |

### getAccessState

Output only. Indicates the access state of the space.

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

### setAccessState

Output only. Indicates the access state of the space.

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

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

### getAudience

Optional. The resource name of the [target
audience](https://support.google.com/a/answer/9934697) who can discover
the space, join the space, and preview the messages in the space. If
unset, only users or Google Groups who have been individually invited or
added to the space can access it. For details, see [Make a space
discoverable to a target
audience](https://developers.google.com/workspace/chat/space-target-audience).

Format: `audiences/{audience}`
To use the default target audience for the Google Workspace organization,
set to `audiences/default`.
Reading the target audience supports:

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope. This field is not populated when using the `chat.bot` scope with [app
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). Setting the target audience requires [user
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

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

### setAudience

Optional. The resource name of the [target
audience](https://support.google.com/a/answer/9934697) who can discover
the space, join the space, and preview the messages in the space. If
unset, only users or Google Groups who have been individually invited or
added to the space can access it. For details, see [Make a space
discoverable to a target
audience](https://developers.google.com/workspace/chat/space-target-audience).

Format: `audiences/{audience}`
To use the default target audience for the Google Workspace organization,
set to `audiences/default`.
Reading the target audience supports:

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope. This field is not populated when using the `chat.bot` scope with [app
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). Setting the target audience requires [user
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

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

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

### getAccessPermissionSettings

Optional. Access permission settings for the space.

To set the target audience when creating a space, specify the
`accessSettings.audience` field in your request.

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

### hasAccessPermissionSettings

### clearAccessPermissionSettings

### setAccessPermissionSettings

Optional. Access permission settings for the space.

To set the target audience when creating a space, specify the
`accessSettings.audience` field in your request.

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

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