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

namespace Google\Analytics\Data\V1beta;

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

/**
 * The dimensions, metrics and comparisons currently accepted in reporting
 * methods.
 *
 * Generated from protobuf message <code>google.analytics.data.v1beta.Metadata</code>
 */
class Metadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Resource name of this metadata.
     *
     * Generated from protobuf field <code>string name = 3;</code>
     */
    protected $name = '';
    /**
     * The dimension descriptions.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1;</code>
     */
    private $dimensions;
    /**
     * The metric descriptions.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2;</code>
     */
    private $metrics;
    /**
     * The comparison descriptions.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.ComparisonMetadata comparisons = 4;</code>
     */
    private $comparisons;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Resource name of this metadata.
     *     @type \Google\Analytics\Data\V1beta\DimensionMetadata[] $dimensions
     *           The dimension descriptions.
     *     @type \Google\Analytics\Data\V1beta\MetricMetadata[] $metrics
     *           The metric descriptions.
     *     @type \Google\Analytics\Data\V1beta\ComparisonMetadata[] $comparisons
     *           The comparison descriptions.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Beta\AnalyticsDataApi::initOnce();
        parent::__construct($data);
    }

    /**
     * Resource name of this metadata.
     *
     * Generated from protobuf field <code>string name = 3;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Resource name of this metadata.
     *
     * Generated from protobuf field <code>string name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The dimension descriptions.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1;</code>
     * @return RepeatedField<\Google\Analytics\Data\V1beta\DimensionMetadata>
     */
    public function getDimensions()
    {
        return $this->dimensions;
    }

    /**
     * The dimension descriptions.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1;</code>
     * @param \Google\Analytics\Data\V1beta\DimensionMetadata[] $var
     * @return $this
     */
    public function setDimensions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1beta\DimensionMetadata::class);
        $this->dimensions = $arr;

        return $this;
    }

    /**
     * The metric descriptions.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2;</code>
     * @return RepeatedField<\Google\Analytics\Data\V1beta\MetricMetadata>
     */
    public function getMetrics()
    {
        return $this->metrics;
    }

    /**
     * The metric descriptions.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2;</code>
     * @param \Google\Analytics\Data\V1beta\MetricMetadata[] $var
     * @return $this
     */
    public function setMetrics($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1beta\MetricMetadata::class);
        $this->metrics = $arr;

        return $this;
    }

    /**
     * The comparison descriptions.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.ComparisonMetadata comparisons = 4;</code>
     * @return RepeatedField<\Google\Analytics\Data\V1beta\ComparisonMetadata>
     */
    public function getComparisons()
    {
        return $this->comparisons;
    }

    /**
     * The comparison descriptions.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.ComparisonMetadata comparisons = 4;</code>
     * @param \Google\Analytics\Data\V1beta\ComparisonMetadata[] $var
     * @return $this
     */
    public function setComparisons($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1beta\ComparisonMetadata::class);
        $this->comparisons = $arr;

        return $this;
    }

}

