<?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;

/**
 * Session segments are subsets of the sessions that occurred on your site or
 * app: for example, all the sessions that originated from a particular
 * advertising campaign.
 *
 * Generated from protobuf message <code>google.analytics.data.v1alpha.SessionSegment</code>
 */
class SessionSegment extends \Google\Protobuf\Internal\Message
{
    /**
     * Defines which sessions are included in this segment. Optional.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.SessionSegmentCriteria session_inclusion_criteria = 1;</code>
     */
    private $session_inclusion_criteria = null;
    /**
     * Defines which sessions are excluded in this segment. Optional.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.SessionSegmentExclusion exclusion = 2;</code>
     */
    private $exclusion = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Data\V1alpha\SessionSegmentCriteria $session_inclusion_criteria
     *           Defines which sessions are included in this segment. Optional.
     *     @type \Google\Analytics\Data\V1alpha\SessionSegmentExclusion $exclusion
     *           Defines which sessions are excluded in this segment. Optional.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * Defines which sessions are included in this segment. Optional.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.SessionSegmentCriteria session_inclusion_criteria = 1;</code>
     * @return \Google\Analytics\Data\V1alpha\SessionSegmentCriteria|null
     */
    public function getSessionInclusionCriteria()
    {
        return $this->session_inclusion_criteria;
    }

    public function hasSessionInclusionCriteria()
    {
        return isset($this->session_inclusion_criteria);
    }

    public function clearSessionInclusionCriteria()
    {
        unset($this->session_inclusion_criteria);
    }

    /**
     * Defines which sessions are included in this segment. Optional.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.SessionSegmentCriteria session_inclusion_criteria = 1;</code>
     * @param \Google\Analytics\Data\V1alpha\SessionSegmentCriteria $var
     * @return $this
     */
    public function setSessionInclusionCriteria($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\SessionSegmentCriteria::class);
        $this->session_inclusion_criteria = $var;

        return $this;
    }

    /**
     * Defines which sessions are excluded in this segment. Optional.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.SessionSegmentExclusion exclusion = 2;</code>
     * @return \Google\Analytics\Data\V1alpha\SessionSegmentExclusion|null
     */
    public function getExclusion()
    {
        return $this->exclusion;
    }

    public function hasExclusion()
    {
        return isset($this->exclusion);
    }

    public function clearExclusion()
    {
        unset($this->exclusion);
    }

    /**
     * Defines which sessions are excluded in this segment. Optional.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.SessionSegmentExclusion exclusion = 2;</code>
     * @param \Google\Analytics\Data\V1alpha\SessionSegmentExclusion $var
     * @return $this
     */
    public function setExclusion($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\SessionSegmentExclusion::class);
        $this->exclusion = $var;

        return $this;
    }

}

