Remove variant from Thresholds interface

The Thresholds property on the Trigger interface is currently defined as
a relatively complex type:
variant<
   array<discrete struct>
   array<numeric struct>
>

This causes some oddities in unpacking given that Dbus properties are
already a variant, applications consuming this interface have to double
wrap the variant.  This was confusing enough that bmcweb has to keep the
trigger types separate, and cannot use the common typing.

This commit changes by adding two new parameters
NumericThresholds: array<numeric struct>
DiscreteThresholds: array<discrete struct>

Which deduplicates the double wrapped variant.

The intent is that this duplicated interface will exist for a transition
period of a week or two, while bmcweb (the only user of this)
transitions the code to use the new properties, then a followup common
will drop the thresholds properly.

Tested: WIP

Change-Id: I6717d4075de53c91aa179a90c7a844c4a13534cc
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/src/trigger_manager.cpp b/src/trigger_manager.cpp
index 20dee51..5cc824e 100644
--- a/src/trigger_manager.cpp
+++ b/src/trigger_manager.cpp
@@ -25,16 +25,28 @@
         triggerManagerPath, triggerManagerIfaceName, [this](auto& iface) {
         iface.register_method(
             "AddTrigger",
-            [this](boost::asio::yield_context& yield, const std::string& id,
-                   const std::string& name,
-                   const std::vector<std::string>& triggerActions,
-                   const SensorsInfo& sensors,
-                   const std::vector<sdbusplus::message::object_path>& reports,
-                   const TriggerThresholdParamsExt& thresholds) {
-            LabeledTriggerThresholdParams labeledTriggerThresholdParams =
-                std::visit(utils::ToLabeledThresholdParamConversion(),
-                           thresholds);
-
+            [this](
+                boost::asio::yield_context& yield, const std::string& id,
+                const std::string& name,
+                const std::vector<std::string>& triggerActions,
+                const SensorsInfo& sensors,
+                const std::vector<sdbusplus::message::object_path>& reports,
+                const std::vector<numeric::ThresholdParam>& numericThresholds,
+                const std::vector<discrete::ThresholdParam>&
+                    discreteThresholds) {
+            LabeledTriggerThresholdParams labeledTriggerThresholdParams;
+            if (!numericThresholds.empty())
+            {
+                labeledTriggerThresholdParams =
+                    utils::ToLabeledThresholdParamConversion()(
+                        numericThresholds);
+            }
+            if (!discreteThresholds.empty())
+            {
+                labeledTriggerThresholdParams =
+                    utils::ToLabeledThresholdParamConversion()(
+                        discreteThresholds);
+            }
             std::vector<LabeledSensorInfo> labeledSensorsInfo =
                 triggerFactory->getLabeledSensorsInfo(yield, sensors);