# Interface ServiceConnectionPolicy.PscConnectionOrBuilder (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.PscConnectionOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.networkconnectivity.v1.ServiceConnectionPolicy.PscConnectionOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.networkconnectivity.v1.ServiceConnectionPolicy.PscConnectionOrBuilder)

    public static interface ServiceConnectionPolicy.PscConnectionOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getConsumerAddress()

    public abstract String getConsumerAddress()

The resource reference of the consumer address.

`string consumer_address = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The consumerAddress. |

### getConsumerAddressBytes()

    public abstract ByteString getConsumerAddressBytes()

The resource reference of the consumer address.

`string consumer_address = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for consumerAddress. |

### getConsumerForwardingRule()

    public abstract String getConsumerForwardingRule()

The resource reference of the PSC Forwarding Rule within the consumer
VPC.

`string consumer_forwarding_rule = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The consumerForwardingRule. |

### getConsumerForwardingRuleBytes()

    public abstract ByteString getConsumerForwardingRuleBytes()

The resource reference of the PSC Forwarding Rule within the consumer
VPC.

`string consumer_forwarding_rule = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for consumerForwardingRule. |

### getConsumerTargetProject()

    public abstract String getConsumerTargetProject()

The project where the PSC connection is created.

`string consumer_target_project = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The consumerTargetProject. |

### getConsumerTargetProjectBytes()

    public abstract ByteString getConsumerTargetProjectBytes()

The project where the PSC connection is created.

`string consumer_target_project = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for consumerTargetProject. |

### getError()

    public abstract Status getError()

The most recent error during operating this connection.

`.google.rpc.Status error = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.rpc.Status` | The error. |

### getErrorOrBuilder()

    public abstract StatusOrBuilder getErrorOrBuilder()

The most recent error during operating this connection.

`.google.rpc.Status error = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.rpc.StatusOrBuilder` |   |

### getErrorType()

    public abstract ConnectionErrorType getErrorType()

The error type indicates whether the error is consumer facing, producer
facing or system internal.

`.google.events.cloud.networkconnectivity.v1.ConnectionErrorType error_type = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkconnectivity.v1.ConnectionErrorType` | The errorType. |

### getErrorTypeValue()

    public abstract int getErrorTypeValue()

The error type indicates whether the error is consumer facing, producer
facing or system internal.

`.google.events.cloud.networkconnectivity.v1.ConnectionErrorType error_type = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for errorType. |

### getGceOperation()

    public abstract String getGceOperation()

The last Compute Engine operation to setup PSC connection.

`string gce_operation = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The gceOperation. |

### getGceOperationBytes()

    public abstract ByteString getGceOperationBytes()

The last Compute Engine operation to setup PSC connection.

`string gce_operation = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for gceOperation. |

### getPscConnectionId()

    public abstract String getPscConnectionId()

The PSC connection id of the PSC forwarding rule.

`string psc_connection_id = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The pscConnectionId. |

### getPscConnectionIdBytes()

    public abstract ByteString getPscConnectionIdBytes()

The PSC connection id of the PSC forwarding rule.

`string psc_connection_id = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for pscConnectionId. |

### getState()

    public abstract ServiceConnectionPolicy.State getState()

State of the PSC Connection

`.google.events.cloud.networkconnectivity.v1.ServiceConnectionPolicy.State state = 1;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkconnectivity.v1.ServiceConnectionPolicy.State` | The state. |

### getStateValue()

    public abstract int getStateValue()

State of the PSC Connection

`.google.events.cloud.networkconnectivity.v1.ServiceConnectionPolicy.State state = 1;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for state. |

### hasError()

    public abstract boolean hasError()

The most recent error during operating this connection.

`.google.rpc.Status error = 5;`

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