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

namespace Keyapis\Rfidregistry\V1\Record;

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

/**
 * Содержимое ячейки ключа
 *
 * Generated from protobuf message <code>keyapis.rfidregistry.v1.Record.DataCell</code>
 */
class DataCell extends \Google\Protobuf\Internal\Message
{
    /**
     * Сектор.
     * # Диапазон: 0..127
     *
     * Generated from protobuf field <code>int32 section = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $section = 0;
    /**
     * Блок.
     * # Диапазон: 0..127
     *
     * Generated from protobuf field <code>int32 block = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $block = 0;
    /**
     * Данные.
     * # Паттерн: /^[A-Za-z0-9=]+$/
     *
     * Generated from protobuf field <code>string data = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $section
     *           Сектор.
     *           # Диапазон: 0..127
     *     @type int $block
     *           Блок.
     *           # Диапазон: 0..127
     *     @type string $data
     *           Данные.
     *           # Паттерн: /^[A-Za-z0-9=]+$/
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Rfidregistry\V1\KeyapisRfidregistryRecordV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Сектор.
     * # Диапазон: 0..127
     *
     * Generated from protobuf field <code>int32 section = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getSection()
    {
        return $this->section;
    }

    /**
     * Сектор.
     * # Диапазон: 0..127
     *
     * Generated from protobuf field <code>int32 section = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setSection($var)
    {
        GPBUtil::checkInt32($var);
        $this->section = $var;

        return $this;
    }

    /**
     * Блок.
     * # Диапазон: 0..127
     *
     * Generated from protobuf field <code>int32 block = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getBlock()
    {
        return $this->block;
    }

    /**
     * Блок.
     * # Диапазон: 0..127
     *
     * Generated from protobuf field <code>int32 block = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setBlock($var)
    {
        GPBUtil::checkInt32($var);
        $this->block = $var;

        return $this;
    }

    /**
     * Данные.
     * # Паттерн: /^[A-Za-z0-9=]+$/
     *
     * Generated from protobuf field <code>string data = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * Данные.
     * # Паттерн: /^[A-Za-z0-9=]+$/
     *
     * Generated from protobuf field <code>string data = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setData($var)
    {
        GPBUtil::checkString($var, True);
        $this->data = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DataCell::class, \Keyapis\Rfidregistry\V1\Record_DataCell::class);

