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

/**
 ** \@brief   Parameters config for this device
 * \@details Stores general device parameters for this unit. Most importantly has logical Device Id and SiteId that is set by 1Device.
 *          
 *          This message can be used without requiring a DeviceConnectRequest handshake.
 *
 * Generated from protobuf message <code>OS.PB.DeviceConfig</code>
 */
class DeviceConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * 0.9 Default is disabled, places the device in developer mode, also modifies MQTT username with "/:", "dev:" or "beta:" prefix
     *
     * Generated from protobuf field <code>.OS.PB.DeviceConfig.DeviceMode Mode = 1;</code>
     */
    protected $Mode = 0;
    /**
     * 0.9 Sets the Logical Address of this Gateway/Device
     *
     * Generated from protobuf field <code>uint64 DeviceId = 2;</code>
     */
    protected $DeviceId = 0;
    /**
     * New Site Id, used for site identification with advertisements
     *
     * Generated from protobuf field <code>uint32 SiteId = 6;</code>
     */
    protected $SiteId = 0;
    /**
     * 1.1 Default: +2:00. The timezone offset from UTC. Allowed from -12:00 to +14:00
     *
     * Generated from protobuf field <code>string TimeZone = 4;</code>
     */
    protected $TimeZone = '';
    /**
     * routing parameters
     *
     * Generated from protobuf field <code>uint32 RoutedCountMax = 5;</code>
     */
    protected $RoutedCountMax = 0;
    /**
     * monitoring parameters
     *
     * Generated from protobuf field <code>uint32 DiscoveryRefreshSeconds = 10;</code>
     */
    protected $DiscoveryRefreshSeconds = 0;
    /**
     * 0.9 Default: 30sec. When TimeToLive is not specified in a message, this will be used instead.
     *
     * Generated from protobuf field <code>uint32 DefaultTimeToLive = 11;</code>
     */
    protected $DefaultTimeToLive = 0;
    /**
     * Where certain messages should be sent to, useful for testing purposes where we virtualize the cloud
     *
     * Generated from protobuf field <code>uint64 DeviceIdToSendMetrics = 13;</code>
     */
    protected $DeviceIdToSendMetrics = 0;
    /**
     * Default: 1 (Cloud). Which Destination Device Id to send event messages to
     *
     * Generated from protobuf field <code>uint64 DeviceIdToSendEvents = 14;</code>
     */
    protected $DeviceIdToSendEvents = 0;
    /**
     * Default: 1 (Cloud). Which Destination Device Id to send log messages to
     *
     * Generated from protobuf field <code>uint64 DeviceIdToSendLogs = 15;</code>
     */
    protected $DeviceIdToSendLogs = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $Mode
     *           0.9 Default is disabled, places the device in developer mode, also modifies MQTT username with "/:", "dev:" or "beta:" prefix
     *     @type int|string $DeviceId
     *           0.9 Sets the Logical Address of this Gateway/Device
     *     @type int $SiteId
     *           New Site Id, used for site identification with advertisements
     *     @type string $TimeZone
     *           1.1 Default: +2:00. The timezone offset from UTC. Allowed from -12:00 to +14:00
     *     @type int $RoutedCountMax
     *           routing parameters
     *     @type int $DiscoveryRefreshSeconds
     *           monitoring parameters
     *     @type int $DefaultTimeToLive
     *           0.9 Default: 30sec. When TimeToLive is not specified in a message, this will be used instead.
     *     @type int|string $DeviceIdToSendMetrics
     *           Where certain messages should be sent to, useful for testing purposes where we virtualize the cloud
     *     @type int|string $DeviceIdToSendEvents
     *           Default: 1 (Cloud). Which Destination Device Id to send event messages to
     *     @type int|string $DeviceIdToSendLogs
     *           Default: 1 (Cloud). Which Destination Device Id to send log messages to
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Device::initOnce();
        parent::__construct($data);
    }

    /**
     * 0.9 Default is disabled, places the device in developer mode, also modifies MQTT username with "/:", "dev:" or "beta:" prefix
     *
     * Generated from protobuf field <code>.OS.PB.DeviceConfig.DeviceMode Mode = 1;</code>
     * @return int
     */
    public function getMode()
    {
        return $this->Mode;
    }

    /**
     * 0.9 Default is disabled, places the device in developer mode, also modifies MQTT username with "/:", "dev:" or "beta:" prefix
     *
     * Generated from protobuf field <code>.OS.PB.DeviceConfig.DeviceMode Mode = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setMode($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\DeviceConfig\DeviceMode::class);
        $this->Mode = $var;

        return $this;
    }

    /**
     * 0.9 Sets the Logical Address of this Gateway/Device
     *
     * Generated from protobuf field <code>uint64 DeviceId = 2;</code>
     * @return int|string
     */
    public function getDeviceId()
    {
        return $this->DeviceId;
    }

    /**
     * 0.9 Sets the Logical Address of this Gateway/Device
     *
     * Generated from protobuf field <code>uint64 DeviceId = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setDeviceId($var)
    {
        GPBUtil::checkUint64($var);
        $this->DeviceId = $var;

        return $this;
    }

    /**
     * New Site Id, used for site identification with advertisements
     *
     * Generated from protobuf field <code>uint32 SiteId = 6;</code>
     * @return int
     */
    public function getSiteId()
    {
        return $this->SiteId;
    }

    /**
     * New Site Id, used for site identification with advertisements
     *
     * Generated from protobuf field <code>uint32 SiteId = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setSiteId($var)
    {
        GPBUtil::checkUint32($var);
        $this->SiteId = $var;

        return $this;
    }

    /**
     * 1.1 Default: +2:00. The timezone offset from UTC. Allowed from -12:00 to +14:00
     *
     * Generated from protobuf field <code>string TimeZone = 4;</code>
     * @return string
     */
    public function getTimeZone()
    {
        return $this->TimeZone;
    }

    /**
     * 1.1 Default: +2:00. The timezone offset from UTC. Allowed from -12:00 to +14:00
     *
     * Generated from protobuf field <code>string TimeZone = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setTimeZone($var)
    {
        GPBUtil::checkString($var, True);
        $this->TimeZone = $var;

        return $this;
    }

    /**
     * routing parameters
     *
     * Generated from protobuf field <code>uint32 RoutedCountMax = 5;</code>
     * @return int
     */
    public function getRoutedCountMax()
    {
        return $this->RoutedCountMax;
    }

    /**
     * routing parameters
     *
     * Generated from protobuf field <code>uint32 RoutedCountMax = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setRoutedCountMax($var)
    {
        GPBUtil::checkUint32($var);
        $this->RoutedCountMax = $var;

        return $this;
    }

    /**
     * monitoring parameters
     *
     * Generated from protobuf field <code>uint32 DiscoveryRefreshSeconds = 10;</code>
     * @return int
     */
    public function getDiscoveryRefreshSeconds()
    {
        return $this->DiscoveryRefreshSeconds;
    }

    /**
     * monitoring parameters
     *
     * Generated from protobuf field <code>uint32 DiscoveryRefreshSeconds = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setDiscoveryRefreshSeconds($var)
    {
        GPBUtil::checkUint32($var);
        $this->DiscoveryRefreshSeconds = $var;

        return $this;
    }

    /**
     * 0.9 Default: 30sec. When TimeToLive is not specified in a message, this will be used instead.
     *
     * Generated from protobuf field <code>uint32 DefaultTimeToLive = 11;</code>
     * @return int
     */
    public function getDefaultTimeToLive()
    {
        return $this->DefaultTimeToLive;
    }

    /**
     * 0.9 Default: 30sec. When TimeToLive is not specified in a message, this will be used instead.
     *
     * Generated from protobuf field <code>uint32 DefaultTimeToLive = 11;</code>
     * @param int $var
     * @return $this
     */
    public function setDefaultTimeToLive($var)
    {
        GPBUtil::checkUint32($var);
        $this->DefaultTimeToLive = $var;

        return $this;
    }

    /**
     * Where certain messages should be sent to, useful for testing purposes where we virtualize the cloud
     *
     * Generated from protobuf field <code>uint64 DeviceIdToSendMetrics = 13;</code>
     * @return int|string
     */
    public function getDeviceIdToSendMetrics()
    {
        return $this->DeviceIdToSendMetrics;
    }

    /**
     * Where certain messages should be sent to, useful for testing purposes where we virtualize the cloud
     *
     * Generated from protobuf field <code>uint64 DeviceIdToSendMetrics = 13;</code>
     * @param int|string $var
     * @return $this
     */
    public function setDeviceIdToSendMetrics($var)
    {
        GPBUtil::checkUint64($var);
        $this->DeviceIdToSendMetrics = $var;

        return $this;
    }

    /**
     * Default: 1 (Cloud). Which Destination Device Id to send event messages to
     *
     * Generated from protobuf field <code>uint64 DeviceIdToSendEvents = 14;</code>
     * @return int|string
     */
    public function getDeviceIdToSendEvents()
    {
        return $this->DeviceIdToSendEvents;
    }

    /**
     * Default: 1 (Cloud). Which Destination Device Id to send event messages to
     *
     * Generated from protobuf field <code>uint64 DeviceIdToSendEvents = 14;</code>
     * @param int|string $var
     * @return $this
     */
    public function setDeviceIdToSendEvents($var)
    {
        GPBUtil::checkUint64($var);
        $this->DeviceIdToSendEvents = $var;

        return $this;
    }

    /**
     * Default: 1 (Cloud). Which Destination Device Id to send log messages to
     *
     * Generated from protobuf field <code>uint64 DeviceIdToSendLogs = 15;</code>
     * @return int|string
     */
    public function getDeviceIdToSendLogs()
    {
        return $this->DeviceIdToSendLogs;
    }

    /**
     * Default: 1 (Cloud). Which Destination Device Id to send log messages to
     *
     * Generated from protobuf field <code>uint64 DeviceIdToSendLogs = 15;</code>
     * @param int|string $var
     * @return $this
     */
    public function setDeviceIdToSendLogs($var)
    {
        GPBUtil::checkUint64($var);
        $this->DeviceIdToSendLogs = $var;

        return $this;
    }

}

