<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: bookstore.proto

namespace Endpoints\Examples\Bookstore;

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

/**
 * Response message to ListBooks method.
 *
 * Generated from protobuf message <code>endpoints.examples.bookstore.ListBooksResponse</code>
 */
class ListBooksResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The books on the shelf.
     *
     * Generated from protobuf field <code>repeated .endpoints.examples.bookstore.Book books = 1;</code>
     */
    private $books;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Endpoints\Examples\Bookstore\Book[]|\Google\Protobuf\Internal\RepeatedField $books
     *           The books on the shelf.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Bookstore::initOnce();
        parent::__construct($data);
    }

    /**
     * The books on the shelf.
     *
     * Generated from protobuf field <code>repeated .endpoints.examples.bookstore.Book books = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getBooks()
    {
        return $this->books;
    }

    /**
     * The books on the shelf.
     *
     * Generated from protobuf field <code>repeated .endpoints.examples.bookstore.Book books = 1;</code>
     * @param \Endpoints\Examples\Bookstore\Book[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setBooks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Endpoints\Examples\Bookstore\Book::class);
        $this->books = $arr;

        return $this;
    }

}