<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/shopping/merchant/reports/v1beta/reports.proto

namespace Google\Shopping\Merchant\Reports\V1beta;

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

/**
 * Response message for the `ReportService.Search` method.
 *
 * Generated from protobuf message <code>google.shopping.merchant.reports.v1beta.SearchResponse</code>
 */
class SearchResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Rows that matched the search query.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.reports.v1beta.ReportRow results = 1;</code>
     */
    private $results;
    /**
     * Token which can be sent as `page_token` to retrieve the next page. If
     * omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    protected $next_page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Shopping\Merchant\Reports\V1beta\ReportRow>|\Google\Protobuf\Internal\RepeatedField $results
     *           Rows that matched the search query.
     *     @type string $next_page_token
     *           Token which can be sent as `page_token` to retrieve the next page. If
     *           omitted, there are no subsequent pages.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Reports\V1Beta\Reports::initOnce();
        parent::__construct($data);
    }

    /**
     * Rows that matched the search query.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.reports.v1beta.ReportRow results = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getResults()
    {
        return $this->results;
    }

    /**
     * Rows that matched the search query.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.reports.v1beta.ReportRow results = 1;</code>
     * @param array<\Google\Shopping\Merchant\Reports\V1beta\ReportRow>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setResults($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Shopping\Merchant\Reports\V1beta\ReportRow::class);
        $this->results = $arr;

        return $this;
    }

    /**
     * Token which can be sent as `page_token` to retrieve the next page. If
     * omitted, 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;
    }

    /**
     * Token which can be sent as `page_token` to retrieve the next page. If
     * omitted, 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;
    }

}

