<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/alloydb/v1beta/resources.proto

namespace Google\Cloud\AlloyDb\V1beta;

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

/**
 * Message describing a BackupSource.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1beta.BackupSource</code>
 */
class BackupSource extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The system-generated UID of the backup which was used to
     * create this resource. The UID is generated when the backup is created, and
     * it is retained until the backup is deleted.
     *
     * Generated from protobuf field <code>string backup_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $backup_uid = '';
    /**
     * Required. The name of the backup resource with the format:
     *  * projects/{project}/locations/{region}/backups/{backup_id}
     *
     * Generated from protobuf field <code>string backup_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $backup_name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $backup_uid
     *           Output only. The system-generated UID of the backup which was used to
     *           create this resource. The UID is generated when the backup is created, and
     *           it is retained until the backup is deleted.
     *     @type string $backup_name
     *           Required. The name of the backup resource with the format:
     *            * projects/{project}/locations/{region}/backups/{backup_id}
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1Beta\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The system-generated UID of the backup which was used to
     * create this resource. The UID is generated when the backup is created, and
     * it is retained until the backup is deleted.
     *
     * Generated from protobuf field <code>string backup_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getBackupUid()
    {
        return $this->backup_uid;
    }

    /**
     * Output only. The system-generated UID of the backup which was used to
     * create this resource. The UID is generated when the backup is created, and
     * it is retained until the backup is deleted.
     *
     * Generated from protobuf field <code>string backup_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setBackupUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->backup_uid = $var;

        return $this;
    }

    /**
     * Required. The name of the backup resource with the format:
     *  * projects/{project}/locations/{region}/backups/{backup_id}
     *
     * Generated from protobuf field <code>string backup_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getBackupName()
    {
        return $this->backup_name;
    }

    /**
     * Required. The name of the backup resource with the format:
     *  * projects/{project}/locations/{region}/backups/{backup_id}
     *
     * Generated from protobuf field <code>string backup_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setBackupName($var)
    {
        GPBUtil::checkString($var, True);
        $this->backup_name = $var;

        return $this;
    }

}

