# Google Cloud Redis Cluster V1 Client - Class PscConnection (0.8.0)

0.8.0 (latest) 0.7.0 0.6.4 0.5.1 0.4.1 0.3.2 0.2.5 0.1.0 Reference documentation and code samples for the Google Cloud Redis Cluster V1 Client class PscConnection.

Details of consumer resources in a PSC connection.

Generated from protobuf message `google.cloud.redis.cluster.v1.PscConnection`

## Namespace

Google \\ Cloud \\ Redis \\ Cluster \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ psc_connection_id` | `string` Required. The PSC connection id of the forwarding rule connected to the service attachment. |
| `↳ address` | `string` Required. The IP allocated on the consumer network for the PSC forwarding rule. |
| `↳ forwarding_rule` | `string` Required. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. |
| `↳ project_id` | `string` Optional. Project ID of the consumer project where the forwarding rule is created in. |
| `↳ network` | `string` Required. The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}. |
| `↳ service_attachment` | `string` Required. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. |
| `↳ psc_connection_status` | `int` Output only. The status of the PSC connection. Please note that this value is updated periodically. To get the latest status of a PSC connection, follow <https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details>. |
| `↳ connection_type` | `int` Output only. Type of the PSC connection. |

### getPscConnectionId

Required. The PSC connection id of the forwarding rule connected to the
service attachment.

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

### setPscConnectionId

Required. The PSC connection id of the forwarding rule connected to the
service attachment.

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

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

### getAddress

Required. The IP allocated on the consumer network for the PSC forwarding
rule.

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

### setAddress

Required. The IP allocated on the consumer network for the PSC forwarding
rule.

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

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

### getForwardingRule

Required. The URI of the consumer side forwarding rule.

Example:
projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.

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

### setForwardingRule

Required. The URI of the consumer side forwarding rule.

Example:
projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.

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

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

### getProjectId

Optional. Project ID of the consumer project where the forwarding rule is
created in.

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

### setProjectId

Optional. Project ID of the consumer project where the forwarding rule is
created in.

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

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

### getNetwork

Required. The consumer network where the IP address resides, in the form of
projects/{project_id}/global/networks/{network_id}.

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

### setNetwork

Required. The consumer network where the IP address resides, in the form of
projects/{project_id}/global/networks/{network_id}.

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

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

### getServiceAttachment

Required. The service attachment which is the target of the PSC connection,
in the form of
projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.

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

### setServiceAttachment

Required. The service attachment which is the target of the PSC connection,
in the form of
projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.

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

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

### getPscConnectionStatus

Output only. The status of the PSC connection.

Please note that this value is updated periodically.
To get the latest status of a PSC connection, follow
<https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details>.

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

### setPscConnectionStatus

Output only. The status of the PSC connection.

Please note that this value is updated periodically.
To get the latest status of a PSC connection, follow
<https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details>.

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

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

### getConnectionType

Output only. Type of the PSC connection.

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

### setConnectionType

Output only. Type of the PSC connection.

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

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