<?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 `ListSchemas` method.
 *
 * Generated from protobuf message <code>google.pubsub.v1.ListSchemasResponse</code>
 */
class ListSchemasResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The resulting schemas.
     *
     * Generated from protobuf field <code>repeated .google.pubsub.v1.Schema schemas = 1;</code>
     */
    private $schemas;
    /**
     * If not empty, indicates that there may be more schemas that match the
     * request; this value should be passed in a new `ListSchemasRequest`.
     *
     * 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 \Google\Cloud\PubSub\V1\Schema[]|\Google\Protobuf\Internal\RepeatedField $schemas
     *           The resulting schemas.
     *     @type string $next_page_token
     *           If not empty, indicates that there may be more schemas that match the
     *           request; this value should be passed in a new `ListSchemasRequest`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
        parent::__construct($data);
    }

    /**
     * The resulting schemas.
     *
     * 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 resulting schemas.
     *
     * Generated from protobuf field <code>repeated .google.pubsub.v1.Schema schemas = 1;</code>
     * @param \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;
    }

    /**
     * If not empty, indicates that there may be more schemas that match the
     * request; this value should be passed in a new `ListSchemasRequest`.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * If not empty, indicates that there may be more schemas that match the
     * request; this value should be passed in a new `ListSchemasRequest`.
     *
     * 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;
    }

}

