# Google Cloud Dms V1 Client - Class AlloyDbSettings (2.1.3)

2.1.3 (latest) 2.1.2 2.0.6 1.5.5 1.4.2 1.3.0 1.2.1 1.1.0 1.0.5 Reference documentation and code samples for the Google Cloud Dms V1 Client class AlloyDbSettings.

Settings for creating an AlloyDB cluster.

Generated from protobuf message `google.cloud.clouddms.v1.AlloyDbSettings`

## Namespace

Google \\ Cloud \\ CloudDms \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ initial_user` | `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.AlloyDbSettings.UserPassword` Required. Input only. Initial user to setup during cluster creation. Required. |
| `↳ vpc_network` | `string` Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: "projects/{project_number}/global/networks/{network_id}". This is required to create a cluster. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Labels for the AlloyDB cluster created by DMS. An object containing a list of 'key', 'value' pairs. |
| `↳ primary_instance_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.AlloyDbSettings.PrimaryInstanceSettings` |
| `↳ encryption_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.AlloyDbSettings.EncryptionConfig` Optional. The encryption config can be specified to encrypt the data disks and other persistent data resources of a cluster with a customer-managed encryption key (CMEK). When this field is not specified, the cluster will then use default encryption scheme to protect the user data. |

### getInitialUser

Required. Input only. Initial user to setup during cluster creation.

Required.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.AlloyDbSettings.UserPassword|null` |   |

### hasInitialUser

### clearInitialUser

### setInitialUser

Required. Input only. Initial user to setup during cluster creation.

Required.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.AlloyDbSettings.UserPassword` |

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

### getVpcNetwork

Required. The resource link for the VPC network in which cluster resources
are created and from which they are accessible via Private IP. The network
must belong to the same project as the cluster. It is specified in the
form: "projects/{project_number}/global/networks/{network_id}". This is
required to create a cluster.

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

### setVpcNetwork

Required. The resource link for the VPC network in which cluster resources
are created and from which they are accessible via Private IP. The network
must belong to the same project as the cluster. It is specified in the
form: "projects/{project_number}/global/networks/{network_id}". This is
required to create a cluster.

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

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

### getLabels

Labels for the AlloyDB cluster created by DMS. An object containing a list
of 'key', 'value' pairs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Labels for the AlloyDB cluster created by DMS. An object containing a list
of 'key', 'value' pairs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getPrimaryInstanceSettings

Generated from protobuf field `.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings primary_instance_settings = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.AlloyDbSettings.PrimaryInstanceSettings|null` |   |

### hasPrimaryInstanceSettings

### clearPrimaryInstanceSettings

### setPrimaryInstanceSettings

Generated from protobuf field `.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings primary_instance_settings = 4;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.AlloyDbSettings.PrimaryInstanceSettings` |

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

### getEncryptionConfig

Optional. The encryption config can be specified to encrypt the data disks
and other persistent data resources of a cluster with a
customer-managed encryption key (CMEK). When this field is not
specified, the cluster will then use default encryption scheme to
protect the user data.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.AlloyDbSettings.EncryptionConfig|null` |   |

### hasEncryptionConfig

### clearEncryptionConfig

### setEncryptionConfig

Optional. The encryption config can be specified to encrypt the data disks
and other persistent data resources of a cluster with a
customer-managed encryption key (CMEK). When this field is not
specified, the cluster will then use default encryption scheme to
protect the user data.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.AlloyDbSettings.EncryptionConfig` |

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