<?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 response for
 * [FirestoreAdmin.ListBackups][google.firestore.admin.v1.FirestoreAdmin.ListBackups].
 *
 * Generated from protobuf message <code>google.firestore.admin.v1.ListBackupsResponse</code>
 */
class ListBackupsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * List of all backups for the project.
     *
     * Generated from protobuf field <code>repeated .google.firestore.admin.v1.Backup backups = 1;</code>
     */
    private $backups;
    /**
     * List of locations that existing backups were not able to be fetched from.
     * Instead of failing the entire requests when a single location is
     * unreachable, this response returns a partial result set and list of
     * locations unable to be reached here. The request can be retried against a
     * single location to get a concrete error.
     *
     * Generated from protobuf field <code>repeated string unreachable = 3;</code>
     */
    private $unreachable;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Firestore\Admin\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups
     *           List of all backups for the project.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $unreachable
     *           List of locations that existing backups were not able to be fetched from.
     *           Instead of failing the entire requests when a single location is
     *           unreachable, this response returns a partial result set and list of
     *           locations unable to be reached here. The request can be retried against a
     *           single location to get a concrete error.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce();
        parent::__construct($data);
    }

    /**
     * List of all backups for the project.
     *
     * Generated from protobuf field <code>repeated .google.firestore.admin.v1.Backup backups = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getBackups()
    {
        return $this->backups;
    }

    /**
     * List of all backups for the project.
     *
     * Generated from protobuf field <code>repeated .google.firestore.admin.v1.Backup backups = 1;</code>
     * @param array<\Google\Cloud\Firestore\Admin\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setBackups($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Backup::class);
        $this->backups = $arr;

        return $this;
    }

    /**
     * List of locations that existing backups were not able to be fetched from.
     * Instead of failing the entire requests when a single location is
     * unreachable, this response returns a partial result set and list of
     * locations unable to be reached here. The request can be retried against a
     * single location to get a concrete error.
     *
     * Generated from protobuf field <code>repeated string unreachable = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getUnreachable()
    {
        return $this->unreachable;
    }

    /**
     * List of locations that existing backups were not able to be fetched from.
     * Instead of failing the entire requests when a single location is
     * unreachable, this response returns a partial result set and list of
     * locations unable to be reached here. The request can be retried against a
     * single location to get a concrete error.
     *
     * Generated from protobuf field <code>repeated string unreachable = 3;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUnreachable($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->unreachable = $arr;

        return $this;
    }

}

