# Google Cloud Sql Admin V1 Client - Class SqlActiveDirectoryConfig (1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.1 1.2.6 1.1.0 1.0.0 0.19.0 0.18.0 0.17.1 0.16.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 0.3.1 0.2.12 Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class SqlActiveDirectoryConfig.

Active Directory configuration, relevant only for Cloud SQL for SQL Server.

Generated from protobuf message `google.cloud.sql.v1.SqlActiveDirectoryConfig`

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ kind` | `string` This is always sql#activeDirectoryConfig. |
| `↳ domain` | `string` The name of the domain (e.g., mydomain.com). |
| `↳ mode` | `int` Optional. The mode of the Active Directory configuration. |
| `↳ dns_servers` | `string[]` Optional. Domain controller IPv4 addresses used to bootstrap Active Directory. |
| `↳ admin_credential_secret_name` | `string` Optional. The secret manager key storing the administrator credential. (e.g., projects/{project}/secrets/{secret}). |
| `↳ organizational_unit` | `string` Optional. The organizational unit distinguished name. This is the full hierarchical path to the organizational unit. |

### getKind

This is always sql#activeDirectoryConfig.

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

### setKind

This is always sql#activeDirectoryConfig.

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

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

### getDomain

The name of the domain (e.g., mydomain.com).

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

### setDomain

The name of the domain (e.g., mydomain.com).

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

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

### getMode

Optional. The mode of the Active Directory configuration.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ActiveDirectoryMode](https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.SqlActiveDirectoryConfig.ActiveDirectoryMode). |

### setMode

Optional. The mode of the Active Directory configuration.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ActiveDirectoryMode](https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.SqlActiveDirectoryConfig.ActiveDirectoryMode). |

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

### getDnsServers

Optional. Domain controller IPv4 addresses used to bootstrap Active
Directory.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setDnsServers

Optional. Domain controller IPv4 addresses used to bootstrap Active
Directory.

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

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

### getAdminCredentialSecretName

Optional. The secret manager key storing the administrator credential.

(e.g., projects/{project}/secrets/{secret}).

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

### setAdminCredentialSecretName

Optional. The secret manager key storing the administrator credential.

(e.g., projects/{project}/secrets/{secret}).

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

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

### getOrganizationalUnit

Optional. The organizational unit distinguished name. This is the full
hierarchical path to the organizational unit.

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

### setOrganizationalUnit

Optional. The organizational unit distinguished name. This is the full
hierarchical path to the organizational unit.

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

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