<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v23/services/google_ads_service.proto

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Indicates the attributes of metrics.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.MetricAttributes</code>
 */
class MetricAttributes extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the metric.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * The attributes of the metric.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.MetricAttributes.Attribute attributes = 2;</code>
     */
    private $attributes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of the metric.
     *     @type array<\Google\Ads\GoogleAds\V23\Services\MetricAttributes\Attribute>|\Google\Protobuf\Internal\RepeatedField $attributes
     *           The attributes of the metric.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\GoogleAdsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the metric.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

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

        return $this;
    }

    /**
     * The attributes of the metric.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.MetricAttributes.Attribute attributes = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAttributes()
    {
        return $this->attributes;
    }

    /**
     * The attributes of the metric.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.MetricAttributes.Attribute attributes = 2;</code>
     * @param array<\Google\Ads\GoogleAds\V23\Services\MetricAttributes\Attribute>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAttributes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Services\MetricAttributes\Attribute::class);
        $this->attributes = $arr;

        return $this;
    }

}

