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

namespace Keyapis\Device\V1\ConfigureDeviceTask\Gate;

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.RelaySettings</code>
 */
class RelaySettings 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;
    /**
     * Индекс реле.
     * # Диапазон: 0..64
     *
     * Generated from protobuf field <code>int32 relay_index = 2;</code>
     */
    protected $relay_index = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $is_active
     *           Состояние реле.
     *           true - по команде «Открыть дверь» произойдет открытие реле.
     *           false - по команде «Открыть дверь» не произойдет открытие реле
     *     @type int $relay_index
     *           Индекс реле.
     *           # Диапазон: 0..64
     * }
     */
    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;
    }

    /**
     * Индекс реле.
     * # Диапазон: 0..64
     *
     * Generated from protobuf field <code>int32 relay_index = 2;</code>
     * @return int
     */
    public function getRelayIndex()
    {
        return $this->relay_index;
    }

    /**
     * Индекс реле.
     * # Диапазон: 0..64
     *
     * Generated from protobuf field <code>int32 relay_index = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setRelayIndex($var)
    {
        GPBUtil::checkInt32($var);
        $this->relay_index = $var;

        return $this;
    }

}

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

