<?php

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/admin/v1alpha/channel_group.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 specific filter for a single dimension.
 *
 * Generated from protobuf message <code>google.analytics.admin.v1alpha.ChannelGroupFilter</code>
 */
class ChannelGroupFilter extends \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\Message
{
    /**
     * Required. Immutable. The dimension name to filter.
     *
     * Generated from protobuf field <code>string field_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    private $field_name = '';
    protected $value_filter;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Admin\V1alpha\ChannelGroupFilter\StringFilter $string_filter
     *           A filter for a string-type dimension that matches a particular pattern.
     *     @type \Google\Analytics\Admin\V1alpha\ChannelGroupFilter\InListFilter $in_list_filter
     *           A filter for a string dimension that matches a particular list of
     *           options.
     *     @type string $field_name
     *           Required. Immutable. The dimension name to filter.
     * }
     */
    public function __construct($data = NULL)
    {
        \Matomo\Dependencies\GoogleAnalyticsImporter\GPBMetadata\Google\Analytics\Admin\V1Alpha\ChannelGroup::initOnce();
        parent::__construct($data);
    }
    /**
     * A filter for a string-type dimension that matches a particular pattern.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter string_filter = 2;</code>
     * @return \Google\Analytics\Admin\V1alpha\ChannelGroupFilter\StringFilter|null
     */
    public function getStringFilter()
    {
        return $this->readOneof(2);
    }
    public function hasStringFilter()
    {
        return $this->hasOneof(2);
    }
    /**
     * A filter for a string-type dimension that matches a particular pattern.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter string_filter = 2;</code>
     * @param \Google\Analytics\Admin\V1alpha\ChannelGroupFilter\StringFilter $var
     * @return $this
     */
    public function setStringFilter($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ChannelGroupFilter\StringFilter::class);
        $this->writeOneof(2, $var);
        return $this;
    }
    /**
     * A filter for a string dimension that matches a particular list of
     * options.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter in_list_filter = 3;</code>
     * @return \Google\Analytics\Admin\V1alpha\ChannelGroupFilter\InListFilter|null
     */
    public function getInListFilter()
    {
        return $this->readOneof(3);
    }
    public function hasInListFilter()
    {
        return $this->hasOneof(3);
    }
    /**
     * A filter for a string dimension that matches a particular list of
     * options.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter in_list_filter = 3;</code>
     * @param \Google\Analytics\Admin\V1alpha\ChannelGroupFilter\InListFilter $var
     * @return $this
     */
    public function setInListFilter($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\ChannelGroupFilter\InListFilter::class);
        $this->writeOneof(3, $var);
        return $this;
    }
    /**
     * Required. Immutable. The dimension name to filter.
     *
     * Generated from protobuf field <code>string field_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getFieldName()
    {
        return $this->field_name;
    }
    /**
     * Required. Immutable. The dimension name to filter.
     *
     * Generated from protobuf field <code>string field_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setFieldName($var)
    {
        GPBUtil::checkString($var, True);
        $this->field_name = $var;
        return $this;
    }
    /**
     * @return string
     */
    public function getValueFilter()
    {
        return $this->whichOneof("value_filter");
    }
}
