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

namespace Google\Cloud\PubSub\V1;

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

/**
 * Response for the `ListSchemaRevisions` method.
 *
 * Generated from protobuf message <code>google.pubsub.v1.ListSchemaRevisionsResponse</code>
 */
class ListSchemaRevisionsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The revisions of the schema.
     *
     * Generated from protobuf field <code>repeated .google.pubsub.v1.Schema schemas = 1;</code>
     */
    private $schemas;
    /**
     * A token that can be sent as `page_token` to retrieve the next page.
     * If this field is empty, there are no subsequent pages.
     *
     * 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\Cloud\PubSub\V1\Schema>|\Google\Protobuf\Internal\RepeatedField $schemas
     *           The revisions of the schema.
     *     @type string $next_page_token
     *           A token that can be sent as `page_token` to retrieve the next page.
     *           If this field is empty, there are no subsequent pages.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
        parent::__construct($data);
    }

    /**
     * The revisions of the schema.
     *
     * Generated from protobuf field <code>repeated .google.pubsub.v1.Schema schemas = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSchemas()
    {
        return $this->schemas;
    }

    /**
     * The revisions of the schema.
     *
     * Generated from protobuf field <code>repeated .google.pubsub.v1.Schema schemas = 1;</code>
     * @param array<\Google\Cloud\PubSub\V1\Schema>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSchemas($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\Schema::class);
        $this->schemas = $arr;

        return $this;
    }

    /**
     * A token that can be sent as `page_token` to retrieve the next page.
     * If this field is empty, 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 that can be sent as `page_token` to retrieve the next page.
     * If this field is empty, 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;
    }

}

