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

namespace Mint\Tulip\V1;

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

/**
 * ----------------------------------------------------------------------------
 *
 * Generated from protobuf message <code>mint.tulip.v1.SearchRequest</code>
 */
class SearchRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated string keywords = 1;</code>
     */
    private $keywords;
    /**
     * Generated from protobuf field <code>int32 book = 2;</code>
     */
    protected $book = 0;
    /**
     * Generated from protobuf field <code>optional .mint.tulip.v1.SearchRequest.Page page = 99;</code>
     */
    protected $page = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $keywords
     *     @type int $book
     *     @type \Mint\Tulip\V1\SearchRequest\Page $page
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Tulip::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated string keywords = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getKeywords()
    {
        return $this->keywords;
    }

    /**
     * Generated from protobuf field <code>repeated string keywords = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setKeywords($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->keywords = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int32 book = 2;</code>
     * @return int
     */
    public function getBook()
    {
        return $this->book;
    }

    /**
     * Generated from protobuf field <code>int32 book = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setBook($var)
    {
        GPBUtil::checkInt32($var);
        $this->book = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .mint.tulip.v1.SearchRequest.Page page = 99;</code>
     * @return \Mint\Tulip\V1\SearchRequest\Page|null
     */
    public function getPage()
    {
        return $this->page;
    }

    public function hasPage()
    {
        return isset($this->page);
    }

    public function clearPage()
    {
        unset($this->page);
    }

    /**
     * Generated from protobuf field <code>optional .mint.tulip.v1.SearchRequest.Page page = 99;</code>
     * @param \Mint\Tulip\V1\SearchRequest\Page $var
     * @return $this
     */
    public function setPage($var)
    {
        GPBUtil::checkMessage($var, \Mint\Tulip\V1\SearchRequest\Page::class);
        $this->page = $var;

        return $this;
    }

}

