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

namespace Google\Cloud\GkeBackup\V1;

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

/**
 * Request message for GetBackupIndexDownloadUrl.
 *
 * Generated from protobuf message <code>google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest</code>
 */
class GetBackupIndexDownloadUrlRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Full name of Backup resource.
     * Format:
     * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}
     *
     * Generated from protobuf field <code>string backup = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $backup = '';

    /**
     * @param string $backup Required. Full name of Backup resource.
     *                       Format:
     *                       projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}
     *                       Please see {@see BackupForGKEClient::backupName()} for help formatting this field.
     *
     * @return \Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlRequest
     *
     * @experimental
     */
    public static function build(string $backup): self
    {
        return (new self())
            ->setBackup($backup);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $backup
     *           Required. Full name of Backup resource.
     *           Format:
     *           projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Full name of Backup resource.
     * Format:
     * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}
     *
     * Generated from protobuf field <code>string backup = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getBackup()
    {
        return $this->backup;
    }

    /**
     * Required. Full name of Backup resource.
     * Format:
     * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}
     *
     * Generated from protobuf field <code>string backup = 1 [(.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;
    }

}

