<?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.TransactionInfo</code>
 */
class TransactionInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bytes id = 1;</code>
     */
    protected $id = '';
    /**
     * Generated from protobuf field <code>int64 fee = 2;</code>
     */
    protected $fee = 0;
    /**
     * Generated from protobuf field <code>int64 blockNumber = 3;</code>
     */
    protected $blockNumber = 0;
    /**
     * Generated from protobuf field <code>int64 blockTimeStamp = 4;</code>
     */
    protected $blockTimeStamp = 0;
    /**
     * Generated from protobuf field <code>repeated bytes contractResult = 5;</code>
     */
    private $contractResult;
    /**
     * Generated from protobuf field <code>bytes contract_address = 6;</code>
     */
    protected $contract_address = '';
    /**
     * Generated from protobuf field <code>.protocol.ResourceReceipt receipt = 7;</code>
     */
    protected $receipt = null;
    /**
     * Generated from protobuf field <code>repeated .protocol.TransactionInfo.Log log = 8;</code>
     */
    private $log;
    /**
     * Generated from protobuf field <code>.protocol.TransactionInfo.code result = 9;</code>
     */
    protected $result = 0;
    /**
     * Generated from protobuf field <code>bytes resMessage = 10;</code>
     */
    protected $resMessage = '';
    /**
     * Generated from protobuf field <code>string assetIssueID = 14;</code>
     */
    protected $assetIssueID = '';
    /**
     * Generated from protobuf field <code>int64 withdraw_amount = 15;</code>
     */
    protected $withdraw_amount = 0;
    /**
     * Generated from protobuf field <code>int64 unfreeze_amount = 16;</code>
     */
    protected $unfreeze_amount = 0;
    /**
     * Generated from protobuf field <code>repeated .protocol.InternalTransaction internal_transactions = 17;</code>
     */
    private $internal_transactions;
    /**
     * Generated from protobuf field <code>int64 exchange_received_amount = 18;</code>
     */
    protected $exchange_received_amount = 0;
    /**
     * Generated from protobuf field <code>int64 exchange_inject_another_amount = 19;</code>
     */
    protected $exchange_inject_another_amount = 0;
    /**
     * Generated from protobuf field <code>int64 exchange_withdraw_another_amount = 20;</code>
     */
    protected $exchange_withdraw_another_amount = 0;
    /**
     * Generated from protobuf field <code>int64 exchange_id = 21;</code>
     */
    protected $exchange_id = 0;
    /**
     * Generated from protobuf field <code>int64 shielded_transaction_fee = 22;</code>
     */
    protected $shielded_transaction_fee = 0;
    /**
     * Generated from protobuf field <code>bytes orderId = 25;</code>
     */
    protected $orderId = '';
    /**
     * Generated from protobuf field <code>repeated .protocol.MarketOrderDetail orderDetails = 26;</code>
     */
    private $orderDetails;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *     @type int|string $fee
     *     @type int|string $blockNumber
     *     @type int|string $blockTimeStamp
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $contractResult
     *     @type string $contract_address
     *     @type \Protocol\ResourceReceipt $receipt
     *     @type \Protocol\TransactionInfo\Log[]|\Google\Protobuf\Internal\RepeatedField $log
     *     @type int $result
     *     @type string $resMessage
     *     @type string $assetIssueID
     *     @type int|string $withdraw_amount
     *     @type int|string $unfreeze_amount
     *     @type \Protocol\InternalTransaction[]|\Google\Protobuf\Internal\RepeatedField $internal_transactions
     *     @type int|string $exchange_received_amount
     *     @type int|string $exchange_inject_another_amount
     *     @type int|string $exchange_withdraw_another_amount
     *     @type int|string $exchange_id
     *     @type int|string $shielded_transaction_fee
     *     @type string $orderId
     *     @type \Protocol\MarketOrderDetail[]|\Google\Protobuf\Internal\RepeatedField $orderDetails
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Tron::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated bytes contractResult = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getContractResult()
    {
        return $this->contractResult;
    }

    /**
     * Generated from protobuf field <code>repeated bytes contractResult = 5;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setContractResult($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES);
        $this->contractResult = $arr;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.protocol.ResourceReceipt receipt = 7;</code>
     * @return \Protocol\ResourceReceipt
     */
    public function getReceipt()
    {
        return isset($this->receipt) ? $this->receipt : null;
    }

    public function hasReceipt()
    {
        return isset($this->receipt);
    }

    public function clearReceipt()
    {
        unset($this->receipt);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .protocol.TransactionInfo.Log log = 8;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLog()
    {
        return $this->log;
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string assetIssueID = 14;</code>
     * @return string
     */
    public function getAssetIssueID()
    {
        return $this->assetIssueID;
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .protocol.InternalTransaction internal_transactions = 17;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInternalTransactions()
    {
        return $this->internal_transactions;
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .protocol.MarketOrderDetail orderDetails = 26;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getOrderDetails()
    {
        return $this->orderDetails;
    }

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

        return $this;
    }

}

