<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: codehop.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.CodeHopEvent</code>
 */
class CodeHopEvent extends \Google\Protobuf\Internal\Message
{
    /**
     * The decoded serial
     *
     * Generated from protobuf field <code>uint64 Serial = 1;</code>
     */
    protected $Serial = 0;
    /**
     * The Buttons pushed as a bitmap of CodeHopButtonMask
     *
     * Generated from protobuf field <code>uint64 Buttons = 2;</code>
     */
    protected $Buttons = 0;
    /**
     * The full sync counter
     *
     * Generated from protobuf field <code>uint32 Counter = 3;</code>
     */
    protected $Counter = 0;
    /**
     * If the voltage is below the low voltage threshold of the codehop remote
     *
     * Generated from protobuf field <code>bool VoltageLow = 4;</code>
     */
    protected $VoltageLow = false;
    /**
     * The RSSI of the CodeHop in dBm
     *
     * Generated from protobuf field <code>sint32 RSSI = 5;</code>
     */
    protected $RSSI = 0;
    /**
     * Only used with CodeHopEnroll Request
     *
     * Generated from protobuf field <code>uint32 ButtonPresses = 8;</code>
     */
    protected $ButtonPresses = 0;
    /**
     * The current stored counter
     *
     * Generated from protobuf field <code>uint32 StoredCounter = 10;</code>
     */
    protected $StoredCounter = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $Serial
     *           The decoded serial
     *     @type int|string $Buttons
     *           The Buttons pushed as a bitmap of CodeHopButtonMask
     *     @type int $Counter
     *           The full sync counter
     *     @type bool $VoltageLow
     *           If the voltage is below the low voltage threshold of the codehop remote
     *     @type int $RSSI
     *           The RSSI of the CodeHop in dBm
     *     @type int $ButtonPresses
     *           Only used with CodeHopEnroll Request
     *     @type int $StoredCounter
     *           The current stored counter
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Codehop::initOnce();
        parent::__construct($data);
    }

    /**
     * The decoded serial
     *
     * Generated from protobuf field <code>uint64 Serial = 1;</code>
     * @return int|string
     */
    public function getSerial()
    {
        return $this->Serial;
    }

    /**
     * The decoded serial
     *
     * Generated from protobuf field <code>uint64 Serial = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setSerial($var)
    {
        GPBUtil::checkUint64($var);
        $this->Serial = $var;

        return $this;
    }

    /**
     * The Buttons pushed as a bitmap of CodeHopButtonMask
     *
     * Generated from protobuf field <code>uint64 Buttons = 2;</code>
     * @return int|string
     */
    public function getButtons()
    {
        return $this->Buttons;
    }

    /**
     * The Buttons pushed as a bitmap of CodeHopButtonMask
     *
     * Generated from protobuf field <code>uint64 Buttons = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setButtons($var)
    {
        GPBUtil::checkUint64($var);
        $this->Buttons = $var;

        return $this;
    }

    /**
     * The full sync counter
     *
     * Generated from protobuf field <code>uint32 Counter = 3;</code>
     * @return int
     */
    public function getCounter()
    {
        return $this->Counter;
    }

    /**
     * The full sync counter
     *
     * Generated from protobuf field <code>uint32 Counter = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setCounter($var)
    {
        GPBUtil::checkUint32($var);
        $this->Counter = $var;

        return $this;
    }

    /**
     * If the voltage is below the low voltage threshold of the codehop remote
     *
     * Generated from protobuf field <code>bool VoltageLow = 4;</code>
     * @return bool
     */
    public function getVoltageLow()
    {
        return $this->VoltageLow;
    }

    /**
     * If the voltage is below the low voltage threshold of the codehop remote
     *
     * Generated from protobuf field <code>bool VoltageLow = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setVoltageLow($var)
    {
        GPBUtil::checkBool($var);
        $this->VoltageLow = $var;

        return $this;
    }

    /**
     * The RSSI of the CodeHop in dBm
     *
     * Generated from protobuf field <code>sint32 RSSI = 5;</code>
     * @return int
     */
    public function getRSSI()
    {
        return $this->RSSI;
    }

    /**
     * The RSSI of the CodeHop in dBm
     *
     * Generated from protobuf field <code>sint32 RSSI = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setRSSI($var)
    {
        GPBUtil::checkInt32($var);
        $this->RSSI = $var;

        return $this;
    }

    /**
     * Only used with CodeHopEnroll Request
     *
     * Generated from protobuf field <code>uint32 ButtonPresses = 8;</code>
     * @return int
     */
    public function getButtonPresses()
    {
        return $this->ButtonPresses;
    }

    /**
     * Only used with CodeHopEnroll Request
     *
     * Generated from protobuf field <code>uint32 ButtonPresses = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setButtonPresses($var)
    {
        GPBUtil::checkUint32($var);
        $this->ButtonPresses = $var;

        return $this;
    }

    /**
     * The current stored counter
     *
     * Generated from protobuf field <code>uint32 StoredCounter = 10;</code>
     * @return int
     */
    public function getStoredCounter()
    {
        return $this->StoredCounter;
    }

    /**
     * The current stored counter
     *
     * Generated from protobuf field <code>uint32 StoredCounter = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setStoredCounter($var)
    {
        GPBUtil::checkUint32($var);
        $this->StoredCounter = $var;

        return $this;
    }

}

