Class VpnTunnel.Builder (1.91.0)

public static final class VpnTunnel.Builder extends GeneratedMessageV3.Builder<VpnTunnel.Builder> 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 Methods

getDescriptor()

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

Methods

addAllLocalTrafficSelector(Iterable<String> values)

public VpnTunnel.Builder addAllLocalTrafficSelector(Iterable<String> values)

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
values Iterable<String>

The localTrafficSelector to add.

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

addAllRemoteTrafficSelector(Iterable<String> values)

public VpnTunnel.Builder addAllRemoteTrafficSelector(Iterable<String> values)

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
values Iterable<String>

The remoteTrafficSelector to add.

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

addLocalTrafficSelector(String value)

public VpnTunnel.Builder addLocalTrafficSelector(String value)

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
value String

The localTrafficSelector to add.

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

addLocalTrafficSelectorBytes(ByteString value)

public VpnTunnel.Builder addLocalTrafficSelectorBytes(ByteString value)

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
value ByteString

The bytes of the localTrafficSelector to add.

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

addRemoteTrafficSelector(String value)

public VpnTunnel.Builder addRemoteTrafficSelector(String value)

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
value String

The remoteTrafficSelector to add.

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

addRemoteTrafficSelectorBytes(ByteString value)

public VpnTunnel.Builder addRemoteTrafficSelectorBytes(ByteString value)

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
value ByteString

The bytes of the remoteTrafficSelector to add.

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public VpnTunnel.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
VpnTunnel.Builder
Overrides

build()

public VpnTunnel build()
Returns
Type Description
VpnTunnel

buildPartial()

public VpnTunnel buildPartial()
Returns
Type Description
VpnTunnel

clear()

public VpnTunnel.Builder clear()
Returns
Type Description
VpnTunnel.Builder
Overrides

clearCipherSuite()

public VpnTunnel.Builder clearCipherSuite()

User specified list of ciphers to use for the phase 1 and phase 2 of the IKE protocol.

optional .google.cloud.compute.v1.VpnTunnelCipherSuite cipher_suite = 443788228;

Returns
Type Description
VpnTunnel.Builder

clearCreationTimestamp()

public VpnTunnel.Builder clearCreationTimestamp()

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

clearDescription()

public VpnTunnel.Builder clearDescription()

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

optional string description = 422937596;

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

clearDetailedStatus()

public VpnTunnel.Builder clearDetailedStatus()

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

optional string detailed_status = 333501025;

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public VpnTunnel.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
VpnTunnel.Builder
Overrides

clearId()

public VpnTunnel.Builder clearId()

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

optional uint64 id = 3355;

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

clearIkeVersion()

public VpnTunnel.Builder clearIkeVersion()

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
VpnTunnel.Builder

This builder for chaining.

clearKind()

public VpnTunnel.Builder clearKind()

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

optional string kind = 3292052;

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

clearLabelFingerprint()

public VpnTunnel.Builder clearLabelFingerprint()

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 error412 conditionNotMet.

To see the latest fingerprint, make a get() request to retrieve a VpnTunnel.

optional string label_fingerprint = 178124825;

Returns
Type Description
VpnTunnel.Builder

This builder for chaining.

clearLabels()

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

clearLocalTrafficSelector()

public VpnTunnel.Builder clearLocalTrafficSelector()

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
VpnTunnel.Builder

This builder for chaining.

clearName()

public VpnTunnel.Builder clearName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. 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
VpnTunnel.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public VpnTunnel.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
VpnTunnel.Builder
Overrides

clearPeerExternalGateway()

public VpnTunnel.Builder clearPeerExternalGateway()

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
VpnTunnel.Builder

This builder for chaining.

clearPeerExternalGatewayInterface()

public VpnTunnel.Builder clearPeerExternalGatewayInterface()

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
VpnTunnel.Builder

This builder for chaining.

clearPeerGcpGateway()

public VpnTunnel.Builder clearPeerGcpGateway()

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
VpnTunnel.Builder

This builder for chaining.

clearPeerIp()

public VpnTunnel.Builder clearPeerIp()

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
VpnTunnel.Builder

This builder for chaining.

clearRegion()

public VpnTunnel.Builder clearRegion()

[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
VpnTunnel.Builder

This builder for chaining.

clearRemoteTrafficSelector()

public VpnTunnel.Builder clearRemoteTrafficSelector()

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;