<?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.DelegatedResource</code>
 */
class DelegatedResource extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bytes from = 1;</code>
     */
    protected $from = '';
    /**
     * Generated from protobuf field <code>bytes to = 2;</code>
     */
    protected $to = '';
    /**
     * Generated from protobuf field <code>int64 frozen_balance_for_bandwidth = 3;</code>
     */
    protected $frozen_balance_for_bandwidth = 0;
    /**
     * Generated from protobuf field <code>int64 frozen_balance_for_energy = 4;</code>
     */
    protected $frozen_balance_for_energy = 0;
    /**
     * Generated from protobuf field <code>int64 expire_time_for_bandwidth = 5;</code>
     */
    protected $expire_time_for_bandwidth = 0;
    /**
     * Generated from protobuf field <code>int64 expire_time_for_energy = 6;</code>
     */
    protected $expire_time_for_energy = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $from
     *     @type string $to
     *     @type int|string $frozen_balance_for_bandwidth
     *     @type int|string $frozen_balance_for_energy
     *     @type int|string $expire_time_for_bandwidth
     *     @type int|string $expire_time_for_energy
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Tron::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

}

