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

namespace OS\PB;

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

/**
 **
 * \@brief   When a Wiegand Code is recieved on a Wiegand 
 * \@details A wiegand event listens to the D0 and D1 lines and 
 *          arranges a binary array in the order the D0 and D1 lines are pulled low.
 *
 * Generated from protobuf message <code>OS.PB.WiegandEvent</code>
 */
class WiegandEvent extends \Google\Protobuf\Internal\Message
{
    /**
     * The binary code received on the Wiegand, open wiegand format
     *
     * Generated from protobuf field <code>bytes RawCode = 1;</code>
     */
    protected $RawCode = '';
    /**
     * The resulting code from either pincode Keypad logic or raw code minus the parity bits
     *
     * Generated from protobuf field <code>uint64 Code = 2;</code>
     */
    protected $Code = 0;
    /**
     * The number of bits received, only applicable with RawCode
     *
     * Generated from protobuf field <code>uint32 RawBitCount = 5;</code>
     */
    protected $RawBitCount = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $RawCode
     *           The binary code received on the Wiegand, open wiegand format
     *     @type int|string $Code
     *           The resulting code from either pincode Keypad logic or raw code minus the parity bits
     *     @type int $RawBitCount
     *           The number of bits received, only applicable with RawCode
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Wiegand::initOnce();
        parent::__construct($data);
    }

    /**
     * The binary code received on the Wiegand, open wiegand format
     *
     * Generated from protobuf field <code>bytes RawCode = 1;</code>
     * @return string
     */
    public function getRawCode()
    {
        return $this->RawCode;
    }

    /**
     * The binary code received on the Wiegand, open wiegand format
     *
     * Generated from protobuf field <code>bytes RawCode = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setRawCode($var)
    {
        GPBUtil::checkString($var, False);
        $this->RawCode = $var;

        return $this;
    }

    /**
     * The resulting code from either pincode Keypad logic or raw code minus the parity bits
     *
     * Generated from protobuf field <code>uint64 Code = 2;</code>
     * @return int|string
     */
    public function getCode()
    {
        return $this->Code;
    }

    /**
     * The resulting code from either pincode Keypad logic or raw code minus the parity bits
     *
     * Generated from protobuf field <code>uint64 Code = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCode($var)
    {
        GPBUtil::checkUint64($var);
        $this->Code = $var;

        return $this;
    }

    /**
     * The number of bits received, only applicable with RawCode
     *
     * Generated from protobuf field <code>uint32 RawBitCount = 5;</code>
     * @return int
     */
    public function getRawBitCount()
    {
        return $this->RawBitCount;
    }

    /**
     * The number of bits received, only applicable with RawCode
     *
     * Generated from protobuf field <code>uint32 RawBitCount = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setRawBitCount($var)
    {
        GPBUtil::checkUint32($var);
        $this->RawBitCount = $var;

        return $this;
    }

}

