created AddReportFutureVersion dbus method

New method will support CollectionTimeScope, CollectionDuration

In order to make not breaking interface changes bmcweb will switch to
AddReportFutureVersion, then AddReport will be changed to match
AddReportFutureVersion, then redfish will switch back to use AddReport,
then AddReportFutureVersion will be removed.

Tested:
  - Verified that current version of bmcweb works fine with old API

Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I51a9b7fb2f4da5b8d2f688ccd5e93710352b1ac7
diff --git a/tests/src/params/metric_params.hpp b/tests/src/params/metric_params.hpp
new file mode 100644
index 0000000..f099472
--- /dev/null
+++ b/tests/src/params/metric_params.hpp
@@ -0,0 +1,74 @@
+#pragma once
+
+#include "types/collection_duration.hpp"
+#include "types/collection_time_scope.hpp"
+#include "types/operation_type.hpp"
+
+#include <string>
+
+class MetricParams final
+{
+  public:
+    MetricParams& operationType(OperationType val)
+    {
+        operationTypeProperty = val;
+        return *this;
+    }
+
+    const OperationType& operationType() const
+    {
+        return operationTypeProperty;
+    }
+
+    MetricParams& id(std::string val)
+    {
+        idProperty = std::move(val);
+        return *this;
+    }
+
+    const std::string& id() const
+    {
+        return idProperty;
+    }
+
+    MetricParams& metadata(std::string val)
+    {
+        metadataProperty = std::move(val);
+        return *this;
+    }
+
+    const std::string& metadata() const
+    {
+        return metadataProperty;
+    }
+
+    MetricParams& collectionTimeScope(CollectionTimeScope val)
+    {
+        collectionTimeScopeProperty = val;
+        return *this;
+    }
+
+    const CollectionTimeScope& collectionTimeScope() const
+    {
+        return collectionTimeScopeProperty;
+    }
+
+    MetricParams& collectionDuration(CollectionDuration val)
+    {
+        collectionDurationProperty = val;
+        return *this;
+    }
+
+    const CollectionDuration& collectionDuration() const
+    {
+        return collectionDurationProperty;
+    }
+
+  private:
+    OperationType operationTypeProperty = {};
+    std::string idProperty = "MetricId";
+    std::string metadataProperty = "MetricMetadata";
+    CollectionTimeScope collectionTimeScopeProperty = {};
+    CollectionDuration collectionDurationProperty =
+        CollectionDuration(Milliseconds(0u));
+};
diff --git a/tests/src/params/report_params.hpp b/tests/src/params/report_params.hpp
index 25422bc..3bfd308 100644
--- a/tests/src/params/report_params.hpp
+++ b/tests/src/params/report_params.hpp
@@ -1,7 +1,7 @@
 #pragma once
 
-#include "interfaces/types.hpp"
 #include "report_manager.hpp"
+#include "types/report_types.hpp"
 
 #include <chrono>
 #include <string>
@@ -53,26 +53,26 @@
         return logToMetricReportCollectionProperty;
     }
 
-    ReportParams& interval(std::chrono::milliseconds val)
+    ReportParams& interval(Milliseconds val)
     {
         intervalProperty = val;
         return *this;
     }
 
-    std::chrono::milliseconds interval() const
+    Milliseconds interval() const
     {
         return intervalProperty;
     }
 
-    ReportParams& readingParameters(ReadingParameters val)
+    ReportParams& metricParameters(std::vector<LabeledMetricParameters> val)
     {
-        readingParametersProperty = std::move(val);
+        metricParametersProperty = std::move(val);
         return *this;
     }
 
-    const ReadingParameters& readingParameters() const
+    const std::vector<LabeledMetricParameters>& metricParameters() const
     {
-        return readingParametersProperty;
+        return metricParametersProperty;
     }
 
   private:
@@ -80,16 +80,22 @@
     std::string reportingTypeProperty = "OnRequest";
     bool emitReadingUpdateProperty = true;
     bool logToMetricReportCollectionProperty = true;
-    std::chrono::milliseconds intervalProperty = ReportManager::minInterval;
-    ReadingParameters readingParametersProperty = {
-        {{sdbusplus::message::object_path(
-             "/xyz/openbmc_project/sensors/power/p1")},
-         utils::enumToString(OperationType::single),
-         "MetricId1",
-         "Metadata1"},
-        {{sdbusplus::message::object_path(
-             "/xyz/openbmc_project/sensors/power/p2")},
-         utils::enumToString(OperationType::single),
-         "MetricId2",
-         "Metadata2"}};
+    Milliseconds intervalProperty = ReportManager::minInterval;
+    std::vector<LabeledMetricParameters> metricParametersProperty{
+        {LabeledMetricParameters{
+             {LabeledSensorParameters{"Service",
+                                      "/xyz/openbmc_project/sensors/power/p1"}},
+             OperationType::single,
+             "MetricId1",
+             "Metadata1",
+             CollectionTimeScope::point,
+             CollectionDuration(Milliseconds(0u))},
+         LabeledMetricParameters{
+             {LabeledSensorParameters{"Service",
+                                      "/xyz/openbmc_project/sensors/power/p2"}},
+             OperationType::single,
+             "MetricId2",
+             "Metadata2",
+             CollectionTimeScope::point,
+             CollectionDuration(Milliseconds(0u))}}};
 };
diff --git a/tests/src/params/trigger_params.hpp b/tests/src/params/trigger_params.hpp
index 7e00157..ac8656a 100644
--- a/tests/src/params/trigger_params.hpp
+++ b/tests/src/params/trigger_params.hpp
@@ -1,6 +1,7 @@
 #pragma once
 
-#include "interfaces/trigger_types.hpp"
+#include "types/milliseconds.hpp"
+#include "types/trigger_types.hpp"
 
 #include <sdbusplus/message.hpp>
 
@@ -88,12 +89,10 @@
 
     LabeledTriggerThresholdParams labeledThresholdsProperty =
         std::vector<numeric::LabeledThresholdParam>{
+            numeric::LabeledThresholdParam{numeric::Type::lowerCritical,
+                                           Milliseconds(10).count(),
+                                           numeric::Direction::decreasing, 0.5},
             numeric::LabeledThresholdParam{
-                numeric::Type::lowerCritical,
-                std::chrono::milliseconds(10).count(),
-                numeric::Direction::decreasing, 0.5},
-            numeric::LabeledThresholdParam{
-                numeric::Type::upperCritical,
-                std::chrono::milliseconds(10).count(),
+                numeric::Type::upperCritical, Milliseconds(10).count(),
                 numeric::Direction::increasing, 90.2}};
 };