<?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;
/**
 * A logical expression of Channel Group dimension filters.
 *
 * Generated from protobuf message <code>google.analytics.admin.v1alpha.ChannelGroupFilterExpression</code>
 */
class ChannelGroupFilterExpression extends \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\Message
{
    protected $expr;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpressionList $and_group
     *           A list of expressions to be AND’ed together. It can only contain
     *           ChannelGroupFilterExpressions with or_group. This must be set for the
     *           top level ChannelGroupFilterExpression.
     *     @type \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpressionList $or_group
     *           A list of expressions to OR’ed together. It cannot contain
     *           ChannelGroupFilterExpressions with and_group or or_group.
     *     @type \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpression $not_expression
     *           A filter expression to be NOT'ed (that is inverted, complemented). It
     *           can only include a dimension_or_metric_filter. This cannot be set on the
     *           top level ChannelGroupFilterExpression.
     *     @type \Google\Analytics\Admin\V1alpha\ChannelGroupFilter $filter
     *           A filter on a single dimension. This cannot be set on the top
     *           level ChannelGroupFilterExpression.
     * }
     */
    public function __construct($data = NULL)
    {
        \Matomo\Dependencies\GoogleAnalyticsImporter\GPBMetadata\Google\Analytics\Admin\V1Alpha\ChannelGroup::initOnce();
        parent::__construct($data);
    }
    /**
     * A list of expressions to be AND’ed together. It can only contain
     * ChannelGroupFilterExpressions with or_group. This must be set for the
     * top level ChannelGroupFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList and_group = 1;</code>
     * @return \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpressionList|null
     */
    public function getAndGroup()
    {
        return $this->readOneof(1);
    }
    public function hasAndGroup()
    {
        return $this->hasOneof(1);
    }
    /**
     * A list of expressions to be AND’ed together. It can only contain
     * ChannelGroupFilterExpressions with or_group. This must be set for the
     * top level ChannelGroupFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList and_group = 1;</code>
     * @param \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpressionList $var
     * @return $this
     */
    public function setAndGroup($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpressionList::class);
        $this->writeOneof(1, $var);
        return $this;
    }
    /**
     * A list of expressions to OR’ed together. It cannot contain
     * ChannelGroupFilterExpressions with and_group or or_group.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList or_group = 2;</code>
     * @return \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpressionList|null
     */
    public function getOrGroup()
    {
        return $this->readOneof(2);
    }
    public function hasOrGroup()
    {
        return $this->hasOneof(2);
    }
    /**
     * A list of expressions to OR’ed together. It cannot contain
     * ChannelGroupFilterExpressions with and_group or or_group.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList or_group = 2;</code>
     * @param \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpressionList $var
     * @return $this
     */
    public function setOrGroup($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpressionList::class);
        $this->writeOneof(2, $var);
        return $this;
    }
    /**
     * A filter expression to be NOT'ed (that is inverted, complemented). It
     * can only include a dimension_or_metric_filter. This cannot be set on the
     * top level ChannelGroupFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilterExpression not_expression = 3;</code>
     * @return \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpression|null
     */
    public function getNotExpression()
    {
        return $this->readOneof(3);
    }
    public function hasNotExpression()
    {
        return $this->hasOneof(3);
    }
    /**
     * A filter expression to be NOT'ed (that is inverted, complemented). It
     * can only include a dimension_or_metric_filter. This cannot be set on the
     * top level ChannelGroupFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilterExpression not_expression = 3;</code>
     * @param \Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpression $var
     * @return $this
     */
    public function setNotExpression($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ChannelGroupFilterExpression::class);
        $this->writeOneof(3, $var);
        return $this;
    }
    /**
     * A filter on a single dimension. This cannot be set on the top
     * level ChannelGroupFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilter filter = 4;</code>
     * @return \Google\Analytics\Admin\V1alpha\ChannelGroupFilter|null
     */
    public function getFilter()
    {
        return $this->readOneof(4);
    }
    public function hasFilter()
    {
        return $this->hasOneof(4);
    }
    /**
     * A filter on a single dimension. This cannot be set on the top
     * level ChannelGroupFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilter filter = 4;</code>
     * @param \Google\Analytics\Admin\V1alpha\ChannelGroupFilter $var
     * @return $this
     */
    public function setFilter($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ChannelGroupFilter::class);
        $this->writeOneof(4, $var);
        return $this;
    }
    /**
     * @return string
     */
    public function getExpr()
    {
        return $this->whichOneof("expr");
    }
}
