@@ -121,8 +121,7 @@ instance ToJSON DataSet where
121 ("minStartTimeNs" .=) <$> _dsMinStartTimeNs,
121 ("minStartTimeNs" .=) <$> _dsMinStartTimeNs,
122 ("maxEndTimeNs" .=) <$> _dsMaxEndTimeNs])
122 ("maxEndTimeNs" .=) <$> _dsMaxEndTimeNs])
125−-- google3\/java\/com\/google\/android\/apps\/heart\/platform\/api\/Application.java
127-- /See:/ 'application' smart constructor.
126-- /See:/ 'application' smart constructor.
128data Application = Application'
127data Application = Application'
@@ -339,16 +338,18 @@ instance ToJSON BucketByActivity where
339 ("activityDataSourceId" .=) <$>
338 ("activityDataSourceId" .=) <$>
340 _bbaActivityDataSourceId])
339 _bbaActivityDataSourceId])
343-- /See:/ 'aggregateRequest' smart constructor.
343-- /See:/ 'aggregateRequest' smart constructor.
344data AggregateRequest = AggregateRequest'
344data AggregateRequest = AggregateRequest'
345− { _arEndTimeMillis :: !(Maybe (Textual Int64))
345+ { _arEndTimeMillis :: !(Maybe (Textual Int64))
346+ , _arFilteredDataQualityStandard :: !(Maybe [AggregateRequestFilteredDataQualityStandardItem])
346− , _arAggregateBy :: !(Maybe [AggregateBy])
347+ , _arAggregateBy :: !(Maybe [AggregateBy])
347− , _arBucketBySession :: !(Maybe BucketBySession)
348+ , _arBucketBySession :: !(Maybe BucketBySession)
348− , _arBucketByActivityType :: !(Maybe BucketByActivity)
349+ , _arBucketByActivityType :: !(Maybe BucketByActivity)
349− , _arBucketByTime :: !(Maybe BucketByTime)
350+ , _arBucketByTime :: !(Maybe BucketByTime)
350− , _arStartTimeMillis :: !(Maybe (Textual Int64))
351+ , _arStartTimeMillis :: !(Maybe (Textual Int64))
351− , _arBucketByActivitySegment :: !(Maybe BucketByActivity)
352+ , _arBucketByActivitySegment :: !(Maybe BucketByActivity)
352 } deriving (Eq,Show,Data,Typeable,Generic)
353 } deriving (Eq,Show,Data,Typeable,Generic)
354-- | Creates a value of 'AggregateRequest' with the minimum fields required to make a request.
355-- | Creates a value of 'AggregateRequest' with the minimum fields required to make a request.
@@ -357,6 +358,8 @@ data AggregateRequest = AggregateRequest'
358-- * 'arEndTimeMillis'
359-- * 'arEndTimeMillis'
361+-- * 'arFilteredDataQualityStandard'
360-- * 'arAggregateBy'
363-- * 'arAggregateBy'
362-- * 'arBucketBySession'
365-- * 'arBucketBySession'
@@ -373,6 +376,7 @@ aggregateRequest
373aggregateRequest =
376aggregateRequest =
374 AggregateRequest'
377 AggregateRequest'
375 { _arEndTimeMillis = Nothing
378 { _arEndTimeMillis = Nothing
379+ , _arFilteredDataQualityStandard = Nothing
376 , _arAggregateBy = Nothing
380 , _arAggregateBy = Nothing
377 , _arBucketBySession = Nothing
381 , _arBucketBySession = Nothing
378 , _arBucketByActivityType = Nothing
382 , _arBucketByActivityType = Nothing
@@ -389,6 +393,16 @@ arEndTimeMillis
389 (\ s a -> s{_arEndTimeMillis = a})
393 (\ s a -> s{_arEndTimeMillis = a})
390 . mapping _Coerce
394 . mapping _Coerce
396+-- | A list of acceptable data quality standards. Only data points which
397+-- conform to at least one of the specified data quality standards will be
398+-- returned. If the list is empty, all data points are returned.
399+arFilteredDataQualityStandard :: Lens' AggregateRequest [AggregateRequestFilteredDataQualityStandardItem]
400+arFilteredDataQualityStandard
401+ = lens _arFilteredDataQualityStandard
402+ (\ s a -> s{_arFilteredDataQualityStandard = a})
392-- | The specification of data to be aggregated. At least one aggregateBy
406-- | The specification of data to be aggregated. At least one aggregateBy
393-- spec must be provided. All data that is specified will be aggregated
407-- spec must be provided. All data that is specified will be aggregated
394-- using the same bucketing criteria. There will be one dataset in the
408-- using the same bucketing criteria. There will be one dataset in the
@@ -450,7 +464,8 @@ instance FromJSON AggregateRequest where
451 AggregateRequest' <$>
465 AggregateRequest' <$>
452 (o .:? "endTimeMillis") <*>
466 (o .:? "endTimeMillis") <*>
467+ (o .:? "filteredDataQualityStandard" .!= mempty)
453− (o .:? "aggregateBy" .!= mempty)
468+ <*> (o .:? "aggregateBy" .!= mempty)
454 <*> (o .:? "bucketBySession")
469 <*> (o .:? "bucketBySession")
455 <*> (o .:? "bucketByActivityType")
470 <*> (o .:? "bucketByActivityType")
456 <*> (o .:? "bucketByTime")
471 <*> (o .:? "bucketByTime")
@@ -462,6 +477,8 @@ instance ToJSON AggregateRequest where
463 (catMaybes
478 (catMaybes
464 [("endTimeMillis" .=) <$> _arEndTimeMillis,
479 [("endTimeMillis" .=) <$> _arEndTimeMillis,
480+ ("filteredDataQualityStandard" .=) <$>
481+ _arFilteredDataQualityStandard,
465 ("aggregateBy" .=) <$> _arAggregateBy,
482 ("aggregateBy" .=) <$> _arAggregateBy,
466 ("bucketBySession" .=) <$> _arBucketBySession,
483 ("bucketBySession" .=) <$> _arBucketBySession,
467 ("bucketByActivityType" .=) <$>
484 ("bucketByActivityType" .=) <$>
@@ -828,6 +845,7 @@ instance ToJSON DataPoint where
828data ListSessionsResponse = ListSessionsResponse'
845data ListSessionsResponse = ListSessionsResponse'
829 { _lsrNextPageToken :: !(Maybe Text)
846 { _lsrNextPageToken :: !(Maybe Text)
830 , _lsrDeletedSession :: !(Maybe [Session])
847 , _lsrDeletedSession :: !(Maybe [Session])
848+ , _lsrHasMoreData :: !(Maybe Bool)
831 , _lsrSession :: !(Maybe [Session])
849 , _lsrSession :: !(Maybe [Session])
832 } deriving (Eq,Show,Data,Typeable,Generic)
850 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -839,6 +857,8 @@ data ListSessionsResponse = ListSessionsResponse'
840-- * 'lsrDeletedSession'
858-- * 'lsrDeletedSession'
860+-- * 'lsrHasMoreData'
842-- * 'lsrSession'
862-- * 'lsrSession'
843listSessionsResponse
863listSessionsResponse
844 :: ListSessionsResponse
864 :: ListSessionsResponse
@@ -846,6 +866,7 @@ listSessionsResponse =
846 ListSessionsResponse'
866 ListSessionsResponse'
847 { _lsrNextPageToken = Nothing
867 { _lsrNextPageToken = Nothing
848 , _lsrDeletedSession = Nothing
868 , _lsrDeletedSession = Nothing
869+ , _lsrHasMoreData = Nothing
849 , _lsrSession = Nothing
870 , _lsrSession = Nothing
@@ -867,6 +888,12 @@ lsrDeletedSession
867 . _Default
888 . _Default
868 . _Coerce
889 . _Coerce
891+-- | Flag to indicate server has more data to transfer
892+lsrHasMoreData :: Lens' ListSessionsResponse (Maybe Bool)
894+ = lens _lsrHasMoreData
895+ (\ s a -> s{_lsrHasMoreData = a})
870-- | Sessions with an end time that is between startTime and endTime of the
897-- | Sessions with an end time that is between startTime and endTime of the
871-- request.
898-- request.
872lsrSession :: Lens' ListSessionsResponse [Session]
899lsrSession :: Lens' ListSessionsResponse [Session]
@@ -882,6 +909,7 @@ instance FromJSON ListSessionsResponse where
882 ListSessionsResponse' <$>
909 ListSessionsResponse' <$>
883 (o .:? "nextPageToken") <*>
910 (o .:? "nextPageToken") <*>
884 (o .:? "deletedSession" .!= mempty)
911 (o .:? "deletedSession" .!= mempty)
912+ <*> (o .:? "hasMoreData")
885 <*> (o .:? "session" .!= mempty))
913 <*> (o .:? "session" .!= mempty))
887instance ToJSON ListSessionsResponse where
915instance ToJSON ListSessionsResponse where
@@ -890,6 +918,7 @@ instance ToJSON ListSessionsResponse where
890 (catMaybes
918 (catMaybes
891 [("nextPageToken" .=) <$> _lsrNextPageToken,
919 [("nextPageToken" .=) <$> _lsrNextPageToken,
892 ("deletedSession" .=) <$> _lsrDeletedSession,
920 ("deletedSession" .=) <$> _lsrDeletedSession,
921+ ("hasMoreData" .=) <$> _lsrHasMoreData,
893 ("session" .=) <$> _lsrSession])
922 ("session" .=) <$> _lsrSession])
@@ -1144,13 +1173,14 @@ instance ToJSON DataTypeField where
1145-- /See:/ 'dataSource' smart constructor.
1174-- /See:/ 'dataSource' smart constructor.
1146data DataSource = DataSource'
1175data DataSource = DataSource'
1147− { _dsApplication :: !(Maybe Application)
1176+ { _dsApplication :: !(Maybe Application)
1148− , _dsDevice :: !(Maybe Device)
1177+ , _dsDevice :: !(Maybe Device)
1178+ , _dsDataQualityStandard :: !(Maybe [DataSourceDataQualityStandardItem])
1149− , _dsName :: !(Maybe Text)
1179+ , _dsName :: !(Maybe Text)
1150− , _dsDataType :: !(Maybe DataType)
1180+ , _dsDataType :: !(Maybe DataType)
1151− , _dsType :: !(Maybe DataSourceType)
1181+ , _dsType :: !(Maybe DataSourceType)
1152− , _dsDataStreamName :: !(Maybe Text)
1182+ , _dsDataStreamName :: !(Maybe Text)
1153− , _dsDataStreamId :: !(Maybe Text)
1183+ , _dsDataStreamId :: !(Maybe Text)
1154 } deriving (Eq,Show,Data,Typeable,Generic)
1184 } deriving (Eq,Show,Data,Typeable,Generic)
1156-- | Creates a value of 'DataSource' with the minimum fields required to make a request.
1186-- | Creates a value of 'DataSource' with the minimum fields required to make a request.
@@ -1161,6 +1191,8 @@ data DataSource = DataSource'
1162-- * 'dsDevice'
1192-- * 'dsDevice'
1194+-- * 'dsDataQualityStandard'
1164-- * 'dsName'
1196-- * 'dsName'
1166-- * 'dsDataType'
1198-- * 'dsDataType'
@@ -1176,6 +1208,7 @@ dataSource =
1176 DataSource'
1208 DataSource'
1177 { _dsApplication = Nothing
1209 { _dsApplication = Nothing
1178 , _dsDevice = Nothing
1210 , _dsDevice = Nothing
1211+ , _dsDataQualityStandard = Nothing
1179 , _dsName = Nothing
1212 , _dsName = Nothing
1180 , _dsDataType = Nothing
1213 , _dsDataType = Nothing
1181 , _dsType = Nothing
1214 , _dsType = Nothing
@@ -1195,6 +1228,14 @@ dsApplication
1195dsDevice :: Lens' DataSource (Maybe Device)
1228dsDevice :: Lens' DataSource (Maybe Device)
1196dsDevice = lens _dsDevice (\ s a -> s{_dsDevice = a})
1229dsDevice = lens _dsDevice (\ s a -> s{_dsDevice = a})
1232+dsDataQualityStandard :: Lens' DataSource [DataSourceDataQualityStandardItem]
1233+dsDataQualityStandard
1234+ = lens _dsDataQualityStandard
1235+ (\ s a -> s{_dsDataQualityStandard = a})
1198-- | An end-user visible name for this data source.
1239-- | An end-user visible name for this data source.
1199dsName :: Lens' DataSource (Maybe Text)
1240dsName :: Lens' DataSource (Maybe Text)
1200dsName = lens _dsName (\ s a -> s{_dsName = a})
1241dsName = lens _dsName (\ s a -> s{_dsName = a})
@@ -1255,7 +1296,8 @@ instance FromJSON DataSource where
1256 DataSource' <$>
1297 DataSource' <$>
1257 (o .:? "application") <*> (o .:? "device") <*>
1298 (o .:? "application") <*> (o .:? "device") <*>
1299+ (o .:? "dataQualityStandard" .!= mempty)
1258− (o .:? "name")
1300+ <*> (o .:? "name")
1259 <*> (o .:? "dataType")
1301 <*> (o .:? "dataType")
1260 <*> (o .:? "type")
1302 <*> (o .:? "type")
1261 <*> (o .:? "dataStreamName")
1303 <*> (o .:? "dataStreamName")
@@ -1266,12 +1308,71 @@ instance ToJSON DataSource where
1266 = object
1308 = object
1267 (catMaybes
1309 (catMaybes
1268 [("application" .=) <$> _dsApplication,
1310 [("application" .=) <$> _dsApplication,
1269− ("device" .=) <$> _dsDevice, ("name" .=) <$> _dsName,
1311+ ("device" .=) <$> _dsDevice,
1312+ ("dataQualityStandard" .=) <$>
1313+ _dsDataQualityStandard,
1314+ ("name" .=) <$> _dsName,
1270 ("dataType" .=) <$> _dsDataType,
1315 ("dataType" .=) <$> _dsDataType,
1271 ("type" .=) <$> _dsType,
1316 ("type" .=) <$> _dsType,
1272 ("dataStreamName" .=) <$> _dsDataStreamName,
1317 ("dataStreamName" .=) <$> _dsDataStreamName,
1273 ("dataStreamId" .=) <$> _dsDataStreamId])
1318 ("dataStreamId" .=) <$> _dsDataStreamId])
1321+-- /See:/ 'bucketByTimePeriod' smart constructor.
1322+data BucketByTimePeriod = BucketByTimePeriod'
1323+ { _bbtpValue :: !(Maybe (Textual Int32))
1324+ , _bbtpType :: !(Maybe BucketByTimePeriodType)
1325+ , _bbtpTimeZoneId :: !(Maybe Text)
1326+ } deriving (Eq,Show,Data,Typeable,Generic)
1328+-- | Creates a value of 'BucketByTimePeriod' with the minimum fields required to make a request.
1330+-- Use one of the following lenses to modify other fields as desired:
1336+-- * 'bbtpTimeZoneId'
1338+ :: BucketByTimePeriod
1339+bucketByTimePeriod =
1340+ BucketByTimePeriod'
1341+ { _bbtpValue = Nothing
1342+ , _bbtpType = Nothing
1343+ , _bbtpTimeZoneId = Nothing
1346+bbtpValue :: Lens' BucketByTimePeriod (Maybe Int32)
1348+ = lens _bbtpValue (\ s a -> s{_bbtpValue = a}) .
1351+bbtpType :: Lens' BucketByTimePeriod (Maybe BucketByTimePeriodType)
1352+bbtpType = lens _bbtpType (\ s a -> s{_bbtpType = a})
1354+-- | org.joda.timezone.DateTimeZone
1355+bbtpTimeZoneId :: Lens' BucketByTimePeriod (Maybe Text)
1357+ = lens _bbtpTimeZoneId
1358+ (\ s a -> s{_bbtpTimeZoneId = a})
1360+instance FromJSON BucketByTimePeriod where
1362+ = withObject "BucketByTimePeriod"
1364+ BucketByTimePeriod' <$>
1365+ (o .:? "value") <*> (o .:? "type") <*>
1366+ (o .:? "timeZoneId"))
1368+instance ToJSON BucketByTimePeriod where
1369+ toJSON BucketByTimePeriod'{..}
1372+ [("value" .=) <$> _bbtpValue,
1373+ ("type" .=) <$> _bbtpType,
1374+ ("timeZoneId" .=) <$> _bbtpTimeZoneId])
1276-- /See:/ 'valueMapValEntry' smart constructor.
1377-- /See:/ 'valueMapValEntry' smart constructor.
1277data ValueMapValEntry = ValueMapValEntry'
1378data ValueMapValEntry = ValueMapValEntry'
@@ -1317,22 +1418,30 @@ instance ToJSON ValueMapValEntry where
1319-- /See:/ 'bucketByTime' smart constructor.
1420-- /See:/ 'bucketByTime' smart constructor.
1320−newtype BucketByTime = BucketByTime'
1421+data BucketByTime = BucketByTime'
1422+ { _bbtPeriod :: !(Maybe BucketByTimePeriod)
1321− { _bbtDurationMillis :: Maybe (Textual Int64)
1423+ , _bbtDurationMillis :: !(Maybe (Textual Int64))
1322 } deriving (Eq,Show,Data,Typeable,Generic)
1424 } deriving (Eq,Show,Data,Typeable,Generic)
1324-- | Creates a value of 'BucketByTime' with the minimum fields required to make a request.
1426-- | Creates a value of 'BucketByTime' with the minimum fields required to make a request.
1326-- Use one of the following lenses to modify other fields as desired:
1428-- Use one of the following lenses to modify other fields as desired:
1328-- * 'bbtDurationMillis'
1432-- * 'bbtDurationMillis'
1329bucketByTime
1433bucketByTime
1330 :: BucketByTime
1434 :: BucketByTime
1331bucketByTime =
1435bucketByTime =
1332 BucketByTime'
1436 BucketByTime'
1437+ { _bbtPeriod = Nothing
1333− { _bbtDurationMillis = Nothing
1438+ , _bbtDurationMillis = Nothing
1441+bbtPeriod :: Lens' BucketByTime (Maybe BucketByTimePeriod)
1443+ = lens _bbtPeriod (\ s a -> s{_bbtPeriod = a})
1336-- | Specifies that result buckets aggregate data by exactly durationMillis
1445-- | Specifies that result buckets aggregate data by exactly durationMillis
1337-- time frames. Time frames that contain no data will be included in the
1446-- time frames. Time frames that contain no data will be included in the
1338-- response with an empty dataset.
1447-- response with an empty dataset.
@@ -1345,16 +1454,18 @@ bbtDurationMillis
1345instance FromJSON BucketByTime where
1454instance FromJSON BucketByTime where
1346 parseJSON
1455 parseJSON
1347 = withObject "BucketByTime"
1456 = withObject "BucketByTime"
1348− (\ o -> BucketByTime' <$> (o .:? "durationMillis"))
1458+ BucketByTime' <$>
1459+ (o .:? "period") <*> (o .:? "durationMillis"))
1350instance ToJSON BucketByTime where
1461instance ToJSON BucketByTime where
1351 toJSON BucketByTime'{..}
1462 toJSON BucketByTime'{..}
1352 = object
1463 = object
1353 (catMaybes
1464 (catMaybes
1465+ [("period" .=) <$> _bbtPeriod,
1354− [("durationMillis" .=) <$> _bbtDurationMillis])
1466+ ("durationMillis" .=) <$> _bbtDurationMillis])
1357−-- google3\/java\/com\/google\/android\/apps\/heart\/platform\/api\/DataType.java
1359-- /See:/ 'dataType' smart constructor.
1470-- /See:/ 'dataType' smart constructor.
1360data DataType = DataType'
1471data DataType = DataType'