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

namespace Keyapis\Rfidregistry\V1;

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

/**
 * Запись.
 * # Описание модели
 *
 * Generated from protobuf message <code>keyapis.rfidregistry.v1.Record</code>
 */
class Record extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор.
     * Если не передан создаётся сервером.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Тип ключа
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.RfidType rfid_type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $rfid_type = 0;
    /**
     * Тип шифрования ключа.
     * Максимально поддерживаемый ключом тип шифрования
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $encryption_type = 0;
    /**
     * Номер ключа.
     * Указывается при создании.
     * # Диапазон: 1..14
     *
     * Generated from protobuf field <code>string uid = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $uid = '';
    /**
     * Тип статуса ключа
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.StatusType status_type = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $status_type = 0;
    /**
     * Дата перевода в статус "Новый".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp new_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $new_at = null;
    /**
     * Дата перевода в статус "Отгружен".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp shipped_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $shipped_at = null;
    /**
     * Дата перевода в статус "Брак".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp defect_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $defect_at = null;
    /**
     * Дата перевода в статус "Использован".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp in_use_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $in_use_at = null;
    /**
     * Идентификатор привязанного ключа.
     * Заполняется при переводе в статус "Использован".
     * # Диапазон: 0..16
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue in_use_rfid_id = 10;</code>
     */
    protected $in_use_rfid_id = null;
    /**
     * Содержимое ячеек ключа
     *
     * Generated from protobuf field <code>repeated .keyapis.rfidregistry.v1.Record.DataCell data_cells = 11;</code>
     */
    private $data_cells;
    /**
     * Идентификатор владельца.
     * Заполняется сервером.
     * # Диапазон: 0..255
     *
     * Generated from protobuf field <code>string resource_owner_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $resource_owner_id = '';
    /**
     * Номер коробки.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 package_info_box = 13;</code>
     */
    protected $package_info_box = 0;
    /**
     * Номер места в коробке.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 package_info_place = 14;</code>
     */
    protected $package_info_place = 0;
    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $changed_at = null;
    /**
     * Конфигурации шифрования ключа
     *
     * Generated from protobuf field <code>repeated .keyapis.rfidregistry.v1.Record.AesKeyConfiguration aes_key_configurations = 16;</code>
     */
    private $aes_key_configurations;
    /**
     * Контрольные суммы.
     * Нужны для ключей SL1 и SL3
     *
     * Generated from protobuf field <code>repeated .keyapis.rfidregistry.v1.Record.Trailer trailers = 17;</code>
     */
    private $trailers;
    /**
     * Номер заказа.
     * # Диапазон: 0..256
     *
     * Generated from protobuf field <code>string order_number = 18 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $order_number = '';
    /**
     * Дата заказа.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp order_at = 19 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $order_at = null;
    /**
     * Владелец привязанного ключа.
     * Заполняется сервером, значение берётся из токена при использовании ключа.
     * # Диапазон: 0..255
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue in_use_resource_owner_id = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $in_use_resource_owner_id = null;
    /**
     * Признак, удалена ли запись
     *
     * Generated from protobuf field <code>bool is_deleted = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $is_deleted = false;
    /**
     * Дата удаления.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $deleted_at = null;
    /**
     * Производитель.
     * # Диапазон: 3..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue vendor_name = 23;</code>
     */
    protected $vendor_name = null;
    /**
     * Метод идентификации
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.IdentificationMethodType identification_method_type = 24;</code>
     */
    protected $identification_method_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Идентификатор.
     *           Если не передан создаётся сервером.
     *           # Тип: Guid
     *     @type int $rfid_type
     *           Тип ключа
     *     @type int $encryption_type
     *           Тип шифрования ключа.
     *           Максимально поддерживаемый ключом тип шифрования
     *     @type string $uid
     *           Номер ключа.
     *           Указывается при создании.
     *           # Диапазон: 1..14
     *     @type int $status_type
     *           Тип статуса ключа
     *     @type \Google\Protobuf\Timestamp $new_at
     *           Дата перевода в статус "Новый".
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $shipped_at
     *           Дата перевода в статус "Отгружен".
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $defect_at
     *           Дата перевода в статус "Брак".
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $in_use_at
     *           Дата перевода в статус "Использован".
     *           # Тип: DateTime
     *     @type \Google\Protobuf\StringValue $in_use_rfid_id
     *           Идентификатор привязанного ключа.
     *           Заполняется при переводе в статус "Использован".
     *           # Диапазон: 0..16
     *     @type array<\Keyapis\Rfidregistry\V1\Record\DataCell>|\Google\Protobuf\Internal\RepeatedField $data_cells
     *           Содержимое ячеек ключа
     *     @type string $resource_owner_id
     *           Идентификатор владельца.
     *           Заполняется сервером.
     *           # Диапазон: 0..255
     *     @type int $package_info_box
     *           Номер коробки.
     *           # Диапазон: 1..2147483647
     *     @type int $package_info_place
     *           Номер места в коробке.
     *           # Диапазон: 1..2147483647
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата последнего изменения.
     *           Заполняется и обновляется сервером.
     *           Заполняется при создании и изменении.
     *           Является версией объекта.
     *           # Тип: DateTime
     *     @type array<\Keyapis\Rfidregistry\V1\Record\AesKeyConfiguration>|\Google\Protobuf\Internal\RepeatedField $aes_key_configurations
     *           Конфигурации шифрования ключа
     *     @type array<\Keyapis\Rfidregistry\V1\Record\Trailer>|\Google\Protobuf\Internal\RepeatedField $trailers
     *           Контрольные суммы.
     *           Нужны для ключей SL1 и SL3
     *     @type string $order_number
     *           Номер заказа.
     *           # Диапазон: 0..256
     *     @type \Google\Protobuf\Timestamp $order_at
     *           Дата заказа.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\StringValue $in_use_resource_owner_id
     *           Владелец привязанного ключа.
     *           Заполняется сервером, значение берётся из токена при использовании ключа.
     *           # Диапазон: 0..255
     *     @type bool $is_deleted
     *           Признак, удалена ли запись
     *     @type \Google\Protobuf\Timestamp $deleted_at
     *           Дата удаления.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\StringValue $vendor_name
     *           Производитель.
     *           # Диапазон: 3..100
     *     @type int $identification_method_type
     *           Метод идентификации
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Rfidregistry\V1\KeyapisRfidregistryRecordV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор.
     * Если не передан создаётся сервером.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор.
     * Если не передан создаётся сервером.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Тип ключа
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.RfidType rfid_type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getRfidType()
    {
        return $this->rfid_type;
    }

    /**
     * Тип ключа
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.RfidType rfid_type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setRfidType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Rfidregistry\V1\Record\RfidType::class);
        $this->rfid_type = $var;

        return $this;
    }

    /**
     * Тип шифрования ключа.
     * Максимально поддерживаемый ключом тип шифрования
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getEncryptionType()
    {
        return $this->encryption_type;
    }

    /**
     * Тип шифрования ключа.
     * Максимально поддерживаемый ключом тип шифрования
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setEncryptionType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Rfidregistry\V1\Record\EncryptionType::class);
        $this->encryption_type = $var;

        return $this;
    }

    /**
     * Номер ключа.
     * Указывается при создании.
     * # Диапазон: 1..14
     *
     * Generated from protobuf field <code>string uid = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * Номер ключа.
     * Указывается при создании.
     * # Диапазон: 1..14
     *
     * Generated from protobuf field <code>string uid = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->uid = $var;

        return $this;
    }

    /**
     * Тип статуса ключа
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.StatusType status_type = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getStatusType()
    {
        return $this->status_type;
    }

    /**
     * Тип статуса ключа
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.StatusType status_type = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setStatusType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Rfidregistry\V1\Record\StatusType::class);
        $this->status_type = $var;

        return $this;
    }

    /**
     * Дата перевода в статус "Новый".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp new_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getNewAt()
    {
        return $this->new_at;
    }

    public function hasNewAt()
    {
        return isset($this->new_at);
    }

    public function clearNewAt()
    {
        unset($this->new_at);
    }

    /**
     * Дата перевода в статус "Новый".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp new_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setNewAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->new_at = $var;

        return $this;
    }

    /**
     * Дата перевода в статус "Отгружен".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp shipped_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getShippedAt()
    {
        return $this->shipped_at;
    }

    public function hasShippedAt()
    {
        return isset($this->shipped_at);
    }

    public function clearShippedAt()
    {
        unset($this->shipped_at);
    }

    /**
     * Дата перевода в статус "Отгружен".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp shipped_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setShippedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->shipped_at = $var;

        return $this;
    }

    /**
     * Дата перевода в статус "Брак".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp defect_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getDefectAt()
    {
        return $this->defect_at;
    }

    public function hasDefectAt()
    {
        return isset($this->defect_at);
    }

    public function clearDefectAt()
    {
        unset($this->defect_at);
    }

    /**
     * Дата перевода в статус "Брак".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp defect_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setDefectAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->defect_at = $var;

        return $this;
    }

    /**
     * Дата перевода в статус "Использован".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp in_use_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getInUseAt()
    {
        return $this->in_use_at;
    }

    public function hasInUseAt()
    {
        return isset($this->in_use_at);
    }

    public function clearInUseAt()
    {
        unset($this->in_use_at);
    }

    /**
     * Дата перевода в статус "Использован".
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp in_use_at = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setInUseAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->in_use_at = $var;

        return $this;
    }

    /**
     * Идентификатор привязанного ключа.
     * Заполняется при переводе в статус "Использован".
     * # Диапазон: 0..16
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue in_use_rfid_id = 10;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getInUseRfidId()
    {
        return $this->in_use_rfid_id;
    }

    public function hasInUseRfidId()
    {
        return isset($this->in_use_rfid_id);
    }

    public function clearInUseRfidId()
    {
        unset($this->in_use_rfid_id);
    }

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

     * Идентификатор привязанного ключа.
     * Заполняется при переводе в статус "Использован".
     * # Диапазон: 0..16
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue in_use_rfid_id = 10;</code>
     * @return string|null
     */
    public function getInUseRfidIdUnwrapped()
    {
        return $this->readWrapperValue("in_use_rfid_id");
    }

    /**
     * Идентификатор привязанного ключа.
     * Заполняется при переводе в статус "Использован".
     * # Диапазон: 0..16
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue in_use_rfid_id = 10;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setInUseRfidId($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->in_use_rfid_id = $var;

        return $this;
    }

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

     * Идентификатор привязанного ключа.
     * Заполняется при переводе в статус "Использован".
     * # Диапазон: 0..16
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue in_use_rfid_id = 10;</code>
     * @param string|null $var
     * @return $this
     */
    public function setInUseRfidIdUnwrapped($var)
    {
        $this->writeWrapperValue("in_use_rfid_id", $var);
        return $this;}

    /**
     * Содержимое ячеек ключа
     *
     * Generated from protobuf field <code>repeated .keyapis.rfidregistry.v1.Record.DataCell data_cells = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDataCells()
    {
        return $this->data_cells;
    }

    /**
     * Содержимое ячеек ключа
     *
     * Generated from protobuf field <code>repeated .keyapis.rfidregistry.v1.Record.DataCell data_cells = 11;</code>
     * @param array<\Keyapis\Rfidregistry\V1\Record\DataCell>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDataCells($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Rfidregistry\V1\Record\DataCell::class);
        $this->data_cells = $arr;

        return $this;
    }

    /**
     * Идентификатор владельца.
     * Заполняется сервером.
     * # Диапазон: 0..255
     *
     * Generated from protobuf field <code>string resource_owner_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getResourceOwnerId()
    {
        return $this->resource_owner_id;
    }

    /**
     * Идентификатор владельца.
     * Заполняется сервером.
     * # Диапазон: 0..255
     *
     * Generated from protobuf field <code>string resource_owner_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setResourceOwnerId($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_owner_id = $var;

        return $this;
    }

    /**
     * Номер коробки.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 package_info_box = 13;</code>
     * @return int
     */
    public function getPackageInfoBox()
    {
        return $this->package_info_box;
    }

    /**
     * Номер коробки.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 package_info_box = 13;</code>
     * @param int $var
     * @return $this
     */
    public function setPackageInfoBox($var)
    {
        GPBUtil::checkInt32($var);
        $this->package_info_box = $var;

        return $this;
    }

    /**
     * Номер места в коробке.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 package_info_place = 14;</code>
     * @return int
     */
    public function getPackageInfoPlace()
    {
        return $this->package_info_place;
    }

    /**
     * Номер места в коробке.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 package_info_place = 14;</code>
     * @param int $var
     * @return $this
     */
    public function setPackageInfoPlace($var)
    {
        GPBUtil::checkInt32($var);
        $this->package_info_place = $var;

        return $this;
    }

    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getChangedAt()
    {
        return $this->changed_at;
    }

    public function hasChangedAt()
    {
        return isset($this->changed_at);
    }

    public function clearChangedAt()
    {
        unset($this->changed_at);
    }

    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setChangedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->changed_at = $var;

        return $this;
    }

    /**
     * Конфигурации шифрования ключа
     *
     * Generated from protobuf field <code>repeated .keyapis.rfidregistry.v1.Record.AesKeyConfiguration aes_key_configurations = 16;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAesKeyConfigurations()
    {
        return $this->aes_key_configurations;
    }

    /**
     * Конфигурации шифрования ключа
     *
     * Generated from protobuf field <code>repeated .keyapis.rfidregistry.v1.Record.AesKeyConfiguration aes_key_configurations = 16;</code>
     * @param array<\Keyapis\Rfidregistry\V1\Record\AesKeyConfiguration>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAesKeyConfigurations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Rfidregistry\V1\Record\AesKeyConfiguration::class);
        $this->aes_key_configurations = $arr;

        return $this;
    }

    /**
     * Контрольные суммы.
     * Нужны для ключей SL1 и SL3
     *
     * Generated from protobuf field <code>repeated .keyapis.rfidregistry.v1.Record.Trailer trailers = 17;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTrailers()
    {
        return $this->trailers;
    }

    /**
     * Контрольные суммы.
     * Нужны для ключей SL1 и SL3
     *
     * Generated from protobuf field <code>repeated .keyapis.rfidregistry.v1.Record.Trailer trailers = 17;</code>
     * @param array<\Keyapis\Rfidregistry\V1\Record\Trailer>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTrailers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Rfidregistry\V1\Record\Trailer::class);
        $this->trailers = $arr;

        return $this;
    }

    /**
     * Номер заказа.
     * # Диапазон: 0..256
     *
     * Generated from protobuf field <code>string order_number = 18 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getOrderNumber()
    {
        return $this->order_number;
    }

    /**
     * Номер заказа.
     * # Диапазон: 0..256
     *
     * Generated from protobuf field <code>string order_number = 18 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setOrderNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->order_number = $var;

        return $this;
    }

    /**
     * Дата заказа.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp order_at = 19 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getOrderAt()
    {
        return $this->order_at;
    }

    public function hasOrderAt()
    {
        return isset($this->order_at);
    }

    public function clearOrderAt()
    {
        unset($this->order_at);
    }

    /**
     * Дата заказа.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp order_at = 19 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setOrderAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->order_at = $var;

        return $this;
    }

    /**
     * Владелец привязанного ключа.
     * Заполняется сервером, значение берётся из токена при использовании ключа.
     * # Диапазон: 0..255
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue in_use_resource_owner_id = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getInUseResourceOwnerId()
    {
        return $this->in_use_resource_owner_id;
    }

    public function hasInUseResourceOwnerId()
    {
        return isset($this->in_use_resource_owner_id);
    }

    public function clearInUseResourceOwnerId()
    {
        unset($this->in_use_resource_owner_id);
    }

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

     * Владелец привязанного ключа.
     * Заполняется сервером, значение берётся из токена при использовании ключа.
     * # Диапазон: 0..255
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue in_use_resource_owner_id = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string|null
     */
    public function getInUseResourceOwnerIdUnwrapped()
    {
        return $this->readWrapperValue("in_use_resource_owner_id");
    }

    /**
     * Владелец привязанного ключа.
     * Заполняется сервером, значение берётся из токена при использовании ключа.
     * # Диапазон: 0..255
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue in_use_resource_owner_id = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setInUseResourceOwnerId($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->in_use_resource_owner_id = $var;

        return $this;
    }

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

     * Владелец привязанного ключа.
     * Заполняется сервером, значение берётся из токена при использовании ключа.
     * # Диапазон: 0..255
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue in_use_resource_owner_id = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string|null $var
     * @return $this
     */
    public function setInUseResourceOwnerIdUnwrapped($var)
    {
        $this->writeWrapperValue("in_use_resource_owner_id", $var);
        return $this;}

    /**
     * Признак, удалена ли запись
     *
     * Generated from protobuf field <code>bool is_deleted = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getIsDeleted()
    {
        return $this->is_deleted;
    }

    /**
     * Признак, удалена ли запись
     *
     * Generated from protobuf field <code>bool is_deleted = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setIsDeleted($var)
    {
        GPBUtil::checkBool($var);
        $this->is_deleted = $var;

        return $this;
    }

    /**
     * Дата удаления.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getDeletedAt()
    {
        return $this->deleted_at;
    }

    public function hasDeletedAt()
    {
        return isset($this->deleted_at);
    }

    public function clearDeletedAt()
    {
        unset($this->deleted_at);
    }

    /**
     * Дата удаления.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setDeletedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->deleted_at = $var;

        return $this;
    }

    /**
     * Производитель.
     * # Диапазон: 3..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue vendor_name = 23;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getVendorName()
    {
        return $this->vendor_name;
    }

    public function hasVendorName()
    {
        return isset($this->vendor_name);
    }

    public function clearVendorName()
    {
        unset($this->vendor_name);
    }

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

     * Производитель.
     * # Диапазон: 3..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue vendor_name = 23;</code>
     * @return string|null
     */
    public function getVendorNameUnwrapped()
    {
        return $this->readWrapperValue("vendor_name");
    }

    /**
     * Производитель.
     * # Диапазон: 3..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue vendor_name = 23;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setVendorName($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->vendor_name = $var;

        return $this;
    }

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

     * Производитель.
     * # Диапазон: 3..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue vendor_name = 23;</code>
     * @param string|null $var
     * @return $this
     */
    public function setVendorNameUnwrapped($var)
    {
        $this->writeWrapperValue("vendor_name", $var);
        return $this;}

    /**
     * Метод идентификации
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.IdentificationMethodType identification_method_type = 24;</code>
     * @return int
     */
    public function getIdentificationMethodType()
    {
        return $this->identification_method_type;
    }

    /**
     * Метод идентификации
     *
     * Generated from protobuf field <code>.keyapis.rfidregistry.v1.Record.IdentificationMethodType identification_method_type = 24;</code>
     * @param int $var
     * @return $this
     */
    public function setIdentificationMethodType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Rfidregistry\V1\Record\IdentificationMethodType::class);
        $this->identification_method_type = $var;

        return $this;
    }

}

