<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * The features describing the data. Returned by
 * [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]
 * and
 * [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults].
 *
 * @deprecated
 * Generated from protobuf message <code>google.cloud.channel.v1.ReportResultsMetadata</code>
 */
class ReportResultsMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Details of the completed report.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.Report report = 1;</code>
     */
    protected $report = null;
    /**
     * The total number of rows of data in the final report.
     *
     * Generated from protobuf field <code>int64 row_count = 2;</code>
     */
    protected $row_count = 0;
    /**
     * The date range of reported usage.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.DateRange date_range = 3;</code>
     */
    protected $date_range = null;
    /**
     * The usage dates immediately preceding `date_range` with the same duration.
     * Use this to calculate trending usage and costs. This is only populated if
     * you request trending data.
     * For example, if `date_range` is July 1-15, `preceding_date_range` will be
     * June 16-30.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.DateRange preceding_date_range = 4;</code>
     */
    protected $preceding_date_range = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Channel\V1\Report $report
     *           Details of the completed report.
     *     @type int|string $row_count
     *           The total number of rows of data in the final report.
     *     @type \Google\Cloud\Channel\V1\DateRange $date_range
     *           The date range of reported usage.
     *     @type \Google\Cloud\Channel\V1\DateRange $preceding_date_range
     *           The usage dates immediately preceding `date_range` with the same duration.
     *           Use this to calculate trending usage and costs. This is only populated if
     *           you request trending data.
     *           For example, if `date_range` is July 1-15, `preceding_date_range` will be
     *           June 16-30.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\ReportsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Details of the completed report.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.Report report = 1;</code>
     * @return \Google\Cloud\Channel\V1\Report|null
     */
    public function getReport()
    {
        return $this->report;
    }

    public function hasReport()
    {
        return isset($this->report);
    }

    public function clearReport()
    {
        unset($this->report);
    }

    /**
     * Details of the completed report.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.Report report = 1;</code>
     * @param \Google\Cloud\Channel\V1\Report $var
     * @return $this
     */
    public function setReport($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\Report::class);
        $this->report = $var;

        return $this;
    }

    /**
     * The total number of rows of data in the final report.
     *
     * Generated from protobuf field <code>int64 row_count = 2;</code>
     * @return int|string
     */
    public function getRowCount()
    {
        return $this->row_count;
    }

    /**
     * The total number of rows of data in the final report.
     *
     * Generated from protobuf field <code>int64 row_count = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setRowCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->row_count = $var;

        return $this;
    }

    /**
     * The date range of reported usage.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.DateRange date_range = 3;</code>
     * @return \Google\Cloud\Channel\V1\DateRange|null
     */
    public function getDateRange()
    {
        return $this->date_range;
    }

    public function hasDateRange()
    {
        return isset($this->date_range);
    }

    public function clearDateRange()
    {
        unset($this->date_range);
    }

    /**
     * The date range of reported usage.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.DateRange date_range = 3;</code>
     * @param \Google\Cloud\Channel\V1\DateRange $var
     * @return $this
     */
    public function setDateRange($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\DateRange::class);
        $this->date_range = $var;

        return $this;
    }

    /**
     * The usage dates immediately preceding `date_range` with the same duration.
     * Use this to calculate trending usage and costs. This is only populated if
     * you request trending data.
     * For example, if `date_range` is July 1-15, `preceding_date_range` will be
     * June 16-30.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.DateRange preceding_date_range = 4;</code>
     * @return \Google\Cloud\Channel\V1\DateRange|null
     */
    public function getPrecedingDateRange()
    {
        return $this->preceding_date_range;
    }

    public function hasPrecedingDateRange()
    {
        return isset($this->preceding_date_range);
    }

    public function clearPrecedingDateRange()
    {
        unset($this->preceding_date_range);
    }

    /**
     * The usage dates immediately preceding `date_range` with the same duration.
     * Use this to calculate trending usage and costs. This is only populated if
     * you request trending data.
     * For example, if `date_range` is July 1-15, `preceding_date_range` will be
     * June 16-30.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.DateRange preceding_date_range = 4;</code>
     * @param \Google\Cloud\Channel\V1\DateRange $var
     * @return $this
     */
    public function setPrecedingDateRange($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\DateRange::class);
        $this->preceding_date_range = $var;

        return $this;
    }

}

