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

namespace Google\Analytics\Data\V1alpha\ResponseMetaData;

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

/**
 * The schema restrictions actively enforced in creating this report. To learn
 * more, see [Access and data-restriction
 * management](https://support.google.com/analytics/answer/10851388).
 *
 * Generated from protobuf message <code>google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse</code>
 */
class SchemaRestrictionResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * All restrictions actively enforced in creating the report. For example,
     * `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
     * However, this active response restriction is only populated if the user's
     * custom role disallows access to `REVENUE_DATA`.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction active_metric_restrictions = 1;</code>
     */
    private $active_metric_restrictions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Data\V1alpha\ResponseMetaData\SchemaRestrictionResponse\ActiveMetricRestriction[] $active_metric_restrictions
     *           All restrictions actively enforced in creating the report. For example,
     *           `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
     *           However, this active response restriction is only populated if the user's
     *           custom role disallows access to `REVENUE_DATA`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * All restrictions actively enforced in creating the report. For example,
     * `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
     * However, this active response restriction is only populated if the user's
     * custom role disallows access to `REVENUE_DATA`.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction active_metric_restrictions = 1;</code>
     * @return RepeatedField<\Google\Analytics\Data\V1alpha\ResponseMetaData\SchemaRestrictionResponse\ActiveMetricRestriction>
     */
    public function getActiveMetricRestrictions()
    {
        return $this->active_metric_restrictions;
    }

    /**
     * All restrictions actively enforced in creating the report. For example,
     * `purchaseRevenue` always has the restriction type `REVENUE_DATA`.
     * However, this active response restriction is only populated if the user's
     * custom role disallows access to `REVENUE_DATA`.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1alpha.ResponseMetaData.SchemaRestrictionResponse.ActiveMetricRestriction active_metric_restrictions = 1;</code>
     * @param \Google\Analytics\Data\V1alpha\ResponseMetaData\SchemaRestrictionResponse\ActiveMetricRestriction[] $var
     * @return $this
     */
    public function setActiveMetricRestrictions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\ResponseMetaData\SchemaRestrictionResponse\ActiveMetricRestriction::class);
        $this->active_metric_restrictions = $arr;

        return $this;
    }

}

