<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/firestore/v1beta1/common.proto

namespace Google\Cloud\Firestore\V1beta1\TransactionOptions;

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

/**
 * Options for a transaction that can be used to read and write documents.
 *
 * Generated from protobuf message <code>google.firestore.v1beta1.TransactionOptions.ReadWrite</code>
 */
class ReadWrite extends \Google\Protobuf\Internal\Message
{
    /**
     * An optional transaction to retry.
     *
     * Generated from protobuf field <code>bytes retry_transaction = 1;</code>
     */
    private $retry_transaction = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $retry_transaction
     *           An optional transaction to retry.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\V1Beta1\Common::initOnce();
        parent::__construct($data);
    }

    /**
     * An optional transaction to retry.
     *
     * Generated from protobuf field <code>bytes retry_transaction = 1;</code>
     * @return string
     */
    public function getRetryTransaction()
    {
        return $this->retry_transaction;
    }

    /**
     * An optional transaction to retry.
     *
     * Generated from protobuf field <code>bytes retry_transaction = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setRetryTransaction($var)
    {
        GPBUtil::checkString($var, False);
        $this->retry_transaction = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReadWrite::class, \Google\Cloud\Firestore\V1beta1\TransactionOptions_ReadWrite::class);

