<?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 specific report task configuration.
 *
 * Generated from protobuf message <code>google.analytics.data.v1alpha.ReportTask</code>
 */
class ReportTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Identifier. The report task resource name assigned during
     * creation. Format: "properties/{property}/reportTasks/{report_task}"
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $name = '';
    /**
     * Optional. A report definition to fetch report data, which describes the
     * structure of a report. It typically includes the fields that will be
     * included in the report and the criteria that will be used to filter the
     * data.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.ReportTask.ReportDefinition report_definition = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $report_definition = null;
    /**
     * Output only. The report metadata for a specific report task, which provides
     * information about a report.  It typically includes the following
     * information: the resource name of the report, the state of the report, the
     * timestamp the report was created, etc,
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.ReportTask.ReportMetadata report_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $report_metadata = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. Identifier. The report task resource name assigned during
     *           creation. Format: "properties/{property}/reportTasks/{report_task}"
     *     @type \Google\Analytics\Data\V1alpha\ReportTask\ReportDefinition $report_definition
     *           Optional. A report definition to fetch report data, which describes the
     *           structure of a report. It typically includes the fields that will be
     *           included in the report and the criteria that will be used to filter the
     *           data.
     *     @type \Google\Analytics\Data\V1alpha\ReportTask\ReportMetadata $report_metadata
     *           Output only. The report metadata for a specific report task, which provides
     *           information about a report.  It typically includes the following
     *           information: the resource name of the report, the state of the report, the
     *           timestamp the report was created, etc,
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Alpha\AnalyticsDataApi::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Identifier. The report task resource name assigned during
     * creation. Format: "properties/{property}/reportTasks/{report_task}"
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. Identifier. The report task resource name assigned during
     * creation. Format: "properties/{property}/reportTasks/{report_task}"
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. A report definition to fetch report data, which describes the
     * structure of a report. It typically includes the fields that will be
     * included in the report and the criteria that will be used to filter the
     * data.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.ReportTask.ReportDefinition report_definition = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Analytics\Data\V1alpha\ReportTask\ReportDefinition|null
     */
    public function getReportDefinition()
    {
        return $this->report_definition;
    }

    public function hasReportDefinition()
    {
        return isset($this->report_definition);
    }

    public function clearReportDefinition()
    {
        unset($this->report_definition);
    }

    /**
     * Optional. A report definition to fetch report data, which describes the
     * structure of a report. It typically includes the fields that will be
     * included in the report and the criteria that will be used to filter the
     * data.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.ReportTask.ReportDefinition report_definition = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Analytics\Data\V1alpha\ReportTask\ReportDefinition $var
     * @return $this
     */
    public function setReportDefinition($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\ReportTask\ReportDefinition::class);
        $this->report_definition = $var;

        return $this;
    }

    /**
     * Output only. The report metadata for a specific report task, which provides
     * information about a report.  It typically includes the following
     * information: the resource name of the report, the state of the report, the
     * timestamp the report was created, etc,
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.ReportTask.ReportMetadata report_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Analytics\Data\V1alpha\ReportTask\ReportMetadata|null
     */
    public function getReportMetadata()
    {
        return $this->report_metadata;
    }

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

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

    /**
     * Output only. The report metadata for a specific report task, which provides
     * information about a report.  It typically includes the following
     * information: the resource name of the report, the state of the report, the
     * timestamp the report was created, etc,
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.ReportTask.ReportMetadata report_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Analytics\Data\V1alpha\ReportTask\ReportMetadata $var
     * @return $this
     */
    public function setReportMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\ReportTask\ReportMetadata::class);
        $this->report_metadata = $var;

        return $this;
    }

}

