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

namespace Google\Cloud\NetworkManagement\V1;

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

/**
 * For display only. Metadata associated with a Compute Engine route.
 *
 * Generated from protobuf message <code>google.cloud.networkmanagement.v1.RouteInfo</code>
 */
class RouteInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Type of route.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8;</code>
     */
    private $route_type = 0;
    /**
     * Type of next hop.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9;</code>
     */
    private $next_hop_type = 0;
    /**
     * Name of a Compute Engine route.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     */
    private $display_name = '';
    /**
     * URI of a Compute Engine route.
     * Dynamic route from cloud router does not have a URI.
     * Advertised route from Google Cloud VPC to on-premises network also does
     * not have a URI.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     */
    private $uri = '';
    /**
     * Destination IP range of the route.
     *
     * Generated from protobuf field <code>string dest_ip_range = 3;</code>
     */
    private $dest_ip_range = '';
    /**
     * Next hop of the route.
     *
     * Generated from protobuf field <code>string next_hop = 4;</code>
     */
    private $next_hop = '';
    /**
     * URI of a Compute Engine network.
     *
     * Generated from protobuf field <code>string network_uri = 5;</code>
     */
    private $network_uri = '';
    /**
     * Priority of the route.
     *
     * Generated from protobuf field <code>int32 priority = 6;</code>
     */
    private $priority = 0;
    /**
     * Instance tags of the route.
     *
     * Generated from protobuf field <code>repeated string instance_tags = 7;</code>
     */
    private $instance_tags;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $route_type
     *           Type of route.
     *     @type int $next_hop_type
     *           Type of next hop.
     *     @type string $display_name
     *           Name of a Compute Engine route.
     *     @type string $uri
     *           URI of a Compute Engine route.
     *           Dynamic route from cloud router does not have a URI.
     *           Advertised route from Google Cloud VPC to on-premises network also does
     *           not have a URI.
     *     @type string $dest_ip_range
     *           Destination IP range of the route.
     *     @type string $next_hop
     *           Next hop of the route.
     *     @type string $network_uri
     *           URI of a Compute Engine network.
     *     @type int $priority
     *           Priority of the route.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $instance_tags
     *           Instance tags of the route.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce();
        parent::__construct($data);
    }

    /**
     * Type of route.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8;</code>
     * @return int
     */
    public function getRouteType()
    {
        return $this->route_type;
    }

    /**
     * Type of route.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setRouteType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\RouteType::class);
        $this->route_type = $var;

        return $this;
    }

    /**
     * Type of next hop.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9;</code>
     * @return int
     */
    public function getNextHopType()
    {
        return $this->next_hop_type;
    }

    /**
     * Type of next hop.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setNextHopType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\NextHopType::class);
        $this->next_hop_type = $var;

        return $this;
    }

    /**
     * Name of a Compute Engine route.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Name of a Compute Engine route.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * URI of a Compute Engine route.
     * Dynamic route from cloud router does not have a URI.
     * Advertised route from Google Cloud VPC to on-premises network also does
     * not have a URI.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     * @return string
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * URI of a Compute Engine route.
     * Dynamic route from cloud router does not have a URI.
     * Advertised route from Google Cloud VPC to on-premises network also does
     * not have a URI.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri = $var;

        return $this;
    }

    /**
     * Destination IP range of the route.
     *
     * Generated from protobuf field <code>string dest_ip_range = 3;</code>
     * @return string
     */
    public function getDestIpRange()
    {
        return $this->dest_ip_range;
    }

    /**
     * Destination IP range of the route.
     *
     * Generated from protobuf field <code>string dest_ip_range = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDestIpRange($var)
    {
        GPBUtil::checkString($var, True);
        $this->dest_ip_range = $var;

        return $this;
    }

    /**
     * Next hop of the route.
     *
     * Generated from protobuf field <code>string next_hop = 4;</code>
     * @return string
     */
    public function getNextHop()
    {
        return $this->next_hop;
    }

    /**
     * Next hop of the route.
     *
     * Generated from protobuf field <code>string next_hop = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setNextHop($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_hop = $var;

        return $this;
    }

    /**
     * URI of a Compute Engine network.
     *
     * Generated from protobuf field <code>string network_uri = 5;</code>
     * @return string
     */
    public function getNetworkUri()
    {
        return $this->network_uri;
    }

    /**
     * URI of a Compute Engine network.
     *
     * Generated from protobuf field <code>string network_uri = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setNetworkUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->network_uri = $var;

        return $this;
    }

    /**
     * Priority of the route.
     *
     * Generated from protobuf field <code>int32 priority = 6;</code>
     * @return int
     */
    public function getPriority()
    {
        return $this->priority;
    }

    /**
     * Priority of the route.
     *
     * Generated from protobuf field <code>int32 priority = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setPriority($var)
    {
        GPBUtil::checkInt32($var);
        $this->priority = $var;

        return $this;
    }

    /**
     * Instance tags of the route.
     *
     * Generated from protobuf field <code>repeated string instance_tags = 7;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInstanceTags()
    {
        return $this->instance_tags;
    }

    /**
     * Instance tags of the route.
     *
     * Generated from protobuf field <code>repeated string instance_tags = 7;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setInstanceTags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->instance_tags = $arr;

        return $this;
    }

}

