<?php

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/admin/v1alpha/expanded_data_set.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 EnhancedDataSet dimension filters.
 *
 * Generated from protobuf message <code>google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression</code>
 */
class ExpandedDataSetFilterExpression 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\ExpandedDataSetFilterExpressionList $and_group
     *           A list of expressions to be AND’ed together. It must contain a
     *           ExpandedDataSetFilterExpression with either not_expression or
     *           dimension_filter. This must be set for the top level
     *           ExpandedDataSetFilterExpression.
     *     @type \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilterExpression $not_expression
     *           A filter expression to be NOT'ed (that is, inverted, complemented). It
     *           must include a dimension_filter. This cannot be set on the
     *           top level ExpandedDataSetFilterExpression.
     *     @type \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilter $filter
     *           A filter on a single dimension. This cannot be set on the top
     *           level ExpandedDataSetFilterExpression.
     * }
     */
    public function __construct($data = NULL)
    {
        \Matomo\Dependencies\GoogleAnalyticsImporter\GPBMetadata\Google\Analytics\Admin\V1Alpha\ExpandedDataSet::initOnce();
        parent::__construct($data);
    }
    /**
     * A list of expressions to be AND’ed together. It must contain a
     * ExpandedDataSetFilterExpression with either not_expression or
     * dimension_filter. This must be set for the top level
     * ExpandedDataSetFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList and_group = 1;</code>
     * @return \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilterExpressionList|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 must contain a
     * ExpandedDataSetFilterExpression with either not_expression or
     * dimension_filter. This must be set for the top level
     * ExpandedDataSetFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpressionList and_group = 1;</code>
     * @param \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilterExpressionList $var
     * @return $this
     */
    public function setAndGroup($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ExpandedDataSetFilterExpressionList::class);
        $this->writeOneof(1, $var);
        return $this;
    }
    /**
     * A filter expression to be NOT'ed (that is, inverted, complemented). It
     * must include a dimension_filter. This cannot be set on the
     * top level ExpandedDataSetFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression not_expression = 2;</code>
     * @return \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilterExpression|null
     */
    public function getNotExpression()
    {
        return $this->readOneof(2);
    }
    public function hasNotExpression()
    {
        return $this->hasOneof(2);
    }
    /**
     * A filter expression to be NOT'ed (that is, inverted, complemented). It
     * must include a dimension_filter. This cannot be set on the
     * top level ExpandedDataSetFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression not_expression = 2;</code>
     * @param \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilterExpression $var
     * @return $this
     */
    public function setNotExpression($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ExpandedDataSetFilterExpression::class);
        $this->writeOneof(2, $var);
        return $this;
    }
    /**
     * A filter on a single dimension. This cannot be set on the top
     * level ExpandedDataSetFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ExpandedDataSetFilter filter = 3;</code>
     * @return \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilter|null
     */
    public function getFilter()
    {
        return $this->readOneof(3);
    }
    public function hasFilter()
    {
        return $this->hasOneof(3);
    }
    /**
     * A filter on a single dimension. This cannot be set on the top
     * level ExpandedDataSetFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ExpandedDataSetFilter filter = 3;</code>
     * @param \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilter $var
     * @return $this
     */
    public function setFilter($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ExpandedDataSetFilter::class);
        $this->writeOneof(3, $var);
        return $this;
    }
    /**
     * @return string
     */
    public function getExpr()
    {
        return $this->whichOneof("expr");
    }
}
