<?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>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>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>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.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.RouterInterface.ManagementType 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>string name = 3373707;</code>
     */
    private $name = 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 int $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.
     *     @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.
     * }
     */
    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>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>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>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>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>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>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.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.RouterInterface.ManagementType management_type = 173703606;</code>
     * @return int
     */
    public function getManagementType()
    {
        return isset($this->management_type) ? $this->management_type : 0;
    }

    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.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.RouterInterface.ManagementType management_type = 173703606;</code>
     * @param int $var
     * @return $this
     */
    public function setManagementType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Compute\V1\RouterInterface\ManagementType::class);
        $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>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>string name = 3373707;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}

