[registry] Add aggregation_type field to ReportDefinition

Change-Id: I8b455a8258f1c48d4d8bf89576d48e260c45b6e1
diff --git a/config/report_definition.proto b/config/report_definition.proto
index e0c104d..62bee14 100644
--- a/config/report_definition.proto
+++ b/config/report_definition.proto
@@ -287,6 +287,7 @@
     //    - candidate_list # All known component names.
     //    - candidate_file # File with all known component names.
     //    - window_size # A list of window sizes in days
+    //    - aggregation_type # How numeric values should be aggregated on-device
     //
     // Report row type: PerDeviceNumericStatsReportRow.
     // (See report_row.proto)
@@ -414,6 +415,29 @@
   // with the same ObservationMetadata.
   uint32 reporting_threshold = 13;
 
+  // How to aggregate numeric values on a device.
+  enum OnDeviceAggregationType {
+    // Sum the values.
+    SUM = 0;
+
+    // Take the minimum value.
+    MIN = 1;
+
+    // Take the maximum value.
+    MAX = 2;
+  }
+
+  // This field is required for the PER_DEVICE_NUMERIC_STATS report type.
+  // It is not used with any other report type.
+  //
+  // Used to specify how numeric values should be aggregated on-device.
+  // If SUM is chosen, each device will generate an Observation containing
+  // the sum of logged numeric values over a specified aggregation window.
+  // If MIN (resp., MAX) is chosen, an Observation for this report will
+  // contain the minimum (resp., maximum) numeric value logged during the
+  // aggregation window.
+  OnDeviceAggregationType aggregation_type = 14;
+
   ///////////////////  Fields used by all metric types ///////////////////
 
   // The list of SystemProfileFields to include in each row of the report.