Api changes in AddReportFuture version

Added support for CollectionFunction, CollectionDuration,
CollectionTimeScope, ReportUpdates, AppendLimit.

New API separates Id and Name, user can decide to pass only Name
to auto generate Id or pass Id which needs to be unique.

Tested:
- No functional changes to old API, everything works as before
- All use cases can be replaced with new API to achieve same results
- New features which require new API work as expected

Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I647efab36d90a548754f89968223e162a087481e
diff --git a/src/types/operation_type.hpp b/src/types/operation_type.hpp
index 5665e79..29bceb4 100644
--- a/src/types/operation_type.hpp
+++ b/src/types/operation_type.hpp
@@ -22,13 +22,13 @@
     convDataOperationType = {
         {std::make_pair<std::string_view, OperationType>("SINGLE",
                                                          OperationType::single),
-         std::make_pair<std::string_view, OperationType>("MAX",
+         std::make_pair<std::string_view, OperationType>("Maximum",
                                                          OperationType::max),
-         std::make_pair<std::string_view, OperationType>("MIN",
+         std::make_pair<std::string_view, OperationType>("Minimum",
                                                          OperationType::min),
-         std::make_pair<std::string_view, OperationType>("AVG",
+         std::make_pair<std::string_view, OperationType>("Average",
                                                          OperationType::avg),
-         std::make_pair<std::string_view, OperationType>("SUM",
+         std::make_pair<std::string_view, OperationType>("Summation",
                                                          OperationType::sum)}};
 
 inline OperationType
diff --git a/src/types/report_types.cpp b/src/types/report_types.cpp
index f6979cc..47add24 100644
--- a/src/types/report_types.cpp
+++ b/src/types/report_types.cpp
@@ -13,12 +13,13 @@
                 utils::transform(
                     metricParams.at_label<ts::SensorPath>(),
                     [](const LabeledSensorParameters& sensorParameters) {
-                        return sdbusplus::message::object_path(
-                            sensorParameters.at_label<ts::Path>());
+                        return std::tuple<sdbusplus::message::object_path,
+                                          std::string>(
+                            sensorParameters.at_label<ts::Path>(),
+                            sensorParameters.at_label<ts::Metadata>());
                     }),
                 utils::enumToString(metricParams.at_label<ts::OperationType>()),
                 metricParams.at_label<ts::Id>(),
-                metricParams.at_label<ts::MetricMetadata>(),
                 utils::enumToString(
                     metricParams.at_label<ts::CollectionTimeScope>()),
                 metricParams.at_label<ts::CollectionDuration>().t.count());
diff --git a/src/types/report_types.hpp b/src/types/report_types.hpp
index 9d4a160..978fd18 100644
--- a/src/types/report_types.hpp
+++ b/src/types/report_types.hpp
@@ -18,20 +18,21 @@
     std::vector<std::tuple<sdbusplus::message::object_path, std::string,
                            std::string, std::string>>;
 
-using ReadingParameters = std::vector<
-    std::tuple<std::vector<sdbusplus::message::object_path>, std::string,
-               std::string, std::string, std::string, uint64_t>>;
+using ReadingParameters = std::vector<std::tuple<
+    std::vector<std::tuple<sdbusplus::message::object_path, std::string>>,
+    std::string, std::string, std::string, uint64_t>>;
 
 using LabeledSensorParameters =
-    utils::LabeledTuple<std::tuple<std::string, std::string>,
-                        utils::tstring::Service, utils::tstring::Path>;
+    utils::LabeledTuple<std::tuple<std::string, std::string, std::string>,
+                        utils::tstring::Service, utils::tstring::Path,
+                        utils::tstring::Metadata>;
 
 using LabeledMetricParameters = utils::LabeledTuple<
     std::tuple<std::vector<LabeledSensorParameters>, OperationType, std::string,
-               std::string, CollectionTimeScope, CollectionDuration>,
+               CollectionTimeScope, CollectionDuration>,
     utils::tstring::SensorPath, utils::tstring::OperationType,
-    utils::tstring::Id, utils::tstring::MetricMetadata,
-    utils::tstring::CollectionTimeScope, utils::tstring::CollectionDuration>;
+    utils::tstring::Id, utils::tstring::CollectionTimeScope,
+    utils::tstring::CollectionDuration>;
 
 using ReadingData = std::tuple<std::string, std::string, double, uint64_t>;
 
diff --git a/src/types/trigger_types.hpp b/src/types/trigger_types.hpp
index 0ad9087..b21e8eb 100644
--- a/src/types/trigger_types.hpp
+++ b/src/types/trigger_types.hpp
@@ -138,7 +138,7 @@
 using LabeledSensorInfo =
     utils::LabeledTuple<std::tuple<std::string, std::string, std::string>,
                         utils::tstring::Service, utils::tstring::SensorPath,
-                        utils::tstring::SensorMetadata>;
+                        utils::tstring::Metadata>;
 
 using TriggerThresholdParamsExt =
     std::variant<std::monostate, std::vector<numeric::ThresholdParam>,