<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: test.proto

namespace Tests;

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

/**
 * <pre>
 * Call to DocumentRef.Create.
 * </pre>
 *
 * Protobuf type <code>tests.CreateTest</code>
 */
class CreateTest extends \Google\Protobuf\Internal\Message
{
    /**
     * <pre>
     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
     * </pre>
     *
     * <code>string doc_ref_path = 1;</code>
     */
    private $doc_ref_path = '';
    /**
     * <pre>
     * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
     * denote the two special sentinel values. Values that could be interpreted as integers
     * (i.e. digit strings) should be treated as integers.
     * </pre>
     *
     * <code>string json_data = 2;</code>
     */
    private $json_data = '';
    /**
     * <pre>
     * The request that the call should generate.
     * </pre>
     *
     * <code>.google.firestore.v1beta1.CommitRequest request = 3;</code>
     */
    private $request = null;
    /**
     * <pre>
     * If true, the call should result in an error without generating a request.
     * If this is true, request should not be set.
     * </pre>
     *
     * <code>bool is_error = 4;</code>
     */
    private $is_error = false;

    public function __construct() {
        \GPBMetadata\Test::initOnce();
        parent::__construct();
    }

    /**
     * <pre>
     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
     * </pre>
     *
     * <code>string doc_ref_path = 1;</code>
     */
    public function getDocRefPath()
    {
        return $this->doc_ref_path;
    }

    /**
     * <pre>
     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
     * </pre>
     *
     * <code>string doc_ref_path = 1;</code>
     */
    public function setDocRefPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->doc_ref_path = $var;
    }

    /**
     * <pre>
     * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
     * denote the two special sentinel values. Values that could be interpreted as integers
     * (i.e. digit strings) should be treated as integers.
     * </pre>
     *
     * <code>string json_data = 2;</code>
     */
    public function getJsonData()
    {
        return $this->json_data;
    }

    /**
     * <pre>
     * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
     * denote the two special sentinel values. Values that could be interpreted as integers
     * (i.e. digit strings) should be treated as integers.
     * </pre>
     *
     * <code>string json_data = 2;</code>
     */
    public function setJsonData($var)
    {
        GPBUtil::checkString($var, True);
        $this->json_data = $var;
    }

    /**
     * <pre>
     * The request that the call should generate.
     * </pre>
     *
     * <code>.google.firestore.v1beta1.CommitRequest request = 3;</code>
     */
    public function getRequest()
    {
        return $this->request;
    }

    /**
     * <pre>
     * The request that the call should generate.
     * </pre>
     *
     * <code>.google.firestore.v1beta1.CommitRequest request = 3;</code>
     */
    public function setRequest(&$var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\CommitRequest::class);
        $this->request = $var;
    }

    /**
     * <pre>
     * If true, the call should result in an error without generating a request.
     * If this is true, request should not be set.
     * </pre>
     *
     * <code>bool is_error = 4;</code>
     */
    public function getIsError()
    {
        return $this->is_error;
    }

    /**
     * <pre>
     * If true, the call should result in an error without generating a request.
     * If this is true, request should not be set.
     * </pre>
     *
     * <code>bool is_error = 4;</code>
     */
    public function setIsError($var)
    {
        GPBUtil::checkBool($var);
        $this->is_error = $var;
    }

}

