<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: deviceapis/device/v1/deviceapis_device_reader_v1.proto

namespace Deviceapis\Device\V1;

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

/**
 * Считыватель
 *
 * Generated from protobuf message <code>deviceapis.device.v1.Reader</code>
 */
class Reader extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор.
     * id=100 - Считыватель внутренний.
     * id=1 - Считыватель внешний №1.
     * id=2 - Считыватель внешний №2 и тд
     *
     * Generated from protobuf field <code>int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $id = 0;
    /**
     * Список идентификаторов профилей шифрования
     *
     * Generated from protobuf field <code>repeated int32 encryption_profile_ids = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $encryption_profile_ids;
    /**
     * Список идентификаторов реле.
     * Диапазон: 1..64
     *
     * Generated from protobuf field <code>repeated int32 relay_indexes = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $relay_indexes;
    /**
     * Считыватель работает не в безопасном режиме (по UID)
     *
     * Generated from protobuf field <code>bool is_none_secure_mode = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $is_none_secure_mode = false;
    /**
     * Направление
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.Reader.DirectionType direction_type = 5;</code>
     */
    protected $direction_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $id
     *           Идентификатор.
     *           id=100 - Считыватель внутренний.
     *           id=1 - Считыватель внешний №1.
     *           id=2 - Считыватель внешний №2 и тд
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $encryption_profile_ids
     *           Список идентификаторов профилей шифрования
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $relay_indexes
     *           Список идентификаторов реле.
     *           Диапазон: 1..64
     *     @type bool $is_none_secure_mode
     *           Считыватель работает не в безопасном режиме (по UID)
     *     @type int $direction_type
     *           Направление
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Deviceapis\Device\V1\DeviceapisDeviceReaderV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор.
     * id=100 - Считыватель внутренний.
     * id=1 - Считыватель внешний №1.
     * id=2 - Считыватель внешний №2 и тд
     *
     * Generated from protobuf field <code>int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор.
     * id=100 - Считыватель внутренний.
     * id=1 - Считыватель внешний №1.
     * id=2 - Считыватель внешний №2 и тд
     *
     * Generated from protobuf field <code>int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkInt32($var);
        $this->id = $var;

        return $this;
    }

    /**
     * Список идентификаторов профилей шифрования
     *
     * Generated from protobuf field <code>repeated int32 encryption_profile_ids = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEncryptionProfileIds()
    {
        return $this->encryption_profile_ids;
    }

    /**
     * Список идентификаторов профилей шифрования
     *
     * Generated from protobuf field <code>repeated int32 encryption_profile_ids = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEncryptionProfileIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->encryption_profile_ids = $arr;

        return $this;
    }

    /**
     * Список идентификаторов реле.
     * Диапазон: 1..64
     *
     * Generated from protobuf field <code>repeated int32 relay_indexes = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRelayIndexes()
    {
        return $this->relay_indexes;
    }

    /**
     * Список идентификаторов реле.
     * Диапазон: 1..64
     *
     * Generated from protobuf field <code>repeated int32 relay_indexes = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRelayIndexes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->relay_indexes = $arr;

        return $this;
    }

    /**
     * Считыватель работает не в безопасном режиме (по UID)
     *
     * Generated from protobuf field <code>bool is_none_secure_mode = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return bool
     */
    public function getIsNoneSecureMode()
    {
        return $this->is_none_secure_mode;
    }

    /**
     * Считыватель работает не в безопасном режиме (по UID)
     *
     * Generated from protobuf field <code>bool is_none_secure_mode = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param bool $var
     * @return $this
     */
    public function setIsNoneSecureMode($var)
    {
        GPBUtil::checkBool($var);
        $this->is_none_secure_mode = $var;

        return $this;
    }

    /**
     * Направление
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.Reader.DirectionType direction_type = 5;</code>
     * @return int
     */
    public function getDirectionType()
    {
        return $this->direction_type;
    }

    /**
     * Направление
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.Reader.DirectionType direction_type = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setDirectionType($var)
    {
        GPBUtil::checkEnum($var, \Deviceapis\Device\V1\Reader\DirectionType::class);
        $this->direction_type = $var;

        return $this;
    }

}

