<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/iot_connect/v1/keyapis_iot_connect_callback_v1.proto

namespace Keyapis\IotConnect\V1;

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

/**
 * Объект устройства
 *
 * Generated from protobuf message <code>keyapis.iot_connect.v1.Device</code>
 */
class Device extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор устройства на платформе Ключ.
     * Конкатенация user_id и device_id плафтормы Ключ
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Название устройства на платформе Ключ
     *
     * Generated from protobuf field <code>string name = 2;</code>
     */
    protected $name = '';
    /**
     * Название устройства от производителя
     *
     * Generated from protobuf field <code>string default_name = 3;</code>
     */
    protected $default_name = '';
    /**
     * Адрес дома, где установлено устройство
     *
     * Generated from protobuf field <code>string home = 4;</code>
     */
    protected $home = '';
    /**
     * Название или номер подъезда
     *
     * Generated from protobuf field <code>string room = 5;</code>
     */
    protected $room = '';
    /**
     * Тип устройства
     *
     * Generated from protobuf field <code>.keyapis.iot_connect.v1.Model model = 6;</code>
     */
    protected $model = null;
    /**
     * HW версия устройства
     *
     * Generated from protobuf field <code>string hw_version = 7;</code>
     */
    protected $hw_version = '';
    /**
     * SW версия устройства
     *
     * Generated from protobuf field <code>string sw_version = 8;</code>
     */
    protected $sw_version = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Идентификатор устройства на платформе Ключ.
     *           Конкатенация user_id и device_id плафтормы Ключ
     *     @type string $name
     *           Название устройства на платформе Ключ
     *     @type string $default_name
     *           Название устройства от производителя
     *     @type string $home
     *           Адрес дома, где установлено устройство
     *     @type string $room
     *           Название или номер подъезда
     *     @type \Keyapis\IotConnect\V1\Model $model
     *           Тип устройства
     *     @type string $hw_version
     *           HW версия устройства
     *     @type string $sw_version
     *           SW версия устройства
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\IotConnect\V1\KeyapisIotConnectCallbackV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор устройства на платформе Ключ.
     * Конкатенация user_id и device_id плафтормы Ключ
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор устройства на платформе Ключ.
     * Конкатенация user_id и device_id плафтормы Ключ
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Название устройства на платформе Ключ
     *
     * Generated from protobuf field <code>string name = 2;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Название устройства на платформе Ключ
     *
     * Generated from protobuf field <code>string name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Название устройства от производителя
     *
     * Generated from protobuf field <code>string default_name = 3;</code>
     * @return string
     */
    public function getDefaultName()
    {
        return $this->default_name;
    }

    /**
     * Название устройства от производителя
     *
     * Generated from protobuf field <code>string default_name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDefaultName($var)
    {
        GPBUtil::checkString($var, True);
        $this->default_name = $var;

        return $this;
    }

    /**
     * Адрес дома, где установлено устройство
     *
     * Generated from protobuf field <code>string home = 4;</code>
     * @return string
     */
    public function getHome()
    {
        return $this->home;
    }

    /**
     * Адрес дома, где установлено устройство
     *
     * Generated from protobuf field <code>string home = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setHome($var)
    {
        GPBUtil::checkString($var, True);
        $this->home = $var;

        return $this;
    }

    /**
     * Название или номер подъезда
     *
     * Generated from protobuf field <code>string room = 5;</code>
     * @return string
     */
    public function getRoom()
    {
        return $this->room;
    }

    /**
     * Название или номер подъезда
     *
     * Generated from protobuf field <code>string room = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setRoom($var)
    {
        GPBUtil::checkString($var, True);
        $this->room = $var;

        return $this;
    }

    /**
     * Тип устройства
     *
     * Generated from protobuf field <code>.keyapis.iot_connect.v1.Model model = 6;</code>
     * @return \Keyapis\IotConnect\V1\Model|null
     */
    public function getModel()
    {
        return $this->model;
    }

    public function hasModel()
    {
        return isset($this->model);
    }

    public function clearModel()
    {
        unset($this->model);
    }

    /**
     * Тип устройства
     *
     * Generated from protobuf field <code>.keyapis.iot_connect.v1.Model model = 6;</code>
     * @param \Keyapis\IotConnect\V1\Model $var
     * @return $this
     */
    public function setModel($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\IotConnect\V1\Model::class);
        $this->model = $var;

        return $this;
    }

    /**
     * HW версия устройства
     *
     * Generated from protobuf field <code>string hw_version = 7;</code>
     * @return string
     */
    public function getHwVersion()
    {
        return $this->hw_version;
    }

    /**
     * HW версия устройства
     *
     * Generated from protobuf field <code>string hw_version = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setHwVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->hw_version = $var;

        return $this;
    }

    /**
     * SW версия устройства
     *
     * Generated from protobuf field <code>string sw_version = 8;</code>
     * @return string
     */
    public function getSwVersion()
    {
        return $this->sw_version;
    }

    /**
     * SW версия устройства
     *
     * Generated from protobuf field <code>string sw_version = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setSwVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->sw_version = $var;

        return $this;
    }

}

