<?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;

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.RouterInterface</code>
 */
class RouterInterface extends \Google\Protobuf\Internal\Message
{
    /**
     * IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
     *
     * Generated from protobuf field <code>optional string ip_range = 145092645;</code>
     */
    private $ip_range = null;
    /**
     * URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
     *
     * Generated from protobuf field <code>optional string linked_interconnect_attachment = 501085518;</code>
     */
    private $linked_interconnect_attachment = null;
    /**
     * URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
     *
     * Generated from protobuf field <code>optional string linked_vpn_tunnel = 352296953;</code>
     */
    private $linked_vpn_tunnel = null;
    /**
     * [Output Only] The resource that configures and manages this interface. - MANAGED_BY_USER is the default value and can be managed directly by users. - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
     * Check the ManagementType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string management_type = 173703606;</code>
     */
    private $management_type = null;
    /**
     * Name of this interface entry. 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;
    /**
     * The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
     *
     * Generated from protobuf field <code>optional string private_ip_address = 100854040;</code>
     */
    private $private_ip_address = null;
    /**
     * Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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 redundant_interface = 523187303;</code>
     */
    private $redundant_interface = null;
    /**
     * The URI of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
     *
     * Generated from protobuf field <code>optional string subnetwork = 307827694;</code>
     */
    private $subnetwork = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $ip_range
     *           IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
     *     @type string $linked_interconnect_attachment
     *           URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
     *     @type string $linked_vpn_tunnel
     *           URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
     *     @type string $management_type
     *           [Output Only] The resource that configures and manages this interface. - MANAGED_BY_USER is the default value and can be managed directly by users. - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
     *           Check the ManagementType enum for the list of possible values.
     *     @type string $name
     *           Name of this interface entry. 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 $private_ip_address
     *           The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
     *     @type string $redundant_interface
     *           Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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 $subnetwork
     *           The URI of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
     *
     * Generated from protobuf field <code>optional string ip_range = 145092645;</code>
     * @return string
     */
    public function getIpRange()
    {
        return isset($this->ip_range) ? $this->ip_range : '';
    }

    public function hasIpRange()
    {
        return isset($this->ip_range);
    }

    public function clearIpRange()
    {
        unset($this->ip_range);
    }

    /**
     * IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface.
     *
     * Generated from protobuf field <code>optional string ip_range = 145092645;</code>
     * @param string $var
     * @return $this
     */
    public function setIpRange($var)
    {
        GPBUtil::checkString($var, True);
        $this->ip_range = $var;

        return $this;
    }

    /**
     * URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
     *
     * Generated from protobuf field <code>optional string linked_interconnect_attachment = 501085518;</code>
     * @return string
     */
    public function getLinkedInterconnectAttachment()
    {
        return isset($this->linked_interconnect_attachment) ? $this->linked_interconnect_attachment : '';
    }

    public function hasLinkedInterconnectAttachment()
    {
        return isset($this->linked_interconnect_attachment);
    }

    public function clearLinkedInterconnectAttachment()
    {
        unset($this->linked_interconnect_attachment);
    }

    /**
     * URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
     *
     * Generated from protobuf field <code>optional string linked_interconnect_attachment = 501085518;</code>
     * @param string $var
     * @return $this
     */
    public function setLinkedInterconnectAttachment($var)
    {
        GPBUtil::checkString($var, True);
        $this->linked_interconnect_attachment = $var;

        return $this;
    }

    /**
     * URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
     *
     * Generated from protobuf field <code>optional string linked_vpn_tunnel = 352296953;</code>
     * @return string
     */
    public function getLinkedVpnTunnel()
    {
        return isset($this->linked_vpn_tunnel) ? $this->linked_vpn_tunnel : '';
    }

    public function hasLinkedVpnTunnel()
    {
        return isset($this->linked_vpn_tunnel);
    }

    public function clearLinkedVpnTunnel()
    {
        unset($this->linked_vpn_tunnel);
    }

    /**
     * URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.
     *
     * Generated from protobuf field <code>optional string linked_vpn_tunnel = 352296953;</code>
     * @param string $var
     * @return $this
     */
    public function setLinkedVpnTunnel($var)
    {
        GPBUtil::checkString($var, True);
        $this->linked_vpn_tunnel = $var;

        return $this;
    }

    /**
     * [Output Only] The resource that configures and manages this interface. - MANAGED_BY_USER is the default value and can be managed directly by users. - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
     * Check the ManagementType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string management_type = 173703606;</code>
     * @return string
     */
    public function getManagementType()
    {
        return isset($this->management_type) ? $this->management_type : '';
    }

    public function hasManagementType()
    {
        return isset($this->management_type);
    }

    public function clearManagementType()
    {
        unset($this->management_type);
    }

    /**
     * [Output Only] The resource that configures and manages this interface. - MANAGED_BY_USER is the default value and can be managed directly by users. - MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
     * Check the ManagementType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string management_type = 173703606;</code>
     * @param string $var
     * @return $this
     */
    public function setManagementType($var)
    {
        GPBUtil::checkString($var, True);
        $this->management_type = $var;

        return $this;
    }

    /**
     * Name of this interface entry. 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 this interface entry. 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;
    }

    /**
     * The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
     *
     * Generated from protobuf field <code>optional string private_ip_address = 100854040;</code>
     * @return string
     */
    public function getPrivateIpAddress()
    {
        return isset($this->private_ip_address) ? $this->private_ip_address : '';
    }

    public function hasPrivateIpAddress()
    {
        return isset($this->private_ip_address);
    }

    public function clearPrivateIpAddress()
    {
        unset($this->private_ip_address);
    }

    /**
     * The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
     *
     * Generated from protobuf field <code>optional string private_ip_address = 100854040;</code>
     * @param string $var
     * @return $this
     */
    public function setPrivateIpAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->private_ip_address = $var;

        return $this;
    }

    /**
     * Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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 redundant_interface = 523187303;</code>
     * @return string
     */
    public function getRedundantInterface()
    {
        return isset($this->redundant_interface) ? $this->redundant_interface : '';
    }

    public function hasRedundantInterface()
    {
        return isset($this->redundant_interface);
    }

    public function clearRedundantInterface()
    {
        unset($this->redundant_interface);
    }

    /**
     * Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface 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 redundant_interface = 523187303;</code>
     * @param string $var
     * @return $this
     */
    public function setRedundantInterface($var)
    {
        GPBUtil::checkString($var, True);
        $this->redundant_interface = $var;

        return $this;
    }

    /**
     * The URI of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
     *
     * Generated from protobuf field <code>optional string subnetwork = 307827694;</code>
     * @return string
     */
    public function getSubnetwork()
    {
        return isset($this->subnetwork) ? $this->subnetwork : '';
    }

    public function hasSubnetwork()
    {
        return isset($this->subnetwork);
    }

    public function clearSubnetwork()
    {
        unset($this->subnetwork);
    }

    /**
     * The URI of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
     *
     * Generated from protobuf field <code>optional string subnetwork = 307827694;</code>
     * @param string $var
     * @return $this
     */
    public function setSubnetwork($var)
    {
        GPBUtil::checkString($var, True);
        $this->subnetwork = $var;

        return $this;
    }

}

