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

namespace Keyapis\Device\V1\ConfigureDeviceTask;

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

/**
 * Параметры калитки
 *
 * Generated from protobuf message <code>keyapis.device.v1.ConfigureDeviceTask.Gate</code>
 */
class Gate extends \Google\Protobuf\Internal\Message
{
    /**
     * Состояние параметра калитки.
     * true - используется, необходимо настроить параметы.
     * false - не используется, необходимо выключить параметры калитки
     *
     * Generated from protobuf field <code>bool is_active = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $is_active = false;
    /**
     * Параметры реле
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.ConfigureDeviceTask.Gate.RelaySettings relay_settings = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $relay_settings;
    /**
     * Диапазоны квартир
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.ConfigureDeviceTask.Gate.RoomRange room_ranges = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $room_ranges;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $is_active
     *           Состояние параметра калитки.
     *           true - используется, необходимо настроить параметы.
     *           false - не используется, необходимо выключить параметры калитки
     *     @type array<\Keyapis\Device\V1\ConfigureDeviceTask\Gate\RelaySettings>|\Google\Protobuf\Internal\RepeatedField $relay_settings
     *           Параметры реле
     *     @type array<\Keyapis\Device\V1\ConfigureDeviceTask\Gate\RoomRange>|\Google\Protobuf\Internal\RepeatedField $room_ranges
     *           Диапазоны квартир
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceEventsV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Состояние параметра калитки.
     * true - используется, необходимо настроить параметы.
     * false - не используется, необходимо выключить параметры калитки
     *
     * Generated from protobuf field <code>bool is_active = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return bool
     */
    public function getIsActive()
    {
        return $this->is_active;
    }

    /**
     * Состояние параметра калитки.
     * true - используется, необходимо настроить параметы.
     * false - не используется, необходимо выключить параметры калитки
     *
     * Generated from protobuf field <code>bool is_active = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param bool $var
     * @return $this
     */
    public function setIsActive($var)
    {
        GPBUtil::checkBool($var);
        $this->is_active = $var;

        return $this;
    }

    /**
     * Параметры реле
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.ConfigureDeviceTask.Gate.RelaySettings relay_settings = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRelaySettings()
    {
        return $this->relay_settings;
    }

    /**
     * Параметры реле
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.ConfigureDeviceTask.Gate.RelaySettings relay_settings = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Keyapis\Device\V1\ConfigureDeviceTask\Gate\RelaySettings>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRelaySettings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\ConfigureDeviceTask\Gate\RelaySettings::class);
        $this->relay_settings = $arr;

        return $this;
    }

    /**
     * Диапазоны квартир
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.ConfigureDeviceTask.Gate.RoomRange room_ranges = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRoomRanges()
    {
        return $this->room_ranges;
    }

    /**
     * Диапазоны квартир
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.ConfigureDeviceTask.Gate.RoomRange room_ranges = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Keyapis\Device\V1\ConfigureDeviceTask\Gate\RoomRange>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRoomRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\ConfigureDeviceTask\Gate\RoomRange::class);
        $this->room_ranges = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Gate::class, \Keyapis\Device\V1\ConfigureDeviceTask_Gate::class);

