<?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 Route resource.
 * A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.Route</code>
 */
class Route extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output Only] Creation timestamp in RFC3339 text format.
     *
     * Generated from protobuf field <code>string creation_timestamp = 30525366;</code>
     */
    private $creation_timestamp = '';
    /**
     * An optional description of this resource. Provide this field when you create the resource.
     *
     * Generated from protobuf field <code>string description = 154502140;</code>
     */
    private $description = '';
    /**
     * The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.
     *
     * Generated from protobuf field <code>string dest_range = 112892256;</code>
     */
    private $dest_range = '';
    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     *
     * Generated from protobuf field <code>string id = 3355;</code>
     */
    private $id = '';
    /**
     * [Output Only] Type of this resource. Always compute#routes for Route resources.
     *
     * Generated from protobuf field <code>string kind = 3292052;</code>
     */
    private $kind = '';
    /**
     * 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
     *
     * Generated from protobuf field <code>string name = 3373707;</code>
     */
    private $name = '';
    /**
     * Fully-qualified URL of the network that this route applies to.
     *
     * Generated from protobuf field <code>string network = 232872494;</code>
     */
    private $network = '';
    /**
     * The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL:  projects/project/global/gateways/default-internet-gateway
     *
     * Generated from protobuf field <code>string next_hop_gateway = 108739842;</code>
     */
    private $next_hop_gateway = '';
    /**
     * The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
     * - 10.128.0.56
     * - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
     * - regions/region/forwardingRules/forwardingRule
     *
     * Generated from protobuf field <code>string next_hop_ilb = 198679901;</code>
     */
    private $next_hop_ilb = '';
    /**
     * The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
     * https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
     *
     * Generated from protobuf field <code>string next_hop_instance = 125072791;</code>
     */
    private $next_hop_instance = '';
    /**
     * The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
     *
     * Generated from protobuf field <code>string next_hop_ip = 110319529;</code>
     */
    private $next_hop_ip = '';
    /**
     * The URL of the local network if it should handle matching packets.
     *
     * Generated from protobuf field <code>string next_hop_network = 262295788;</code>
     */
    private $next_hop_network = '';
    /**
     * [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
     *
     * Generated from protobuf field <code>string next_hop_peering = 144247294;</code>
     */
    private $next_hop_peering = '';
    /**
     * The URL to a VpnTunnel that should handle matching packets.
     *
     * Generated from protobuf field <code>string next_hop_vpn_tunnel = 251409045;</code>
     */
    private $next_hop_vpn_tunnel = '';
    /**
     * The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive.
     *
     * Generated from protobuf field <code>uint32 priority = 176716196;</code>
     */
    private $priority = 0;
    /**
     * [Output Only] Server-defined fully-qualified URL for this resource.
     *
     * Generated from protobuf field <code>string self_link = 187779341;</code>
     */
    private $self_link = '';
    /**
     * A list of instance tags to which this route applies.
     *
     * Generated from protobuf field <code>repeated string tags = 3552281;</code>
     */
    private $tags;
    /**
     * [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.Warnings warnings = 229655639;</code>
     */
    private $warnings;

    /**
     * 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 field when you create the resource.
     *     @type string $dest_range
     *           The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.
     *     @type string $id
     *           [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     *     @type string $kind
     *           [Output Only] Type of this resource. Always compute#routes for Route resources.
     *     @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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
     *     @type string $network
     *           Fully-qualified URL of the network that this route applies to.
     *     @type string $next_hop_gateway
     *           The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL:  projects/project/global/gateways/default-internet-gateway
     *     @type string $next_hop_ilb
     *           The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
     *           - 10.128.0.56
     *           - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
     *           - regions/region/forwardingRules/forwardingRule
     *     @type string $next_hop_instance
     *           The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
     *           https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
     *     @type string $next_hop_ip
     *           The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
     *     @type string $next_hop_network
     *           The URL of the local network if it should handle matching packets.
     *     @type string $next_hop_peering
     *           [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
     *     @type string $next_hop_vpn_tunnel
     *           The URL to a VpnTunnel that should handle matching packets.
     *     @type int $priority
     *           The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive.
     *     @type string $self_link
     *           [Output Only] Server-defined fully-qualified URL for this resource.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $tags
     *           A list of instance tags to which this route applies.
     *     @type \Google\Cloud\Compute\V1\Warnings[]|\Google\Protobuf\Internal\RepeatedField $warnings
     *           [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
     * }
     */
    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>string creation_timestamp = 30525366;</code>
     * @return string
     */
    public function getCreationTimestamp()
    {
        return $this->creation_timestamp;
    }

    /**
     * [Output Only] Creation timestamp in RFC3339 text format.
     *
     * Generated from protobuf field <code>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 field when you create the resource.
     *
     * Generated from protobuf field <code>string description = 154502140;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

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

        return $this;
    }

    /**
     * The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.
     *
     * Generated from protobuf field <code>string dest_range = 112892256;</code>
     * @return string
     */
    public function getDestRange()
    {
        return $this->dest_range;
    }

    /**
     * The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.
     *
     * Generated from protobuf field <code>string dest_range = 112892256;</code>
     * @param string $var
     * @return $this
     */
    public function setDestRange($var)
    {
        GPBUtil::checkString($var, True);
        $this->dest_range = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * [Output Only] Type of this resource. Always compute#routes for Route resources.
     *
     * Generated from protobuf field <code>string kind = 3292052;</code>
     * @return string
     */
    public function getKind()
    {
        return $this->kind;
    }

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

        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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
     *
     * Generated from protobuf field <code>string name = 3373707;</code>
     * @return string
     */
    public function getName()
    {
        return $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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
     *
     * 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;
    }

    /**
     * Fully-qualified URL of the network that this route applies to.
     *
     * Generated from protobuf field <code>string network = 232872494;</code>
     * @return string
     */
    public function getNetwork()
    {
        return $this->network;
    }

    /**
     * Fully-qualified URL of the network that this route applies to.
     *
     * Generated from protobuf field <code>string network = 232872494;</code>
     * @param string $var
     * @return $this
     */
    public function setNetwork($var)
    {
        GPBUtil::checkString($var, True);
        $this->network = $var;

        return $this;
    }

    /**
     * The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL:  projects/project/global/gateways/default-internet-gateway
     *
     * Generated from protobuf field <code>string next_hop_gateway = 108739842;</code>
     * @return string
     */
    public function getNextHopGateway()
    {
        return $this->next_hop_gateway;
    }

    /**
     * The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL:  projects/project/global/gateways/default-internet-gateway
     *
     * Generated from protobuf field <code>string next_hop_gateway = 108739842;</code>
     * @param string $var
     * @return $this
     */
    public function setNextHopGateway($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_hop_gateway = $var;

        return $this;
    }

    /**
     * The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
     * - 10.128.0.56
     * - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
     * - regions/region/forwardingRules/forwardingRule
     *
     * Generated from protobuf field <code>string next_hop_ilb = 198679901;</code>
     * @return string
     */
    public function getNextHopIlb()
    {
        return $this->next_hop_ilb;
    }

    /**
     * The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
     * - 10.128.0.56
     * - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule
     * - regions/region/forwardingRules/forwardingRule
     *
     * Generated from protobuf field <code>string next_hop_ilb = 198679901;</code>
     * @param string $var
     * @return $this
     */
    public function setNextHopIlb($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_hop_ilb = $var;

        return $this;
    }

    /**
     * The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
     * https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
     *
     * Generated from protobuf field <code>string next_hop_instance = 125072791;</code>
     * @return string
     */
    public function getNextHopInstance()
    {
        return $this->next_hop_instance;
    }

    /**
     * The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
     * https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
     *
     * Generated from protobuf field <code>string next_hop_instance = 125072791;</code>
     * @param string $var
     * @return $this
     */
    public function setNextHopInstance($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_hop_instance = $var;

        return $this;
    }

    /**
     * The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
     *
     * Generated from protobuf field <code>string next_hop_ip = 110319529;</code>
     * @return string
     */
    public function getNextHopIp()
    {
        return $this->next_hop_ip;
    }

    /**
     * The network IP address of an instance that should handle matching packets. Only IPv4 is supported.
     *
     * Generated from protobuf field <code>string next_hop_ip = 110319529;</code>
     * @param string $var
     * @return $this
     */
    public function setNextHopIp($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_hop_ip = $var;

        return $this;
    }

    /**
     * The URL of the local network if it should handle matching packets.
     *
     * Generated from protobuf field <code>string next_hop_network = 262295788;</code>
     * @return string
     */
    public function getNextHopNetwork()
    {
        return $this->next_hop_network;
    }

    /**
     * The URL of the local network if it should handle matching packets.
     *
     * Generated from protobuf field <code>string next_hop_network = 262295788;</code>
     * @param string $var
     * @return $this
     */
    public function setNextHopNetwork($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_hop_network = $var;

        return $this;
    }

    /**
     * [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
     *
     * Generated from protobuf field <code>string next_hop_peering = 144247294;</code>
     * @return string
     */
    public function getNextHopPeering()
    {
        return $this->next_hop_peering;
    }

    /**
     * [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
     *
     * Generated from protobuf field <code>string next_hop_peering = 144247294;</code>
     * @param string $var
     * @return $this
     */
    public function setNextHopPeering($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_hop_peering = $var;

        return $this;
    }

    /**
     * The URL to a VpnTunnel that should handle matching packets.
     *
     * Generated from protobuf field <code>string next_hop_vpn_tunnel = 251409045;</code>
     * @return string
     */
    public function getNextHopVpnTunnel()
    {
        return $this->next_hop_vpn_tunnel;
    }

    /**
     * The URL to a VpnTunnel that should handle matching packets.
     *
     * Generated from protobuf field <code>string next_hop_vpn_tunnel = 251409045;</code>
     * @param string $var
     * @return $this
     */
    public function setNextHopVpnTunnel($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_hop_vpn_tunnel = $var;

        return $this;
    }

    /**
     * The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive.
     *
     * Generated from protobuf field <code>uint32 priority = 176716196;</code>
     * @return int
     */
    public function getPriority()
    {
        return $this->priority;
    }

    /**
     * The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive.
     *
     * Generated from protobuf field <code>uint32 priority = 176716196;</code>
     * @param int $var
     * @return $this
     */
    public function setPriority($var)
    {
        GPBUtil::checkUint32($var);
        $this->priority = $var;

        return $this;
    }

    /**
     * [Output Only] Server-defined fully-qualified URL for this resource.
     *
     * Generated from protobuf field <code>string self_link = 187779341;</code>
     * @return string
     */
    public function getSelfLink()
    {
        return $this->self_link;
    }

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

        return $this;
    }

    /**
     * A list of instance tags to which this route applies.
     *
     * Generated from protobuf field <code>repeated string tags = 3552281;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * A list of instance tags to which this route applies.
     *
     * Generated from protobuf field <code>repeated string tags = 3552281;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->tags = $arr;

        return $this;
    }

    /**
     * [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.Warnings warnings = 229655639;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getWarnings()
    {
        return $this->warnings;
    }

    /**
     * [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.Warnings warnings = 229655639;</code>
     * @param \Google\Cloud\Compute\V1\Warnings[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setWarnings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\Warnings::class);
        $this->warnings = $arr;

        return $this;
    }

}

