# Interface ServiceConnectionPolicy.PscConfigOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkconnectivity.v1.ServiceConnectionPolicy.PscConfigOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.networkconnectivity.v1.ServiceConnectionPolicy.PscConfigOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.networkconnectivity.v1.ServiceConnectionPolicy.PscConfigOrBuilder)

    public static interface ServiceConnectionPolicy.PscConfigOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getLimit()

    public abstract long getLimit()

Optional. Max number of PSC connections for this policy.

`optional int64 limit = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The limit. |

### getSubnetworks(int index)

    public abstract String getSubnetworks(int index)

The resource paths of subnetworks to use for IP address management.
Example:
projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.

`repeated string subnetworks = 1;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The subnetworks at the given index. |

### getSubnetworksBytes(int index)

    public abstract ByteString getSubnetworksBytes(int index)

The resource paths of subnetworks to use for IP address management.
Example:
projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.

`repeated string subnetworks = 1;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the subnetworks at the given index. |

### getSubnetworksCount()

    public abstract int getSubnetworksCount()

The resource paths of subnetworks to use for IP address management.
Example:
projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.

`repeated string subnetworks = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of subnetworks. |

### getSubnetworksList()

    public abstract List<String> getSubnetworksList()

The resource paths of subnetworks to use for IP address management.
Example:
projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.

`repeated string subnetworks = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the subnetworks. |

### hasLimit()

    public abstract boolean hasLimit()

Optional. Max number of PSC connections for this policy.

`optional int64 limit = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the limit field is set. |