<?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.AccessReader</code>
 */
class AccessReader extends \Google\Protobuf\Internal\Message
{
    /**
     * The ReaderId as per the database on the server
     *
     * Generated from protobuf field <code>uint64 Id = 1;</code>
     */
    protected $Id = 0;
    /**
     * The Interface type which the Reader is on
     *
     * Generated from protobuf field <code>.OS.PB.DeviceInterface Interface = 2;</code>
     */
    protected $Interface = 0;
    /**
     * The index of the Interface the Reader is on
     *
     * Generated from protobuf field <code>uint32 InterfaceIndex = 3;</code>
     */
    protected $InterfaceIndex = 0;
    /**
     * If NotSet, then uses the direction reported by the reader. Further if this is not available, then Both is used.
     *
     * Generated from protobuf field <code>.OS.PB.AccessDirectionType Direction = 4;</code>
     */
    protected $Direction = 0;
    /**
     * If Enabled, Perimeter will increase entry or exit redeems based on direction. 
     *
     * Generated from protobuf field <code>.OS.PB.Toggle Perimeter = 5;</code>
     */
    protected $Perimeter = 0;
    /**
     * (Default AllDays=0) Which day of the week this reader can be used, as per local time
     *
     * Generated from protobuf field <code>uint64 DaysOfWeekBits = 16;</code>
     */
    protected $DaysOfWeekBits = 0;
    /**
     * (Default AnyTime=0) Which time of day this reader can be used, as per local time
     *
     * Generated from protobuf field <code>uint64 TimesOfDayBits = 17;</code>
     */
    protected $TimesOfDayBits = 0;
    protected $InterfaceFiltering;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $Id
     *           The ReaderId as per the database on the server
     *     @type int $Interface
     *           The Interface type which the Reader is on
     *     @type int $InterfaceIndex
     *           The index of the Interface the Reader is on
     *     @type int $Direction
     *           If NotSet, then uses the direction reported by the reader. Further if this is not available, then Both is used.
     *     @type int $Perimeter
     *           If Enabled, Perimeter will increase entry or exit redeems based on direction. 
     *     @type int $OSDPAddress
     *           By the event's OSDP address.
     *     @type string $ANPRCameraId
     *           By the event's ANPR Camera ID
     *     @type int $CodeHopButtons
     *           By the event's CodeHop buttons that were pressed (this is a mask and can have multiple buttons allowed)
     *     @type int|string $DaysOfWeekBits
     *           (Default AllDays=0) Which day of the week this reader can be used, as per local time
     *     @type int|string $TimesOfDayBits
     *           (Default AnyTime=0) Which time of day this reader can be used, as per local time
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Access::initOnce();
        parent::__construct($data);
    }

    /**
     * The ReaderId as per the database on the server
     *
     * Generated from protobuf field <code>uint64 Id = 1;</code>
     * @return int|string
     */
    public function getId()
    {
        return $this->Id;
    }

    /**
     * The ReaderId as per the database on the server
     *
     * Generated from protobuf field <code>uint64 Id = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkUint64($var);
        $this->Id = $var;

        return $this;
    }

    /**
     * The Interface type which the Reader is on
     *
     * Generated from protobuf field <code>.OS.PB.DeviceInterface Interface = 2;</code>
     * @return int
     */
    public function getInterface()
    {
        return $this->Interface;
    }

    /**
     * The Interface type which the Reader is on
     *
     * Generated from protobuf field <code>.OS.PB.DeviceInterface Interface = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setInterface($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\DeviceInterface::class);
        $this->Interface = $var;

        return $this;
    }

    /**
     * The index of the Interface the Reader is on
     *
     * Generated from protobuf field <code>uint32 InterfaceIndex = 3;</code>
     * @return int
     */
    public function getInterfaceIndex()
    {
        return $this->InterfaceIndex;
    }

    /**
     * The index of the Interface the Reader is on
     *
     * Generated from protobuf field <code>uint32 InterfaceIndex = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setInterfaceIndex($var)
    {
        GPBUtil::checkUint32($var);
        $this->InterfaceIndex = $var;

        return $this;
    }

    /**
     * If NotSet, then uses the direction reported by the reader. Further if this is not available, then Both is used.
     *
     * Generated from protobuf field <code>.OS.PB.AccessDirectionType Direction = 4;</code>
     * @return int
     */
    public function getDirection()
    {
        return $this->Direction;
    }

    /**
     * If NotSet, then uses the direction reported by the reader. Further if this is not available, then Both is used.
     *
     * Generated from protobuf field <code>.OS.PB.AccessDirectionType Direction = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setDirection($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\AccessDirectionType::class);
        $this->Direction = $var;

        return $this;
    }

    /**
     * If Enabled, Perimeter will increase entry or exit redeems based on direction. 
     *
     * Generated from protobuf field <code>.OS.PB.Toggle Perimeter = 5;</code>
     * @return int
     */
    public function getPerimeter()
    {
        return $this->Perimeter;
    }

    /**
     * If Enabled, Perimeter will increase entry or exit redeems based on direction. 
     *
     * Generated from protobuf field <code>.OS.PB.Toggle Perimeter = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setPerimeter($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\Toggle::class);
        $this->Perimeter = $var;

        return $this;
    }

    /**
     * By the event's OSDP address.
     *
     * Generated from protobuf field <code>uint32 OSDPAddress = 10;</code>
     * @return int
     */
    public function getOSDPAddress()
    {
        return $this->readOneof(10);
    }

    public function hasOSDPAddress()
    {
        return $this->hasOneof(10);
    }

    /**
     * By the event's OSDP address.
     *
     * Generated from protobuf field <code>uint32 OSDPAddress = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setOSDPAddress($var)
    {
        GPBUtil::checkUint32($var);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * By the event's ANPR Camera ID
     *
     * Generated from protobuf field <code>bytes ANPRCameraId = 11;</code>
     * @return string
     */
    public function getANPRCameraId()
    {
        return $this->readOneof(11);
    }

    public function hasANPRCameraId()
    {
        return $this->hasOneof(11);
    }

    /**
     * By the event's ANPR Camera ID
     *
     * Generated from protobuf field <code>bytes ANPRCameraId = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setANPRCameraId($var)
    {
        GPBUtil::checkString($var, False);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * By the event's CodeHop buttons that were pressed (this is a mask and can have multiple buttons allowed)
     *
     * Generated from protobuf field <code>uint32 CodeHopButtons = 12;</code>
     * @return int
     */
    public function getCodeHopButtons()
    {
        return $this->readOneof(12);
    }

    public function hasCodeHopButtons()
    {
        return $this->hasOneof(12);
    }

    /**
     * By the event's CodeHop buttons that were pressed (this is a mask and can have multiple buttons allowed)
     *
     * Generated from protobuf field <code>uint32 CodeHopButtons = 12;</code>
     * @param int $var
     * @return $this
     */
    public function setCodeHopButtons($var)
    {
        GPBUtil::checkUint32($var);
        $this->writeOneof(12, $var);

        return $this;
    }

    /**
     * (Default AllDays=0) Which day of the week this reader can be used, as per local time
     *
     * Generated from protobuf field <code>uint64 DaysOfWeekBits = 16;</code>
     * @return int|string
     */
    public function getDaysOfWeekBits()
    {
        return $this->DaysOfWeekBits;
    }

    /**
     * (Default AllDays=0) Which day of the week this reader can be used, as per local time
     *
     * Generated from protobuf field <code>uint64 DaysOfWeekBits = 16;</code>
     * @param int|string $var
     * @return $this
     */
    public function setDaysOfWeekBits($var)
    {
        GPBUtil::checkUint64($var);
        $this->DaysOfWeekBits = $var;

        return $this;
    }

    /**
     * (Default AnyTime=0) Which time of day this reader can be used, as per local time
     *
     * Generated from protobuf field <code>uint64 TimesOfDayBits = 17;</code>
     * @return int|string
     */
    public function getTimesOfDayBits()
    {
        return $this->TimesOfDayBits;
    }

    /**
     * (Default AnyTime=0) Which time of day this reader can be used, as per local time
     *
     * Generated from protobuf field <code>uint64 TimesOfDayBits = 17;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTimesOfDayBits($var)
    {
        GPBUtil::checkUint64($var);
        $this->TimesOfDayBits = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getInterfaceFiltering()
    {
        return $this->whichOneof("InterfaceFiltering");
    }

}

