# Network Connectivity V1 API - Class Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConnection (v1.14.0)

1.14.0 (latest) 1.13.0 1.12.0 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.1 1.4.0 1.3.0 1.2.0 1.1.0 1.0.1 0.10.0 0.9.2 0.8.0 0.7.0 0.6.1 0.5.0 0.4.1 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Network Connectivity V1 API class Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConnection.

Information about a specific Private Service Connect connection.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #consumer_address

    def consumer_address() -> ::String

**Returns**

- (::String) --- The resource reference of the consumer address.

### #consumer_address=

    def consumer_address=(value) -> ::String

**Parameter**

- **value** (::String) --- The resource reference of the consumer address.
**Returns**

- (::String) --- The resource reference of the consumer address.

### #consumer_forwarding_rule

    def consumer_forwarding_rule() -> ::String

**Returns**

- (::String) --- The resource reference of the PSC Forwarding Rule within the consumer VPC.

### #consumer_forwarding_rule=

    def consumer_forwarding_rule=(value) -> ::String

**Parameter**

- **value** (::String) --- The resource reference of the PSC Forwarding Rule within the consumer VPC.
**Returns**

- (::String) --- The resource reference of the PSC Forwarding Rule within the consumer VPC.

### #consumer_target_project

    def consumer_target_project() -> ::String

**Returns**

- (::String) --- The project where the PSC connection is created.

### #consumer_target_project=

    def consumer_target_project=(value) -> ::String

**Parameter**

- **value** (::String) --- The project where the PSC connection is created.
**Returns**

- (::String) --- The project where the PSC connection is created.

### #error

    def error() -> ::Google::Rpc::Status

**Returns**

- ([::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Rpc-Status)) --- The most recent error during operating this connection. Deprecated, please use error_info instead.

### #error=

    def error=(value) -> ::Google::Rpc::Status

**Parameter**

- **value** ([::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Rpc-Status)) --- The most recent error during operating this connection. Deprecated, please use error_info instead.
**Returns**

- ([::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Rpc-Status)) --- The most recent error during operating this connection. Deprecated, please use error_info instead.

### #error_info

    def error_info() -> ::Google::Rpc::ErrorInfo

**Returns**

- ([::Google::Rpc::ErrorInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Rpc-ErrorInfo)) --- Output only. The error info for the latest error during operating this connection.

### #error_type

    def error_type() -> ::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ConnectionErrorType)) --- The error type indicates whether the error is consumer facing, producer facing or system internal.

### #error_type=

    def error_type=(value) -> ::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType

**Parameter**

- **value** ([::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ConnectionErrorType)) --- The error type indicates whether the error is consumer facing, producer facing or system internal.
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ConnectionErrorType)) --- The error type indicates whether the error is consumer facing, producer facing or system internal.

### #gce_operation

    def gce_operation() -> ::String

**Returns**

- (::String) --- The last Compute Engine operation to setup PSC connection.

### #gce_operation=

    def gce_operation=(value) -> ::String

**Parameter**

- **value** (::String) --- The last Compute Engine operation to setup PSC connection.
**Returns**

- (::String) --- The last Compute Engine operation to setup PSC connection.

### #ip_version

    def ip_version() -> ::Google::Cloud::NetworkConnectivity::V1::IPVersion

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::IPVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-IPVersion)) --- The requested IP version for the PSC connection.

### #ip_version=

    def ip_version=(value) -> ::Google::Cloud::NetworkConnectivity::V1::IPVersion

**Parameter**

- **value** ([::Google::Cloud::NetworkConnectivity::V1::IPVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-IPVersion)) --- The requested IP version for the PSC connection.
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::IPVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-IPVersion)) --- The requested IP version for the PSC connection.

### #producer_instance_id

    def producer_instance_id() -> ::String

**Returns**

- (::String) --- Immutable. Deprecated. Use producer_instance_metadata instead. An immutable identifier for the producer instance.

### #producer_instance_id=

    def producer_instance_id=(value) -> ::String

**Parameter**

- **value** (::String) --- Immutable. Deprecated. Use producer_instance_metadata instead. An immutable identifier for the producer instance.
**Returns**

- (::String) --- Immutable. Deprecated. Use producer_instance_metadata instead. An immutable identifier for the producer instance.

### #producer_instance_metadata

    def producer_instance_metadata() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Immutable. An immutable map for the producer instance metadata.

### #producer_instance_metadata=

    def producer_instance_metadata=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Immutable. An immutable map for the producer instance metadata.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Immutable. An immutable map for the producer instance metadata.

### #psc_connection_id

    def psc_connection_id() -> ::String

**Returns**

- (::String) --- The PSC connection id of the PSC forwarding rule.

### #psc_connection_id=

    def psc_connection_id=(value) -> ::String

**Parameter**

- **value** (::String) --- The PSC connection id of the PSC forwarding rule.
**Returns**

- (::String) --- The PSC connection id of the PSC forwarding rule.

### #selected_subnetwork

    def selected_subnetwork() -> ::String

**Returns**

- (::String) --- Output only. The URI of the subnetwork selected to allocate IP address for this connection.

### #service_class

    def service_class() -> ::String

**Returns**

- (::String) --- Output only. \[Output only\] The service class associated with this PSC Connection. The value is derived from the SCPolicy and matches the service class name provided by the customer.

### #state

    def state() -> ::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ServiceConnectionPolicy-State)) --- State of the PSC Connection

### #state=

    def state=(value) -> ::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State

**Parameter**

- **value** ([::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ServiceConnectionPolicy-State)) --- State of the PSC Connection
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-ServiceConnectionPolicy-State)) --- State of the PSC Connection