<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: access.proto

namespace OS\PB;

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

/**
 * Generated from protobuf message <code>OS.PB.AccessConfig</code>
 */
class AccessConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Default: Disabled. Global on/off switch for access control on gateway. Generates AccessMethodDeniedGatewayDisabled if disabled.
     *
     * Generated from protobuf field <code>.OS.PB.Toggle State = 1;</code>
     */
    protected $State = 0;
    /**
     * If Confirmation is configured, then Access Confirmed and Unconfirmed events are generated. 
     *
     * Generated from protobuf field <code>.OS.PB.AccessConfirmationInput ConfirmationInput = 3;</code>
     */
    protected $ConfirmationInput = null;
    /**
     * Default enabled. Generates events using all the data from the databases on the site for debugging
     *
     * Generated from protobuf field <code>.OS.PB.Toggle VerboseEvents = 4;</code>
     */
    protected $VerboseEvents = 0;
    /**
     * The readers currently setup on this Gateway
     *
     * Generated from protobuf field <code>repeated .OS.PB.AccessReader Readers = 5;</code>
     */
    private $Readers;
    /**
     * Default disabled. If Enabled, will generate AccessDeniedReaderUnknown or AccessDeniedMethodUnknown events when receiving an unrecognised CodeHop remote.
     *
     * Generated from protobuf field <code>.OS.PB.Toggle CodeHopUnknownEvent = 6;</code>
     */
    protected $CodeHopUnknownEvent = 0;
    /**
     * Below are for auto-detecting the UID range from Wiegand and OSDP events that come back from the reader
     * For Readers with SIP Intercom, if the resident sends the correct code back, then an assigned UID will be sent from the reader
     *
     * Generated from protobuf field <code>uint64 IntercomStart = 8;</code>
     */
    protected $IntercomStart = 0;
    /**
     * typically 9999
     *
     * Generated from protobuf field <code>uint64 IntercomEnd = 9;</code>
     */
    protected $IntercomEnd = 0;
    /**
     * For Biometric Readers, the data can come back as RFID or Biometric, this detects when it is a biometric UID versus when it is a RFID tag
     *
     * Generated from protobuf field <code>uint64 BiometricStart = 10;</code>
     */
    protected $BiometricStart = 0;
    /**
     * typically 99999
     *
     * Generated from protobuf field <code>uint64 BiometricEnd = 11;</code>
     */
    protected $BiometricEnd = 0;
    /**
     * For Keypad Readers, the data can come back as RFID or PinCode, this detects when it is a pin code versus when it is a RFID tag
     *
     * Generated from protobuf field <code>uint64 PinCodeStart = 12;</code>
     */
    protected $PinCodeStart = 0;
    /**
     * typically 999999
     *
     * Generated from protobuf field <code>uint64 PinCodeEnd = 13;</code>
     */
    protected $PinCodeEnd = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $State
     *           Default: Disabled. Global on/off switch for access control on gateway. Generates AccessMethodDeniedGatewayDisabled if disabled.
     *     @type \OS\PB\AccessConfirmationInput $ConfirmationInput
     *           If Confirmation is configured, then Access Confirmed and Unconfirmed events are generated. 
     *     @type int $VerboseEvents
     *           Default enabled. Generates events using all the data from the databases on the site for debugging
     *     @type \OS\PB\AccessReader[] $Readers
     *           The readers currently setup on this Gateway
     *     @type int $CodeHopUnknownEvent
     *           Default disabled. If Enabled, will generate AccessDeniedReaderUnknown or AccessDeniedMethodUnknown events when receiving an unrecognised CodeHop remote.
     *     @type int|string $IntercomStart
     *           Below are for auto-detecting the UID range from Wiegand and OSDP events that come back from the reader
     *           For Readers with SIP Intercom, if the resident sends the correct code back, then an assigned UID will be sent from the reader
     *     @type int|string $IntercomEnd
     *           typically 9999
     *     @type int|string $BiometricStart
     *           For Biometric Readers, the data can come back as RFID or Biometric, this detects when it is a biometric UID versus when it is a RFID tag
     *     @type int|string $BiometricEnd
     *           typically 99999
     *     @type int|string $PinCodeStart
     *           For Keypad Readers, the data can come back as RFID or PinCode, this detects when it is a pin code versus when it is a RFID tag
     *     @type int|string $PinCodeEnd
     *           typically 999999
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Access::initOnce();
        parent::__construct($data);
    }

    /**
     * Default: Disabled. Global on/off switch for access control on gateway. Generates AccessMethodDeniedGatewayDisabled if disabled.
     *
     * Generated from protobuf field <code>.OS.PB.Toggle State = 1;</code>
     * @return int
     */
    public function getState()
    {
        return $this->State;
    }

    /**
     * Default: Disabled. Global on/off switch for access control on gateway. Generates AccessMethodDeniedGatewayDisabled if disabled.
     *
     * Generated from protobuf field <code>.OS.PB.Toggle State = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\Toggle::class);
        $this->State = $var;

        return $this;
    }

    /**
     * If Confirmation is configured, then Access Confirmed and Unconfirmed events are generated. 
     *
     * Generated from protobuf field <code>.OS.PB.AccessConfirmationInput ConfirmationInput = 3;</code>
     * @return \OS\PB\AccessConfirmationInput|null
     */
    public function getConfirmationInput()
    {
        return $this->ConfirmationInput;
    }

    public function hasConfirmationInput()
    {
        return isset($this->ConfirmationInput);
    }

    public function clearConfirmationInput()
    {
        unset($this->ConfirmationInput);
    }

    /**
     * If Confirmation is configured, then Access Confirmed and Unconfirmed events are generated. 
     *
     * Generated from protobuf field <code>.OS.PB.AccessConfirmationInput ConfirmationInput = 3;</code>
     * @param \OS\PB\AccessConfirmationInput $var
     * @return $this
     */
    public function setConfirmationInput($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\AccessConfirmationInput::class);
        $this->ConfirmationInput = $var;

        return $this;
    }

    /**
     * Default enabled. Generates events using all the data from the databases on the site for debugging
     *
     * Generated from protobuf field <code>.OS.PB.Toggle VerboseEvents = 4;</code>
     * @return int
     */
    public function getVerboseEvents()
    {
        return $this->VerboseEvents;
    }

    /**
     * Default enabled. Generates events using all the data from the databases on the site for debugging
     *
     * Generated from protobuf field <code>.OS.PB.Toggle VerboseEvents = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setVerboseEvents($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\Toggle::class);
        $this->VerboseEvents = $var;

        return $this;
    }

    /**
     * The readers currently setup on this Gateway
     *
     * Generated from protobuf field <code>repeated .OS.PB.AccessReader Readers = 5;</code>
     * @return RepeatedField<\OS\PB\AccessReader>
     */
    public function getReaders()
    {
        return $this->Readers;
    }

    /**
     * The readers currently setup on this Gateway
     *
     * Generated from protobuf field <code>repeated .OS.PB.AccessReader Readers = 5;</code>
     * @param \OS\PB\AccessReader[] $var
     * @return $this
     */
    public function setReaders($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \OS\PB\AccessReader::class);
        $this->Readers = $arr;

        return $this;
    }

    /**
     * Default disabled. If Enabled, will generate AccessDeniedReaderUnknown or AccessDeniedMethodUnknown events when receiving an unrecognised CodeHop remote.
     *
     * Generated from protobuf field <code>.OS.PB.Toggle CodeHopUnknownEvent = 6;</code>
     * @return int
     */
    public function getCodeHopUnknownEvent()
    {
        return $this->CodeHopUnknownEvent;
    }

    /**
     * Default disabled. If Enabled, will generate AccessDeniedReaderUnknown or AccessDeniedMethodUnknown events when receiving an unrecognised CodeHop remote.
     *
     * Generated from protobuf field <code>.OS.PB.Toggle CodeHopUnknownEvent = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setCodeHopUnknownEvent($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\Toggle::class);
        $this->CodeHopUnknownEvent = $var;

        return $this;
    }

    /**
     * Below are for auto-detecting the UID range from Wiegand and OSDP events that come back from the reader
     * For Readers with SIP Intercom, if the resident sends the correct code back, then an assigned UID will be sent from the reader
     *
     * Generated from protobuf field <code>uint64 IntercomStart = 8;</code>
     * @return int|string
     */
    public function getIntercomStart()
    {
        return $this->IntercomStart;
    }

    /**
     * Below are for auto-detecting the UID range from Wiegand and OSDP events that come back from the reader
     * For Readers with SIP Intercom, if the resident sends the correct code back, then an assigned UID will be sent from the reader
     *
     * Generated from protobuf field <code>uint64 IntercomStart = 8;</code>
     * @param int|string $var
     * @return $this
     */
    public function setIntercomStart($var)
    {
        GPBUtil::checkUint64($var);
        $this->IntercomStart = $var;

        return $this;
    }

    /**
     * typically 9999
     *
     * Generated from protobuf field <code>uint64 IntercomEnd = 9;</code>
     * @return int|string
     */
    public function getIntercomEnd()
    {
        return $this->IntercomEnd;
    }

    /**
     * typically 9999
     *
     * Generated from protobuf field <code>uint64 IntercomEnd = 9;</code>
     * @param int|string $var
     * @return $this
     */
    public function setIntercomEnd($var)
    {
        GPBUtil::checkUint64($var);
        $this->IntercomEnd = $var;

        return $this;
    }

    /**
     * For Biometric Readers, the data can come back as RFID or Biometric, this detects when it is a biometric UID versus when it is a RFID tag
     *
     * Generated from protobuf field <code>uint64 BiometricStart = 10;</code>
     * @return int|string
     */
    public function getBiometricStart()
    {
        return $this->BiometricStart;
    }

    /**
     * For Biometric Readers, the data can come back as RFID or Biometric, this detects when it is a biometric UID versus when it is a RFID tag
     *
     * Generated from protobuf field <code>uint64 BiometricStart = 10;</code>
     * @param int|string $var
     * @return $this
     */
    public function setBiometricStart($var)
    {
        GPBUtil::checkUint64($var);
        $this->BiometricStart = $var;

        return $this;
    }

    /**
     * typically 99999
     *
     * Generated from protobuf field <code>uint64 BiometricEnd = 11;</code>
     * @return int|string
     */
    public function getBiometricEnd()
    {
        return $this->BiometricEnd;
    }

    /**
     * typically 99999
     *
     * Generated from protobuf field <code>uint64 BiometricEnd = 11;</code>
     * @param int|string $var
     * @return $this
     */
    public function setBiometricEnd($var)
    {
        GPBUtil::checkUint64($var);
        $this->BiometricEnd = $var;

        return $this;
    }

    /**
     * For Keypad Readers, the data can come back as RFID or PinCode, this detects when it is a pin code versus when it is a RFID tag
     *
     * Generated from protobuf field <code>uint64 PinCodeStart = 12;</code>
     * @return int|string
     */
    public function getPinCodeStart()
    {
        return $this->PinCodeStart;
    }

    /**
     * For Keypad Readers, the data can come back as RFID or PinCode, this detects when it is a pin code versus when it is a RFID tag
     *
     * Generated from protobuf field <code>uint64 PinCodeStart = 12;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPinCodeStart($var)
    {
        GPBUtil::checkUint64($var);
        $this->PinCodeStart = $var;

        return $this;
    }

    /**
     * typically 999999
     *
     * Generated from protobuf field <code>uint64 PinCodeEnd = 13;</code>
     * @return int|string
     */
    public function getPinCodeEnd()
    {
        return $this->PinCodeEnd;
    }

    /**
     * typically 999999
     *
     * Generated from protobuf field <code>uint64 PinCodeEnd = 13;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPinCodeEnd($var)
    {
        GPBUtil::checkUint64($var);
        $this->PinCodeEnd = $var;

        return $this;
    }

}

