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

/**
 * Account 
 *
 * Generated from protobuf message <code>protocol.Account</code>
 */
class Account extends \Google\Protobuf\Internal\Message
{
    /**
     * account nick name
     *
     * Generated from protobuf field <code>bytes account_name = 1;</code>
     */
    protected $account_name = '';
    /**
     * Generated from protobuf field <code>.protocol.AccountType type = 2;</code>
     */
    protected $type = 0;
    /**
     * the create address
     *
     * Generated from protobuf field <code>bytes address = 3;</code>
     */
    protected $address = '';
    /**
     * the trx balance
     *
     * Generated from protobuf field <code>int64 balance = 4;</code>
     */
    protected $balance = 0;
    /**
     * the votes
     *
     * Generated from protobuf field <code>repeated .protocol.Vote votes = 5;</code>
     */
    private $votes;
    /**
     * the other asset owned by this account
     *
     * Generated from protobuf field <code>map<string, int64> asset = 6;</code>
     */
    private $asset;
    /**
     * the other asset owned by this account，key is assetId
     *
     * Generated from protobuf field <code>map<string, int64> assetV2 = 56;</code>
     */
    private $assetV2;
    /**
     * the frozen balance for bandwidth
     *
     * Generated from protobuf field <code>repeated .protocol.Account.Frozen frozen = 7;</code>
     */
    private $frozen;
    /**
     * bandwidth, get from frozen
     *
     * Generated from protobuf field <code>int64 net_usage = 8;</code>
     */
    protected $net_usage = 0;
    /**
     *Frozen balance provided by other accounts to this account
     *
     * Generated from protobuf field <code>int64 acquired_delegated_frozen_balance_for_bandwidth = 41;</code>
     */
    protected $acquired_delegated_frozen_balance_for_bandwidth = 0;
    /**
     *Freeze and provide balances to other accounts
     *
     * Generated from protobuf field <code>int64 delegated_frozen_balance_for_bandwidth = 42;</code>
     */
    protected $delegated_frozen_balance_for_bandwidth = 0;
    /**
     * this account create time
     *
     * Generated from protobuf field <code>int64 create_time = 9;</code>
     */
    protected $create_time = 0;
    /**
     * this last operation time, including transfer, voting and so on. //FIXME fix grammar
     *
     * Generated from protobuf field <code>int64 latest_opration_time = 10;</code>
     */
    protected $latest_opration_time = 0;
    /**
     * witness block producing allowance
     *
     * Generated from protobuf field <code>int64 allowance = 11;</code>
     */
    protected $allowance = 0;
    /**
     * last withdraw time
     *
     * Generated from protobuf field <code>int64 latest_withdraw_time = 12;</code>
     */
    protected $latest_withdraw_time = 0;
    /**
     * not used so far
     *
     * Generated from protobuf field <code>bytes code = 13;</code>
     */
    protected $code = '';
    /**
     * Generated from protobuf field <code>bool is_witness = 14;</code>
     */
    protected $is_witness = false;
    /**
     * Generated from protobuf field <code>bool is_committee = 15;</code>
     */
    protected $is_committee = false;
    /**
     * frozen asset(for asset issuer)
     *
     * Generated from protobuf field <code>repeated .protocol.Account.Frozen frozen_supply = 16;</code>
     */
    private $frozen_supply;
    /**
     * asset_issued_name
     *
     * Generated from protobuf field <code>bytes asset_issued_name = 17;</code>
     */
    protected $asset_issued_name = '';
    /**
     * Generated from protobuf field <code>bytes asset_issued_ID = 57;</code>
     */
    protected $asset_issued_ID = '';
    /**
     * Generated from protobuf field <code>map<string, int64> latest_asset_operation_time = 18;</code>
     */
    private $latest_asset_operation_time;
    /**
     * Generated from protobuf field <code>map<string, int64> latest_asset_operation_timeV2 = 58;</code>
     */
    private $latest_asset_operation_timeV2;
    /**
     * Generated from protobuf field <code>int64 free_net_usage = 19;</code>
     */
    protected $free_net_usage = 0;
    /**
     * Generated from protobuf field <code>map<string, int64> free_asset_net_usage = 20;</code>
     */
    private $free_asset_net_usage;
    /**
     * Generated from protobuf field <code>map<string, int64> free_asset_net_usageV2 = 59;</code>
     */
    private $free_asset_net_usageV2;
    /**
     * Generated from protobuf field <code>int64 latest_consume_time = 21;</code>
     */
    protected $latest_consume_time = 0;
    /**
     * Generated from protobuf field <code>int64 latest_consume_free_time = 22;</code>
     */
    protected $latest_consume_free_time = 0;
    /**
     * the identity of this account, case insensitive
     *
     * Generated from protobuf field <code>bytes account_id = 23;</code>
     */
    protected $account_id = '';
    /**
     * Generated from protobuf field <code>.protocol.Account.AccountResource account_resource = 26;</code>
     */
    protected $account_resource = null;
    /**
     * Generated from protobuf field <code>bytes codeHash = 30;</code>
     */
    protected $codeHash = '';
    /**
     * Generated from protobuf field <code>.protocol.Permission owner_permission = 31;</code>
     */
    protected $owner_permission = null;
    /**
     * Generated from protobuf field <code>.protocol.Permission witness_permission = 32;</code>
     */
    protected $witness_permission = null;
    /**
     * Generated from protobuf field <code>repeated .protocol.Permission active_permission = 33;</code>
     */
    private $active_permission;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $account_name
     *           account nick name
     *     @type int $type
     *     @type string $address
     *           the create address
     *     @type int|string $balance
     *           the trx balance
     *     @type \Protocol\Vote[]|\Google\Protobuf\Internal\RepeatedField $votes
     *           the votes
     *     @type array|\Google\Protobuf\Internal\MapField $asset
     *           the other asset owned by this account
     *     @type array|\Google\Protobuf\Internal\MapField $assetV2
     *           the other asset owned by this account，key is assetId
     *     @type \Protocol\Account\Frozen[]|\Google\Protobuf\Internal\RepeatedField $frozen
     *           the frozen balance for bandwidth
     *     @type int|string $net_usage
     *           bandwidth, get from frozen
     *     @type int|string $acquired_delegated_frozen_balance_for_bandwidth
     *          Frozen balance provided by other accounts to this account
     *     @type int|string $delegated_frozen_balance_for_bandwidth
     *          Freeze and provide balances to other accounts
     *     @type int|string $create_time
     *           this account create time
     *     @type int|string $latest_opration_time
     *           this last operation time, including transfer, voting and so on. //FIXME fix grammar
     *     @type int|string $allowance
     *           witness block producing allowance
     *     @type int|string $latest_withdraw_time
     *           last withdraw time
     *     @type string $code
     *           not used so far
     *     @type bool $is_witness
     *     @type bool $is_committee
     *     @type \Protocol\Account\Frozen[]|\Google\Protobuf\Internal\RepeatedField $frozen_supply
     *           frozen asset(for asset issuer)
     *     @type string $asset_issued_name
     *           asset_issued_name
     *     @type string $asset_issued_ID
     *     @type array|\Google\Protobuf\Internal\MapField $latest_asset_operation_time
     *     @type array|\Google\Protobuf\Internal\MapField $latest_asset_operation_timeV2
     *     @type int|string $free_net_usage
     *     @type array|\Google\Protobuf\Internal\MapField $free_asset_net_usage
     *     @type array|\Google\Protobuf\Internal\MapField $free_asset_net_usageV2
     *     @type int|string $latest_consume_time
     *     @type int|string $latest_consume_free_time
     *     @type string $account_id
     *           the identity of this account, case insensitive
     *     @type \Protocol\Account\AccountResource $account_resource
     *     @type string $codeHash
     *     @type \Protocol\Permission $owner_permission
     *     @type \Protocol\Permission $witness_permission
     *     @type \Protocol\Permission[]|\Google\Protobuf\Internal\RepeatedField $active_permission
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Tron::initOnce();
        parent::__construct($data);
    }

    /**
     * account nick name
     *
     * Generated from protobuf field <code>bytes account_name = 1;</code>
     * @return string
     */
    public function getAccountName()
    {
        return $this->account_name;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.protocol.AccountType type = 2;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Generated from protobuf field <code>.protocol.AccountType type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Protocol\AccountType::class);
        $this->type = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * the trx balance
     *
     * Generated from protobuf field <code>int64 balance = 4;</code>
     * @return int|string
     */
    public function getBalance()
    {
        return $this->balance;
    }

    /**
     * the trx balance
     *
     * Generated from protobuf field <code>int64 balance = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setBalance($var)
    {
        GPBUtil::checkInt64($var);
        $this->balance = $var;

        return $this;
    }

    /**
     * the votes
     *
     * Generated from protobuf field <code>repeated .protocol.Vote votes = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getVotes()
    {
        return $this->votes;
    }

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

        return $this;
    }

    /**
     * the other asset owned by this account
     *
     * Generated from protobuf field <code>map<string, int64> asset = 6;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAsset()
    {
        return $this->asset;
    }

    /**
     * the other asset owned by this account
     *
     * Generated from protobuf field <code>map<string, int64> asset = 6;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAsset($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64);
        $this->asset = $arr;

        return $this;
    }

    /**
     * the other asset owned by this account，key is assetId
     *
     * Generated from protobuf field <code>map<string, int64> assetV2 = 56;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAssetV2()
    {
        return $this->assetV2;
    }

    /**
     * the other asset owned by this account，key is assetId
     *
     * Generated from protobuf field <code>map<string, int64> assetV2 = 56;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAssetV2($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64);
        $this->assetV2 = $arr;

        return $this;
    }

    /**
     * the frozen balance for bandwidth
     *
     * Generated from protobuf field <code>repeated .protocol.Account.Frozen frozen = 7;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFrozen()
    {
        return $this->frozen;
    }

    /**
     * the frozen balance for bandwidth
     *
     * Generated from protobuf field <code>repeated .protocol.Account.Frozen frozen = 7;</code>
     * @param \Protocol\Account\Frozen[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFrozen($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Protocol\Account\Frozen::class);
        $this->frozen = $arr;

        return $this;
    }

    /**
     * bandwidth, get from frozen
     *
     * Generated from protobuf field <code>int64 net_usage = 8;</code>
     * @return int|string
     */
    public function getNetUsage()
    {
        return $this->net_usage;
    }

    /**
     * bandwidth, get from frozen
     *
     * Generated from protobuf field <code>int64 net_usage = 8;</code>
     * @param int|string $var
     * @return $this
     */
    public function setNetUsage($var)
    {
        GPBUtil::checkInt64($var);
        $this->net_usage = $var;

        return $this;
    }

    /**
     *Frozen balance provided by other accounts to this account
     *
     * Generated from protobuf field <code>int64 acquired_delegated_frozen_balance_for_bandwidth = 41;</code>
     * @return int|string
     */
    public function getAcquiredDelegatedFrozenBalanceForBandwidth()
    {
        return $this->acquired_delegated_frozen_balance_for_bandwidth;
    }

    /**
     *Frozen balance provided by other accounts to this account
     *
     * Generated from protobuf field <code>int64 acquired_delegated_frozen_balance_for_bandwidth = 41;</code>
     * @param int|string $var
     * @return $this
     */
    public function setAcquiredDelegatedFrozenBalanceForBandwidth($var)
    {
        GPBUtil::checkInt64($var);
        $this->acquired_delegated_frozen_balance_for_bandwidth = $var;

        return $this;
    }

    /**
     *Freeze and provide balances to other accounts
     *
     * Generated from protobuf field <code>int64 delegated_frozen_balance_for_bandwidth = 42;</code>
     * @return int|string
     */
    public function getDelegatedFrozenBalanceForBandwidth()
    {
        return $this->delegated_frozen_balance_for_bandwidth;
    }

    /**
     *Freeze and provide balances to other accounts
     *
     * Generated from protobuf field <code>int64 delegated_frozen_balance_for_bandwidth = 42;</code>
     * @param int|string $var
     * @return $this
     */
    public function setDelegatedFrozenBalanceForBandwidth($var)
    {
        GPBUtil::checkInt64($var);
        $this->delegated_frozen_balance_for_bandwidth = $var;

        return $this;
    }

    /**
     * this account create time
     *
     * Generated from protobuf field <code>int64 create_time = 9;</code>
     * @return int|string
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    /**
     * this account create time
     *
     * Generated from protobuf field <code>int64 create_time = 9;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->create_time = $var;

        return $this;
    }

    /**
     * this last operation time, including transfer, voting and so on. //FIXME fix grammar
     *
     * Generated from protobuf field <code>int64 latest_opration_time = 10;</code>
     * @return int|string
     */
    public function getLatestOprationTime()
    {
        return $this->latest_opration_time;
    }

    /**
     * this last operation time, including transfer, voting and so on. //FIXME fix grammar
     *
     * Generated from protobuf field <code>int64 latest_opration_time = 10;</code>
     * @param int|string $var
     * @return $this
     */
    public function setLatestOprationTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->latest_opration_time = $var;

        return $this;
    }

    /**
     * witness block producing allowance
     *
     * Generated from protobuf field <code>int64 allowance = 11;</code>
     * @return int|string
     */
    public function getAllowance()
    {
        return $this->allowance;
    }

    /**
     * witness block producing allowance
     *
     * Generated from protobuf field <code>int64 allowance = 11;</code>
     * @param int|string $var
     * @return $this
     */
    public function setAllowance($var)
    {
        GPBUtil::checkInt64($var);
        $this->allowance = $var;

        return $this;
    }

    /**
     * last withdraw time
     *
     * Generated from protobuf field <code>int64 latest_withdraw_time = 12;</code>
     * @return int|string
     */
    public function getLatestWithdrawTime()
    {
        return $this->latest_withdraw_time;
    }

    /**
     * last withdraw time
     *
     * Generated from protobuf field <code>int64 latest_withdraw_time = 12;</code>
     * @param int|string $var
     * @return $this
     */
    public function setLatestWithdrawTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->latest_withdraw_time = $var;

        return $this;
    }

    /**
     * not used so far
     *
     * Generated from protobuf field <code>bytes code = 13;</code>
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * not used so far
     *
     * Generated from protobuf field <code>bytes code = 13;</code>
     * @param string $var
     * @return $this
     */
    public function setCode($var)
    {
        GPBUtil::checkString($var, False);
        $this->code = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool is_witness = 14;</code>
     * @return bool
     */
    public function getIsWitness()
    {
        return $this->is_witness;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * frozen asset(for asset issuer)
     *
     * Generated from protobuf field <code>repeated .protocol.Account.Frozen frozen_supply = 16;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFrozenSupply()
    {
        return $this->frozen_supply;
    }

    /**
     * frozen asset(for asset issuer)
     *
     * Generated from protobuf field <code>repeated .protocol.Account.Frozen frozen_supply = 16;</code>
     * @param \Protocol\Account\Frozen[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFrozenSupply($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Protocol\Account\Frozen::class);
        $this->frozen_supply = $arr;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * the identity of this account, case insensitive
     *
     * Generated from protobuf field <code>bytes account_id = 23;</code>
     * @return string
     */
    public function getAccountId()
    {
        return $this->account_id;
    }

    /**
     * the identity of this account, case insensitive
     *
     * Generated from protobuf field <code>bytes account_id = 23;</code>
     * @param string $var
     * @return $this
     */
    public function setAccountId($var)
    {
        GPBUtil::checkString($var, False);
        $this->account_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.protocol.Account.AccountResource account_resource = 26;</code>
     * @return \Protocol\Account\AccountResource
     */
    public function getAccountResource()
    {
        return isset($this->account_resource) ? $this->account_resource : null;
    }

    public function hasAccountResource()
    {
        return isset($this->account_resource);
    }

    public function clearAccountResource()
    {
        unset($this->account_resource);
    }

    /**
     * Generated from protobuf field <code>.protocol.Account.AccountResource account_resource = 26;</code>
     * @param \Protocol\Account\AccountResource $var
     * @return $this
     */
    public function setAccountResource($var)
    {
        GPBUtil::checkMessage($var, \Protocol\Account\AccountResource::class);
        $this->account_resource = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.protocol.Permission owner_permission = 31;</code>
     * @return \Protocol\Permission
     */
    public function getOwnerPermission()
    {
        return isset($this->owner_permission) ? $this->owner_permission : null;
    }

    public function hasOwnerPermission()
    {
        return isset($this->owner_permission);
    }

    public function clearOwnerPermission()
    {
        unset($this->owner_permission);
    }

    /**
     * Generated from protobuf field <code>.protocol.Permission owner_permission = 31;</code>
     * @param \Protocol\Permission $var
     * @return $this
     */
    public function setOwnerPermission($var)
    {
        GPBUtil::checkMessage($var, \Protocol\Permission::class);
        $this->owner_permission = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.protocol.Permission witness_permission = 32;</code>
     * @return \Protocol\Permission
     */
    public function getWitnessPermission()
    {
        return isset($this->witness_permission) ? $this->witness_permission : null;
    }

    public function hasWitnessPermission()
    {
        return isset($this->witness_permission);
    }

    public function clearWitnessPermission()
    {
        unset($this->witness_permission);
    }

    /**
     * Generated from protobuf field <code>.protocol.Permission witness_permission = 32;</code>
     * @param \Protocol\Permission $var
     * @return $this
     */
    public function setWitnessPermission($var)
    {
        GPBUtil::checkMessage($var, \Protocol\Permission::class);
        $this->witness_permission = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .protocol.Permission active_permission = 33;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getActivePermission()
    {
        return $this->active_permission;
    }

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

        return $this;
    }

}

