<?php

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/admin/v1alpha/channel_group.proto
namespace Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha;

use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType;
use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\RepeatedField;
use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBUtil;
/**
 * The rules that govern how traffic is grouped into one channel.
 *
 * Generated from protobuf message <code>google.analytics.admin.v1alpha.GroupingRule</code>
 */
class GroupingRule extends \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\Message
{
    /**
     * Required. Customer defined display name for the channel.
     *
     * Generated from protobuf field <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $display_name = '';
    /**
     * Required. The Filter Expression that defines the Grouping Rule.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilterExpression expression = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $expression = null;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $display_name
     *           Required. Customer defined display name for the channel.
     *     @type \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpression $expression
     *           Required. The Filter Expression that defines the Grouping Rule.
     * }
     */
    public function __construct($data = NULL)
    {
        \Matomo\Dependencies\GoogleAnalyticsImporter\GPBMetadata\Google\Analytics\Admin\V1Alpha\ChannelGroup::initOnce();
        parent::__construct($data);
    }
    /**
     * Required. Customer defined display name for the channel.
     *
     * Generated from protobuf field <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }
    /**
     * Required. Customer defined display name for the channel.
     *
     * Generated from protobuf field <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;
        return $this;
    }
    /**
     * Required. The Filter Expression that defines the Grouping Rule.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilterExpression expression = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpression|null
     */
    public function getExpression()
    {
        return $this->expression;
    }
    public function hasExpression()
    {
        return isset($this->expression);
    }
    public function clearExpression()
    {
        unset($this->expression);
    }
    /**
     * Required. The Filter Expression that defines the Grouping Rule.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilterExpression expression = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpression $var
     * @return $this
     */
    public function setExpression($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpression::class);
        $this->expression = $var;
        return $this;
    }
}
