# Google Cloud Dms V1 Client - Class PrimaryInstanceSettings (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 PrimaryInstanceSettings.

Settings for the cluster's primary instance

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

## Namespace

Google \\ Cloud \\ CloudDms \\ V1 \\ AlloyDbSettings

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ id` | `string` Required. The ID of the AlloyDB primary instance. The ID must satisfy the regex expression "\[a-z0-9-\]+". |
| `↳ machine_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig` Configuration for the machines that host the underlying database engine. |
| `↳ database_flags` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Database flags to pass to AlloyDB when DMS is creating the AlloyDB cluster and instances. See the AlloyDB documentation for how these can be used. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Labels for the AlloyDB primary instance created by DMS. An object containing a list of 'key', 'value' pairs. |
| `↳ private_ip` | `string` Output only. The private IP address for the Instance. This is the connection endpoint for an end-user application. |

### getId

Required. The ID of the AlloyDB primary instance. The ID must satisfy the
regex expression "\[a-z0-9-\]+".

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

### setId

Required. The ID of the AlloyDB primary instance. The ID must satisfy the
regex expression "\[a-z0-9-\]+".

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

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

### getMachineConfig

Configuration for the machines that host the underlying
database engine.

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

### hasMachineConfig

### clearMachineConfig

### setMachineConfig

Configuration for the machines that host the underlying
database engine.

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

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

### getDatabaseFlags

Database flags to pass to AlloyDB when DMS is creating the AlloyDB
cluster and instances. See the AlloyDB documentation for how these can be
used.

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

### setDatabaseFlags

Database flags to pass to AlloyDB when DMS is creating the AlloyDB
cluster and instances. See the AlloyDB documentation for how these can be
used.

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

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

### getLabels

Labels for the AlloyDB primary instance 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 primary instance 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` |   |

### getPrivateIp

Output only. The private IP address for the Instance.

This is the connection endpoint for an end-user application.

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

### setPrivateIp

Output only. The private IP address for the Instance.

This is the connection endpoint for an end-user application.

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

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