# Google Cloud Network Connectivity V1 Client - Class PscConfig (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.0 2.2.2 2.1.2 2.0.2 1.5.5 1.4.2 1.3.0 1.2.0 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Network Connectivity V1 Client class PscConfig.

Configuration used for Private Service Connect connections. Used when
Infrastructure is PSC.

Generated from protobuf message `google.cloud.networkconnectivity.v1.ServiceConnectionPolicy.PscConfig`

## Namespace

Google \\ Cloud \\ NetworkConnectivity \\ V1 \\ ServiceConnectionPolicy

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ subnetworks` | `string[]` The resource paths of subnetworks to use for IP address management. Example: projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}. |
| `↳ limit` | `int|string` Optional. Max number of PSC connections for this policy. |
| `↳ producer_instance_location` | `int` Required. ProducerInstanceLocation is used to specify which authorization mechanism to use to determine which projects the Producer instance can be within. |
| `↳ allowed_google_producers_resource_hierarchy_level` | `string[]` Optional. List of Projects, Folders, or Organizations from where the Producer instance can be within. For example, a network administrator can provide both 'organizations/foo' and 'projects/bar' as allowed_google_producers_resource_hierarchy_levels. This allowlists this network to connect with any Producer instance within the 'foo' organization or the 'bar' project. By default, allowed_google_producers_resource_hierarchy_level is empty. The format for each allowed_google_producers_resource_hierarchy_level is |

### getSubnetworks

The resource paths of subnetworks to use for IP address management.

Example:
projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.

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

### setSubnetworks

The resource paths of subnetworks to use for IP address management.

Example:
projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.

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

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

### getLimit

Optional. Max number of PSC connections for this policy.

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

### hasLimit

### clearLimit

### setLimit

Optional. Max number of PSC connections for this policy.

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

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

### getProducerInstanceLocation

Required. ProducerInstanceLocation is used to specify which authorization
mechanism to use to determine which projects the Producer instance can be
within.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ProducerInstanceLocation](https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionPolicy.PscConfig.ProducerInstanceLocation). |

### setProducerInstanceLocation

Required. ProducerInstanceLocation is used to specify which authorization
mechanism to use to determine which projects the Producer instance can be
within.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ProducerInstanceLocation](https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionPolicy.PscConfig.ProducerInstanceLocation). |

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

### getAllowedGoogleProducersResourceHierarchyLevel

Optional. List of Projects, Folders, or Organizations from where the
Producer instance can be within. For example, a network administrator can
provide both 'organizations/foo' and 'projects/bar' as
allowed_google_producers_resource_hierarchy_levels. This allowlists this
network to connect with any Producer instance within the 'foo'
organization or the 'bar' project. By default,
allowed_google_producers_resource_hierarchy_level is empty. The format
for each allowed_google_producers_resource_hierarchy_level is


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

### setAllowedGoogleProducersResourceHierarchyLevel

Optional. List of Projects, Folders, or Organizations from where the
Producer instance can be within. For example, a network administrator can
provide both 'organizations/foo' and 'projects/bar' as
allowed_google_producers_resource_hierarchy_levels. This allowlists this
network to connect with any Producer instance within the 'foo'
organization or the 'bar' project. By default,
allowed_google_producers_resource_hierarchy_level is empty. The format
for each allowed_google_producers_resource_hierarchy_level is


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

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