<?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.DFUResponse</code>
 */
class DFUResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * If true, then the request failed
     *
     * Generated from protobuf field <code>.OS.PB.DFUResponse.DFUResponseType Response = 1;</code>
     */
    protected $Response = 0;
    /**
     * On Request Status, the number bits/blocks that an Image will have, determined by rounded up ImageSize divided BlockSize
     *
     * Generated from protobuf field <code>uint32 ImageBlocksTotal = 2;</code>
     */
    protected $ImageBlocksTotal = 0;
    /**
     * On Request Status, an atomic bit representation of the Image by ImageSize, 1 bit per block (by BlockSize). 
     *
     * Generated from protobuf field <code>bytes ImageBlocksStatus = 3;</code>
     */
    protected $ImageBlocksStatus = '';
    /**
     * How many blocks have been transferred so far
     *
     * Generated from protobuf field <code>uint32 BlocksTransferred = 4;</code>
     */
    protected $BlocksTransferred = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $Response
     *           If true, then the request failed
     *     @type int $ImageBlocksTotal
     *           On Request Status, the number bits/blocks that an Image will have, determined by rounded up ImageSize divided BlockSize
     *     @type string $ImageBlocksStatus
     *           On Request Status, an atomic bit representation of the Image by ImageSize, 1 bit per block (by BlockSize). 
     *     @type int $BlocksTransferred
     *           How many blocks have been transferred so far
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Dfu::initOnce();
        parent::__construct($data);
    }

    /**
     * If true, then the request failed
     *
     * Generated from protobuf field <code>.OS.PB.DFUResponse.DFUResponseType Response = 1;</code>
     * @return int
     */
    public function getResponse()
    {
        return $this->Response;
    }

    /**
     * If true, then the request failed
     *
     * Generated from protobuf field <code>.OS.PB.DFUResponse.DFUResponseType Response = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setResponse($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\DFUResponse\DFUResponseType::class);
        $this->Response = $var;

        return $this;
    }

    /**
     * On Request Status, the number bits/blocks that an Image will have, determined by rounded up ImageSize divided BlockSize
     *
     * Generated from protobuf field <code>uint32 ImageBlocksTotal = 2;</code>
     * @return int
     */
    public function getImageBlocksTotal()
    {
        return $this->ImageBlocksTotal;
    }

    /**
     * On Request Status, the number bits/blocks that an Image will have, determined by rounded up ImageSize divided BlockSize
     *
     * Generated from protobuf field <code>uint32 ImageBlocksTotal = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setImageBlocksTotal($var)
    {
        GPBUtil::checkUint32($var);
        $this->ImageBlocksTotal = $var;

        return $this;
    }

    /**
     * On Request Status, an atomic bit representation of the Image by ImageSize, 1 bit per block (by BlockSize). 
     *
     * Generated from protobuf field <code>bytes ImageBlocksStatus = 3;</code>
     * @return string
     */
    public function getImageBlocksStatus()
    {
        return $this->ImageBlocksStatus;
    }

    /**
     * On Request Status, an atomic bit representation of the Image by ImageSize, 1 bit per block (by BlockSize). 
     *
     * Generated from protobuf field <code>bytes ImageBlocksStatus = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setImageBlocksStatus($var)
    {
        GPBUtil::checkString($var, False);
        $this->ImageBlocksStatus = $var;

        return $this;
    }

    /**
     * How many blocks have been transferred so far
     *
     * Generated from protobuf field <code>uint32 BlocksTransferred = 4;</code>
     * @return int
     */
    public function getBlocksTransferred()
    {
        return $this->BlocksTransferred;
    }

    /**
     * How many blocks have been transferred so far
     *
     * Generated from protobuf field <code>uint32 BlocksTransferred = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setBlocksTransferred($var)
    {
        GPBUtil::checkUint32($var);
        $this->BlocksTransferred = $var;

        return $this;
    }

}

