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

/**
 * A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.NetworkRoutingConfig</code>
 */
class NetworkRoutingConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.
     * Check the RoutingMode enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string routing_mode = 475143548;</code>
     */
    private $routing_mode = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $routing_mode
     *           The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.
     *           Check the RoutingMode enum for the list of possible values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.
     * Check the RoutingMode enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string routing_mode = 475143548;</code>
     * @return string
     */
    public function getRoutingMode()
    {
        return isset($this->routing_mode) ? $this->routing_mode : '';
    }

    public function hasRoutingMode()
    {
        return isset($this->routing_mode);
    }

    public function clearRoutingMode()
    {
        unset($this->routing_mode);
    }

    /**
     * The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.
     * Check the RoutingMode enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string routing_mode = 475143548;</code>
     * @param string $var
     * @return $this
     */
    public function setRoutingMode($var)
    {
        GPBUtil::checkString($var, True);
        $this->routing_mode = $var;

        return $this;
    }

}

