# Compute V1 Client - Class InterconnectAttachmentL2Forwarding (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 InterconnectAttachmentL2Forwarding.

L2 Interconnect Attachment related configuration.

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

## Namespace

Google \\ Cloud \\ Compute \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ appliance_mappings` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. A map of VLAN tags to appliances and optional inner mapping rules. If VLANs are not explicitly mapped to any appliance, the defaultApplianceIpAddress is used. Each VLAN tag can be a single number or a range of numbers in the range of 1 to 4094, e.g., "1" or "4001-4094". Non-empty and non-overlapping VLAN tag ranges are enforced, and violating operations will be rejected. The VLAN tags in the Ethernet header must use an ethertype value of 0x88A8 or 0x8100. |
| `↳ default_appliance_ip_address` | `string` Optional. A single IPv4 or IPv6 address used as the default destination IP when there is no VLAN mapping result found. Unset field (null-value) indicates the unmatched packet should be dropped. |
| `↳ geneve_header` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.InterconnectAttachmentL2ForwardingGeneveHeader` Optional. It represents the structure of a Geneve (Generic Network Virtualization Encapsulation) header, as defined in RFC8926. It encapsulates packets from various protocols (e.g., Ethernet, IPv4, IPv6) for use in network virtualization environments. |
| `↳ network` | `string` Required. Resource URL of the network to which this attachment belongs. |
| `↳ tunnel_endpoint_ip_address` | `string` Required. A single IPv4 or IPv6 address. This address will be used as the source IP address for packets sent to the appliances, and must be used as the destination IP address for packets that should be sent out through this attachment. |

### getApplianceMappings

Optional. A map of VLAN tags to appliances and optional inner mapping
rules. If VLANs are not explicitly mapped to any appliance, the
defaultApplianceIpAddress is used.

Each VLAN tag can be a single number or a range of numbers in the range
of 1 to 4094, e.g., "1" or "4001-4094". Non-empty and non-overlapping
VLAN tag ranges are enforced, and violating operations will be rejected.
The VLAN tags in the Ethernet header must use an ethertype value of
0x88A8 or 0x8100.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setApplianceMappings

Optional. A map of VLAN tags to appliances and optional inner mapping
rules. If VLANs are not explicitly mapped to any appliance, the
defaultApplianceIpAddress is used.

Each VLAN tag can be a single number or a range of numbers in the range
of 1 to 4094, e.g., "1" or "4001-4094". Non-empty and non-overlapping
VLAN tag ranges are enforced, and violating operations will be rejected.
The VLAN tags in the Ethernet header must use an ethertype value of
0x88A8 or 0x8100.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getDefaultApplianceIpAddress

Optional. A single IPv4 or IPv6 address used as the default destination
IP when there is no VLAN mapping result found.

Unset field (null-value) indicates the unmatched packet should be
dropped.

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

### hasDefaultApplianceIpAddress

### clearDefaultApplianceIpAddress

### setDefaultApplianceIpAddress

Optional. A single IPv4 or IPv6 address used as the default destination
IP when there is no VLAN mapping result found.

Unset field (null-value) indicates the unmatched packet should be
dropped.

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

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

### getGeneveHeader

Optional. It represents the structure of a Geneve (Generic Network
Virtualization Encapsulation) header, as defined in RFC8926. It encapsulates packets from various
protocols (e.g., Ethernet, IPv4, IPv6) for use in network virtualization
environments.

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

### hasGeneveHeader

### clearGeneveHeader

### setGeneveHeader

Optional. It represents the structure of a Geneve (Generic Network
Virtualization Encapsulation) header, as defined in RFC8926. It encapsulates packets from various
protocols (e.g., Ethernet, IPv4, IPv6) for use in network virtualization
environments.

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

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

### getNetwork

Required. Resource URL of the network to which this attachment belongs.

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

### hasNetwork

### clearNetwork

### setNetwork

Required. Resource URL of the network to which this attachment belongs.

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

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

### getTunnelEndpointIpAddress

Required. A single IPv4 or IPv6 address. This address will be used as the
source IP address for packets sent to the appliances, and must be used as
the destination IP address for packets that should be sent out through
this attachment.

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

### hasTunnelEndpointIpAddress

### clearTunnelEndpointIpAddress

### setTunnelEndpointIpAddress

Required. A single IPv4 or IPv6 address. This address will be used as the
source IP address for packets sent to the appliances, and must be used as
the destination IP address for packets that should be sent out through
this attachment.

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

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