<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: core/Tron.proto

namespace Protocol\BlockHeader;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Generated from protobuf message <code>protocol.BlockHeader.raw</code>
 */
class raw extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int64 timestamp = 1;</code>
     */
    protected $timestamp = 0;
    /**
     * Generated from protobuf field <code>bytes txTrieRoot = 2;</code>
     */
    protected $txTrieRoot = '';
    /**
     * Generated from protobuf field <code>bytes parentHash = 3;</code>
     */
    protected $parentHash = '';
    /**
     *bytes nonce = 5;
     *bytes difficulty = 6;
     *
     * Generated from protobuf field <code>int64 number = 7;</code>
     */
    protected $number = 0;
    /**
     * Generated from protobuf field <code>int64 witness_id = 8;</code>
     */
    protected $witness_id = 0;
    /**
     * Generated from protobuf field <code>bytes witness_address = 9;</code>
     */
    protected $witness_address = '';
    /**
     * Generated from protobuf field <code>int32 version = 10;</code>
     */
    protected $version = 0;
    /**
     * Generated from protobuf field <code>bytes accountStateRoot = 11;</code>
     */
    protected $accountStateRoot = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $timestamp
     *     @type string $txTrieRoot
     *     @type string $parentHash
     *     @type int|string $number
     *          bytes nonce = 5;
     *          bytes difficulty = 6;
     *     @type int|string $witness_id
     *     @type string $witness_address
     *     @type int $version
     *     @type string $accountStateRoot
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Tron::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>int64 timestamp = 1;</code>
     * @return int|string
     */
    public function getTimestamp()
    {
        return $this->timestamp;
    }

    /**
     * Generated from protobuf field <code>int64 timestamp = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTimestamp($var)
    {
        GPBUtil::checkInt64($var);
        $this->timestamp = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bytes txTrieRoot = 2;</code>
     * @return string
     */
    public function getTxTrieRoot()
    {
        return $this->txTrieRoot;
    }

    /**
     * Generated from protobuf field <code>bytes txTrieRoot = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setTxTrieRoot($var)
    {
        GPBUtil::checkString($var, False);
        $this->txTrieRoot = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bytes parentHash = 3;</code>
     * @return string
     */
    public function getParentHash()
    {
        return $this->parentHash;
    }

    /**
     * Generated from protobuf field <code>bytes parentHash = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setParentHash($var)
    {
        GPBUtil::checkString($var, False);
        $this->parentHash = $var;

        return $this;
    }

    /**
     *bytes nonce = 5;
     *bytes difficulty = 6;
     *
     * Generated from protobuf field <code>int64 number = 7;</code>
     * @return int|string
     */
    public function getNumber()
    {
        return $this->number;
    }

    /**
     *bytes nonce = 5;
     *bytes difficulty = 6;
     *
     * Generated from protobuf field <code>int64 number = 7;</code>
     * @param int|string $var
     * @return $this
     */
    public function setNumber($var)
    {
        GPBUtil::checkInt64($var);
        $this->number = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 witness_id = 8;</code>
     * @return int|string
     */
    public function getWitnessId()
    {
        return $this->witness_id;
    }

    /**
     * Generated from protobuf field <code>int64 witness_id = 8;</code>
     * @param int|string $var
     * @return $this
     */
    public function setWitnessId($var)
    {
        GPBUtil::checkInt64($var);
        $this->witness_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bytes witness_address = 9;</code>
     * @return string
     */
    public function getWitnessAddress()
    {
        return $this->witness_address;
    }

    /**
     * Generated from protobuf field <code>bytes witness_address = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setWitnessAddress($var)
    {
        GPBUtil::checkString($var, False);
        $this->witness_address = $var;

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>int32 version = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkInt32($var);
        $this->version = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bytes accountStateRoot = 11;</code>
     * @return string
     */
    public function getAccountStateRoot()
    {
        return $this->accountStateRoot;
    }

    /**
     * Generated from protobuf field <code>bytes accountStateRoot = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setAccountStateRoot($var)
    {
        GPBUtil::checkString($var, False);
        $this->accountStateRoot = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(raw::class, \Protocol\BlockHeader_raw::class);

