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

The PrivateConnection resource is used to establish private connectivity
with the customer's network.

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

## Namespace

Google \\ Cloud \\ CloudDms \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The name of the resource. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The create time of the resource. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The last update time of the resource. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` The resource labels for private connections to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of "key": "value" pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `↳ display_name` | `string` The private connection display name. |
| `↳ state` | `int` Output only. The state of the private connection. |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` Output only. The error details in case of state FAILED. |
| `↳ vpc_peering_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.VpcPeeringConfig` VPC peering configuration. |

### getName

The name of the resource.

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

### setName

The name of the resource.

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

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

### getCreateTime

Output only. The create time of the resource.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The create time of the resource.

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

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

### getUpdateTime

Output only. The last update time of the resource.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The last update time of the resource.

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

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

### getLabels

The resource labels for private connections to use to annotate any related
underlying resources such as Compute Engine VMs. An object containing a
list of "key": "value" pairs.

Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.

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

### setLabels

The resource labels for private connections to use to annotate any related
underlying resources such as Compute Engine VMs. An object containing a
list of "key": "value" pairs.

Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.

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

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

### getDisplayName

The private connection display name.

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

### setDisplayName

The private connection display name.

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

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

### getState

Output only. The state of the private connection.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.PrivateConnection.State). |

### setState

Output only. The state of the private connection.

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

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

### getError

Output only. The error details in case of state FAILED.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasError

### clearError

### setError

Output only. The error details in case of state FAILED.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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

### getVpcPeeringConfig

VPC peering configuration.

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

### hasVpcPeeringConfig

### setVpcPeeringConfig

VPC peering configuration.

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

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

### getConnectivity

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