<?php

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/admin/v1alpha/subproperty_event_filter.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 Subproperty event filters.
 *
 * Generated from protobuf message <code>google.analytics.admin.v1alpha.SubpropertyEventFilterExpression</code>
 */
class SubpropertyEventFilterExpression 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\SubpropertyEventFilterExpressionList $or_group
     *           A list of expressions to OR’ed together. Must only contain
     *           not_expression or filter_condition expressions.
     *     @type \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterExpression $not_expression
     *           A filter expression to be NOT'ed (inverted, complemented). It can only
     *           include a filter. This cannot be set on the top level
     *           SubpropertyEventFilterExpression.
     *     @type \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterCondition $filter_condition
     *           Creates a filter that matches a specific event. This cannot be set on the
     *           top level SubpropertyEventFilterExpression.
     * }
     */
    public function __construct($data = NULL)
    {
        \Matomo\Dependencies\GoogleAnalyticsImporter\GPBMetadata\Google\Analytics\Admin\V1Alpha\SubpropertyEventFilter::initOnce();
        parent::__construct($data);
    }
    /**
     * A list of expressions to OR’ed together. Must only contain
     * not_expression or filter_condition expressions.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1;</code>
     * @return \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterExpressionList|null
     */
    public function getOrGroup()
    {
        return $this->readOneof(1);
    }
    public function hasOrGroup()
    {
        return $this->hasOneof(1);
    }
    /**
     * A list of expressions to OR’ed together. Must only contain
     * not_expression or filter_condition expressions.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1;</code>
     * @param \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterExpressionList $var
     * @return $this
     */
    public function setOrGroup($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\SubpropertyEventFilterExpressionList::class);
        $this->writeOneof(1, $var);
        return $this;
    }
    /**
     * A filter expression to be NOT'ed (inverted, complemented). It can only
     * include a filter. This cannot be set on the top level
     * SubpropertyEventFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2;</code>
     * @return \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterExpression|null
     */
    public function getNotExpression()
    {
        return $this->readOneof(2);
    }
    public function hasNotExpression()
    {
        return $this->hasOneof(2);
    }
    /**
     * A filter expression to be NOT'ed (inverted, complemented). It can only
     * include a filter. This cannot be set on the top level
     * SubpropertyEventFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2;</code>
     * @param \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterExpression $var
     * @return $this
     */
    public function setNotExpression($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\SubpropertyEventFilterExpression::class);
        $this->writeOneof(2, $var);
        return $this;
    }
    /**
     * Creates a filter that matches a specific event. This cannot be set on the
     * top level SubpropertyEventFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3;</code>
     * @return \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterCondition|null
     */
    public function getFilterCondition()
    {
        return $this->readOneof(3);
    }
    public function hasFilterCondition()
    {
        return $this->hasOneof(3);
    }
    /**
     * Creates a filter that matches a specific event. This cannot be set on the
     * top level SubpropertyEventFilterExpression.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3;</code>
     * @param \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterCondition $var
     * @return $this
     */
    public function setFilterCondition($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\SubpropertyEventFilterCondition::class);
        $this->writeOneof(3, $var);
        return $this;
    }
    /**
     * @return string
     */
    public function getExpr()
    {
        return $this->whichOneof("expr");
    }
}
