<?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.SearchResponse</code>
 */
class SearchResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .mint.tulip.v1.SearchResponse.Item items = 1;</code>
     */
    private $items;
    /**
     * Generated from protobuf field <code>.mint.tulip.v1.SearchRequest.Page page = 98;</code>
     */
    protected $page = null;
    /**
     * Generated from protobuf field <code>int32 total = 99;</code>
     */
    protected $total = 0;

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

    /**
     * Generated from protobuf field <code>repeated .mint.tulip.v1.SearchResponse.Item items = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getItems()
    {
        return $this->items;
    }

    /**
     * Generated from protobuf field <code>repeated .mint.tulip.v1.SearchResponse.Item items = 1;</code>
     * @param array<\Mint\Tulip\V1\SearchResponse\Item>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setItems($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Mint\Tulip\V1\SearchResponse\Item::class);
        $this->items = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.mint.tulip.v1.SearchRequest.Page page = 98;</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>.mint.tulip.v1.SearchRequest.Page page = 98;</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;
    }

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

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

        return $this;
    }

}

