<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/data/v1alpha/analytics_data_api.proto

namespace Google\Analytics\Data\V1alpha;

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

/**
 * A request to fetch the report content for a report task.
 *
 * Generated from protobuf message <code>google.analytics.data.v1alpha.QueryReportTaskRequest</code>
 */
class QueryReportTaskRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The report source name.
     * Format: `properties/{property}/reportTasks/{report}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Optional. The row count of the start row in the report. The first row is
     * counted as row 0.
     * When paging, the first request does not specify offset; or equivalently,
     * sets offset to 0; the first request returns the first `limit` of rows. The
     * second request sets offset to the `limit` of the first request; the second
     * request returns the second `limit` of rows.
     * To learn more about this pagination parameter, see
     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
     *
     * Generated from protobuf field <code>int64 offset = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $offset = 0;
    /**
     * Optional. The number of rows to return from the report. If unspecified,
     * 10,000 rows are returned. The API returns a maximum of 250,000 rows per
     * request, no matter how many you ask for. `limit` must be positive.
     * The API can also return fewer rows than the requested `limit`, if there
     * aren't as many dimension values as the `limit`. The number of rows
     * available to a QueryReportTaskRequest is further limited by the limit of
     * the associated ReportTask. A query can retrieve at most ReportTask.limit
     * rows. For example, if the ReportTask has a limit of 1,000, then a
     * QueryReportTask request with offset=900 and limit=500 will return at most
     * 100 rows.
     * To learn more about this pagination parameter, see
     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
     *
     * Generated from protobuf field <code>int64 limit = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $limit = 0;

    /**
     * @param string $name Required. The report source name.
     *                     Format: `properties/{property}/reportTasks/{report}`
     *
     * @return \Google\Analytics\Data\V1alpha\QueryReportTaskRequest
     *
     * @experimental
     */
    public static function build(string $name): self
    {
        return (new self())
            ->setName($name);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The report source name.
     *           Format: `properties/{property}/reportTasks/{report}`
     *     @type int|string $offset
     *           Optional. The row count of the start row in the report. The first row is
     *           counted as row 0.
     *           When paging, the first request does not specify offset; or equivalently,
     *           sets offset to 0; the first request returns the first `limit` of rows. The
     *           second request sets offset to the `limit` of the first request; the second
     *           request returns the second `limit` of rows.
     *           To learn more about this pagination parameter, see
     *           [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
     *     @type int|string $limit
     *           Optional. The number of rows to return from the report. If unspecified,
     *           10,000 rows are returned. The API returns a maximum of 250,000 rows per
     *           request, no matter how many you ask for. `limit` must be positive.
     *           The API can also return fewer rows than the requested `limit`, if there
     *           aren't as many dimension values as the `limit`. The number of rows
     *           available to a QueryReportTaskRequest is further limited by the limit of
     *           the associated ReportTask. A query can retrieve at most ReportTask.limit
     *           rows. For example, if the ReportTask has a limit of 1,000, then a
     *           QueryReportTask request with offset=900 and limit=500 will return at most
     *           100 rows.
     *           To learn more about this pagination parameter, see
     *           [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The report source name.
     * Format: `properties/{property}/reportTasks/{report}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The report source name.
     * Format: `properties/{property}/reportTasks/{report}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. The row count of the start row in the report. The first row is
     * counted as row 0.
     * When paging, the first request does not specify offset; or equivalently,
     * sets offset to 0; the first request returns the first `limit` of rows. The
     * second request sets offset to the `limit` of the first request; the second
     * request returns the second `limit` of rows.
     * To learn more about this pagination parameter, see
     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
     *
     * Generated from protobuf field <code>int64 offset = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int|string
     */
    public function getOffset()
    {
        return $this->offset;
    }

    /**
     * Optional. The row count of the start row in the report. The first row is
     * counted as row 0.
     * When paging, the first request does not specify offset; or equivalently,
     * sets offset to 0; the first request returns the first `limit` of rows. The
     * second request sets offset to the `limit` of the first request; the second
     * request returns the second `limit` of rows.
     * To learn more about this pagination parameter, see
     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
     *
     * Generated from protobuf field <code>int64 offset = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int|string $var
     * @return $this
     */
    public function setOffset($var)
    {
        GPBUtil::checkInt64($var);
        $this->offset = $var;

        return $this;
    }

    /**
     * Optional. The number of rows to return from the report. If unspecified,
     * 10,000 rows are returned. The API returns a maximum of 250,000 rows per
     * request, no matter how many you ask for. `limit` must be positive.
     * The API can also return fewer rows than the requested `limit`, if there
     * aren't as many dimension values as the `limit`. The number of rows
     * available to a QueryReportTaskRequest is further limited by the limit of
     * the associated ReportTask. A query can retrieve at most ReportTask.limit
     * rows. For example, if the ReportTask has a limit of 1,000, then a
     * QueryReportTask request with offset=900 and limit=500 will return at most
     * 100 rows.
     * To learn more about this pagination parameter, see
     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
     *
     * Generated from protobuf field <code>int64 limit = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int|string
     */
    public function getLimit()
    {
        return $this->limit;
    }

    /**
     * Optional. The number of rows to return from the report. If unspecified,
     * 10,000 rows are returned. The API returns a maximum of 250,000 rows per
     * request, no matter how many you ask for. `limit` must be positive.
     * The API can also return fewer rows than the requested `limit`, if there
     * aren't as many dimension values as the `limit`. The number of rows
     * available to a QueryReportTaskRequest is further limited by the limit of
     * the associated ReportTask. A query can retrieve at most ReportTask.limit
     * rows. For example, if the ReportTask has a limit of 1,000, then a
     * QueryReportTask request with offset=900 and limit=500 will return at most
     * 100 rows.
     * To learn more about this pagination parameter, see
     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
     *
     * Generated from protobuf field <code>int64 limit = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int|string $var
     * @return $this
     */
    public function setLimit($var)
    {
        GPBUtil::checkInt64($var);
        $this->limit = $var;

        return $this;
    }

}

