<?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.add_rfids
 *
 * Generated from protobuf message <code>keyapis.device.v1.AddRfidsTask</code>
 */
class AddRfidsTask 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;</code>
     */
    protected $username = '';
    /**
     * Пароль
     *
     * Generated from protobuf field <code>string password = 5;</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>repeated .keyapis.device.v1.Rfid rfids = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $rfids;

    /**
     * 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 array<\Keyapis\Device\V1\Rfid>|\Google\Protobuf\Internal\RepeatedField $rfids
     *           Ключи
     * }
     */
    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;</code>
     * @return string
     */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     * Имя пользователя
     *
     * Generated from protobuf field <code>string username = 4;</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;</code>
     * @return string
     */
    public function getPassword()
    {
        return $this->password;
    }

    /**
     * Пароль
     *
     * Generated from protobuf field <code>string password = 5;</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>repeated .keyapis.device.v1.Rfid rfids = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRfids()
    {
        return $this->rfids;
    }

    /**
     * Ключи
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Rfid rfids = 7 [(.google.api.field_behavior) = REQUIRED];</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;
    }

}

