# Google Cloud Network Management V1 Client - Class NatInfo (2.9.2)

2.9.2 (latest) 2.9.1 2.8.0 2.7.0 2.6.1 2.5.0 2.4.2 2.3.2 2.2.1 2.1.1 2.0.1 1.7.3 1.5.0 1.4.2 1.3.0 1.2.0 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Network Management V1 Client class NatInfo.

For display only. Metadata associated with NAT.

Generated from protobuf message `google.cloud.networkmanagement.v1.NatInfo`

## Namespace

Google \\ Cloud \\ NetworkManagement \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `int` Type of NAT. |
| `↳ protocol` | `string` IP protocol in string format, for example: "TCP", "UDP", "ICMP". |
| `↳ network_uri` | `string` URI of the network where NAT translation takes place. |
| `↳ old_source_ip` | `string` Source IP address before NAT translation. |
| `↳ new_source_ip` | `string` Source IP address after NAT translation. |
| `↳ old_destination_ip` | `string` Destination IP address before NAT translation. |
| `↳ new_destination_ip` | `string` Destination IP address after NAT translation. |
| `↳ old_source_port` | `int` Source port before NAT translation. Only valid when protocol is TCP or UDP. |
| `↳ new_source_port` | `int` Source port after NAT translation. Only valid when protocol is TCP or UDP. |
| `↳ old_destination_port` | `int` Destination port before NAT translation. Only valid when protocol is TCP or UDP. |
| `↳ new_destination_port` | `int` Destination port after NAT translation. Only valid when protocol is TCP or UDP. |
| `↳ router_uri` | `string` Uri of the Cloud Router. Only valid when type is CLOUD_NAT. |
| `↳ nat_gateway_name` | `string` The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. |
| `↳ cloud_nat_gateway_type` | `int` Type of Cloud NAT gateway. Only valid when `type` is CLOUD_NAT. |

### getType

Type of NAT.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.NatInfo.Type). |

### setType

Type of NAT.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.NatInfo.Type). |

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

### getProtocol

IP protocol in string format, for example: "TCP", "UDP", "ICMP".

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

### setProtocol

IP protocol in string format, for example: "TCP", "UDP", "ICMP".

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

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

### getNetworkUri

URI of the network where NAT translation takes place.

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

### setNetworkUri

URI of the network where NAT translation takes place.

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

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

### getOldSourceIp

Source IP address before NAT translation.

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

### setOldSourceIp

Source IP address before NAT translation.

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

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

### getNewSourceIp

Source IP address after NAT translation.

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

### setNewSourceIp

Source IP address after NAT translation.

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

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

### getOldDestinationIp

Destination IP address before NAT translation.

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

### setOldDestinationIp

Destination IP address before NAT translation.

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

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

### getNewDestinationIp

Destination IP address after NAT translation.

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

### setNewDestinationIp

Destination IP address after NAT translation.

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

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

### getOldSourcePort

Source port before NAT translation. Only valid when protocol is TCP or UDP.

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

### setOldSourcePort

Source port before NAT translation. Only valid when protocol is TCP or UDP.

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

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

### getNewSourcePort

Source port after NAT translation. Only valid when protocol is TCP or UDP.

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

### setNewSourcePort

Source port after NAT translation. Only valid when protocol is TCP or UDP.

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

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

### getOldDestinationPort

Destination port before NAT translation. Only valid when protocol is TCP or
UDP.

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

### setOldDestinationPort

Destination port before NAT translation. Only valid when protocol is TCP or
UDP.

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

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

### getNewDestinationPort

Destination port after NAT translation. Only valid when protocol is TCP or
UDP.

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

### setNewDestinationPort

Destination port after NAT translation. Only valid when protocol is TCP or
UDP.

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

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

### getRouterUri

Uri of the Cloud Router. Only valid when type is CLOUD_NAT.

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

### setRouterUri

Uri of the Cloud Router. Only valid when type is CLOUD_NAT.

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

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

### getNatGatewayName

The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.

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

### setNatGatewayName

The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.

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

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

### getCloudNatGatewayType

Type of Cloud NAT gateway. Only valid when `type` is CLOUD_NAT.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [CloudNatGatewayType](https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.NatInfo.CloudNatGatewayType). |

### setCloudNatGatewayType

Type of Cloud NAT gateway. Only valid when `type` is CLOUD_NAT.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [CloudNatGatewayType](https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.NatInfo.CloudNatGatewayType). |

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