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

namespace Google\Cloud\Firestore\Admin\V1\Database\SourceInfo;

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

/**
 * Information about a backup that was used to restore a database.
 *
 * Generated from protobuf message <code>google.firestore.admin.v1.Database.SourceInfo.BackupSource</code>
 */
class BackupSource extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the backup that was used to restore this
     * database. Format:
     * `projects/{project}/locations/{location}/backups/{backup}`.
     *
     * Generated from protobuf field <code>string backup = 1 [(.google.api.resource_reference) = {</code>
     */
    private $backup = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $backup
     *           The resource name of the backup that was used to restore this
     *           database. Format:
     *           `projects/{project}/locations/{location}/backups/{backup}`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce();
        parent::__construct($data);
    }

    /**
     * The resource name of the backup that was used to restore this
     * database. Format:
     * `projects/{project}/locations/{location}/backups/{backup}`.
     *
     * Generated from protobuf field <code>string backup = 1 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getBackup()
    {
        return $this->backup;
    }

    /**
     * The resource name of the backup that was used to restore this
     * database. Format:
     * `projects/{project}/locations/{location}/backups/{backup}`.
     *
     * Generated from protobuf field <code>string backup = 1 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setBackup($var)
    {
        GPBUtil::checkString($var, True);
        $this->backup = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BackupSource::class, \Google\Cloud\Firestore\Admin\V1\Database_SourceInfo_BackupSource::class);

