<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/channel/v1/reports_service.proto

namespace Google\Cloud\Channel\V1;

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

/**
 * Response message for
 * [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults].
 * Contains a tabular representation of the report results.
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.FetchReportResultsResponse</code>
 */
class FetchReportResultsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The metadata for the report results (display name, columns, row count, and
     * date ranges).
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.ReportResultsMetadata report_metadata = 1;</code>
     */
    private $report_metadata = null;
    /**
     * The report's lists of values. Each row follows the settings and ordering
     * of the columns from `report_metadata`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.channel.v1.Row rows = 2;</code>
     */
    private $rows;
    /**
     * Pass this token to
     * [FetchReportResultsRequest.page_token][google.cloud.channel.v1.FetchReportResultsRequest.page_token]
     * to retrieve the next page of results.
     *
     * Generated from protobuf field <code>string next_page_token = 3;</code>
     */
    private $next_page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Channel\V1\ReportResultsMetadata $report_metadata
     *           The metadata for the report results (display name, columns, row count, and
     *           date ranges).
     *     @type array<\Google\Cloud\Channel\V1\Row>|\Google\Protobuf\Internal\RepeatedField $rows
     *           The report's lists of values. Each row follows the settings and ordering
     *           of the columns from `report_metadata`.
     *     @type string $next_page_token
     *           Pass this token to
     *           [FetchReportResultsRequest.page_token][google.cloud.channel.v1.FetchReportResultsRequest.page_token]
     *           to retrieve the next page of results.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\ReportsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The metadata for the report results (display name, columns, row count, and
     * date ranges).
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.ReportResultsMetadata report_metadata = 1;</code>
     * @return \Google\Cloud\Channel\V1\ReportResultsMetadata|null
     */
    public function getReportMetadata()
    {
        return $this->report_metadata;
    }

    public function hasReportMetadata()
    {
        return isset($this->report_metadata);
    }

    public function clearReportMetadata()
    {
        unset($this->report_metadata);
    }

    /**
     * The metadata for the report results (display name, columns, row count, and
     * date ranges).
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.ReportResultsMetadata report_metadata = 1;</code>
     * @param \Google\Cloud\Channel\V1\ReportResultsMetadata $var
     * @return $this
     */
    public function setReportMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\ReportResultsMetadata::class);
        $this->report_metadata = $var;

        return $this;
    }

    /**
     * The report's lists of values. Each row follows the settings and ordering
     * of the columns from `report_metadata`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.channel.v1.Row rows = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRows()
    {
        return $this->rows;
    }

    /**
     * The report's lists of values. Each row follows the settings and ordering
     * of the columns from `report_metadata`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.channel.v1.Row rows = 2;</code>
     * @param array<\Google\Cloud\Channel\V1\Row>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRows($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Channel\V1\Row::class);
        $this->rows = $arr;

        return $this;
    }

    /**
     * Pass this token to
     * [FetchReportResultsRequest.page_token][google.cloud.channel.v1.FetchReportResultsRequest.page_token]
     * to retrieve the next page of results.
     *
     * Generated from protobuf field <code>string next_page_token = 3;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * Pass this token to
     * [FetchReportResultsRequest.page_token][google.cloud.channel.v1.FetchReportResultsRequest.page_token]
     * to retrieve the next page of results.
     *
     * Generated from protobuf field <code>string next_page_token = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_page_token = $var;

        return $this;
    }

}

