<?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.delete_rfids
 *
 * Generated from protobuf message <code>keyapis.device.v1.DeleteRfidsTask</code>
 */
class DeleteRfidsTask 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;
    /**
     * При передаче этого флага в true, ответное сообщение не будет получено
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_answer_unnecessary = 8;</code>
     */
    protected $is_answer_unnecessary = 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 array<\Keyapis\Device\V1\Rfid>|\Google\Protobuf\Internal\RepeatedField $rfids
     *           Ключи
     *     @type \Google\Protobuf\BoolValue $is_answer_unnecessary
     *           При передаче этого флага в true, ответное сообщение не будет получено
     * }
     */
    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;
    }

    /**
     * При передаче этого флага в true, ответное сообщение не будет получено
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_answer_unnecessary = 8;</code>
     * @return \Google\Protobuf\BoolValue|null
     */
    public function getIsAnswerUnnecessary()
    {
        return $this->is_answer_unnecessary;
    }

    public function hasIsAnswerUnnecessary()
    {
        return isset($this->is_answer_unnecessary);
    }

    public function clearIsAnswerUnnecessary()
    {
        unset($this->is_answer_unnecessary);
    }

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

     * При передаче этого флага в true, ответное сообщение не будет получено
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_answer_unnecessary = 8;</code>
     * @return bool|null
     */
    public function getIsAnswerUnnecessaryUnwrapped()
    {
        return $this->readWrapperValue("is_answer_unnecessary");
    }

    /**
     * При передаче этого флага в true, ответное сообщение не будет получено
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_answer_unnecessary = 8;</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setIsAnswerUnnecessary($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->is_answer_unnecessary = $var;

        return $this;
    }

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

     * При передаче этого флага в true, ответное сообщение не будет получено
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_answer_unnecessary = 8;</code>
     * @param bool|null $var
     * @return $this
     */
    public function setIsAnswerUnnecessaryUnwrapped($var)
    {
        $this->writeWrapperValue("is_answer_unnecessary", $var);
        return $this;}

}

