<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: device.proto

namespace OS\PB;

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

/**
 * Generated from protobuf message <code>OS.PB.DeviceRoutingConfig</code>
 */
class DeviceRoutingConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Cannot be 0. Device wide unique Logical Id assigned by the 1Device, also referred to as GatewayId. 1 is reserved for server/cloud
     *
     * Generated from protobuf field <code>uint64 DestinationDeviceId = 1;</code>
     */
    protected $DestinationDeviceId = 0;
    /**
     * The different routes that can be taken. We iterate through each route, see which one is connected, if not connected, then moves onto next route
     *
     * Generated from protobuf field <code>repeated .OS.PB.DeviceRoute Routes = 2;</code>
     */
    private $Routes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $DestinationDeviceId
     *           Cannot be 0. Device wide unique Logical Id assigned by the 1Device, also referred to as GatewayId. 1 is reserved for server/cloud
     *     @type \OS\PB\DeviceRoute[] $Routes
     *           The different routes that can be taken. We iterate through each route, see which one is connected, if not connected, then moves onto next route
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Device::initOnce();
        parent::__construct($data);
    }

    /**
     * Cannot be 0. Device wide unique Logical Id assigned by the 1Device, also referred to as GatewayId. 1 is reserved for server/cloud
     *
     * Generated from protobuf field <code>uint64 DestinationDeviceId = 1;</code>
     * @return int|string
     */
    public function getDestinationDeviceId()
    {
        return $this->DestinationDeviceId;
    }

    /**
     * Cannot be 0. Device wide unique Logical Id assigned by the 1Device, also referred to as GatewayId. 1 is reserved for server/cloud
     *
     * Generated from protobuf field <code>uint64 DestinationDeviceId = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setDestinationDeviceId($var)
    {
        GPBUtil::checkUint64($var);
        $this->DestinationDeviceId = $var;

        return $this;
    }

    /**
     * The different routes that can be taken. We iterate through each route, see which one is connected, if not connected, then moves onto next route
     *
     * Generated from protobuf field <code>repeated .OS.PB.DeviceRoute Routes = 2;</code>
     * @return RepeatedField<\OS\PB\DeviceRoute>
     */
    public function getRoutes()
    {
        return $this->Routes;
    }

    /**
     * The different routes that can be taken. We iterate through each route, see which one is connected, if not connected, then moves onto next route
     *
     * Generated from protobuf field <code>repeated .OS.PB.DeviceRoute Routes = 2;</code>
     * @param \OS\PB\DeviceRoute[] $var
     * @return $this
     */
    public function setRoutes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \OS\PB\DeviceRoute::class);
        $this->Routes = $arr;

        return $this;
    }

}

