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

namespace Protocol;

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

/**
 * Generated from protobuf message <code>protocol.NodeInfo</code>
 */
class NodeInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int64 beginSyncNum = 1;</code>
     */
    protected $beginSyncNum = 0;
    /**
     * Generated from protobuf field <code>string block = 2;</code>
     */
    protected $block = '';
    /**
     * Generated from protobuf field <code>string solidityBlock = 3;</code>
     */
    protected $solidityBlock = '';
    /**
     *connect information
     *
     * Generated from protobuf field <code>int32 currentConnectCount = 4;</code>
     */
    protected $currentConnectCount = 0;
    /**
     * Generated from protobuf field <code>int32 activeConnectCount = 5;</code>
     */
    protected $activeConnectCount = 0;
    /**
     * Generated from protobuf field <code>int32 passiveConnectCount = 6;</code>
     */
    protected $passiveConnectCount = 0;
    /**
     * Generated from protobuf field <code>int64 totalFlow = 7;</code>
     */
    protected $totalFlow = 0;
    /**
     * Generated from protobuf field <code>repeated .protocol.NodeInfo.PeerInfo peerInfoList = 8;</code>
     */
    private $peerInfoList;
    /**
     * Generated from protobuf field <code>.protocol.NodeInfo.ConfigNodeInfo configNodeInfo = 9;</code>
     */
    protected $configNodeInfo = null;
    /**
     * Generated from protobuf field <code>.protocol.NodeInfo.MachineInfo machineInfo = 10;</code>
     */
    protected $machineInfo = null;
    /**
     * Generated from protobuf field <code>map<string, string> cheatWitnessInfoMap = 11;</code>
     */
    private $cheatWitnessInfoMap;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $beginSyncNum
     *     @type string $block
     *     @type string $solidityBlock
     *     @type int $currentConnectCount
     *          connect information
     *     @type int $activeConnectCount
     *     @type int $passiveConnectCount
     *     @type int|string $totalFlow
     *     @type \Protocol\NodeInfo\PeerInfo[]|\Google\Protobuf\Internal\RepeatedField $peerInfoList
     *     @type \Protocol\NodeInfo\ConfigNodeInfo $configNodeInfo
     *     @type \Protocol\NodeInfo\MachineInfo $machineInfo
     *     @type array|\Google\Protobuf\Internal\MapField $cheatWitnessInfoMap
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Tron::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     *connect information
     *
     * Generated from protobuf field <code>int32 currentConnectCount = 4;</code>
     * @return int
     */
    public function getCurrentConnectCount()
    {
        return $this->currentConnectCount;
    }

    /**
     *connect information
     *
     * Generated from protobuf field <code>int32 currentConnectCount = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setCurrentConnectCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->currentConnectCount = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .protocol.NodeInfo.PeerInfo peerInfoList = 8;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPeerInfoList()
    {
        return $this->peerInfoList;
    }

    /**
     * Generated from protobuf field <code>repeated .protocol.NodeInfo.PeerInfo peerInfoList = 8;</code>
     * @param \Protocol\NodeInfo\PeerInfo[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPeerInfoList($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Protocol\NodeInfo\PeerInfo::class);
        $this->peerInfoList = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.protocol.NodeInfo.ConfigNodeInfo configNodeInfo = 9;</code>
     * @return \Protocol\NodeInfo\ConfigNodeInfo
     */
    public function getConfigNodeInfo()
    {
        return isset($this->configNodeInfo) ? $this->configNodeInfo : null;
    }

    public function hasConfigNodeInfo()
    {
        return isset($this->configNodeInfo);
    }

    public function clearConfigNodeInfo()
    {
        unset($this->configNodeInfo);
    }

    /**
     * Generated from protobuf field <code>.protocol.NodeInfo.ConfigNodeInfo configNodeInfo = 9;</code>
     * @param \Protocol\NodeInfo\ConfigNodeInfo $var
     * @return $this
     */
    public function setConfigNodeInfo($var)
    {
        GPBUtil::checkMessage($var, \Protocol\NodeInfo\ConfigNodeInfo::class);
        $this->configNodeInfo = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.protocol.NodeInfo.MachineInfo machineInfo = 10;</code>
     * @return \Protocol\NodeInfo\MachineInfo
     */
    public function getMachineInfo()
    {
        return isset($this->machineInfo) ? $this->machineInfo : null;
    }

    public function hasMachineInfo()
    {
        return isset($this->machineInfo);
    }

    public function clearMachineInfo()
    {
        unset($this->machineInfo);
    }

    /**
     * Generated from protobuf field <code>.protocol.NodeInfo.MachineInfo machineInfo = 10;</code>
     * @param \Protocol\NodeInfo\MachineInfo $var
     * @return $this
     */
    public function setMachineInfo($var)
    {
        GPBUtil::checkMessage($var, \Protocol\NodeInfo\MachineInfo::class);
        $this->machineInfo = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, string> cheatWitnessInfoMap = 11;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getCheatWitnessInfoMap()
    {
        return $this->cheatWitnessInfoMap;
    }

    /**
     * Generated from protobuf field <code>map<string, string> cheatWitnessInfoMap = 11;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setCheatWitnessInfoMap($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->cheatWitnessInfoMap = $arr;

        return $this;
    }

}

