<?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.TriggerAlertFilter</code>
 */
class TriggerAlertFilter extends \Google\Protobuf\Internal\Message
{
    /**
     * По важности триггера
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.SeverityType trigger_severity_types = 1;</code>
     */
    private $trigger_severity_types;
    /**
     * По ФИАСам
     *
     * Generated from protobuf field <code>repeated string fias_ids = 2;</code>
     */
    private $fias_ids;
    /**
     * По тэгам
     *
     * Generated from protobuf field <code>repeated string tags = 3;</code>
     */
    private $tags;
    /**
     * По типам метрик триггера
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.MetricType metric_types = 4;</code>
     */
    private $metric_types;
    /**
     * По моделям устройств
     *
     * Generated from protobuf field <code>repeated string device_models = 5;</code>
     */
    private $device_models;
    /**
     * По типам устройств
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.DeviceType device_types = 6;</code>
     */
    private $device_types;
    /**
     * По идентификаторам родительских устройств
     *
     * Generated from protobuf field <code>repeated int32 device_parent_ids = 7;</code>
     */
    private $device_parent_ids;
    /**
     * По идентификаторам устройств
     *
     * Generated from protobuf field <code>repeated int32 device_ids = 8;</code>
     */
    private $device_ids;
    /**
     * По признаку активности
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_disabled = 9;</code>
     */
    protected $is_disabled = null;
    /**
     * От даты возникновения включительно (>=)
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp after_raised_at = 10;</code>
     */
    protected $after_raised_at = null;
    /**
     * До даты возникновения (<)
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp before_raised_at = 11;</code>
     */
    protected $before_raised_at = null;
    /**
     * По типам группировки метрик
     *
     * Generated from protobuf field <code>repeated .keyapis.telemetry_alerting.v1.Trigger.MetricGroupingType metric_grouping_types = 12;</code>
     */
    private $metric_grouping_types;
    /**
     * По идентификаторам триггеров
     *
     * Generated from protobuf field <code>repeated int32 trigger_ids = 13;</code>
     */
    private $trigger_ids;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $trigger_severity_types
     *           По важности триггера
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $fias_ids
     *           По ФИАСам
     *     @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 $device_parent_ids
     *           По идентификаторам родительских устройств
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $device_ids
     *           По идентификаторам устройств
     *     @type \Google\Protobuf\BoolValue $is_disabled
     *           По признаку активности
     *     @type \Google\Protobuf\Timestamp $after_raised_at
     *           От даты возникновения включительно (>=)
     *     @type \Google\Protobuf\Timestamp $before_raised_at
     *           До даты возникновения (<)
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $metric_grouping_types
     *           По типам группировки метрик
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $trigger_ids
     *           По идентификаторам триггеров
     * }
     */
    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 trigger_severity_types = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTriggerSeverityTypes()
    {
        return $this->trigger_severity_types;
    }

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

        return $this;
    }

    /**
     * По ФИАСам
     *
     * Generated from protobuf field <code>repeated string fias_ids = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFiasIds()
    {
        return $this->fias_ids;
    }

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

        return $this;
    }

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

    /**
     * По тэгам
     *
     * Generated from protobuf field <code>repeated string tags = 3;</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 = 4;</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 = 4;</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 = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDeviceModels()
    {
        return $this->device_models;
    }

    /**
     * По моделям устройств
     *
     * Generated from protobuf field <code>repeated string device_models = 5;</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 = 6;</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 = 6;</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 int32 device_parent_ids = 7;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDeviceParentIds()
    {
        return $this->device_parent_ids;
    }

    /**
     * По идентификаторам родительских устройств
     *
     * Generated from protobuf field <code>repeated int32 device_parent_ids = 7;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDeviceParentIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->device_parent_ids = $arr;

        return $this;
    }

    /**
     * По идентификаторам устройств
     *
     * Generated from protobuf field <code>repeated int32 device_ids = 8;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDeviceIds()
    {
        return $this->device_ids;
    }

    /**
     * По идентификаторам устройств
     *
     * Generated from protobuf field <code>repeated int32 device_ids = 8;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDeviceIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->device_ids = $arr;

        return $this;
    }

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

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

    /**
     * От даты возникновения включительно (>=)
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp after_raised_at = 10;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getAfterRaisedAt()
    {
        return $this->after_raised_at;
    }

    public function hasAfterRaisedAt()
    {
        return isset($this->after_raised_at);
    }

    public function clearAfterRaisedAt()
    {
        unset($this->after_raised_at);
    }

    /**
     * От даты возникновения включительно (>=)
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp after_raised_at = 10;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setAfterRaisedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->after_raised_at = $var;

        return $this;
    }

    /**
     * До даты возникновения (<)
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp before_raised_at = 11;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getBeforeRaisedAt()
    {
        return $this->before_raised_at;
    }

    public function hasBeforeRaisedAt()
    {
        return isset($this->before_raised_at);
    }

    public function clearBeforeRaisedAt()
    {
        unset($this->before_raised_at);
    }

    /**
     * До даты возникновения (<)
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp before_raised_at = 11;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setBeforeRaisedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->before_raised_at = $var;

        return $this;
    }

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

    /**
     * По идентификаторам триггеров
     *
     * Generated from protobuf field <code>repeated int32 trigger_ids = 13;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTriggerIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->trigger_ids = $arr;

        return $this;
    }

}

