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

namespace Google\Cloud\AlloyDb\V1alpha;

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

/**
 * Message for response to listing Databases.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1alpha.ListDatabasesResponse</code>
 */
class ListDatabasesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of databases
     *
     * Generated from protobuf field <code>repeated .google.cloud.alloydb.v1alpha.Database databases = 1;</code>
     */
    private $databases;
    /**
     * A token identifying the next page of results the server should return.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    protected $next_page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\AlloyDb\V1alpha\Database>|\Google\Protobuf\Internal\RepeatedField $databases
     *           The list of databases
     *     @type string $next_page_token
     *           A token identifying the next page of results the server should return.
     *           If this field is omitted, there are no subsequent pages.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1Alpha\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of databases
     *
     * Generated from protobuf field <code>repeated .google.cloud.alloydb.v1alpha.Database databases = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDatabases()
    {
        return $this->databases;
    }

    /**
     * The list of databases
     *
     * Generated from protobuf field <code>repeated .google.cloud.alloydb.v1alpha.Database databases = 1;</code>
     * @param array<\Google\Cloud\AlloyDb\V1alpha\Database>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDatabases($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AlloyDb\V1alpha\Database::class);
        $this->databases = $arr;

        return $this;
    }

    /**
     * A token identifying the next page of results the server should return.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * A token identifying the next page of results the server should return.
     * If this field is omitted, there are no subsequent pages.
     *
     * 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;
    }

}

