<?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.ResourceReceipt</code>
 */
class ResourceReceipt extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int64 energy_usage = 1;</code>
     */
    protected $energy_usage = 0;
    /**
     * Generated from protobuf field <code>int64 energy_fee = 2;</code>
     */
    protected $energy_fee = 0;
    /**
     * Generated from protobuf field <code>int64 origin_energy_usage = 3;</code>
     */
    protected $origin_energy_usage = 0;
    /**
     * Generated from protobuf field <code>int64 energy_usage_total = 4;</code>
     */
    protected $energy_usage_total = 0;
    /**
     * Generated from protobuf field <code>int64 net_usage = 5;</code>
     */
    protected $net_usage = 0;
    /**
     * Generated from protobuf field <code>int64 net_fee = 6;</code>
     */
    protected $net_fee = 0;
    /**
     * Generated from protobuf field <code>.protocol.Transaction.Result.contractResult result = 7;</code>
     */
    protected $result = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $energy_usage
     *     @type int|string $energy_fee
     *     @type int|string $origin_energy_usage
     *     @type int|string $energy_usage_total
     *     @type int|string $net_usage
     *     @type int|string $net_fee
     *     @type int $result
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Tron::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.protocol.Transaction.Result.contractResult result = 7;</code>
     * @return int
     */
    public function getResult()
    {
        return $this->result;
    }

    /**
     * Generated from protobuf field <code>.protocol.Transaction.Result.contractResult result = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setResult($var)
    {
        GPBUtil::checkEnum($var, \Protocol\Transaction\Result\contractResult::class);
        $this->result = $var;

        return $this;
    }

}

