<?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 segment filter on parameters.
 *
 * Generated from protobuf message <code>google.analytics.data.v1alpha.SegmentParameterFilterExpression</code>
 */
class SegmentParameterFilterExpression extends \Google\Protobuf\Internal\Message
{
    protected $expr;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Data\V1alpha\SegmentParameterFilterExpressionList $and_group
     *           The SegmentParameterFilterExpression in `andGroup` have an AND
     *           relationship.
     *     @type \Google\Analytics\Data\V1alpha\SegmentParameterFilterExpressionList $or_group
     *           The SegmentParameterFilterExpression in `orGroup` have an OR
     *           relationship.
     *     @type \Google\Analytics\Data\V1alpha\SegmentParameterFilterExpression $not_expression
     *           The SegmentParameterFilterExpression is NOT of `notExpression`.
     *     @type \Google\Analytics\Data\V1alpha\SegmentParameterFilter $segment_parameter_filter
     *           A primitive segment parameter filter.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
        parent::__construct($data);
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

    /**
     * A primitive segment parameter filter.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;</code>
     * @return \Google\Analytics\Data\V1alpha\SegmentParameterFilter|null
     */
    public function getSegmentParameterFilter()
    {
        return $this->readOneof(4);
    }

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

    /**
     * A primitive segment parameter filter.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;</code>
     * @param \Google\Analytics\Data\V1alpha\SegmentParameterFilter $var
     * @return $this
     */
    public function setSegmentParameterFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\SegmentParameterFilter::class);
        $this->writeOneof(4, $var);

        return $this;
    }

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

}

