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

namespace Protocol\NodeInfo;

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

/**
 * Generated from protobuf message <code>protocol.NodeInfo.ConfigNodeInfo</code>
 */
class ConfigNodeInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string codeVersion = 1;</code>
     */
    protected $codeVersion = '';
    /**
     * Generated from protobuf field <code>string p2pVersion = 2;</code>
     */
    protected $p2pVersion = '';
    /**
     * Generated from protobuf field <code>int32 listenPort = 3;</code>
     */
    protected $listenPort = 0;
    /**
     * Generated from protobuf field <code>bool discoverEnable = 4;</code>
     */
    protected $discoverEnable = false;
    /**
     * Generated from protobuf field <code>int32 activeNodeSize = 5;</code>
     */
    protected $activeNodeSize = 0;
    /**
     * Generated from protobuf field <code>int32 passiveNodeSize = 6;</code>
     */
    protected $passiveNodeSize = 0;
    /**
     * Generated from protobuf field <code>int32 sendNodeSize = 7;</code>
     */
    protected $sendNodeSize = 0;
    /**
     * Generated from protobuf field <code>int32 maxConnectCount = 8;</code>
     */
    protected $maxConnectCount = 0;
    /**
     * Generated from protobuf field <code>int32 sameIpMaxConnectCount = 9;</code>
     */
    protected $sameIpMaxConnectCount = 0;
    /**
     * Generated from protobuf field <code>int32 backupListenPort = 10;</code>
     */
    protected $backupListenPort = 0;
    /**
     * Generated from protobuf field <code>int32 backupMemberSize = 11;</code>
     */
    protected $backupMemberSize = 0;
    /**
     * Generated from protobuf field <code>int32 backupPriority = 12;</code>
     */
    protected $backupPriority = 0;
    /**
     * Generated from protobuf field <code>int32 dbVersion = 13;</code>
     */
    protected $dbVersion = 0;
    /**
     * Generated from protobuf field <code>int32 minParticipationRate = 14;</code>
     */
    protected $minParticipationRate = 0;
    /**
     * Generated from protobuf field <code>bool supportConstant = 15;</code>
     */
    protected $supportConstant = false;
    /**
     * Generated from protobuf field <code>double minTimeRatio = 16;</code>
     */
    protected $minTimeRatio = 0.0;
    /**
     * Generated from protobuf field <code>double maxTimeRatio = 17;</code>
     */
    protected $maxTimeRatio = 0.0;
    /**
     * Generated from protobuf field <code>int64 allowCreationOfContracts = 18;</code>
     */
    protected $allowCreationOfContracts = 0;
    /**
     * Generated from protobuf field <code>int64 allowAdaptiveEnergy = 19;</code>
     */
    protected $allowAdaptiveEnergy = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $codeVersion
     *     @type string $p2pVersion
     *     @type int $listenPort
     *     @type bool $discoverEnable
     *     @type int $activeNodeSize
     *     @type int $passiveNodeSize
     *     @type int $sendNodeSize
     *     @type int $maxConnectCount
     *     @type int $sameIpMaxConnectCount
     *     @type int $backupListenPort
     *     @type int $backupMemberSize
     *     @type int $backupPriority
     *     @type int $dbVersion
     *     @type int $minParticipationRate
     *     @type bool $supportConstant
     *     @type float $minTimeRatio
     *     @type float $maxTimeRatio
     *     @type int|string $allowCreationOfContracts
     *     @type int|string $allowAdaptiveEnergy
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Tron::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string codeVersion = 1;</code>
     * @return string
     */
    public function getCodeVersion()
    {
        return $this->codeVersion;
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool discoverEnable = 4;</code>
     * @return bool
     */
    public function getDiscoverEnable()
    {
        return $this->discoverEnable;
    }

    /**
     * Generated from protobuf field <code>bool discoverEnable = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setDiscoverEnable($var)
    {
        GPBUtil::checkBool($var);
        $this->discoverEnable = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool supportConstant = 15;</code>
     * @return bool
     */
    public function getSupportConstant()
    {
        return $this->supportConstant;
    }

    /**
     * Generated from protobuf field <code>bool supportConstant = 15;</code>
     * @param bool $var
     * @return $this
     */
    public function setSupportConstant($var)
    {
        GPBUtil::checkBool($var);
        $this->supportConstant = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>double minTimeRatio = 16;</code>
     * @return float
     */
    public function getMinTimeRatio()
    {
        return $this->minTimeRatio;
    }

    /**
     * Generated from protobuf field <code>double minTimeRatio = 16;</code>
     * @param float $var
     * @return $this
     */
    public function setMinTimeRatio($var)
    {
        GPBUtil::checkDouble($var);
        $this->minTimeRatio = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>double maxTimeRatio = 17;</code>
     * @return float
     */
    public function getMaxTimeRatio()
    {
        return $this->maxTimeRatio;
    }

    /**
     * Generated from protobuf field <code>double maxTimeRatio = 17;</code>
     * @param float $var
     * @return $this
     */
    public function setMaxTimeRatio($var)
    {
        GPBUtil::checkDouble($var);
        $this->maxTimeRatio = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

}

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

