<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/telemetry_alerting/v1/keyapis_telemetry_alerting_trigger_v1.proto

namespace Keyapis\TelemetryAlerting\V1;

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

/**
 * Параметры фильтрации триггеров.
 * При передаче массива в параметр фильтра элементы массива работают в выборке через ИЛИ.
 * При передаче нескольких разных параметров фильтра они работают в выборке через И
 *
 * Generated from protobuf message <code>keyapis.telemetry_alerting.v1.TriggerFilter</code>
 */
class TriggerFilter extends \Google\Protobuf\Internal\Message
{
    /**
     * По уровням критичности
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.SeverityType severity_types = 1;</code>
     */
    private $severity_types;
    /**
     * По тэгам
     *
     * Generated from protobuf field <code>repeated string tags = 2;</code>
     */
    private $tags;
    /**
     * По типам метрик триггеров
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.MetricType metric_types = 3;</code>
     */
    private $metric_types;
    /**
     * По моделям устройств
     *
     * Generated from protobuf field <code>repeated string device_models = 4;</code>
     */
    private $device_models;
    /**
     * По типам устройств
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.DeviceType device_types = 5;</code>
     */
    private $device_types;
    /**
     * По типам группировки метрик
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.MetricGroupingType metric_grouping_types = 6;</code>
     */
    private $metric_grouping_types;
    /**
     * По признаку активности триггера
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_disabled = 7;</code>
     */
    protected $is_disabled = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $severity_types
     *           По уровням критичности
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $tags
     *           По тэгам
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $metric_types
     *           По типам метрик триггеров
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $device_models
     *           По моделям устройств
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $device_types
     *           По типам устройств
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $metric_grouping_types
     *           По типам группировки метрик
     *     @type \Google\Protobuf\BoolValue $is_disabled
     *           По признаку активности триггера
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\TelemetryAlerting\V1\KeyapisTelemetryAlertingTriggerV1::initOnce();
        parent::__construct($data);
    }

    /**
     * По уровням критичности
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.SeverityType severity_types = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSeverityTypes()
    {
        return $this->severity_types;
    }

    /**
     * По уровням критичности
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.SeverityType severity_types = 1;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSeverityTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Keyapis\TelemetryAlerting\V1\Trigger\SeverityType::class);
        $this->severity_types = $arr;

        return $this;
    }

    /**
     * По тэгам
     *
     * Generated from protobuf field <code>repeated string tags = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * По тэгам
     *
     * Generated from protobuf field <code>repeated string tags = 2;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->tags = $arr;

        return $this;
    }

    /**
     * По типам метрик триггеров
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.MetricType metric_types = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMetricTypes()
    {
        return $this->metric_types;
    }

    /**
     * По типам метрик триггеров
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.MetricType metric_types = 3;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMetricTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Keyapis\TelemetryAlerting\V1\Trigger\MetricType::class);
        $this->metric_types = $arr;

        return $this;
    }

    /**
     * По моделям устройств
     *
     * Generated from protobuf field <code>repeated string device_models = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDeviceModels()
    {
        return $this->device_models;
    }

    /**
     * По моделям устройств
     *
     * Generated from protobuf field <code>repeated string device_models = 4;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDeviceModels($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->device_models = $arr;

        return $this;
    }

    /**
     * По типам устройств
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.DeviceType device_types = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDeviceTypes()
    {
        return $this->device_types;
    }

    /**
     * По типам устройств
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.DeviceType device_types = 5;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDeviceTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Keyapis\TelemetryAlerting\V1\Trigger\DeviceType::class);
        $this->device_types = $arr;

        return $this;
    }

    /**
     * По типам группировки метрик
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.MetricGroupingType metric_grouping_types = 6;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMetricGroupingTypes()
    {
        return $this->metric_grouping_types;
    }

    /**
     * По типам группировки метрик
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.MetricGroupingType metric_grouping_types = 6;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMetricGroupingTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Keyapis\TelemetryAlerting\V1\Trigger\MetricGroupingType::class);
        $this->metric_grouping_types = $arr;

        return $this;
    }

    /**
     * По признаку активности триггера
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_disabled = 7;</code>
     * @return \Google\Protobuf\BoolValue|null
     */
    public function getIsDisabled()
    {
        return $this->is_disabled;
    }

    public function hasIsDisabled()
    {
        return isset($this->is_disabled);
    }

    public function clearIsDisabled()
    {
        unset($this->is_disabled);
    }

    /**
     * Returns the unboxed value from <code>getIsDisabled()</code>

     * По признаку активности триггера
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_disabled = 7;</code>
     * @return bool|null
     */
    public function getIsDisabledUnwrapped()
    {
        return $this->readWrapperValue("is_disabled");
    }

    /**
     * По признаку активности триггера
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_disabled = 7;</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setIsDisabled($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->is_disabled = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

     * По признаку активности триггера
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_disabled = 7;</code>
     * @param bool|null $var
     * @return $this
     */
    public function setIsDisabledUnwrapped($var)
    {
        $this->writeWrapperValue("is_disabled", $var);
        return $this;}

}

