# Compute V1 Client - Class RouterStatusBgpPeerStatus (2.10.0)

2.10.0 (latest) 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.0.0 1.36.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.24.0 1.23.0 1.22.1 1.21.0 1.20.0 1.19.0 1.18.1 1.17.0 1.16.2 1.14.0 1.13.0 1.12.1 1.11.1 1.10.1 1.9.1 1.8.3 1.7.1 1.6.1 1.5.0 Reference documentation and code samples for the Compute V1 Client class RouterStatusBgpPeerStatus.

Generated from protobuf message `google.cloud.compute.v1.RouterStatusBgpPeerStatus`

## Namespace

Google \\ Cloud \\ Compute \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ advertised_routes` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.Route>` Routes that were advertised to the remote BGP peer |
| `↳ bfd_status` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.BfdStatus` |
| `↳ enable_ipv4` | `bool` Output only. Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. |
| `↳ enable_ipv6` | `bool` Output only. Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6. |
| `↳ ip_address` | `string` Output only. IP address of the local BGP interface. |
| `↳ ipv4_nexthop_address` | `string` Output only. IPv4 address of the local BGP interface. |
| `↳ ipv6_nexthop_address` | `string` Output only. IPv6 address of the local BGP interface. |
| `↳ linked_vpn_tunnel` | `string` Output only. URL of the VPN tunnel that this BGP peer controls. |
| `↳ md5_auth_enabled` | `bool` Informs whether MD5 authentication is enabled on this BGP peer. |
| `↳ name` | `string` Output only. Name of this BGP peer. Unique within the Routers resource. |
| `↳ num_learned_routes` | `int` Output only. Number of routes learned from the remote BGP Peer. |
| `↳ peer_ip_address` | `string` Output only. IP address of the remote BGP interface. |
| `↳ peer_ipv4_nexthop_address` | `string` Output only. IPv4 address of the remote BGP interface. |
| `↳ peer_ipv6_nexthop_address` | `string` Output only. IPv6 address of the remote BGP interface. |
| `↳ router_appliance_instance` | `string` Output only. \[Output only\] URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance is the peer side of the BGP session. |
| `↳ state` | `string` Output only. The state of the BGP session. For a list of possible values for this field, seeBGP session states. |
| `↳ status` | `string` Output only. Status of the BGP peer: {UP, DOWN} Check the Status enum for the list of possible values. |
| `↳ status_reason` | `string` Indicates why particular status was returned. Check the StatusReason enum for the list of possible values. |
| `↳ uptime` | `string` Output only. Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds |
| `↳ uptime_seconds` | `string` Output only. Time this session has been up, in seconds. Format: 145 |

### getAdvertisedRoutes

Routes that were advertised to the remote BGP peer

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.Route>` |   |

### setAdvertisedRoutes

