<?php

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/data/v1beta/data.proto
namespace SEOPressPro\Vendor\Google\Analytics\Data\V1beta\ResponseMetaData\SchemaRestrictionResponse;

use SEOPressPro\Vendor\Google\Protobuf\Internal\GPBType;
use SEOPressPro\Vendor\Google\Protobuf\Internal\RepeatedField;
use SEOPressPro\Vendor\Google\Protobuf\Internal\GPBUtil;
/**
 * A metric actively restricted in creating the report.
 *
 * Generated from protobuf message <code>google.analytics.data.v1beta.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction</code>
 */
class ActiveMetricRestriction extends \SEOPressPro\Vendor\Google\Protobuf\Internal\Message
{
    /**
     * The name of the restricted metric.
     *
     * Generated from protobuf field <code>optional string metric_name = 1;</code>
     */
    private $metric_name = null;
    /**
     * The reason for this metric's restriction.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.RestrictedMetricType restricted_metric_types = 2;</code>
     */
    private $restricted_metric_types;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $metric_name
     *           The name of the restricted metric.
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $restricted_metric_types
     *           The reason for this metric's restriction.
     * }
     */
    public function __construct($data = NULL)
    {
        \SEOPressPro\Vendor\GPBMetadata\Google\Analytics\Data\V1Beta\Data::initOnce();
        parent::__construct($data);
    }
    /**
     * The name of the restricted metric.
     *
     * Generated from protobuf field <code>optional string metric_name = 1;</code>
     * @return string
     */
    public function getMetricName()
    {
        return isset($this->metric_name) ? $this->metric_name : '';
    }
    public function hasMetricName()
    {
        return isset($this->metric_name);
    }
    public function clearMetricName()
    {
        unset($this->metric_name);
    }
    /**
     * The name of the restricted metric.
     *
     * Generated from protobuf field <code>optional string metric_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setMetricName($var)
    {
        GPBUtil::checkString($var, True);
        $this->metric_name = $var;
        return $this;
    }
    /**
     * The reason for this metric's restriction.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.RestrictedMetricType restricted_metric_types = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRestrictedMetricTypes()
    {
        return $this->restricted_metric_types;
    }
    /**
     * The reason for this metric's restriction.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1beta.RestrictedMetricType restricted_metric_types = 2;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRestrictedMetricTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \SEOPressPro\Vendor\Google\Protobuf\Internal\GPBType::ENUM, \SEOPressPro\Vendor\Google\Analytics\Data\V1beta\RestrictedMetricType::class);
        $this->restricted_metric_types = $arr;
        return $this;
    }
}
