<?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.AccessMethodConfig</code>
 */
class AccessMethodConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Which Access User this method belongs to. Access Rights are ignored when this is set to something other than AccessUserId_NotSet.
     *
     * Generated from protobuf field <code>uint64 UserId = 14;</code>
     */
    protected $UserId = 0;
    /**
     * Which Access Rights this method has. Limit 8
     *
     * Generated from protobuf field <code>repeated uint64 RightsIds = 15;</code>
     */
    private $RightsIds;
    /**
     * Specifically for Domestic Helpers, allows this AccessMethod if its days of week and AccessRights day of week overlap (mask AND condition). 0 means all week
     *
     * Generated from protobuf field <code>uint64 DaysOfWeekBits = 16;</code>
     */
    protected $DaysOfWeekBits = 0;
    protected $MethodType;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $CardTag
     *           either 4 or 7 byte Unique ID most of the time, however ISO14443 requires 12 byte or 96bit mandatory just in case.
     *     @type int|string $Phone
     *           BlueTooth phone access through Connect App Id
     *     @type int|string $CodeHop
     *           Remote Serial, excluding buttons. Buttons pressed is part of AccessAllowedEvent
     *     @type int|string $Intercom
     *           Intercom UID reported by the reader
     *     @type int|string $Biometric
     *           ID assigned to user biometric template, returned by face or fingerprint reader 
     *     @type string $NumberPlate
     *           Number plate string, returned by ANPR camera. eg: ND123456
     *     @type int|string $PinCode
     *           A 0-9 digit pin code in decimal form
     *     @type int|string $UserId
     *           Which Access User this method belongs to. Access Rights are ignored when this is set to something other than AccessUserId_NotSet.
     *     @type int[]|string[] $RightsIds
     *           Which Access Rights this method has. Limit 8
     *     @type int|string $DaysOfWeekBits
     *           Specifically for Domestic Helpers, allows this AccessMethod if its days of week and AccessRights day of week overlap (mask AND condition). 0 means all week
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Access::initOnce();
        parent::__construct($data);
    }

    /**
     * either 4 or 7 byte Unique ID most of the time, however ISO14443 requires 12 byte or 96bit mandatory just in case.
     *
     * Generated from protobuf field <code>uint64 CardTag = 2;</code>
     * @return int|string
     */
    public function getCardTag()
    {
        return $this->readOneof(2);
    }

    public function hasCardTag()
    {
        return $this->hasOneof(2);
    }

    /**
     * either 4 or 7 byte Unique ID most of the time, however ISO14443 requires 12 byte or 96bit mandatory just in case.
     *
     * Generated from protobuf field <code>uint64 CardTag = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCardTag($var)
    {
        GPBUtil::checkUint64($var);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * BlueTooth phone access through Connect App Id
     *
     * Generated from protobuf field <code>uint64 Phone = 3;</code>
     * @return int|string
     */
    public function getPhone()
    {
        return $this->readOneof(3);
    }

    public function hasPhone()
    {
        return $this->hasOneof(3);
    }

    /**
     * BlueTooth phone access through Connect App Id
     *
     * Generated from protobuf field <code>uint64 Phone = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPhone($var)
    {
        GPBUtil::checkUint64($var);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Remote Serial, excluding buttons. Buttons pressed is part of AccessAllowedEvent
     *
     * Generated from protobuf field <code>uint64 CodeHop = 4;</code>
     * @return int|string
     */
    public function getCodeHop()
    {
        return $this->readOneof(4);
    }

    public function hasCodeHop()
    {
        return $this->hasOneof(4);
    }

    /**
     * Remote Serial, excluding buttons. Buttons pressed is part of AccessAllowedEvent
     *
     * Generated from protobuf field <code>uint64 CodeHop = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCodeHop($var)
    {
        GPBUtil::checkUint64($var);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Intercom UID reported by the reader
     *
     * Generated from protobuf field <code>uint64 Intercom = 5;</code>
     * @return int|string
     */
    public function getIntercom()
    {
        return $this->readOneof(5);
    }

    public function hasIntercom()
    {
        return $this->hasOneof(5);
    }

    /**
     * Intercom UID reported by the reader
     *
     * Generated from protobuf field <code>uint64 Intercom = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setIntercom($var)
    {
        GPBUtil::checkUint64($var);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * ID assigned to user biometric template, returned by face or fingerprint reader 
     *
     * Generated from protobuf field <code>uint64 Biometric = 7;</code>
     * @return int|string
     */
    public function getBiometric()
    {
        return $this->readOneof(7);
    }

    public function hasBiometric()
    {
        return $this->hasOneof(7);
    }

    /**
     * ID assigned to user biometric template, returned by face or fingerprint reader 
     *
     * Generated from protobuf field <code>uint64 Biometric = 7;</code>
     * @param int|string $var
     * @return $this
     */
    public function setBiometric($var)
    {
        GPBUtil::checkUint64($var);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Number plate string, returned by ANPR camera. eg: ND123456
     *
     * Generated from protobuf field <code>string NumberPlate = 9;</code>
     * @return string
     */
    public function getNumberPlate()
    {
        return $this->readOneof(9);
    }

    public function hasNumberPlate()
    {
        return $this->hasOneof(9);
    }

    /**
     * Number plate string, returned by ANPR camera. eg: ND123456
     *
     * Generated from protobuf field <code>string NumberPlate = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setNumberPlate($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(9, $var);

        return $this;
    }

    /**
     * A 0-9 digit pin code in decimal form
     *
     * Generated from protobuf field <code>uint64 PinCode = 10;</code>
     * @return int|string
     */
    public function getPinCode()
    {
        return $this->readOneof(10);
    }

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

    /**
     * A 0-9 digit pin code in decimal form
     *
     * Generated from protobuf field <code>uint64 PinCode = 10;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPinCode($var)
    {
        GPBUtil::checkUint64($var);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Which Access User this method belongs to. Access Rights are ignored when this is set to something other than AccessUserId_NotSet.
     *
     * Generated from protobuf field <code>uint64 UserId = 14;</code>
     * @return int|string
     */
    public function getUserId()
    {
        return $this->UserId;
    }

    /**
     * Which Access User this method belongs to. Access Rights are ignored when this is set to something other than AccessUserId_NotSet.
     *
     * Generated from protobuf field <code>uint64 UserId = 14;</code>
     * @param int|string $var
     * @return $this
     */
    public function setUserId($var)
    {
        GPBUtil::checkUint64($var);
        $this->UserId = $var;

        return $this;
    }

    /**
     * Which Access Rights this method has. Limit 8
     *
     * Generated from protobuf field <code>repeated uint64 RightsIds = 15;</code>
     * @return RepeatedField<int>|RepeatedField<string>
     */
    public function getRightsIds()
    {
        return $this->RightsIds;
    }

    /**
     * Which Access Rights this method has. Limit 8
     *
     * Generated from protobuf field <code>repeated uint64 RightsIds = 15;</code>
     * @param int[]|string[] $var
     * @return $this
     */
    public function setRightsIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT64);
        $this->RightsIds = $arr;

        return $this;
    }

    /**
     * Specifically for Domestic Helpers, allows this AccessMethod if its days of week and AccessRights day of week overlap (mask AND condition). 0 means all week
     *
     * Generated from protobuf field <code>uint64 DaysOfWeekBits = 16;</code>
     * @return int|string
     */
    public function getDaysOfWeekBits()
    {
        return $this->DaysOfWeekBits;
    }

    /**
     * Specifically for Domestic Helpers, allows this AccessMethod if its days of week and AccessRights day of week overlap (mask AND condition). 0 means all week
     *
     * 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;
    }

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

}

