<?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.TransactionSign</code>
 */
class TransactionSign extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.protocol.Transaction transaction = 1;</code>
     */
    protected $transaction = null;
    /**
     * Generated from protobuf field <code>bytes privateKey = 2;</code>
     */
    protected $privateKey = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Protocol\Transaction $transaction
     *     @type string $privateKey
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Tron::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.protocol.Transaction transaction = 1;</code>
     * @return \Protocol\Transaction
     */
    public function getTransaction()
    {
        return isset($this->transaction) ? $this->transaction : null;
    }

    public function hasTransaction()
    {
        return isset($this->transaction);
    }

    public function clearTransaction()
    {
        unset($this->transaction);
    }

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

        return $this;
    }

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

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

        return $this;
    }

}

