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.

Change-Id: I9cc906cc1fa7cdf27be7e433390c516f6bae3c50
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/src/types/collection_duration.hpp b/src/types/collection_duration.hpp
new file mode 100644
index 0000000..dc70d4f
--- /dev/null
+++ b/src/types/collection_duration.hpp
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <boost/serialization/strong_typedef.hpp>
+#include <nlohmann/json.hpp>
+
+#include <chrono>
+
+BOOST_STRONG_TYPEDEF(std::chrono::milliseconds, CollectionDuration)
+
+inline void to_json(nlohmann::json& json, const CollectionDuration& value)
+{
+    json = value.t.count();
+}
+
+inline void from_json(const nlohmann::json& json, CollectionDuration& value)
+{
+    value = CollectionDuration(std::chrono::milliseconds(json.get<uint64_t>()));
+}
diff --git a/src/types/collection_time_scope.hpp b/src/types/collection_time_scope.hpp
new file mode 100644
index 0000000..d2694d2
--- /dev/null
+++ b/src/types/collection_time_scope.hpp
@@ -0,0 +1,46 @@
+#pragma once
+
+#include "utils/conversion.hpp"
+
+#include <array>
+#include <cstdint>
+#include <string_view>
+#include <type_traits>
+
+enum class CollectionTimeScope : uint32_t
+{
+    point,
+    interval,
+    startup
+};
+
+namespace utils
+{
+
+constexpr std::array<std::pair<std::string_view, CollectionTimeScope>, 3>
+    convDataCollectionTimeScope = {
+        {std::make_pair<std::string_view, CollectionTimeScope>(
+             "Point", CollectionTimeScope::point),
+         std::make_pair<std::string_view, CollectionTimeScope>(
+             "Interval", CollectionTimeScope::interval),
+         std::make_pair<std::string_view, CollectionTimeScope>(
+             "StartupInterval", CollectionTimeScope::startup)}};
+
+inline CollectionTimeScope
+    toCollectionTimeScope(std::underlying_type_t<CollectionTimeScope> value)
+{
+    return toEnum<CollectionTimeScope, CollectionTimeScope::point,
+                  CollectionTimeScope::startup>(value);
+}
+
+inline CollectionTimeScope stringToCollectionTimeScope(const std::string& value)
+{
+    return stringToEnum(convDataCollectionTimeScope, value);
+}
+
+inline std::string enumToString(CollectionTimeScope value)
+{
+    return std::string(enumToString(convDataCollectionTimeScope, value));
+}
+
+} // namespace utils
\ No newline at end of file
diff --git a/src/types/operation_type.hpp b/src/types/operation_type.hpp
new file mode 100644
index 0000000..a4f085c
--- /dev/null
+++ b/src/types/operation_type.hpp
@@ -0,0 +1,51 @@
+#pragma once
+
+#include "utils/conversion.hpp"
+
+#include <array>
+#include <cstdint>
+#include <string_view>
+
+enum class OperationType : uint32_t
+{
+    single,
+    max,
+    min,
+    avg,
+    sum
+};
+
+namespace utils
+{
+
+constexpr std::array<std::pair<std::string_view, OperationType>, 5>
+    convDataOperationType = {
+        {std::make_pair<std::string_view, OperationType>("SINGLE",
+                                                         OperationType::single),
+         std::make_pair<std::string_view, OperationType>("MAX",
+                                                         OperationType::max),
+         std::make_pair<std::string_view, OperationType>("MIN",
+                                                         OperationType::min),
+         std::make_pair<std::string_view, OperationType>("AVG",
+                                                         OperationType::avg),
+         std::make_pair<std::string_view, OperationType>("SUM",
+                                                         OperationType::sum)}};
+
+inline OperationType
+    toOperationType(std::underlying_type_t<OperationType> value)
+{
+    return toEnum<OperationType, OperationType::single, OperationType::sum>(
+        value);
+}
+
+inline OperationType stringToOperationType(const std::string& value)
+{
+    return stringToEnum(convDataOperationType, value);
+}
+
+inline std::string enumToString(OperationType value)
+{
+    return std::string(enumToString(convDataOperationType, value));
+}
+
+} // namespace utils
diff --git a/src/types/types.hpp b/src/types/types.hpp
new file mode 100644
index 0000000..93f3b27
--- /dev/null
+++ b/src/types/types.hpp
@@ -0,0 +1,38 @@
+#pragma once
+
+#include "types/collection_duration.hpp"
+#include "types/collection_time_scope.hpp"
+#include "types/operation_type.hpp"
+#include "utils/labeled_tuple.hpp"
+#include "utils/tstring.hpp"
+
+#include <sdbusplus/message/types.hpp>
+
+#include <chrono>
+#include <string>
+#include <tuple>
+#include <type_traits>
+#include <vector>
+
+using ReadingParametersPastVersion =
+    std::vector<std::tuple<sdbusplus::message::object_path, std::string,
+                           std::string, std::string>>;
+
+using ReadingParameters =
+    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>;
+
+using LabeledMetricParameters = utils::LabeledTuple<
+    std::tuple<LabeledSensorParameters, OperationType, std::string, std::string,
+               CollectionTimeScope, CollectionDuration>,
+    utils::tstring::SensorPath, utils::tstring::OperationType,
+    utils::tstring::Id, utils::tstring::MetricMetadata,
+    utils::tstring::CollectionTimeScope, utils::tstring::CollectionDuration>;
+
+using Readings = std::tuple<
+    uint64_t,
+    std::vector<std::tuple<std::string, std::string, double, uint64_t>>>;