<?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.SpendDescription</code>
 */
class SpendDescription extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bytes value_commitment = 1;</code>
     */
    protected $value_commitment = '';
    /**
     * merkle root
     *
     * Generated from protobuf field <code>bytes anchor = 2;</code>
     */
    protected $anchor = '';
    /**
     * used for check double spend
     *
     * Generated from protobuf field <code>bytes nullifier = 3;</code>
     */
    protected $nullifier = '';
    /**
     * used for check spend authority signature
     *
     * Generated from protobuf field <code>bytes rk = 4;</code>
     */
    protected $rk = '';
    /**
     * Generated from protobuf field <code>bytes zkproof = 5;</code>
     */
    protected $zkproof = '';
    /**
     * Generated from protobuf field <code>bytes spend_authority_signature = 6;</code>
     */
    protected $spend_authority_signature = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $value_commitment
     *     @type string $anchor
     *           merkle root
     *     @type string $nullifier
     *           used for check double spend
     *     @type string $rk
     *           used for check spend authority signature
     *     @type string $zkproof
     *     @type string $spend_authority_signature
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Contract\ShieldContract::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * used for check double spend
     *
     * Generated from protobuf field <code>bytes nullifier = 3;</code>
     * @return string
     */
    public function getNullifier()
    {
        return $this->nullifier;
    }

    /**
     * used for check double spend
     *
     * Generated from protobuf field <code>bytes nullifier = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setNullifier($var)
    {
        GPBUtil::checkString($var, False);
        $this->nullifier = $var;

        return $this;
    }

    /**
     * used for check spend authority signature
     *
     * Generated from protobuf field <code>bytes rk = 4;</code>
     * @return string
     */
    public function getRk()
    {
        return $this->rk;
    }

    /**
     * used for check spend authority signature
     *
     * Generated from protobuf field <code>bytes rk = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setRk($var)
    {
        GPBUtil::checkString($var, False);
        $this->rk = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

}

