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

namespace Google\Cloud\Spanner\Admin\Database\V1;

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

/**
 * The response for
 * [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations].
 *
 * Generated from protobuf message <code>google.spanner.admin.database.v1.ListBackupOperationsResponse</code>
 */
class ListBackupOperationsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of matching backup [long-running
     * operations][google.longrunning.Operation]. Each operation's name will be
     * prefixed by the backup's name. The operation's
     * [metadata][google.longrunning.Operation.metadata] field type
     * `metadata.type_url` describes the type of the metadata. Operations returned
     * include those that are pending or have completed/failed/canceled within the
     * last 7 days. Operations returned are ordered by
     * `operation.metadata.value.progress.start_time` in descending order starting
     * from the most recently started operation.
     *
     * Generated from protobuf field <code>repeated .google.longrunning.Operation operations = 1;</code>
     */
    private $operations;
    /**
     * `next_page_token` can be sent in a subsequent
     * [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]
     * call to fetch more of the matching metadata.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    private $next_page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\LongRunning\Operation>|\Google\Protobuf\Internal\RepeatedField $operations
     *           The list of matching backup [long-running
     *           operations][google.longrunning.Operation]. Each operation's name will be
     *           prefixed by the backup's name. The operation's
     *           [metadata][google.longrunning.Operation.metadata] field type
     *           `metadata.type_url` describes the type of the metadata. Operations returned
     *           include those that are pending or have completed/failed/canceled within the
     *           last 7 days. Operations returned are ordered by
     *           `operation.metadata.value.progress.start_time` in descending order starting
     *           from the most recently started operation.
     *     @type string $next_page_token
     *           `next_page_token` can be sent in a subsequent
     *           [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]
     *           call to fetch more of the matching metadata.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Spanner\Admin\Database\V1\Backup::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of matching backup [long-running
     * operations][google.longrunning.Operation]. Each operation's name will be
     * prefixed by the backup's name. The operation's
     * [metadata][google.longrunning.Operation.metadata] field type
     * `metadata.type_url` describes the type of the metadata. Operations returned
     * include those that are pending or have completed/failed/canceled within the
     * last 7 days. Operations returned are ordered by
     * `operation.metadata.value.progress.start_time` in descending order starting
     * from the most recently started operation.
     *
     * Generated from protobuf field <code>repeated .google.longrunning.Operation operations = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getOperations()
    {
        return $this->operations;
    }

    /**
     * The list of matching backup [long-running
     * operations][google.longrunning.Operation]. Each operation's name will be
     * prefixed by the backup's name. The operation's
     * [metadata][google.longrunning.Operation.metadata] field type
     * `metadata.type_url` describes the type of the metadata. Operations returned
     * include those that are pending or have completed/failed/canceled within the
     * last 7 days. Operations returned are ordered by
     * `operation.metadata.value.progress.start_time` in descending order starting
     * from the most recently started operation.
     *
     * Generated from protobuf field <code>repeated .google.longrunning.Operation operations = 1;</code>
     * @param array<\Google\LongRunning\Operation>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setOperations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\LongRunning\Operation::class);
        $this->operations = $arr;

        return $this;
    }

    /**
     * `next_page_token` can be sent in a subsequent
     * [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]
     * call to fetch more of the matching metadata.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * `next_page_token` can be sent in a subsequent
     * [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]
     * call to fetch more of the matching metadata.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_page_token = $var;

        return $this;
    }

}

