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

/**
 * Exchange
 *
 * Generated from protobuf message <code>protocol.Exchange</code>
 */
class Exchange extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>int64 exchange_id = 1;</code>
     */
    protected $exchange_id = 0;
    /**
     * Generated from protobuf field <code>bytes creator_address = 2;</code>
     */
    protected $creator_address = '';
    /**
     * Generated from protobuf field <code>int64 create_time = 3;</code>
     */
    protected $create_time = 0;
    /**
     * Generated from protobuf field <code>bytes first_token_id = 6;</code>
     */
    protected $first_token_id = '';
    /**
     * Generated from protobuf field <code>int64 first_token_balance = 7;</code>
     */
    protected $first_token_balance = 0;
    /**
     * Generated from protobuf field <code>bytes second_token_id = 8;</code>
     */
    protected $second_token_id = '';
    /**
     * Generated from protobuf field <code>int64 second_token_balance = 9;</code>
     */
    protected $second_token_balance = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $exchange_id
     *     @type string $creator_address
     *     @type int|string $create_time
     *     @type string $first_token_id
     *     @type int|string $first_token_balance
     *     @type string $second_token_id
     *     @type int|string $second_token_balance
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Tron::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Generated from protobuf field <code>int64 exchange_id = 1;</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>bytes creator_address = 2;</code>
     * @return string
     */
    public function getCreatorAddress()
    {
        return $this->creator_address;
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

}

