<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: log.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.LogMessage</code>
 */
class LogMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * If there is any data associated with the above logging messages, then this will contain it in binary
     *
     * Generated from protobuf field <code>bytes Data = 6;</code>
     */
    protected $Data = '';
    /**
     * The name of the thread, typically either: main, 1d, 1a, 1h
     *
     * Generated from protobuf field <code>string Thread = 10;</code>
     */
    protected $Thread = '';
    /**
     * Which logging module reported it, typically named after the .c file but not always
     *
     * Generated from protobuf field <code>string Module = 11;</code>
     */
    protected $Module = '';
    /**
     * If specified, this would be the function name that reported the warning or error, if enabled through Kconfig
     *
     * Generated from protobuf field <code>string FuncName = 12;</code>
     */
    protected $FuncName = '';
    /**
     * If CoreDump available, then this is the dump of the stack, heap and registers
     *
     * Generated from protobuf field <code>bytes CoreDumpBin = 14;</code>
     */
    protected $CoreDumpBin = '';
    /**
     * If CoreDump available, then this is last log that came from it
     *
     * Generated from protobuf field <code>bytes CoreDumpLog = 15;</code>
     */
    protected $CoreDumpLog = '';
    protected $LogType;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $Error
     *           When something happens that shouldn't have in logic that suggests a bug. eg: BLE device already connected, but tried connecting again
     *     @type string $Warning
     *           A warning is when something happens that shouldn't have, but is within the programming logic and is catered for accordingly. eg: Warning, corrupted packet
     *     @type string $Info
     *           Info provides information on states the application is going through. eg: Received Packet, sending response
     *     @type string $Debug
     *           Debug provides underlying information for functions and logic. eg: packet length is 20 bytes
     *     @type int $Dropped
     *           if log messages weren't able to be queued, and the buffer was full, then messages are dropped. This is count of how many messages had to be dropped.
     *     @type string $Data
     *           If there is any data associated with the above logging messages, then this will contain it in binary
     *     @type string $Thread
     *           The name of the thread, typically either: main, 1d, 1a, 1h
     *     @type string $Module
     *           Which logging module reported it, typically named after the .c file but not always
     *     @type string $FuncName
     *           If specified, this would be the function name that reported the warning or error, if enabled through Kconfig
     *     @type string $CoreDumpBin
     *           If CoreDump available, then this is the dump of the stack, heap and registers
     *     @type string $CoreDumpLog
     *           If CoreDump available, then this is last log that came from it
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Log::initOnce();
        parent::__construct($data);
    }

    /**
     * When something happens that shouldn't have in logic that suggests a bug. eg: BLE device already connected, but tried connecting again
     *
     * Generated from protobuf field <code>string Error = 1;</code>
     * @return string
     */
    public function getError()
    {
        return $this->readOneof(1);
    }

    public function hasError()
    {
        return $this->hasOneof(1);
    }

    /**
     * When something happens that shouldn't have in logic that suggests a bug. eg: BLE device already connected, but tried connecting again
     *
     * Generated from protobuf field <code>string Error = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * A warning is when something happens that shouldn't have, but is within the programming logic and is catered for accordingly. eg: Warning, corrupted packet
     *
     * Generated from protobuf field <code>string Warning = 2;</code>
     * @return string
     */
    public function getWarning()
    {
        return $this->readOneof(2);
    }

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

    /**
     * A warning is when something happens that shouldn't have, but is within the programming logic and is catered for accordingly. eg: Warning, corrupted packet
     *
     * Generated from protobuf field <code>string Warning = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setWarning($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Info provides information on states the application is going through. eg: Received Packet, sending response
     *
     * Generated from protobuf field <code>string Info = 3;</code>
     * @return string
     */
    public function getInfo()
    {
        return $this->readOneof(3);
    }

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

    /**
     * Info provides information on states the application is going through. eg: Received Packet, sending response
     *
     * Generated from protobuf field <code>string Info = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setInfo($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Debug provides underlying information for functions and logic. eg: packet length is 20 bytes
     *
     * Generated from protobuf field <code>string Debug = 4;</code>
     * @return string
     */
    public function getDebug()
    {
        return $this->readOneof(4);
    }

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

    /**
     * Debug provides underlying information for functions and logic. eg: packet length is 20 bytes
     *
     * Generated from protobuf field <code>string Debug = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setDebug($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * if log messages weren't able to be queued, and the buffer was full, then messages are dropped. This is count of how many messages had to be dropped.
     *
     * Generated from protobuf field <code>uint32 Dropped = 5;</code>
     * @return int
     */
    public function getDropped()
    {
        return $this->readOneof(5);
    }

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

    /**
     * if log messages weren't able to be queued, and the buffer was full, then messages are dropped. This is count of how many messages had to be dropped.
     *
     * Generated from protobuf field <code>uint32 Dropped = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setDropped($var)
    {
        GPBUtil::checkUint32($var);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * If there is any data associated with the above logging messages, then this will contain it in binary
     *
     * Generated from protobuf field <code>bytes Data = 6;</code>
     * @return string
     */
    public function getData()
    {
        return $this->Data;
    }

    /**
     * If there is any data associated with the above logging messages, then this will contain it in binary
     *
     * Generated from protobuf field <code>bytes Data = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setData($var)
    {
        GPBUtil::checkString($var, False);
        $this->Data = $var;

        return $this;
    }

    /**
     * The name of the thread, typically either: main, 1d, 1a, 1h
     *
     * Generated from protobuf field <code>string Thread = 10;</code>
     * @return string
     */
    public function getThread()
    {
        return $this->Thread;
    }

    /**
     * The name of the thread, typically either: main, 1d, 1a, 1h
     *
     * Generated from protobuf field <code>string Thread = 10;</code>
     * @param string $var
     * @return $this
     */
    public function setThread($var)
    {
        GPBUtil::checkString($var, True);
        $this->Thread = $var;

        return $this;
    }

    /**
     * Which logging module reported it, typically named after the .c file but not always
     *
     * Generated from protobuf field <code>string Module = 11;</code>
     * @return string
     */
    public function getModule()
    {
        return $this->Module;
    }

    /**
     * Which logging module reported it, typically named after the .c file but not always
     *
     * Generated from protobuf field <code>string Module = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setModule($var)
    {
        GPBUtil::checkString($var, True);
        $this->Module = $var;

        return $this;
    }

    /**
     * If specified, this would be the function name that reported the warning or error, if enabled through Kconfig
     *
     * Generated from protobuf field <code>string FuncName = 12;</code>
     * @return string
     */
    public function getFuncName()
    {
        return $this->FuncName;
    }

    /**
     * If specified, this would be the function name that reported the warning or error, if enabled through Kconfig
     *
     * Generated from protobuf field <code>string FuncName = 12;</code>
     * @param string $var
     * @return $this
     */
    public function setFuncName($var)
    {
        GPBUtil::checkString($var, True);
        $this->FuncName = $var;

        return $this;
    }

    /**
     * If CoreDump available, then this is the dump of the stack, heap and registers
     *
     * Generated from protobuf field <code>bytes CoreDumpBin = 14;</code>
     * @return string
     */
    public function getCoreDumpBin()
    {
        return $this->CoreDumpBin;
    }

    /**
     * If CoreDump available, then this is the dump of the stack, heap and registers
     *
     * Generated from protobuf field <code>bytes CoreDumpBin = 14;</code>
     * @param string $var
     * @return $this
     */
    public function setCoreDumpBin($var)
    {
        GPBUtil::checkString($var, False);
        $this->CoreDumpBin = $var;

        return $this;
    }

    /**
     * If CoreDump available, then this is last log that came from it
     *
     * Generated from protobuf field <code>bytes CoreDumpLog = 15;</code>
     * @return string
     */
    public function getCoreDumpLog()
    {
        return $this->CoreDumpLog;
    }

    /**
     * If CoreDump available, then this is last log that came from it
     *
     * Generated from protobuf field <code>bytes CoreDumpLog = 15;</code>
     * @param string $var
     * @return $this
     */
    public function setCoreDumpLog($var)
    {
        GPBUtil::checkString($var, False);
        $this->CoreDumpLog = $var;

        return $this;
    }

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

}