Routes that were advertised to the remote BGP peer

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.Route>` |

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

### getBfdStatus

Generated from protobuf field `optional .google.cloud.compute.v1.BfdStatus bfd_status = 395631729;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.BfdStatus|null` |   |

### hasBfdStatus

### clearBfdStatus

### setBfdStatus

Generated from protobuf field `optional .google.cloud.compute.v1.BfdStatus bfd_status = 395631729;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.BfdStatus` |

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

### getEnableIpv4

Output only. Enable IPv4 traffic over BGP Peer.

It is enabled by default if the peerIpAddress is version 4.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasEnableIpv4

### clearEnableIpv4

### setEnableIpv4

Output only. Enable IPv4 traffic over BGP Peer.

It is enabled by default if the peerIpAddress is version 4.

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

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

### getEnableIpv6

Output only. Enable IPv6 traffic over BGP Peer.

It is enabled by default if the peerIpAddress is version 6.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasEnableIpv6

### clearEnableIpv6

### setEnableIpv6

Output only. Enable IPv6 traffic over BGP Peer.

It is enabled by default if the peerIpAddress is version 6.

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

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

### getIpAddress

Output only. IP address of the local BGP interface.

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

### hasIpAddress

### clearIpAddress

### setIpAddress

Output only. IP address of the local BGP interface.

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

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

### getIpv4NexthopAddress

Output only. IPv4 address of the local BGP interface.

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

### hasIpv4NexthopAddress

### clearIpv4NexthopAddress

### setIpv4NexthopAddress

Output only. IPv4 address of the local BGP interface.

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

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

### getIpv6NexthopAddress

Output only. IPv6 address of the local BGP interface.

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

### hasIpv6NexthopAddress

### clearIpv6NexthopAddress

### setIpv6NexthopAddress

Output only. IPv6 address of the local BGP interface.

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

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

### getLinkedVpnTunnel

Output only. URL of the VPN tunnel that this BGP peer controls.

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

### hasLinkedVpnTunnel

### clearLinkedVpnTunnel

### setLinkedVpnTunnel

Output only. URL of the VPN tunnel that this BGP peer controls.

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

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

### getMd5AuthEnabled

Informs whether MD5 authentication is enabled on this BGP peer.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasMd5AuthEnabled

### clearMd5AuthEnabled

### setMd5AuthEnabled

Informs whether MD5 authentication is enabled on this BGP peer.

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

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

### getName

Output only. Name of this BGP peer. Unique within the Routers resource.

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

### hasName

### clearName

### setName

Output only. Name of this BGP peer. Unique within the Routers resource.

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

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

### getNumLearnedRoutes

Output only. Number of routes learned from the remote BGP Peer.

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

### hasNumLearnedRoutes

### clearNumLearnedRoutes

### setNumLearnedRoutes

Output only. Number of routes learned from the remote BGP Peer.

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

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

### getPeerIpAddress

Output only. IP address of the remote BGP interface.

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

### hasPeerIpAddress

### clearPeerIpAddress

### setPeerIpAddress

Output only. IP address of the remote BGP interface.

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

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

### getPeerIpv4NexthopAddress

Output only. IPv4 address of the remote BGP interface.

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

### hasPeerIpv4NexthopAddress

### clearPeerIpv4NexthopAddress

### setPeerIpv4NexthopAddress

Output only. IPv4 address of the remote BGP interface.

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

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

### getPeerIpv6NexthopAddress

Output only. IPv6 address of the remote BGP interface.

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

### hasPeerIpv6NexthopAddress

### clearPeerIpv6NexthopAddress

### setPeerIpv6NexthopAddress

Output only. IPv6 address of the remote BGP interface.

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

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

### getRouterApplianceInstance

Output only. \[Output only\] URI of the VM instance that is used as third-party router
appliances such as Next Gen Firewalls, Virtual Routers, or Router
Appliances.

The VM instance is the peer side of the BGP session.

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

### hasRouterApplianceInstance

### clearRouterApplianceInstance

### setRouterApplianceInstance

Output only. \[Output only\] URI of the VM instance that is used as third-party router
appliances such as Next Gen Firewalls, Virtual Routers, or Router
Appliances.

The VM instance is the peer side of the BGP session.

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

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

### getState

Output only. The state of the BGP session. For a list of possible values for this
field, seeBGP session states.

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

### hasState

### clearState

### setState

Output only. The state of the BGP session. For a list of possible values for this
field, seeBGP session states.

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

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

### getStatus

Output only. Status of the BGP peer: {UP, DOWN}
Check the Status enum for the list of possible values.

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

### hasStatus

### clearStatus

### setStatus

Output only. Status of the BGP peer: {UP, DOWN}
Check the Status enum for the list of possible values.

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

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

### getStatusReason

Indicates why particular status was returned.

Check the StatusReason enum for the list of possible values.

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

### hasStatusReason

### clearStatusReason

### setStatusReason

Indicates why particular status was returned.

Check the StatusReason enum for the list of possible values.

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

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

### getUptime

Output only. Time this session has been up.

Format:
14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds

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

### hasUptime

### clearUptime

### setUptime

Output only. Time this session has been up.

Format:
14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds

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

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

### getUptimeSeconds

Output only. Time this session has been up, in seconds.

Format:
145

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

### hasUptimeSeconds

### clearUptimeSeconds

### setUptimeSeconds

Output only. Time this session has been up, in seconds.

Format:
145

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

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