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

namespace Keyapis\Device\V1;

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

/**
 *Задача на конфигурирование устройства.
 * Очередь key.device.configure_device
 *
 * Generated from protobuf message <code>keyapis.device.v1.ConfigureDeviceTask</code>
 */
class ConfigureDeviceTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $request_id = '';
    /**
     * Модель
     *
     * Generated from protobuf field <code>string model = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $model = '';
    /**
     * Адрес устройства
     *
     * Generated from protobuf field <code>string host = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $host = '';
    /**
     * Имя пользователя устройства
     *
     * Generated from protobuf field <code>string username = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $username = '';
    /**
     * Пароль пользователья устройства
     *
     * Generated from protobuf field <code>string password = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $password = '';
    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $device_id = 0;
    /**
     * Пресет устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset preset = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $preset = null;
    /**
     * Sip аккаунт
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceTask.SipAccount sip_account = 8;</code>
     */
    protected $sip_account = null;
    /**
     * Список сип-номеров в помещениях.
     * # Диапазон: 0..10000
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.SipRoom sip_rooms = 9;</code>
     */
    private $sip_rooms;
    /**
     * Параметры калитки
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceTask.Gate gate = 10;</code>
     */
    protected $gate = null;
    /**
     * Ключи
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Rfid rfids = 11;</code>
     */
    private $rfids;
    /**
     * Коды
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Code codes = 12;</code>
     */
    private $codes;
    /**
     * Таймзона NTP
     *
     * Generated from protobuf field <code>string ntp_timezone = 13 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $ntp_timezone = '';
    /**
     * Параметр Sl3
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceTask.Sl3 sl3 = 14;</code>
     */
    protected $sl3 = null;
    /**
     * Настройки вызова экстренной службы
     *
     * Generated from protobuf field <code>.keyapis.device.v1.EmergencyCallSettings emergency_call_settings = 15;</code>
     */
    protected $emergency_call_settings = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор запроса
     *     @type string $model
     *           Модель
     *     @type string $host
     *           Адрес устройства
     *     @type string $username
     *           Имя пользователя устройства
     *     @type string $password
     *           Пароль пользователья устройства
     *     @type int $device_id
     *           Идентификатор устройства
     *     @type \Keyapis\Device\V1\Preset $preset
     *           Пресет устройства
     *     @type \Keyapis\Device\V1\ConfigureDeviceTask\SipAccount $sip_account
     *           Sip аккаунт
     *     @type array<\Keyapis\Device\V1\SipRoom>|\Google\Protobuf\Internal\RepeatedField $sip_rooms
     *           Список сип-номеров в помещениях.
     *           # Диапазон: 0..10000
     *     @type \Keyapis\Device\V1\ConfigureDeviceTask\Gate $gate
     *           Параметры калитки
     *     @type array<\Keyapis\Device\V1\Rfid>|\Google\Protobuf\Internal\RepeatedField $rfids
     *           Ключи
     *     @type array<\Keyapis\Device\V1\Code>|\Google\Protobuf\Internal\RepeatedField $codes
     *           Коды
     *     @type string $ntp_timezone
     *           Таймзона NTP
     *     @type \Keyapis\Device\V1\ConfigureDeviceTask\Sl3 $sl3
     *           Параметр Sl3
     *     @type \Keyapis\Device\V1\EmergencyCallSettings $emergency_call_settings
     *           Настройки вызова экстренной службы
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceEventsV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Модель
     *
     * Generated from protobuf field <code>string model = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getModel()
    {
        return $this->model;
    }

    /**
     * Модель
     *
     * Generated from protobuf field <code>string model = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setModel($var)
    {
        GPBUtil::checkString($var, True);
        $this->model = $var;

        return $this;
    }

    /**
     * Адрес устройства
     *
     * Generated from protobuf field <code>string host = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getHost()
    {
        return $this->host;
    }

    /**
     * Адрес устройства
     *
     * Generated from protobuf field <code>string host = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setHost($var)
    {
        GPBUtil::checkString($var, True);
        $this->host = $var;

        return $this;
    }

    /**
     * Имя пользователя устройства
     *
     * Generated from protobuf field <code>string username = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     * Имя пользователя устройства
     *
     * Generated from protobuf field <code>string username = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setUsername($var)
    {
        GPBUtil::checkString($var, True);
        $this->username = $var;

        return $this;
    }

    /**
     * Пароль пользователья устройства
     *
     * Generated from protobuf field <code>string password = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPassword()
    {
        return $this->password;
    }

    /**
     * Пароль пользователья устройства
     *
     * Generated from protobuf field <code>string password = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPassword($var)
    {
        GPBUtil::checkString($var, True);
        $this->password = $var;

        return $this;
    }

    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getDeviceId()
    {
        return $this->device_id;
    }

    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setDeviceId($var)
    {
        GPBUtil::checkInt32($var);
        $this->device_id = $var;

        return $this;
    }

    /**
     * Пресет устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset preset = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\Device\V1\Preset|null
     */
    public function getPreset()
    {
        return $this->preset;
    }

    public function hasPreset()
    {
        return isset($this->preset);
    }

    public function clearPreset()
    {
        unset($this->preset);
    }

    /**
     * Пресет устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset preset = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\Device\V1\Preset $var
     * @return $this
     */
    public function setPreset($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Preset::class);
        $this->preset = $var;

        return $this;
    }

    /**
     * Sip аккаунт
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceTask.SipAccount sip_account = 8;</code>
     * @return \Keyapis\Device\V1\ConfigureDeviceTask\SipAccount|null
     */
    public function getSipAccount()
    {
        return $this->sip_account;
    }

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

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

    /**
     * Sip аккаунт
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceTask.SipAccount sip_account = 8;</code>
     * @param \Keyapis\Device\V1\ConfigureDeviceTask\SipAccount $var
     * @return $this
     */
    public function setSipAccount($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\ConfigureDeviceTask\SipAccount::class);
        $this->sip_account = $var;

        return $this;
    }

    /**
     * Список сип-номеров в помещениях.
     * # Диапазон: 0..10000
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.SipRoom sip_rooms = 9;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSipRooms()
    {
        return $this->sip_rooms;
    }

    /**
     * Список сип-номеров в помещениях.
     * # Диапазон: 0..10000
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.SipRoom sip_rooms = 9;</code>
     * @param array<\Keyapis\Device\V1\SipRoom>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSipRooms($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\SipRoom::class);
        $this->sip_rooms = $arr;

        return $this;
    }

    /**
     * Параметры калитки
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceTask.Gate gate = 10;</code>
     * @return \Keyapis\Device\V1\ConfigureDeviceTask\Gate|null
     */
    public function getGate()
    {
        return $this->gate;
    }

    public function hasGate()
    {
        return isset($this->gate);
    }

    public function clearGate()
    {
        unset($this->gate);
    }

    /**
     * Параметры калитки
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceTask.Gate gate = 10;</code>
     * @param \Keyapis\Device\V1\ConfigureDeviceTask\Gate $var
     * @return $this
     */
    public function setGate($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\ConfigureDeviceTask\Gate::class);
        $this->gate = $var;

        return $this;
    }

    /**
     * Ключи
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Rfid rfids = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRfids()
    {
        return $this->rfids;
    }

    /**
     * Ключи
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Rfid rfids = 11;</code>
     * @param array<\Keyapis\Device\V1\Rfid>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRfids($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\Rfid::class);
        $this->rfids = $arr;

        return $this;
    }

    /**
     * Коды
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Code codes = 12;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCodes()
    {
        return $this->codes;
    }

    /**
     * Коды
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Code codes = 12;</code>
     * @param array<\Keyapis\Device\V1\Code>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCodes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\Code::class);
        $this->codes = $arr;

        return $this;
    }

    /**
     * Таймзона NTP
     *
     * Generated from protobuf field <code>string ntp_timezone = 13 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getNtpTimezone()
    {
        return $this->ntp_timezone;
    }

    /**
     * Таймзона NTP
     *
     * Generated from protobuf field <code>string ntp_timezone = 13 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setNtpTimezone($var)
    {
        GPBUtil::checkString($var, True);
        $this->ntp_timezone = $var;

        return $this;
    }

    /**
     * Параметр Sl3
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceTask.Sl3 sl3 = 14;</code>
     * @return \Keyapis\Device\V1\ConfigureDeviceTask\Sl3|null
     */
    public function getSl3()
    {
        return $this->sl3;
    }

    public function hasSl3()
    {
        return isset($this->sl3);
    }

    public function clearSl3()
    {
        unset($this->sl3);
    }

    /**
     * Параметр Sl3
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceTask.Sl3 sl3 = 14;</code>
     * @param \Keyapis\Device\V1\ConfigureDeviceTask\Sl3 $var
     * @return $this
     */
    public function setSl3($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\ConfigureDeviceTask\Sl3::class);
        $this->sl3 = $var;

        return $this;
    }

    /**
     * Настройки вызова экстренной службы
     *
     * Generated from protobuf field <code>.keyapis.device.v1.EmergencyCallSettings emergency_call_settings = 15;</code>
     * @return \Keyapis\Device\V1\EmergencyCallSettings|null
     */
    public function getEmergencyCallSettings()
    {
        return $this->emergency_call_settings;
    }

    public function hasEmergencyCallSettings()
    {
        return isset($this->emergency_call_settings);
    }

    public function clearEmergencyCallSettings()
    {
        unset($this->emergency_call_settings);
    }

    /**
     * Настройки вызова экстренной службы
     *
     * Generated from protobuf field <code>.keyapis.device.v1.EmergencyCallSettings emergency_call_settings = 15;</code>
     * @param \Keyapis\Device\V1\EmergencyCallSettings $var
     * @return $this
     */
    public function setEmergencyCallSettings($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\EmergencyCallSettings::class);
        $this->emergency_call_settings = $var;

        return $this;
    }

}

