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

namespace Google\Cloud\Firestore\Admin\V1;

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

/**
 * The request message for
 * [FirestoreAdmin.RestoreDatabase][google.firestore.admin.v1.RestoreDatabase].
 *
 * Generated from protobuf message <code>google.firestore.admin.v1.RestoreDatabaseRequest</code>
 */
class RestoreDatabaseRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The project to restore the database in. Format is
     * `projects/{project_id}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The ID to use for the database, which will become the final
     * component of the database's resource name. This database id must not be
     * associated with an existing database.
     * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
     * with first character a letter and the last a letter or a number. Must not
     * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
     * "(default)" database id is also valid.
     *
     * Generated from protobuf field <code>string database_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $database_id = '';
    /**
     * Required. Backup to restore from. Must be from the same project as the
     * parent.
     * Format is: `projects/{project_id}/locations/{location}/backups/{backup}`
     *
     * Generated from protobuf field <code>string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $backup = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The project to restore the database in. Format is
     *           `projects/{project_id}`.
     *     @type string $database_id
     *           Required. The ID to use for the database, which will become the final
     *           component of the database's resource name. This database id must not be
     *           associated with an existing database.
     *           This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
     *           with first character a letter and the last a letter or a number. Must not
     *           be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
     *           "(default)" database id is also valid.
     *     @type string $backup
     *           Required. Backup to restore from. Must be from the same project as the
     *           parent.
     *           Format is: `projects/{project_id}/locations/{location}/backups/{backup}`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The project to restore the database in. Format is
     * `projects/{project_id}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The project to restore the database in. Format is
     * `projects/{project_id}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The ID to use for the database, which will become the final
     * component of the database's resource name. This database id must not be
     * associated with an existing database.
     * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
     * with first character a letter and the last a letter or a number. Must not
     * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
     * "(default)" database id is also valid.
     *
     * Generated from protobuf field <code>string database_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDatabaseId()
    {
        return $this->database_id;
    }

    /**
     * Required. The ID to use for the database, which will become the final
     * component of the database's resource name. This database id must not be
     * associated with an existing database.
     * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
     * with first character a letter and the last a letter or a number. Must not
     * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
     * "(default)" database id is also valid.
     *
     * Generated from protobuf field <code>string database_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDatabaseId($var)
    {
        GPBUtil::checkString($var, True);
        $this->database_id = $var;

        return $this;
    }

    /**
     * Required. Backup to restore from. Must be from the same project as the
     * parent.
     * Format is: `projects/{project_id}/locations/{location}/backups/{backup}`
     *
     * Generated from protobuf field <code>string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getBackup()
    {
        return $this->backup;
    }

    /**
     * Required. Backup to restore from. Must be from the same project as the
     * parent.
     * Format is: `projects/{project_id}/locations/{location}/backups/{backup}`
     *
     * Generated from protobuf field <code>string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setBackup($var)
    {
        GPBUtil::checkString($var, True);
        $this->backup = $var;

        return $this;
    }

}

