<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: device.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.DeviceEvent</code>
 */
class DeviceEvent extends \Google\Protobuf\Internal\Message
{
    /**
     * refer to enum above
     *
     * Generated from protobuf field <code>.OS.PB.DeviceRestartReason RestartReason = 1;</code>
     */
    protected $RestartReason = 0;
    /**
     * refer to enum above   
     *
     * Generated from protobuf field <code>.OS.PB.DeviceFormatReason FormatReason = 2;</code>
     */
    protected $FormatReason = 0;
    /**
     * Registers from Kernal Panic used on Fatal_KernelPanic and Fatal_PanicLoopRecovery
     *
     * Generated from protobuf field <code>uint32 Panic_A1 = 8;</code>
     */
    protected $Panic_A1 = 0;
    /**
     * Generated from protobuf field <code>uint32 Panic_A2 = 9;</code>
     */
    protected $Panic_A2 = 0;
    /**
     * Generated from protobuf field <code>uint32 Panic_A3 = 10;</code>
     */
    protected $Panic_A3 = 0;
    /**
     * Generated from protobuf field <code>uint32 Panic_A4 = 11;</code>
     */
    protected $Panic_A4 = 0;
    /**
     * Intra-procedure scratch register (R12) - Used for temporary storage during function calls. 
     *
     * Generated from protobuf field <code>uint32 Panic_IP = 12;</code>
     */
    protected $Panic_IP = 0;
    /**
     * Link Register (R14) Stores the return address of the last function call. 
     *
     * Generated from protobuf field <code>uint32 Panic_LR = 13;</code>
     */
    protected $Panic_LR = 0;
    /**
     * Program Counter (R15) Points to the current instruction being executed. Crucial for identifying the exact location of the fault.
     *
     * Generated from protobuf field <code>uint32 Panic_PC = 14;</code>
     */
    protected $Panic_PC = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $RestartReason
     *           refer to enum above
     *     @type int $FormatReason
     *           refer to enum above   
     *     @type int $Panic_A1
     *           Registers from Kernal Panic used on Fatal_KernelPanic and Fatal_PanicLoopRecovery
     *     @type int $Panic_A2
     *     @type int $Panic_A3
     *     @type int $Panic_A4
     *     @type int $Panic_IP
     *           Intra-procedure scratch register (R12) - Used for temporary storage during function calls. 
     *     @type int $Panic_LR
     *           Link Register (R14) Stores the return address of the last function call. 
     *     @type int $Panic_PC
     *           Program Counter (R15) Points to the current instruction being executed. Crucial for identifying the exact location of the fault.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Device::initOnce();
        parent::__construct($data);
    }

    /**
     * refer to enum above
     *
     * Generated from protobuf field <code>.OS.PB.DeviceRestartReason RestartReason = 1;</code>
     * @return int
     */
    public function getRestartReason()
    {
        return $this->RestartReason;
    }

    /**
     * refer to enum above
     *
     * Generated from protobuf field <code>.OS.PB.DeviceRestartReason RestartReason = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setRestartReason($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\DeviceRestartReason::class);
        $this->RestartReason = $var;

        return $this;
    }

    /**
     * refer to enum above   
     *
     * Generated from protobuf field <code>.OS.PB.DeviceFormatReason FormatReason = 2;</code>
     * @return int
     */
    public function getFormatReason()
    {
        return $this->FormatReason;
    }

    /**
     * refer to enum above   
     *
     * Generated from protobuf field <code>.OS.PB.DeviceFormatReason FormatReason = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setFormatReason($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\DeviceFormatReason::class);
        $this->FormatReason = $var;

        return $this;
    }

    /**
     * Registers from Kernal Panic used on Fatal_KernelPanic and Fatal_PanicLoopRecovery
     *
     * Generated from protobuf field <code>uint32 Panic_A1 = 8;</code>
     * @return int
     */
    public function getPanicA1()
    {
        return $this->Panic_A1;
    }

    /**
     * Registers from Kernal Panic used on Fatal_KernelPanic and Fatal_PanicLoopRecovery
     *
     * Generated from protobuf field <code>uint32 Panic_A1 = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setPanicA1($var)
    {
        GPBUtil::checkUint32($var);
        $this->Panic_A1 = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 Panic_A2 = 9;</code>
     * @return int
     */
    public function getPanicA2()
    {
        return $this->Panic_A2;
    }

    /**
     * Generated from protobuf field <code>uint32 Panic_A2 = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setPanicA2($var)
    {
        GPBUtil::checkUint32($var);
        $this->Panic_A2 = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 Panic_A3 = 10;</code>
     * @return int
     */
    public function getPanicA3()
    {
        return $this->Panic_A3;
    }

    /**
     * Generated from protobuf field <code>uint32 Panic_A3 = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setPanicA3($var)
    {
        GPBUtil::checkUint32($var);
        $this->Panic_A3 = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 Panic_A4 = 11;</code>
     * @return int
     */
    public function getPanicA4()
    {
        return $this->Panic_A4;
    }

    /**
     * Generated from protobuf field <code>uint32 Panic_A4 = 11;</code>
     * @param int $var
     * @return $this
     */
    public function setPanicA4($var)
    {
        GPBUtil::checkUint32($var);
        $this->Panic_A4 = $var;

        return $this;
    }

    /**
     * Intra-procedure scratch register (R12) - Used for temporary storage during function calls. 
     *
     * Generated from protobuf field <code>uint32 Panic_IP = 12;</code>
     * @return int
     */
    public function getPanicIP()
    {
        return $this->Panic_IP;
    }

    /**
     * Intra-procedure scratch register (R12) - Used for temporary storage during function calls. 
     *
     * Generated from protobuf field <code>uint32 Panic_IP = 12;</code>
     * @param int $var
     * @return $this
     */
    public function setPanicIP($var)
    {
        GPBUtil::checkUint32($var);
        $this->Panic_IP = $var;

        return $this;
    }

    /**
     * Link Register (R14) Stores the return address of the last function call. 
     *
     * Generated from protobuf field <code>uint32 Panic_LR = 13;</code>
     * @return int
     */
    public function getPanicLR()
    {
        return $this->Panic_LR;
    }

    /**
     * Link Register (R14) Stores the return address of the last function call. 
     *
     * Generated from protobuf field <code>uint32 Panic_LR = 13;</code>
     * @param int $var
     * @return $this
     */
    public function setPanicLR($var)
    {
        GPBUtil::checkUint32($var);
        $this->Panic_LR = $var;

        return $this;
    }

    /**
     * Program Counter (R15) Points to the current instruction being executed. Crucial for identifying the exact location of the fault.
     *
     * Generated from protobuf field <code>uint32 Panic_PC = 14;</code>
     * @return int
     */
    public function getPanicPC()
    {
        return $this->Panic_PC;
    }

    /**
     * Program Counter (R15) Points to the current instruction being executed. Crucial for identifying the exact location of the fault.
     *
     * Generated from protobuf field <code>uint32 Panic_PC = 14;</code>
     * @param int $var
     * @return $this
     */
    public function setPanicPC($var)
    {
        GPBUtil::checkUint32($var);
        $this->Panic_PC = $var;

        return $this;
    }

}

