<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: dfu.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.DFUEvent</code>
 */
class DFUEvent extends \Google\Protobuf\Internal\Message
{
    /**
     * Matches the number in write action, only used if ProgressOption is not disabled
     *
     * Generated from protobuf field <code>uint32 BlockIndex = 1;</code>
     */
    protected $BlockIndex = 0;
    /**
     * When StatusAndPerBlock is used
     *
     * Generated from protobuf field <code>uint32 BlocksTotal = 2;</code>
     */
    protected $BlocksTotal = 0;
    /**
     * When StatusAndPerBlock is used
     *
     * Generated from protobuf field <code>uint32 BlockCount = 3;</code>
     */
    protected $BlockCount = 0;
    /**
     * When StatusAndPerPercent or StatusAndPer10Percent is used
     *
     * Generated from protobuf field <code>uint32 Percentage = 4;</code>
     */
    protected $Percentage = 0;
    /**
     * A friendly message for user to see, if failed event, provides the reason why
     *
     * Generated from protobuf field <code>string Message = 5;</code>
     */
    protected $Message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $BlockIndex
     *           Matches the number in write action, only used if ProgressOption is not disabled
     *     @type int $BlocksTotal
     *           When StatusAndPerBlock is used
     *     @type int $BlockCount
     *           When StatusAndPerBlock is used
     *     @type int $Percentage
     *           When StatusAndPerPercent or StatusAndPer10Percent is used
     *     @type string $Message
     *           A friendly message for user to see, if failed event, provides the reason why
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Dfu::initOnce();
        parent::__construct($data);
    }

    /**
     * Matches the number in write action, only used if ProgressOption is not disabled
     *
     * Generated from protobuf field <code>uint32 BlockIndex = 1;</code>
     * @return int
     */
    public function getBlockIndex()
    {
        return $this->BlockIndex;
    }

    /**
     * Matches the number in write action, only used if ProgressOption is not disabled
     *
     * Generated from protobuf field <code>uint32 BlockIndex = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setBlockIndex($var)
    {
        GPBUtil::checkUint32($var);
        $this->BlockIndex = $var;

        return $this;
    }

    /**
     * When StatusAndPerBlock is used
     *
     * Generated from protobuf field <code>uint32 BlocksTotal = 2;</code>
     * @return int
     */
    public function getBlocksTotal()
    {
        return $this->BlocksTotal;
    }

    /**
     * When StatusAndPerBlock is used
     *
     * Generated from protobuf field <code>uint32 BlocksTotal = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setBlocksTotal($var)
    {
        GPBUtil::checkUint32($var);
        $this->BlocksTotal = $var;

        return $this;
    }

    /**
     * When StatusAndPerBlock is used
     *
     * Generated from protobuf field <code>uint32 BlockCount = 3;</code>
     * @return int
     */
    public function getBlockCount()
    {
        return $this->BlockCount;
    }

    /**
     * When StatusAndPerBlock is used
     *
     * Generated from protobuf field <code>uint32 BlockCount = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setBlockCount($var)
    {
        GPBUtil::checkUint32($var);
        $this->BlockCount = $var;

        return $this;
    }

    /**
     * When StatusAndPerPercent or StatusAndPer10Percent is used
     *
     * Generated from protobuf field <code>uint32 Percentage = 4;</code>
     * @return int
     */
    public function getPercentage()
    {
        return $this->Percentage;
    }

    /**
     * When StatusAndPerPercent or StatusAndPer10Percent is used
     *
     * Generated from protobuf field <code>uint32 Percentage = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setPercentage($var)
    {
        GPBUtil::checkUint32($var);
        $this->Percentage = $var;

        return $this;
    }

    /**
     * A friendly message for user to see, if failed event, provides the reason why
     *
     * Generated from protobuf field <code>string Message = 5;</code>
     * @return string
     */
    public function getMessage()
    {
        return $this->Message;
    }

    /**
     * A friendly message for user to see, if failed event, provides the reason why
     *
     * Generated from protobuf field <code>string Message = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->Message = $var;

        return $this;
    }

}

