Class VpnTunnel (1.65.0)

public final class VpnTunnel extends GeneratedMessageV3 implements VpnTunnelOrBuilder

Represents a Cloud VPN Tunnel resource. For more information about VPN, read the the Cloud VPN Overview.

Protobuf type google.cloud.compute.v1.VpnTunnel

Implements

VpnTunnelOrBuilder

Static Fields

CREATION_TIMESTAMP_FIELD_NUMBER

public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DETAILED_STATUS_FIELD_NUMBER

public static final int DETAILED_STATUS_FIELD_NUMBER
Field Value
Type Description
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

IKE_VERSION_FIELD_NUMBER

public static final int IKE_VERSION_FIELD_NUMBER
Field Value
Type Description
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
Type Description
int

LABEL_FINGERPRINT_FIELD_NUMBER

public static final int LABEL_FINGERPRINT_FIELD_NUMBER
Field Value
Type Description
int

LOCAL_TRAFFIC_SELECTOR_FIELD_NUMBER

public static final int LOCAL_TRAFFIC_SELECTOR_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PEER_EXTERNAL_GATEWAY_FIELD_NUMBER

public static final int PEER_EXTERNAL_GATEWAY_FIELD_NUMBER
Field Value
Type Description
int

PEER_EXTERNAL_GATEWAY_INTERFACE_FIELD_NUMBER

public static final int PEER_EXTERNAL_GATEWAY_INTERFACE_FIELD_NUMBER
Field Value
Type Description
int

PEER_GCP_GATEWAY_FIELD_NUMBER

public static final int PEER_GCP_GATEWAY_FIELD_NUMBER
Field Value
Type Description
int

PEER_IP_FIELD_NUMBER

public static final int PEER_IP_FIELD_NUMBER
Field Value
Type Description
int

REGION_FIELD_NUMBER

public static final int REGION_FIELD_NUMBER
Field Value
Type Description
int

REMOTE_TRAFFIC_SELECTOR_FIELD_NUMBER

public static final int REMOTE_TRAFFIC_SELECTOR_FIELD_NUMBER
Field Value
Type Description
int

ROUTER_FIELD_NUMBER

public static final int ROUTER_FIELD_NUMBER
Field Value
Type Description
int
public static final int SELF_LINK_FIELD_NUMBER
Field Value
Type Description
int

SHARED_SECRET_FIELD_NUMBER

public static final int SHARED_SECRET_FIELD_NUMBER
Field Value
Type Description
int

SHARED_SECRET_HASH_FIELD_NUMBER

public static final int SHARED_SECRET_HASH_FIELD_NUMBER
Field Value
Type Description
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
Type Description
int

TARGET_VPN_GATEWAY_FIELD_NUMBER

public static final int TARGET_VPN_GATEWAY_FIELD_NUMBER
Field Value
Type Description
int

VPN_GATEWAY_FIELD_NUMBER

public static final int VPN_GATEWAY_FIELD_NUMBER
Field Value
Type Description
int

VPN_GATEWAY_INTERFACE_FIELD_NUMBER

public static final int VPN_GATEWAY_INTERFACE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static VpnTunnel getDefaultInstance()
Returns
Type Description
VpnTunnel

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static VpnTunnel.Builder newBuilder()
Returns
Type Description
VpnTunnel.Builder

newBuilder(VpnTunnel prototype)

public static VpnTunnel.Builder newBuilder(VpnTunnel prototype)
Parameter
Name Description
prototype VpnTunnel
Returns
Type Description
VpnTunnel.Builder

parseDelimitedFrom(InputStream input)

public static VpnTunnel parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
VpnTunnel
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static VpnTunnel parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VpnTunnel
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static VpnTunnel parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
VpnTunnel
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static VpnTunnel parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VpnTunnel
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static VpnTunnel parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
VpnTunnel
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static VpnTunnel parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VpnTunnel
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static VpnTunnel parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
VpnTunnel
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static VpnTunnel parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VpnTunnel
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static VpnTunnel parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
VpnTunnel
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static VpnTunnel parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VpnTunnel
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static VpnTunnel parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
VpnTunnel
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static VpnTunnel parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VpnTunnel
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<VpnTunnel> parser()
Returns
Type Description
Parser<VpnTunnel>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.

