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

namespace Keyapis\Device\V1;

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

/**
 * Устройство.
 * # Описание модели
 *
 * Generated from protobuf message <code>keyapis.device.v1.Device</code>
 */
class Device extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор.
     * # Диапазон: 0..2147483647
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     */
    protected $id = 0;
    /**
     * Идентификатор пресета.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 preset_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $preset_id = 0;
    /**
     * Статус установки пресета.
     * # Поле вычисляется в коде приложения
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.PresetStatusType preset_status_type = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {</code>
     * @deprecated
     */
    protected $preset_status_type = 0;
    /**
     * Дата установки пресета на устройство.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp preset_configured_at = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {</code>
     * @deprecated
     */
    protected $preset_configured_at = null;
    /**
     * Настройка режима SL3
     *
     * Generated from protobuf field <code>bool is_sl3_mode_enabled = 5 [deprecated = true, (.google.api.field_behavior) = REQUIRED, (.google.api.field_visibility) = {</code>
     * @deprecated
     */
    protected $is_sl3_mode_enabled = false;
    /**
     * Тип назначения устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Type type = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $type = 0;
    /**
     * MAC-адрес.
     * # Диапазон: 17..17.
     * # Паттерн: /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/
     *
     * Generated from protobuf field <code>string mac_address = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $mac_address = '';
    /**
     * Наименование устройства.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>string title = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $title = '';
    /**
     * Модель устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.ModelType model_type = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $model_type = 0;
    /**
     * Идентификатор компании владельца.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 owner_company_id = 10 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $owner_company_id = 0;
    /**
     * Серийный номер.
     * # Диапазон: 1..16
     *
     * Generated from protobuf field <code>string serial_number = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $serial_number = '';
    /**
     * Идентификатор квартирограммы.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 flatgramm_id = 12 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $flatgramm_id = 0;
    /**
     * Смещение таймзоны в минутах.
     * # Диапазон: -720..840
     *
     * Generated from protobuf field <code>int32 utc_offset = 13 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $utc_offset = 0;
    /**
     * Статус устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.StatusType status_type = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $status_type = 0;
    /**
     * Сетевой адрес.
     * # Диапазон: 0..250
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue ip_address = 15;</code>
     */
    protected $ip_address = null;
    /**
     * Сетевой порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value port = 16;</code>
     */
    protected $port = null;
    /**
     * Учетные данные.
     * Используется для устройств с типом модели SPUTNIK_IO
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.SputnikCredentials sputnik_credentials = 17;</code>
     */
    protected $sputnik_credentials = null;
    /**
     * Координаты
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Location location = 18;</code>
     */
    protected $location = null;
    /**
     * Идентификатор камеры uid.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue camera_id = 19;</code>
     */
    protected $camera_id = null;
    /**
     * Список тегов устройства.
     * # Диапазон: 1..50
     *
     * Generated from protobuf field <code>repeated string tags = 20;</code>
     */
    private $tags;
    /**
     * Настройки устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Settings settings = 21;</code>
     */
    protected $settings = null;
    /**
     * Версия аппаратного обеспенения
     *
     * Generated from protobuf field <code>string hardware_version = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $hardware_version = '';
    /**
     * Версия программного обеспенения
     *
     * Generated from protobuf field <code>string software_version = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $software_version = '';
    /**
     * Диспетчеризации
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Dispatching dispatching = 24;</code>
     */
    protected $dispatching = null;
    /**
     * Транк
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.SipTrunk sip_trunk = 25;</code>
     */
    protected $sip_trunk = null;
    /**
     * Переадресация
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Redirect redirect = 26;</code>
     */
    protected $redirect = null;
    /**
     * Настройки автозамены пароля
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.AutochangePasswordSettings autochange_password_settings = 27;</code>
     */
    protected $autochange_password_settings = null;
    /**
     * Учетные данные пользователей
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Device.Credentials credentials = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $credentials;
    /**
     * Сип-аккаунт
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue sip_account = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $sip_account = null;
    /**
     * Статус синхронизации
     *
     * Generated from protobuf field <code>.keyapis.device.v1.SyncStatus sync_status = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $sync_status = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $id
     *           Идентификатор.
     *           # Диапазон: 0..2147483647
     *     @type int $preset_id
     *           Идентификатор пресета.
     *           # Диапазон: 1..2147483647
     *     @type int $preset_status_type
     *           Статус установки пресета.
     *           # Поле вычисляется в коде приложения
     *     @type \Google\Protobuf\Timestamp $preset_configured_at
     *           Дата установки пресета на устройство.
     *           # Тип: DateTime
     *     @type bool $is_sl3_mode_enabled
     *           Настройка режима SL3
     *     @type int $type
     *           Тип назначения устройства
     *     @type string $mac_address
     *           MAC-адрес.
     *           # Диапазон: 17..17.
     *           # Паттерн: /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/
     *     @type string $title
     *           Наименование устройства.
     *           # Диапазон: 3..256
     *     @type int $model_type
     *           Модель устройства
     *     @type int $owner_company_id
     *           Идентификатор компании владельца.
     *           # Диапазон: 1..2147483647
     *     @type string $serial_number
     *           Серийный номер.
     *           # Диапазон: 1..16
     *     @type int $flatgramm_id
     *           Идентификатор квартирограммы.
     *           # Диапазон: 1..2147483647
     *     @type int $utc_offset
     *           Смещение таймзоны в минутах.
     *           # Диапазон: -720..840
     *     @type int $status_type
     *           Статус устройства
     *     @type \Google\Protobuf\StringValue $ip_address
     *           Сетевой адрес.
     *           # Диапазон: 0..250
     *     @type \Google\Protobuf\Int32Value $port
     *           Сетевой порт.
     *           # Диапазон: 0..65535
     *     @type \Keyapis\Device\V1\Device\SputnikCredentials $sputnik_credentials
     *           Учетные данные.
     *           Используется для устройств с типом модели SPUTNIK_IO
     *     @type \Keyapis\Device\V1\Device\Location $location
     *           Координаты
     *     @type \Google\Protobuf\StringValue $camera_id
     *           Идентификатор камеры uid.
     *           # Тип: Guid
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $tags
     *           Список тегов устройства.
     *           # Диапазон: 1..50
     *     @type \Keyapis\Device\V1\Device\Settings $settings
     *           Настройки устройства
     *     @type string $hardware_version
     *           Версия аппаратного обеспенения
     *     @type string $software_version
     *           Версия программного обеспенения
     *     @type \Keyapis\Device\V1\Device\Dispatching $dispatching
     *           Диспетчеризации
     *     @type \Keyapis\Device\V1\Device\SipTrunk $sip_trunk
     *           Транк
     *     @type \Keyapis\Device\V1\Device\Redirect $redirect
     *           Переадресация
     *     @type \Keyapis\Device\V1\Device\AutochangePasswordSettings $autochange_password_settings
     *           Настройки автозамены пароля
     *     @type array<\Keyapis\Device\V1\Device\Credentials>|\Google\Protobuf\Internal\RepeatedField $credentials
     *           Учетные данные пользователей
     *     @type \Google\Protobuf\StringValue $sip_account
     *           Сип-аккаунт
     *     @type \Keyapis\Device\V1\SyncStatus $sync_status
     *           Статус синхронизации
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceDeviceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор.
     * # Диапазон: 0..2147483647
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор.
     * # Диапазон: 0..2147483647
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkInt32($var);
        $this->id = $var;

        return $this;
    }

    /**
     * Идентификатор пресета.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 preset_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getPresetId()
    {
        return $this->preset_id;
    }

    /**
     * Идентификатор пресета.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 preset_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setPresetId($var)
    {
        GPBUtil::checkInt32($var);
        $this->preset_id = $var;

        return $this;
    }

    /**
     * Статус установки пресета.
     * # Поле вычисляется в коде приложения
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.PresetStatusType preset_status_type = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {</code>
     * @return int
     * @deprecated
     */
    public function getPresetStatusType()
    {
        @trigger_error('preset_status_type is deprecated.', E_USER_DEPRECATED);
        return $this->preset_status_type;
    }

    /**
     * Статус установки пресета.
     * # Поле вычисляется в коде приложения
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.PresetStatusType preset_status_type = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {</code>
     * @param int $var
     * @return $this
     * @deprecated
     */
    public function setPresetStatusType($var)
    {
        @trigger_error('preset_status_type is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkEnum($var, \Keyapis\Device\V1\Device\PresetStatusType::class);
        $this->preset_status_type = $var;

        return $this;
    }

    /**
     * Дата установки пресета на устройство.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp preset_configured_at = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {</code>
     * @return \Google\Protobuf\Timestamp|null
     * @deprecated
     */
    public function getPresetConfiguredAt()
    {
        @trigger_error('preset_configured_at is deprecated.', E_USER_DEPRECATED);
        return $this->preset_configured_at;
    }

    public function hasPresetConfiguredAt()
    {
        @trigger_error('preset_configured_at is deprecated.', E_USER_DEPRECATED);
        return isset($this->preset_configured_at);
    }

    public function clearPresetConfiguredAt()
    {
        @trigger_error('preset_configured_at is deprecated.', E_USER_DEPRECATED);
        unset($this->preset_configured_at);
    }

    /**
     * Дата установки пресета на устройство.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp preset_configured_at = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_visibility) = {</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     * @deprecated
     */
    public function setPresetConfiguredAt($var)
    {
        @trigger_error('preset_configured_at is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->preset_configured_at = $var;

        return $this;
    }

    /**
     * Настройка режима SL3
     *
     * Generated from protobuf field <code>bool is_sl3_mode_enabled = 5 [deprecated = true, (.google.api.field_behavior) = REQUIRED, (.google.api.field_visibility) = {</code>
     * @return bool
     * @deprecated
     */
    public function getIsSl3ModeEnabled()
    {
        @trigger_error('is_sl3_mode_enabled is deprecated.', E_USER_DEPRECATED);
        return $this->is_sl3_mode_enabled;
    }

    /**
     * Настройка режима SL3
     *
     * Generated from protobuf field <code>bool is_sl3_mode_enabled = 5 [deprecated = true, (.google.api.field_behavior) = REQUIRED, (.google.api.field_visibility) = {</code>
     * @param bool $var
     * @return $this
     * @deprecated
     */
    public function setIsSl3ModeEnabled($var)
    {
        @trigger_error('is_sl3_mode_enabled is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkBool($var);
        $this->is_sl3_mode_enabled = $var;

        return $this;
    }

    /**
     * Тип назначения устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Type type = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Тип назначения устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Type type = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Device\V1\Device\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * MAC-адрес.
     * # Диапазон: 17..17.
     * # Паттерн: /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/
     *
     * Generated from protobuf field <code>string mac_address = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getMacAddress()
    {
        return $this->mac_address;
    }

    /**
     * MAC-адрес.
     * # Диапазон: 17..17.
     * # Паттерн: /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/
     *
     * Generated from protobuf field <code>string mac_address = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setMacAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->mac_address = $var;

        return $this;
    }

    /**
     * Наименование устройства.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>string title = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Наименование устройства.
     * # Диапазон: 3..256
     *
     * Generated from protobuf field <code>string title = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * Модель устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.ModelType model_type = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getModelType()
    {
        return $this->model_type;
    }

    /**
     * Модель устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.ModelType model_type = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setModelType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Device\V1\Device\ModelType::class);
        $this->model_type = $var;

        return $this;
    }

    /**
     * Идентификатор компании владельца.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 owner_company_id = 10 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getOwnerCompanyId()
    {
        return $this->owner_company_id;
    }

    /**
     * Идентификатор компании владельца.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 owner_company_id = 10 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setOwnerCompanyId($var)
    {
        GPBUtil::checkInt32($var);
        $this->owner_company_id = $var;

        return $this;
    }

    /**
     * Серийный номер.
     * # Диапазон: 1..16
     *
     * Generated from protobuf field <code>string serial_number = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getSerialNumber()
    {
        return $this->serial_number;
    }

    /**
     * Серийный номер.
     * # Диапазон: 1..16
     *
     * Generated from protobuf field <code>string serial_number = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setSerialNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->serial_number = $var;

        return $this;
    }

    /**
     * Идентификатор квартирограммы.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 flatgramm_id = 12 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getFlatgrammId()
    {
        return $this->flatgramm_id;
    }

    /**
     * Идентификатор квартирограммы.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 flatgramm_id = 12 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setFlatgrammId($var)
    {
        GPBUtil::checkInt32($var);
        $this->flatgramm_id = $var;

        return $this;
    }

    /**
     * Смещение таймзоны в минутах.
     * # Диапазон: -720..840
     *
     * Generated from protobuf field <code>int32 utc_offset = 13 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getUtcOffset()
    {
        return $this->utc_offset;
    }

    /**
     * Смещение таймзоны в минутах.
     * # Диапазон: -720..840
     *
     * Generated from protobuf field <code>int32 utc_offset = 13 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setUtcOffset($var)
    {
        GPBUtil::checkInt32($var);
        $this->utc_offset = $var;

        return $this;
    }

    /**
     * Статус устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.StatusType status_type = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getStatusType()
    {
        return $this->status_type;
    }

    /**
     * Статус устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.StatusType status_type = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setStatusType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Device\V1\Device\StatusType::class);
        $this->status_type = $var;

        return $this;
    }

    /**
     * Сетевой адрес.
     * # Диапазон: 0..250
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue ip_address = 15;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getIpAddress()
    {
        return $this->ip_address;
    }

    public function hasIpAddress()
    {
        return isset($this->ip_address);
    }

    public function clearIpAddress()
    {
        unset($this->ip_address);
    }

    /**
     * Returns the unboxed value from <code>getIpAddress()</code>

     * Сетевой адрес.
     * # Диапазон: 0..250
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue ip_address = 15;</code>
     * @return string|null
     */
    public function getIpAddressUnwrapped()
    {
        return $this->readWrapperValue("ip_address");
    }

    /**
     * Сетевой адрес.
     * # Диапазон: 0..250
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue ip_address = 15;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setIpAddress($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->ip_address = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.

     * Сетевой адрес.
     * # Диапазон: 0..250
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue ip_address = 15;</code>
     * @param string|null $var
     * @return $this
     */
    public function setIpAddressUnwrapped($var)
    {
        $this->writeWrapperValue("ip_address", $var);
        return $this;}

    /**
     * Сетевой порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value port = 16;</code>
     * @return \Google\Protobuf\Int32Value|null
     */
    public function getPort()
    {
        return $this->port;
    }

    public function hasPort()
    {
        return isset($this->port);
    }

    public function clearPort()
    {
        unset($this->port);
    }

    /**
     * Returns the unboxed value from <code>getPort()</code>

     * Сетевой порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value port = 16;</code>
     * @return int|null
     */
    public function getPortUnwrapped()
    {
        return $this->readWrapperValue("port");
    }

    /**
     * Сетевой порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value port = 16;</code>
     * @param \Google\Protobuf\Int32Value $var
     * @return $this
     */
    public function setPort($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
        $this->port = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.

     * Сетевой порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value port = 16;</code>
     * @param int|null $var
     * @return $this
     */
    public function setPortUnwrapped($var)
    {
        $this->writeWrapperValue("port", $var);
        return $this;}

    /**
     * Учетные данные.
     * Используется для устройств с типом модели SPUTNIK_IO
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.SputnikCredentials sputnik_credentials = 17;</code>
     * @return \Keyapis\Device\V1\Device\SputnikCredentials|null
     */
    public function getSputnikCredentials()
    {
        return $this->sputnik_credentials;
    }

    public function hasSputnikCredentials()
    {
        return isset($this->sputnik_credentials);
    }

    public function clearSputnikCredentials()
    {
        unset($this->sputnik_credentials);
    }

    /**
     * Учетные данные.
     * Используется для устройств с типом модели SPUTNIK_IO
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.SputnikCredentials sputnik_credentials = 17;</code>
     * @param \Keyapis\Device\V1\Device\SputnikCredentials $var
     * @return $this
     */
    public function setSputnikCredentials($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Device\SputnikCredentials::class);
        $this->sputnik_credentials = $var;

        return $this;
    }

    /**
     * Координаты
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Location location = 18;</code>
     * @return \Keyapis\Device\V1\Device\Location|null
     */
    public function getLocation()
    {
        return $this->location;
    }

    public function hasLocation()
    {
        return isset($this->location);
    }

    public function clearLocation()
    {
        unset($this->location);
    }

    /**
     * Координаты
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Location location = 18;</code>
     * @param \Keyapis\Device\V1\Device\Location $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Device\Location::class);
        $this->location = $var;

        return $this;
    }

    /**
     * Идентификатор камеры uid.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue camera_id = 19;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getCameraId()
    {
        return $this->camera_id;
    }

    public function hasCameraId()
    {
        return isset($this->camera_id);
    }

    public function clearCameraId()
    {
        unset($this->camera_id);
    }

    /**
     * Returns the unboxed value from <code>getCameraId()</code>

     * Идентификатор камеры uid.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue camera_id = 19;</code>
     * @return string|null
     */
    public function getCameraIdUnwrapped()
    {
        return $this->readWrapperValue("camera_id");
    }

    /**
     * Идентификатор камеры uid.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue camera_id = 19;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setCameraId($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->camera_id = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.

     * Идентификатор камеры uid.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue camera_id = 19;</code>
     * @param string|null $var
     * @return $this
     */
    public function setCameraIdUnwrapped($var)
    {
        $this->writeWrapperValue("camera_id", $var);
        return $this;}

    /**
     * Список тегов устройства.
     * # Диапазон: 1..50
     *
     * Generated from protobuf field <code>repeated string tags = 20;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * Список тегов устройства.
     * # Диапазон: 1..50
     *
     * Generated from protobuf field <code>repeated string tags = 20;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->tags = $arr;

        return $this;
    }

    /**
     * Настройки устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Settings settings = 21;</code>
     * @return \Keyapis\Device\V1\Device\Settings|null
     */
    public function getSettings()
    {
        return $this->settings;
    }

    public function hasSettings()
    {
        return isset($this->settings);
    }

    public function clearSettings()
    {
        unset($this->settings);
    }

    /**
     * Настройки устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Settings settings = 21;</code>
     * @param \Keyapis\Device\V1\Device\Settings $var
     * @return $this
     */
    public function setSettings($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Device\Settings::class);
        $this->settings = $var;

        return $this;
    }

    /**
     * Версия аппаратного обеспенения
     *
     * Generated from protobuf field <code>string hardware_version = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getHardwareVersion()
    {
        return $this->hardware_version;
    }

    /**
     * Версия аппаратного обеспенения
     *
     * Generated from protobuf field <code>string hardware_version = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setHardwareVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->hardware_version = $var;

        return $this;
    }

    /**
     * Версия программного обеспенения
     *
     * Generated from protobuf field <code>string software_version = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getSoftwareVersion()
    {
        return $this->software_version;
    }

    /**
     * Версия программного обеспенения
     *
     * Generated from protobuf field <code>string software_version = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setSoftwareVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->software_version = $var;

        return $this;
    }

    /**
     * Диспетчеризации
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Dispatching dispatching = 24;</code>
     * @return \Keyapis\Device\V1\Device\Dispatching|null
     */
    public function getDispatching()
    {
        return $this->dispatching;
    }

    public function hasDispatching()
    {
        return isset($this->dispatching);
    }

    public function clearDispatching()
    {
        unset($this->dispatching);
    }

    /**
     * Диспетчеризации
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Dispatching dispatching = 24;</code>
     * @param \Keyapis\Device\V1\Device\Dispatching $var
     * @return $this
     */
    public function setDispatching($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Device\Dispatching::class);
        $this->dispatching = $var;

        return $this;
    }

    /**
     * Транк
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.SipTrunk sip_trunk = 25;</code>
     * @return \Keyapis\Device\V1\Device\SipTrunk|null
     */
    public function getSipTrunk()
    {
        return $this->sip_trunk;
    }

    public function hasSipTrunk()
    {
        return isset($this->sip_trunk);
    }

    public function clearSipTrunk()
    {
        unset($this->sip_trunk);
    }

    /**
     * Транк
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.SipTrunk sip_trunk = 25;</code>
     * @param \Keyapis\Device\V1\Device\SipTrunk $var
     * @return $this
     */
    public function setSipTrunk($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Device\SipTrunk::class);
        $this->sip_trunk = $var;

        return $this;
    }

    /**
     * Переадресация
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Redirect redirect = 26;</code>
     * @return \Keyapis\Device\V1\Device\Redirect|null
     */
    public function getRedirect()
    {
        return $this->redirect;
    }

    public function hasRedirect()
    {
        return isset($this->redirect);
    }

    public function clearRedirect()
    {
        unset($this->redirect);
    }

    /**
     * Переадресация
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.Redirect redirect = 26;</code>
     * @param \Keyapis\Device\V1\Device\Redirect $var
     * @return $this
     */
    public function setRedirect($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Device\Redirect::class);
        $this->redirect = $var;

        return $this;
    }

    /**
     * Настройки автозамены пароля
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.AutochangePasswordSettings autochange_password_settings = 27;</code>
     * @return \Keyapis\Device\V1\Device\AutochangePasswordSettings|null
     */
    public function getAutochangePasswordSettings()
    {
        return $this->autochange_password_settings;
    }

    public function hasAutochangePasswordSettings()
    {
        return isset($this->autochange_password_settings);
    }

    public function clearAutochangePasswordSettings()
    {
        unset($this->autochange_password_settings);
    }

    /**
     * Настройки автозамены пароля
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.AutochangePasswordSettings autochange_password_settings = 27;</code>
     * @param \Keyapis\Device\V1\Device\AutochangePasswordSettings $var
     * @return $this
     */
    public function setAutochangePasswordSettings($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Device\AutochangePasswordSettings::class);
        $this->autochange_password_settings = $var;

        return $this;
    }

    /**
     * Учетные данные пользователей
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Device.Credentials credentials = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCredentials()
    {
        return $this->credentials;
    }

    /**
     * Учетные данные пользователей
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Device.Credentials credentials = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Keyapis\Device\V1\Device\Credentials>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCredentials($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\Device\Credentials::class);
        $this->credentials = $arr;

        return $this;
    }

    /**
     * Сип-аккаунт
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue sip_account = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getSipAccount()
    {
        return $this->sip_account;
    }

    public function hasSipAccount()
    {
        return isset($this->sip_account);
    }

    public function clearSipAccount()
    {
        unset($this->sip_account);
    }

    /**
     * Returns the unboxed value from <code>getSipAccount()</code>

     * Сип-аккаунт
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue sip_account = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string|null
     */
    public function getSipAccountUnwrapped()
    {
        return $this->readWrapperValue("sip_account");
    }

    /**
     * Сип-аккаунт
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue sip_account = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setSipAccount($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->sip_account = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.

     * Сип-аккаунт
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue sip_account = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string|null $var
     * @return $this
     */
    public function setSipAccountUnwrapped($var)
    {
        $this->writeWrapperValue("sip_account", $var);
        return $this;}

    /**
     * Статус синхронизации
     *
     * Generated from protobuf field <code>.keyapis.device.v1.SyncStatus sync_status = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Keyapis\Device\V1\SyncStatus|null
     */
    public function getSyncStatus()
    {
        return $this->sync_status;
    }

    public function hasSyncStatus()
    {
        return isset($this->sync_status);
    }

    public function clearSyncStatus()
    {
        unset($this->sync_status);
    }

    /**
     * Статус синхронизации
     *
     * Generated from protobuf field <code>.keyapis.device.v1.SyncStatus sync_status = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Keyapis\Device\V1\SyncStatus $var
     * @return $this
     */
    public function setSyncStatus($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\SyncStatus::class);
        $this->sync_status = $var;

        return $this;
    }

}

