<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/compute/v1/compute.proto

namespace Google\Cloud\Compute\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Represents a Cloud VPN Tunnel resource. For more information about VPN, read the the Cloud VPN Overview.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.VpnTunnel</code>
 */
class VpnTunnel extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output Only] Creation timestamp in RFC3339 text format.
     *
     * Generated from protobuf field <code>optional string creation_timestamp = 30525366;</code>
     */
    private $creation_timestamp = null;
    /**
     * An optional description of this resource. Provide this property when you create the resource.
     *
     * Generated from protobuf field <code>optional string description = 422937596;</code>
     */
    private $description = null;
    /**
     * [Output Only] Detailed status message for the VPN tunnel.
     *
     * Generated from protobuf field <code>optional string detailed_status = 333501025;</code>
     */
    private $detailed_status = null;
    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     *
     * Generated from protobuf field <code>optional uint64 id = 3355;</code>
     */
    private $id = null;
    /**
     * 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.
     *
     * Generated from protobuf field <code>optional int32 ike_version = 218376220;</code>
     */
    private $ike_version = null;
    /**
     * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
     *
     * Generated from protobuf field <code>optional string kind = 3292052;</code>
     */
    private $kind = null;
    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string local_traffic_selector = 317314613;</code>
     */
    private $local_traffic_selector;
    /**
     * 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]([-a-z0-9]*[a-z0-9])?` 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.
     *
     * Generated from protobuf field <code>optional string name = 3373707;</code>
     */
    private $name = null;
    /**
     * 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.
     *
     * Generated from protobuf field <code>optional string peer_external_gateway = 384956173;</code>
     */
    private $peer_external_gateway = null;
    /**
     * 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.
     *
     * Generated from protobuf field <code>optional int32 peer_external_gateway_interface = 452768391;</code>
     */
    private $peer_external_gateway_interface = null;
    /**
     * URL of the peer side HA GCP 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 GCP VPN gateway.
     *
     * Generated from protobuf field <code>optional string peer_gcp_gateway = 281867452;</code>
     */
    private $peer_gcp_gateway = null;
    /**
     * IP address of the peer VPN gateway. Only IPv4 is supported.
     *
     * Generated from protobuf field <code>optional string peer_ip = 383249700;</code>
     */
    private $peer_ip = null;
    /**
     * [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.
     *
     * Generated from protobuf field <code>optional string region = 138946292;</code>
     */
    private $region = null;
    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string remote_traffic_selector = 358887098;</code>
     */
    private $remote_traffic_selector;
    /**
     * URL of the router resource to be used for dynamic routing.
     *
     * Generated from protobuf field <code>optional string router = 148608841;</code>
     */
    private $router = null;
    /**
     * [Output Only] Server-defined URL for the resource.
     *
     * Generated from protobuf field <code>optional string self_link = 456214797;</code>
     */
    private $self_link = null;
    /**
     * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
     *
     * Generated from protobuf field <code>optional string shared_secret = 381932490;</code>
     */
    private $shared_secret = null;
    /**
     * Hash of the shared secret.
     *
     * Generated from protobuf field <code>optional string shared_secret_hash = 398881891;</code>
     */
    private $shared_secret_hash = null;
    /**
     * [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.
     *
     * Generated from protobuf field <code>optional string status = 181260274;</code>
     */
    private $status = null;
    /**
     * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
     *
     * Generated from protobuf field <code>optional string target_vpn_gateway = 532512843;</code>
     */
    private $target_vpn_gateway = null;
    /**
     * 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.
     *
     * Generated from protobuf field <code>optional string vpn_gateway = 406684153;</code>
     */
    private $vpn_gateway = null;
    /**
     * The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.
     *
     * Generated from protobuf field <code>optional int32 vpn_gateway_interface = 95979123;</code>
     */
    private $vpn_gateway_interface = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $creation_timestamp
     *           [Output Only] Creation timestamp in RFC3339 text format.
     *     @type string $description
     *           An optional description of this resource. Provide this property when you create the resource.
     *     @type string $detailed_status
     *           [Output Only] Detailed status message for the VPN tunnel.
     *     @type int|string $id
     *           [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     *     @type int $ike_version
     *           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.
     *     @type string $kind
     *           [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $local_traffic_selector
     *           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.
     *     @type string $name
     *           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]([-a-z0-9]*[a-z0-9])?` 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.
     *     @type string $peer_external_gateway
     *           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.
     *     @type int $peer_external_gateway_interface
     *           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.
     *     @type string $peer_gcp_gateway
     *           URL of the peer side HA GCP 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 GCP VPN gateway.
     *     @type string $peer_ip
     *           IP address of the peer VPN gateway. Only IPv4 is supported.
     *     @type string $region
     *           [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.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $remote_traffic_selector
     *           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.
     *     @type string $router
     *           URL of the router resource to be used for dynamic routing.
     *     @type string $self_link
     *           [Output Only] Server-defined URL for the resource.
     *     @type string $shared_secret
     *           Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
     *     @type string $shared_secret_hash
     *           Hash of the shared secret.
     *     @type string $status
     *           [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.
     *     @type string $target_vpn_gateway
     *           URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
     *     @type string $vpn_gateway
     *           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.
     *     @type int $vpn_gateway_interface
     *           The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * [Output Only] Creation timestamp in RFC3339 text format.
     *
     * Generated from protobuf field <code>optional string creation_timestamp = 30525366;</code>
     * @return string
     */
    public function getCreationTimestamp()
    {
        return isset($this->creation_timestamp) ? $this->creation_timestamp : '';
    }

    public function hasCreationTimestamp()
    {
        return isset($this->creation_timestamp);
    }

    public function clearCreationTimestamp()
    {
        unset($this->creation_timestamp);
    }

    /**
     * [Output Only] Creation timestamp in RFC3339 text format.
     *
     * Generated from protobuf field <code>optional string creation_timestamp = 30525366;</code>
     * @param string $var
     * @return $this
     */
    public function setCreationTimestamp($var)
    {
        GPBUtil::checkString($var, True);
        $this->creation_timestamp = $var;

        return $this;
    }

    /**
     * An optional description of this resource. Provide this property when you create the resource.
     *
     * Generated from protobuf field <code>optional string description = 422937596;</code>
     * @return string
     */
    public function getDescription()
    {
        return isset($this->description) ? $this->description : '';
    }

    public function hasDescription()
    {
        return isset($this->description);
    }

    public function clearDescription()
    {
        unset($this->description);
    }

    /**
     * An optional description of this resource. Provide this property when you create the resource.
     *
     * Generated from protobuf field <code>optional string description = 422937596;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * [Output Only] Detailed status message for the VPN tunnel.
     *
     * Generated from protobuf field <code>optional string detailed_status = 333501025;</code>
     * @return string
     */
    public function getDetailedStatus()
    {
        return isset($this->detailed_status) ? $this->detailed_status : '';
    }

    public function hasDetailedStatus()
    {
        return isset($this->detailed_status);
    }

    public function clearDetailedStatus()
    {
        unset($this->detailed_status);
    }

    /**
     * [Output Only] Detailed status message for the VPN tunnel.
     *
     * Generated from protobuf field <code>optional string detailed_status = 333501025;</code>
     * @param string $var
     * @return $this
     */
    public function setDetailedStatus($var)
    {
        GPBUtil::checkString($var, True);
        $this->detailed_status = $var;

        return $this;
    }

    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     *
     * Generated from protobuf field <code>optional uint64 id = 3355;</code>
     * @return int|string
     */
    public function getId()
    {
        return isset($this->id) ? $this->id : 0;
    }

    public function hasId()
    {
        return isset($this->id);
    }

    public function clearId()
    {
        unset($this->id);
    }

    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     *
     * Generated from protobuf field <code>optional uint64 id = 3355;</code>
     * @param int|string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkUint64($var);
        $this->id = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>optional int32 ike_version = 218376220;</code>
     * @return int
     */
    public function getIkeVersion()
    {
        return isset($this->ike_version) ? $this->ike_version : 0;
    }

    public function hasIkeVersion()
    {
        return isset($this->ike_version);
    }

    public function clearIkeVersion()
    {
        unset($this->ike_version);
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>optional int32 ike_version = 218376220;</code>
     * @param int $var
     * @return $this
     */
    public function setIkeVersion($var)
    {
        GPBUtil::checkInt32($var);
        $this->ike_version = $var;

        return $this;
    }

    /**
     * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
     *
     * Generated from protobuf field <code>optional string kind = 3292052;</code>
     * @return string
     */
    public function getKind()
    {
        return isset($this->kind) ? $this->kind : '';
    }

    public function hasKind()
    {
        return isset($this->kind);
    }

    public function clearKind()
    {
        unset($this->kind);
    }

    /**
     * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
     *
     * Generated from protobuf field <code>optional string kind = 3292052;</code>
     * @param string $var
     * @return $this
     */
    public function setKind($var)
    {
        GPBUtil::checkString($var, True);
        $this->kind = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string local_traffic_selector = 317314613;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLocalTrafficSelector()
    {
        return $this->local_traffic_selector;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string local_traffic_selector = 317314613;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLocalTrafficSelector($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->local_traffic_selector = $arr;

        return $this;
    }

    /**
     * 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]([-a-z0-9]*[a-z0-9])?` 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.
     *
     * Generated from protobuf field <code>optional string name = 3373707;</code>
     * @return string
     */
    public function getName()
    {
        return isset($this->name) ? $this->name : '';
    }

    public function hasName()
    {
        return isset($this->name);
    }

    public function clearName()
    {
        unset($this->name);
    }

    /**
     * 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]([-a-z0-9]*[a-z0-9])?` 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.
     *
     * Generated from protobuf field <code>optional string name = 3373707;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>optional string peer_external_gateway = 384956173;</code>
     * @return string
     */
    public function getPeerExternalGateway()
    {
        return isset($this->peer_external_gateway) ? $this->peer_external_gateway : '';
    }

    public function hasPeerExternalGateway()
    {
        return isset($this->peer_external_gateway);
    }

    public function clearPeerExternalGateway()
    {
        unset($this->peer_external_gateway);
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>optional string peer_external_gateway = 384956173;</code>
     * @param string $var
     * @return $this
     */
    public function setPeerExternalGateway($var)
    {
        GPBUtil::checkString($var, True);
        $this->peer_external_gateway = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>optional int32 peer_external_gateway_interface = 452768391;</code>
     * @return int
     */
    public function getPeerExternalGatewayInterface()
    {
        return isset($this->peer_external_gateway_interface) ? $this->peer_external_gateway_interface : 0;
    }

    public function hasPeerExternalGatewayInterface()
    {
        return isset($this->peer_external_gateway_interface);
    }

    public function clearPeerExternalGatewayInterface()
    {
        unset($this->peer_external_gateway_interface);
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>optional int32 peer_external_gateway_interface = 452768391;</code>
     * @param int $var
     * @return $this
     */
    public function setPeerExternalGatewayInterface($var)
    {
        GPBUtil::checkInt32($var);
        $this->peer_external_gateway_interface = $var;

        return $this;
    }

    /**
     * URL of the peer side HA GCP 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 GCP VPN gateway.
     *
     * Generated from protobuf field <code>optional string peer_gcp_gateway = 281867452;</code>
     * @return string
     */
    public function getPeerGcpGateway()
    {
        return isset($this->peer_gcp_gateway) ? $this->peer_gcp_gateway : '';
    }

    public function hasPeerGcpGateway()
    {
        return isset($this->peer_gcp_gateway);
    }

    public function clearPeerGcpGateway()
    {
        unset($this->peer_gcp_gateway);
    }

    /**
     * URL of the peer side HA GCP 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 GCP VPN gateway.
     *
     * Generated from protobuf field <code>optional string peer_gcp_gateway = 281867452;</code>
     * @param string $var
     * @return $this
     */
    public function setPeerGcpGateway($var)
    {
        GPBUtil::checkString($var, True);
        $this->peer_gcp_gateway = $var;

        return $this;
    }

    /**
     * IP address of the peer VPN gateway. Only IPv4 is supported.
     *
     * Generated from protobuf field <code>optional string peer_ip = 383249700;</code>
     * @return string
     */
    public function getPeerIp()
    {
        return isset($this->peer_ip) ? $this->peer_ip : '';
    }

    public function hasPeerIp()
    {
        return isset($this->peer_ip);
    }

    public function clearPeerIp()
    {
        unset($this->peer_ip);
    }

    /**
     * IP address of the peer VPN gateway. Only IPv4 is supported.
     *
     * Generated from protobuf field <code>optional string peer_ip = 383249700;</code>
     * @param string $var
     * @return $this
     */
    public function setPeerIp($var)
    {
        GPBUtil::checkString($var, True);
        $this->peer_ip = $var;

        return $this;
    }

    /**
     * [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.
     *
     * Generated from protobuf field <code>optional string region = 138946292;</code>
     * @return string
     */
    public function getRegion()
    {
        return isset($this->region) ? $this->region : '';
    }

    public function hasRegion()
    {
        return isset($this->region);
    }

    public function clearRegion()
    {
        unset($this->region);
    }

    /**
     * [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.
     *
     * Generated from protobuf field <code>optional string region = 138946292;</code>
     * @param string $var
     * @return $this
     */
    public function setRegion($var)
    {
        GPBUtil::checkString($var, True);
        $this->region = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string remote_traffic_selector = 358887098;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRemoteTrafficSelector()
    {
        return $this->remote_traffic_selector;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string remote_traffic_selector = 358887098;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRemoteTrafficSelector($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->remote_traffic_selector = $arr;

        return $this;
    }

    /**
     * URL of the router resource to be used for dynamic routing.
     *
     * Generated from protobuf field <code>optional string router = 148608841;</code>
     * @return string
     */
    public function getRouter()
    {
        return isset($this->router) ? $this->router : '';
    }

    public function hasRouter()
    {
        return isset($this->router);
    }

    public function clearRouter()
    {
        unset($this->router);
    }

    /**
     * URL of the router resource to be used for dynamic routing.
     *
     * Generated from protobuf field <code>optional string router = 148608841;</code>
     * @param string $var
     * @return $this
     */
    public function setRouter($var)
    {
        GPBUtil::checkString($var, True);
        $this->router = $var;

        return $this;
    }

    /**
     * [Output Only] Server-defined URL for the resource.
     *
     * Generated from protobuf field <code>optional string self_link = 456214797;</code>
     * @return string
     */
    public function getSelfLink()
    {
        return isset($this->self_link) ? $this->self_link : '';
    }

    public function hasSelfLink()
    {
        return isset($this->self_link);
    }

    public function clearSelfLink()
    {
        unset($this->self_link);
    }

    /**
     * [Output Only] Server-defined URL for the resource.
     *
     * Generated from protobuf field <code>optional string self_link = 456214797;</code>
     * @param string $var
     * @return $this
     */
    public function setSelfLink($var)
    {
        GPBUtil::checkString($var, True);
        $this->self_link = $var;

        return $this;
    }

    /**
     * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
     *
     * Generated from protobuf field <code>optional string shared_secret = 381932490;</code>
     * @return string
     */
    public function getSharedSecret()
    {
        return isset($this->shared_secret) ? $this->shared_secret : '';
    }

    public function hasSharedSecret()
    {
        return isset($this->shared_secret);
    }

    public function clearSharedSecret()
    {
        unset($this->shared_secret);
    }

    /**
     * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
     *
     * Generated from protobuf field <code>optional string shared_secret = 381932490;</code>
     * @param string $var
     * @return $this
     */
    public function setSharedSecret($var)
    {
        GPBUtil::checkString($var, True);
        $this->shared_secret = $var;

        return $this;
    }

    /**
     * Hash of the shared secret.
     *
     * Generated from protobuf field <code>optional string shared_secret_hash = 398881891;</code>
     * @return string
     */
    public function getSharedSecretHash()
    {
        return isset($this->shared_secret_hash) ? $this->shared_secret_hash : '';
    }

    public function hasSharedSecretHash()
    {
        return isset($this->shared_secret_hash);
    }

    public function clearSharedSecretHash()
    {
        unset($this->shared_secret_hash);
    }

    /**
     * Hash of the shared secret.
     *
     * Generated from protobuf field <code>optional string shared_secret_hash = 398881891;</code>
     * @param string $var
     * @return $this
     */
    public function setSharedSecretHash($var)
    {
        GPBUtil::checkString($var, True);
        $this->shared_secret_hash = $var;

        return $this;
    }

    /**
     * [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.
     *
     * Generated from protobuf field <code>optional string status = 181260274;</code>
     * @return string
     */
    public function getStatus()
    {
        return isset($this->status) ? $this->status : '';
    }

    public function hasStatus()
    {
        return isset($this->status);
    }

    public function clearStatus()
    {
        unset($this->status);
    }

    /**
     * [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.
     *
     * Generated from protobuf field <code>optional string status = 181260274;</code>
     * @param string $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkString($var, True);
        $this->status = $var;

        return $this;
    }

    /**
     * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
     *
     * Generated from protobuf field <code>optional string target_vpn_gateway = 532512843;</code>
     * @return string
     */
    public function getTargetVpnGateway()
    {
        return isset($this->target_vpn_gateway) ? $this->target_vpn_gateway : '';
    }

    public function hasTargetVpnGateway()
    {
        return isset($this->target_vpn_gateway);
    }

    public function clearTargetVpnGateway()
    {
        unset($this->target_vpn_gateway);
    }

    /**
     * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
     *
     * Generated from protobuf field <code>optional string target_vpn_gateway = 532512843;</code>
     * @param string $var
     * @return $this
     */
    public function setTargetVpnGateway($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_vpn_gateway = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>optional string vpn_gateway = 406684153;</code>
     * @return string
     */
    public function getVpnGateway()
    {
        return isset($this->vpn_gateway) ? $this->vpn_gateway : '';
    }

    public function hasVpnGateway()
    {
        return isset($this->vpn_gateway);
    }

    public function clearVpnGateway()
    {
        unset($this->vpn_gateway);
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>optional string vpn_gateway = 406684153;</code>
     * @param string $var
     * @return $this
     */
    public function setVpnGateway($var)
    {
        GPBUtil::checkString($var, True);
        $this->vpn_gateway = $var;

        return $this;
    }

    /**
     * The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.
     *
     * Generated from protobuf field <code>optional int32 vpn_gateway_interface = 95979123;</code>
     * @return int
     */
    public function getVpnGatewayInterface()
    {
        return isset($this->vpn_gateway_interface) ? $this->vpn_gateway_interface : 0;
    }

    public function hasVpnGatewayInterface()
    {
        return isset($this->vpn_gateway_interface);
    }

    public function clearVpnGatewayInterface()
    {
        unset($this->vpn_gateway_interface);
    }

    /**
     * The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.
     *
     * Generated from protobuf field <code>optional int32 vpn_gateway_interface = 95979123;</code>
     * @param int $var
     * @return $this
     */
    public function setVpnGatewayInterface($var)
    {
        GPBUtil::checkInt32($var);
        $this->vpn_gateway_interface = $var;

        return $this;
    }

}

