<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: core/contract/shield_contract.proto

namespace Protocol;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Generated from protobuf message <code>protocol.IncrementalMerkleTree</code>
 */
class IncrementalMerkleTree extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.protocol.PedersenHash left = 1;</code>
     */
    protected $left = null;
    /**
     * Generated from protobuf field <code>.protocol.PedersenHash right = 2;</code>
     */
    protected $right = null;
    /**
     * Generated from protobuf field <code>repeated .protocol.PedersenHash parents = 3;</code>
     */
    private $parents;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Protocol\PedersenHash $left
     *     @type \Protocol\PedersenHash $right
     *     @type \Protocol\PedersenHash[]|\Google\Protobuf\Internal\RepeatedField $parents
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Contract\ShieldContract::initOnce();
        parent::__construct($data);
    }

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

    public function hasLeft()
    {
        return isset($this->left);
    }

    public function clearLeft()
    {
        unset($this->left);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.protocol.PedersenHash right = 2;</code>
     * @return \Protocol\PedersenHash
     */
    public function getRight()
    {
        return isset($this->right) ? $this->right : null;
    }

    public function hasRight()
    {
        return isset($this->right);
    }

    public function clearRight()
    {
        unset($this->right);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .protocol.PedersenHash parents = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getParents()
    {
        return $this->parents;
    }

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

        return $this;
    }

}

