<?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_fail
 *
 * Generated from protobuf message <code>keyapis.device.v1.DeleteRfidsFailTask</code>
 */
class DeleteRfidsFailTask 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>int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $device_id = 0;
    /**
     * Ошибки ключей
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.RfidError rfid_errors = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $rfid_errors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор запроса
     *     @type int $device_id
     *           Идентификатор устройства
     *     @type array<\Keyapis\Device\V1\RfidError>|\Google\Protobuf\Internal\RepeatedField $rfid_errors
     *           Ошибки ключей
     * }
     */
    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>int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getDeviceId()
    {
        return $this->device_id;
    }

    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 2 [(.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.RfidError rfid_errors = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRfidErrors()
    {
        return $this->rfid_errors;
    }

    /**
     * Ошибки ключей
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.RfidError rfid_errors = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Keyapis\Device\V1\RfidError>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRfidErrors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\RfidError::class);
        $this->rfid_errors = $arr;

        return $this;
    }

}

