<?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;

/**
 * Witness
 *
 * Generated from protobuf message <code>protocol.Witness</code>
 */
class Witness extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bytes address = 1;</code>
     */
    protected $address = '';
    /**
     * Generated from protobuf field <code>int64 voteCount = 2;</code>
     */
    protected $voteCount = 0;
    /**
     * Generated from protobuf field <code>bytes pubKey = 3;</code>
     */
    protected $pubKey = '';
    /**
     * Generated from protobuf field <code>string url = 4;</code>
     */
    protected $url = '';
    /**
     * Generated from protobuf field <code>int64 totalProduced = 5;</code>
     */
    protected $totalProduced = 0;
    /**
     * Generated from protobuf field <code>int64 totalMissed = 6;</code>
     */
    protected $totalMissed = 0;
    /**
     * Generated from protobuf field <code>int64 latestBlockNum = 7;</code>
     */
    protected $latestBlockNum = 0;
    /**
     * Generated from protobuf field <code>int64 latestSlotNum = 8;</code>
     */
    protected $latestSlotNum = 0;
    /**
     * Generated from protobuf field <code>bool isJobs = 9;</code>
     */
    protected $isJobs = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $address
     *     @type int|string $voteCount
     *     @type string $pubKey
     *     @type string $url
     *     @type int|string $totalProduced
     *     @type int|string $totalMissed
     *     @type int|string $latestBlockNum
     *     @type int|string $latestSlotNum
     *     @type bool $isJobs
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Tron::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string url = 4;</code>
     * @return string
     */
    public function getUrl()
    {
        return $this->url;
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool isJobs = 9;</code>
     * @return bool
     */
    public function getIsJobs()
    {
        return $this->isJobs;
    }

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

        return $this;
    }

}

