# Class protos.google.cloud.compute.v1.VpnTunnel (6.13.0)

6.13.0 (latest) 6.12.0 6.11.0 6.9.0 6.7.0 6.5.0 4.11.0 4.10.0 4.9.0 4.8.0 4.6.0 4.5.0 4.3.0 4.1.0 3.9.1 3.8.1 3.6.0 3.5.1 3.1.2 3.0.0 Represents a VpnTunnel.

## Package

[@google-cloud/compute](https://docs.cloud.google.com/nodejs/docs/reference/compute/latest/overview.html)

## Constructors

### (constructor)(properties)

    constructor(properties?: google.cloud.compute.v1.IVpnTunnel);

Constructs a new VpnTunnel.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `properties` | `https://docs.cloud.google.com/nodejs/docs/reference/compute/latest/compute/protos.google.cloud.compute.v1.ivpntunnel` Properties to set |

## Properties

### cipherSuite

    public cipherSuite?: (google.cloud.compute.v1.IVpnTunnelCipherSuite|null);

VpnTunnel cipherSuite.

### creationTimestamp

    public creationTimestamp?: (string|null);

VpnTunnel creationTimestamp.

### description

    public description?: (string|null);

VpnTunnel description.

### detailedStatus

    public detailedStatus?: (string|null);

VpnTunnel detailedStatus.

### id

    public id?: (number|Long|string|null);

VpnTunnel id.

### ikeVersion

    public ikeVersion?: (number|null);

VpnTunnel ikeVersion.

### kind

    public kind?: (string|null);

VpnTunnel kind.

### labelFingerprint

    public labelFingerprint?: (string|null);

VpnTunnel labelFingerprint.

### labels

    public labels: { [k: string]: string };

VpnTunnel labels.

### localTrafficSelector

    public localTrafficSelector: string[];

VpnTunnel localTrafficSelector.

### name

    public name?: (string|null);

VpnTunnel name.

### params

    public params?: (google.cloud.compute.v1.IVpnTunnelParams|null);

VpnTunnel params.

### peerExternalGateway

    public peerExternalGateway?: (string|null);

VpnTunnel peerExternalGateway.

### peerExternalGatewayInterface

    public peerExternalGatewayInterface?: (number|null);

VpnTunnel peerExternalGatewayInterface.

### peerGcpGateway

    public peerGcpGateway?: (string|null);

VpnTunnel peerGcpGateway.

### peerIp

    public peerIp?: (string|null);

VpnTunnel peerIp.

### region

    public region?: (string|null);

VpnTunnel region.

### remoteTrafficSelector

    public remoteTrafficSelector: string[];

VpnTunnel remoteTrafficSelector.

### router

    public router?: (string|null);

VpnTunnel router.

### selfLink

    public selfLink?: (string|null);

VpnTunnel selfLink.

### sharedSecret

    public sharedSecret?: (string|null);

VpnTunnel sharedSecret.

### sharedSecretHash

    public sharedSecretHash?: (string|null);

VpnTunnel sharedSecretHash.

### status

    public status?: (string|null);

VpnTunnel status.

### targetVpnGateway

    public targetVpnGateway?: (string|null);

VpnTunnel targetVpnGateway.

### vpnGateway

    public vpnGateway?: (string|null);

VpnTunnel vpnGateway.

### vpnGatewayInterface

    public vpnGatewayInterface?: (number|null);

VpnTunnel vpnGatewayInterface.

## Methods

### create(properties)

    public static create(properties?: google.cloud.compute.v1.IVpnTunnel): google.cloud.compute.v1.VpnTunnel;

Creates a new VpnTunnel instance using the specified properties.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `properties` | `https://docs.cloud.google.com/nodejs/docs/reference/compute/latest/compute/protos.google.cloud.compute.v1.ivpntunnel` Properties to set |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/nodejs/docs/reference/compute/latest/compute/protos.google.cloud.compute.v1.vpntunnel-class` | VpnTunnel instance |

### decode(reader, length)

    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.VpnTunnel;

Decodes a VpnTunnel message from the specified reader or buffer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `reader` | `(Reader|Uint8Array)` Reader or buffer to decode from |
| `length` | `number` Message length if known beforehand |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/nodejs/docs/reference/compute/latest/compute/protos.google.cloud.compute.v1.vpntunnel-class` | VpnTunnel |

### decodeDelimited(reader)

    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.VpnTunnel;

Decodes a VpnTunnel message from the specified reader or buffer, length delimited.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `reader` | `(Reader|Uint8Array)` Reader or buffer to decode from |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/nodejs/docs/reference/compute/latest/compute/protos.google.cloud.compute.v1.vpntunnel-class` | VpnTunnel |

### encode(message, writer)

    public static encode(message: google.cloud.compute.v1.IVpnTunnel, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified VpnTunnel message. Does not implicitly messages.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `message` | `https://docs.cloud.google.com/nodejs/docs/reference/compute/latest/compute/protos.google.cloud.compute.v1.ivpntunnel` VpnTunnel message or plain object to encode |
| `writer` | `$protobuf.Writer` Writer to encode to |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$protobuf.Writer` | Writer |

### encodeDelimited(message, writer)

    public static encodeDelimited(message: google.cloud.compute.v1.IVpnTunnel, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified VpnTunnel message, length delimited. Does not implicitly messages.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `message` | `https://docs.cloud.google.com/nodejs/docs/reference/compute/latest/compute/protos.google.cloud.compute.v1.ivpntunnel` VpnTunnel message or plain object to encode |
| `writer` | `$protobuf.Writer` Writer to encode to |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$protobuf.Writer` | Writer |

### fromObject(object)

    public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.VpnTunnel;

Creates a VpnTunnel message from a plain object. Also converts values to their respective internal types.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `object` | `{ [k: string]: any }` Plain object |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/nodejs/docs/reference/compute/latest/compute/protos.google.cloud.compute.v1.vpntunnel-class` | VpnTunnel |

### getTypeUrl(typeUrlPrefix)

    public static getTypeUrl(typeUrlPrefix?: string): string;

Gets the default type url for VpnTunnel

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `typeUrlPrefix` | `string` your custom typeUrlPrefix(default "type.googleapis.com") |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The default type url |

### toJSON()

    public toJSON(): { [k: string]: any };

Converts this VpnTunnel to JSON.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `{ [k: string]: any }` | JSON object |

### toObject(message, options)

    public static toObject(message: google.cloud.compute.v1.VpnTunnel, options?: $protobuf.IConversionOptions): { [k: string]: any };

Creates a plain object from a VpnTunnel message. Also converts values to other types if specified.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `message` | `https://docs.cloud.google.com/nodejs/docs/reference/compute/latest/compute/protos.google.cloud.compute.v1.vpntunnel-class` VpnTunnel |
| `options` | `$protobuf.IConversionOptions` Conversion options |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `{ [k: string]: any }` | Plain object |

### verify(message)

    public static verify(message: { [k: string]: any }): (string|null);

Verifies a VpnTunnel message.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `message` | `{ [k: string]: any }` Plain object to verify |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `(string|null)` | `null` if valid, otherwise the reason why it is not |