Using enum class instead of string in more places

ReportingType and ReportUpdates are now used as enum class in more
places than before. Changed how this two fields are stored in
persistent configuration. Increased Report::Version to break backward
compatibility. Updated unit tests to verify changed functionality.

Tested:
- All existing tests are passing

Change-Id: I55db205aefbe2b5a69fb7a31ccf11885aaecaaf2
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/src/report_factory.cpp b/src/report_factory.cpp
index 6c61cbe..57126b7 100644
--- a/src/report_factory.cpp
+++ b/src/report_factory.cpp
@@ -17,10 +17,9 @@
 {}
 
 std::unique_ptr<interfaces::Report> ReportFactory::make(
-    const std::string& name, const std::string& reportingTypeStr,
-    bool emitsReadingsSignal, bool logToMetricReportsCollection,
-    Milliseconds period, uint64_t appendLimit,
-    const std::string& reportUpdatesStr,
+    const std::string& name, const ReportingType reportingType,
+    const std::vector<ReportAction>& reportActions, Milliseconds period,
+    uint64_t appendLimit, const ReportUpdates reportUpdates,
     interfaces::ReportManager& reportManager,
     interfaces::JsonStorage& reportStorage,
     std::vector<LabeledMetricParameters> labeledMetricParams,
@@ -41,12 +40,8 @@
                 std::make_unique<Clock>());
         });
 
-    const ReportingType reportingType = stringToReportingType(reportingTypeStr);
-    const ReportUpdates reportUpdates = stringToReportUpdates(reportUpdatesStr);
-
     return std::make_unique<Report>(bus->get_io_context(), objServer, name,
-                                    reportingType, emitsReadingsSignal,
-                                    logToMetricReportsCollection, period,
+                                    reportingType, reportActions, period,
                                     appendLimit, reportUpdates, reportManager,
                                     reportStorage, std::move(metrics), enabled);
 }
@@ -99,9 +94,8 @@
         }
 
         return LabeledMetricParameters(
-            std::move(sensorParameters),
-            utils::stringToOperationType(operationType), id, metadata,
-            utils::stringToCollectionTimeScope(collectionTimeScope),
+            std::move(sensorParameters), utils::toOperationType(operationType),
+            id, metadata, utils::toCollectionTimeScope(collectionTimeScope),
             CollectionDuration(Milliseconds(collectionDuration)));
     });
 }