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

namespace Google\Analytics\Data\V1alpha;

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

/**
 * Expresses combinations of funnel filters.
 *
 * Generated from protobuf message <code>google.analytics.data.v1alpha.FunnelFilterExpression</code>
 */
class FunnelFilterExpression extends \Google\Protobuf\Internal\Message
{
    protected $expr;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Data\V1alpha\FunnelFilterExpressionList $and_group
     *           The FunnelFilterExpression in `andGroup` have an AND relationship.
     *     @type \Google\Analytics\Data\V1alpha\FunnelFilterExpressionList $or_group
     *           The FunnelFilterExpression in `orGroup` have an OR relationship.
     *     @type \Google\Analytics\Data\V1alpha\FunnelFilterExpression $not_expression
     *           The FunnelFilterExpression is NOT of `notExpression`.
     *     @type \Google\Analytics\Data\V1alpha\FunnelFieldFilter $funnel_field_filter
     *           A funnel filter for a dimension or metric.
     *     @type \Google\Analytics\Data\V1alpha\FunnelEventFilter $funnel_event_filter
     *           Creates a filter that matches events of a single event name. If a
     *           parameter filter expression is specified, only the subset of events that
     *           match both the single event name and the parameter filter expressions
     *           match this event filter.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     * @return \Google\Analytics\Data\V1alpha\FunnelFilterExpressionList|null
     */
    public function getAndGroup()
    {
        return $this->readOneof(1);
    }

    public function hasAndGroup()
    {
        return $this->hasOneof(1);
    }

    /**
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     * @param \Google\Analytics\Data\V1alpha\FunnelFilterExpressionList $var
     * @return $this
     */
    public function setAndGroup($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FunnelFilterExpressionList::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     * @return \Google\Analytics\Data\V1alpha\FunnelFilterExpressionList|null
     */
    public function getOrGroup()
    {
        return $this->readOneof(2);
    }

    public function hasOrGroup()
    {
        return $this->hasOneof(2);
    }

    /**
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     * @param \Google\Analytics\Data\V1alpha\FunnelFilterExpressionList $var
     * @return $this
     */
    public function setOrGroup($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FunnelFilterExpressionList::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * The FunnelFilterExpression is NOT of `notExpression`.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     * @return \Google\Analytics\Data\V1alpha\FunnelFilterExpression|null
     */
    public function getNotExpression()
    {
        return $this->readOneof(3);
    }

    public function hasNotExpression()
    {
        return $this->hasOneof(3);
    }

    /**
     * The FunnelFilterExpression is NOT of `notExpression`.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     * @param \Google\Analytics\Data\V1alpha\FunnelFilterExpression $var
     * @return $this
     */
    public function setNotExpression($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FunnelFilterExpression::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * A funnel filter for a dimension or metric.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     * @return \Google\Analytics\Data\V1alpha\FunnelFieldFilter|null
     */
    public function getFunnelFieldFilter()
    {
        return $this->readOneof(4);
    }

    public function hasFunnelFieldFilter()
    {
        return $this->hasOneof(4);
    }

    /**
     * A funnel filter for a dimension or metric.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     * @param \Google\Analytics\Data\V1alpha\FunnelFieldFilter $var
     * @return $this
     */
    public function setFunnelFieldFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FunnelFieldFilter::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     * @return \Google\Analytics\Data\V1alpha\FunnelEventFilter|null
     */
    public function getFunnelEventFilter()
    {
        return $this->readOneof(5);
    }

    public function hasFunnelEventFilter()
    {
        return $this->hasOneof(5);
    }

    /**
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     * @param \Google\Analytics\Data\V1alpha\FunnelEventFilter $var
     * @return $this
     */
    public function setFunnelEventFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\FunnelEventFilter::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getExpr()
    {
        return $this->whichOneof("expr");
    }

}