map<string, string> labels = 500195327;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public VpnTunnel getDefaultInstanceForType()
Returns
Type Description
VpnTunnel

getDescription()

public String getDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
Type Description
ByteString

The bytes for description.

getDetailedStatus()

public String getDetailedStatus()

[Output Only] Detailed status message for the VPN tunnel.

optional string detailed_status = 333501025;

Returns
Type Description
String

The detailedStatus.

getDetailedStatusBytes()

public ByteString getDetailedStatusBytes()

[Output Only] Detailed status message for the VPN tunnel.

optional string detailed_status = 333501025;

Returns
Type Description
ByteString

The bytes for detailedStatus.

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
Type Description
long

The id.

getIkeVersion()

public int getIkeVersion()

IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.

optional int32 ike_version = 218376220;

Returns
Type Description
int

The ikeVersion.

getKind()

public String getKind()

[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.

optional string kind = 3292052;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.

optional string kind = 3292052;

Returns
Type Description
ByteString

The bytes for kind.

getLabelFingerprint()

public String getLabelFingerprint()

A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnTunnel.

optional string label_fingerprint = 178124825;

Returns
Type Description
String

The labelFingerprint.

getLabelFingerprintBytes()

public ByteString getLabelFingerprintBytes()

A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnTunnel.

optional string label_fingerprint = 178124825;

Returns
Type Description
ByteString

The bytes for labelFingerprint.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.

map<string, string> labels = 500195327;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.

map<string, string> labels = 500195327;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.

map<string, string> labels = 500195327;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.

map<string, string> labels = 500195327;

Parameter
Name Description
key String
Returns
Type Description
String

getLocalTrafficSelector(int index)

public String getLocalTrafficSelector(int index)

Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.

repeated string local_traffic_selector = 317314613;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The localTrafficSelector at the given index.

getLocalTrafficSelectorBytes(int index)

public ByteString getLocalTrafficSelectorBytes(int index)

Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.

repeated string local_traffic_selector = 317314613;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the localTrafficSelector at the given index.

getLocalTrafficSelectorCount()

public int getLocalTrafficSelectorCount()

Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.

repeated string local_traffic_selector = 317314613;

Returns
Type Description
int

The count of localTrafficSelector.

getLocalTrafficSelectorList()

public ProtocolStringList getLocalTrafficSelectorList()

Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.

repeated string local_traffic_selector = 317314613;

Returns
Type Description
ProtocolStringList

A list containing the localTrafficSelector.

getName()

public String getName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<VpnTunnel> getParserForType()
Returns
Type Description
Parser<VpnTunnel>
Overrides

getPeerExternalGateway()

public String getPeerExternalGateway()

URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.

optional string peer_external_gateway = 384956173;

Returns
Type Description
String

The peerExternalGateway.

getPeerExternalGatewayBytes()

public ByteString getPeerExternalGatewayBytes()

URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.

optional string peer_external_gateway = 384956173;

Returns
Type Description
ByteString

The bytes for peerExternalGateway.

getPeerExternalGatewayInterface()

public int getPeerExternalGatewayInterface()

The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. Possible values are: 0, 1, 2, 3. The number of IDs in use depends on the external VPN gateway redundancy type.

optional int32 peer_external_gateway_interface = 452768391;

Returns
Type Description
int

The peerExternalGatewayInterface.

getPeerGcpGateway()

public String getPeerGcpGateway()

URL of the peer side HA VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer Google Cloud VPN gateway.

optional string peer_gcp_gateway = 281867452;

Returns
Type Description
String

The peerGcpGateway.

getPeerGcpGatewayBytes()

public ByteString getPeerGcpGatewayBytes()

URL of the peer side HA VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer Google Cloud VPN gateway.

optional string peer_gcp_gateway = 281867452;

Returns
Type Description
ByteString

The bytes for peerGcpGateway.

getPeerIp()

public String getPeerIp()

IP address of the peer VPN gateway. Only IPv4 is supported. This field can be set only for Classic VPN tunnels.

optional string peer_ip = 383249700;

Returns
Type Description
String

The peerIp.

getPeerIpBytes()

public ByteString getPeerIpBytes()

IP address of the peer VPN gateway. Only IPv4 is supported. This field can be set only for Classic VPN tunnels.

optional string peer_ip = 383249700;

Returns
Type Description
ByteString

The bytes for peerIp.

getRegion()

public String getRegion()

[Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Returns
Type Description
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

[Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Returns
Type Description
ByteString

The bytes for region.

getRemoteTrafficSelector(int index)

public String getRemoteTrafficSelector(int index)

Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.

repeated string remote_traffic_selector = 358887098;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The remoteTrafficSelector at the given index.

getRemoteTrafficSelectorBytes(int index)

public ByteString getRemoteTrafficSelectorBytes(int index)

Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.

repeated string remote_traffic_selector = 358887098;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the remoteTrafficSelector at the given index.

getRemoteTrafficSelectorCount()

public int getRemoteTrafficSelectorCount()

Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.

repeated string remote_traffic_selector = 358887098;

Returns
Type Description
int

The count of remoteTrafficSelector.

getRemoteTrafficSelectorList()

public ProtocolStringList getRemoteTrafficSelectorList()

Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.

repeated string remote_traffic_selector = 358887098;

Returns
Type Description
ProtocolStringList

A list containing the remoteTrafficSelector.

getRouter()

public String getRouter()

URL of the router resource to be used for dynamic routing.

optional string router = 148608841;

Returns
Type Description
String

The router.

getRouterBytes()

public ByteString getRouterBytes()

URL of the router resource to be used for dynamic routing.

optional string router = 148608841;

Returns
Type Description
ByteString

The bytes for router.

public String getSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
Type Description
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
Type Description
ByteString

The bytes for selfLink.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSharedSecret()

public String getSharedSecret()

Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.

optional string shared_secret = 381932490;

Returns
Type Description
String

The sharedSecret.

getSharedSecretBytes()

public ByteString getSharedSecretBytes()

Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.

optional string shared_secret = 381932490;

Returns
Type Description
ByteString

The bytes for sharedSecret.

getSharedSecretHash()

public String getSharedSecretHash()

Hash of the shared secret.

optional string shared_secret_hash = 398881891;

Returns
Type Description
String

The sharedSecretHash.

getSharedSecretHashBytes()

public ByteString getSharedSecretHashBytes()

Hash of the shared secret.

optional string shared_secret_hash = 398881891;

Returns
Type Description
ByteString

The bytes for sharedSecretHash.

getStatus()

public String getStatus()

[Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
Type Description
String

The status.

getStatusBytes()

public ByteString getStatusBytes()

[Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
Type Description
ByteString

The bytes for status.

getTargetVpnGateway()

public String getTargetVpnGateway()

URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This field can be set only for Classic VPN tunnels.

optional string target_vpn_gateway = 532512843;

Returns
Type Description
String

The targetVpnGateway.

getTargetVpnGatewayBytes()

public ByteString getTargetVpnGatewayBytes()

URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This field can be set only for Classic VPN tunnels.

optional string target_vpn_gateway = 532512843;

Returns
Type Description
ByteString

The bytes for targetVpnGateway.

getVpnGateway()

public String getVpnGateway()

URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.

optional string vpn_gateway = 406684153;

Returns
Type Description
String

The vpnGateway.

getVpnGatewayBytes()

public ByteString getVpnGatewayBytes()

URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.

optional string vpn_gateway = 406684153;

Returns
Type Description
ByteString

The bytes for vpnGateway.

getVpnGatewayInterface()

public int getVpnGatewayInterface()

The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: 0, 1.

optional int32 vpn_gateway_interface = 95979123;

Returns
Type Description
int

The vpnGatewayInterface.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
Type Description
boolean

Whether the description field is set.

hasDetailedStatus()

public boolean hasDetailedStatus()

[Output Only] Detailed status message for the VPN tunnel.

optional string detailed_status = 333501025;

Returns
Type Description
boolean

Whether the detailedStatus field is set.

hasId()

public boolean hasId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
Type Description
boolean

Whether the id field is set.

hasIkeVersion()

public boolean hasIkeVersion()

IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.

optional int32 ike_version = 218376220;

Returns
Type Description
boolean

Whether the ikeVersion field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.

optional string kind = 3292052;

Returns
Type Description
boolean

Whether the kind field is set.

hasLabelFingerprint()

public boolean hasLabelFingerprint()

A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnTunnel.

optional string label_fingerprint = 178124825;

Returns
Type Description
boolean

Whether the labelFingerprint field is set.

hasName()

public boolean hasName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
boolean

Whether the name field is set.

hasPeerExternalGateway()

public boolean hasPeerExternalGateway()

URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.

optional string peer_external_gateway = 384956173;

Returns
Type Description
boolean

Whether the peerExternalGateway field is set.

hasPeerExternalGatewayInterface()

public boolean hasPeerExternalGatewayInterface()

The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. Possible values are: 0, 1, 2, 3. The number of IDs in use depends on the external VPN gateway redundancy type.

optional int32 peer_external_gateway_interface = 452768391;

Returns
Type Description
boolean

Whether the peerExternalGatewayInterface field is set.

hasPeerGcpGateway()

public boolean hasPeerGcpGateway()

URL of the peer side HA VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer Google Cloud VPN gateway.

optional string peer_gcp_gateway = 281867452;

Returns
Type Description
boolean

Whether the peerGcpGateway field is set.

hasPeerIp()

public boolean hasPeerIp()

IP address of the peer VPN gateway. Only IPv4 is supported. This field can be set only for Classic VPN tunnels.

optional string peer_ip = 383249700;

Returns
Type Description
boolean

Whether the peerIp field is set.

hasRegion()

public boolean hasRegion()

[Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Returns
Type Description
boolean

Whether the region field is set.

hasRouter()

public boolean hasRouter()

URL of the router resource to be used for dynamic routing.

optional string router = 148608841;

Returns
Type Description
boolean

Whether the router field is set.

public boolean hasSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
Type Description
boolean

Whether the selfLink field is set.

hasSharedSecret()

public boolean hasSharedSecret()

Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.

optional string shared_secret = 381932490;

Returns
Type Description
boolean

Whether the sharedSecret field is set.

hasSharedSecretHash()

public boolean hasSharedSecretHash()

Hash of the shared secret.

optional string shared_secret_hash = 398881891;

Returns
Type Description
boolean

Whether the sharedSecretHash field is set.

hasStatus()

public boolean hasStatus()

[Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
Type Description
boolean

Whether the status field is set.

hasTargetVpnGateway()

public boolean hasTargetVpnGateway()

URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This field can be set only for Classic VPN tunnels.

optional string target_vpn_gateway = 532512843;

Returns
Type Description
boolean

Whether the targetVpnGateway field is set.

hasVpnGateway()

public boolean hasVpnGateway()

URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.

optional string vpn_gateway = 406684153;

Returns
Type Description
boolean

Whether the vpnGateway field is set.

hasVpnGatewayInterface()

public boolean hasVpnGatewayInterface()

The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: 0, 1.

optional int32 vpn_gateway_interface = 95979123;

Returns
Type Description
boolean

Whether the vpnGatewayInterface field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public VpnTunnel.Builder newBuilderForType()
Returns
Type Description
VpnTunnel.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected VpnTunnel.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
VpnTunnel.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public VpnTunnel.Builder toBuilder()
Returns
Type Description
VpnTunnel.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException