@@ -121,8 +121,7 @@ instance ToJSON DataSet where
121121 ("minStartTimeNs" .=) <$> _dsMinStartTimeNs,
122122 ("maxEndTimeNs" .=) <$> _dsMaxEndTimeNs])
123123
124−-- | See:
125−-- google3\/java\/com\/google\/android\/apps\/heart\/platform\/api\/Application.java
124+-- |
126125--
127126-- /See:/ 'application' smart constructor.
128127data Application = Application'
@@ -339,16 +338,18 @@ instance ToJSON BucketByActivity where
339338 ("activityDataSourceId" .=) <$>
340339 _bbaActivityDataSourceId])
341340
341+-- | Next id: 10
342342--
343343-- /See:/ 'aggregateRequest' smart constructor.
344344data AggregateRequest = AggregateRequest'
345− { _arEndTimeMillis :: !(Maybe (Textual Int64))
346− , _arAggregateBy :: !(Maybe [AggregateBy])
347− , _arBucketBySession :: !(Maybe BucketBySession)
348− , _arBucketByActivityType :: !(Maybe BucketByActivity)
349− , _arBucketByTime :: !(Maybe BucketByTime)
350− , _arStartTimeMillis :: !(Maybe (Textual Int64))
351− , _arBucketByActivitySegment :: !(Maybe BucketByActivity)
345+ { _arEndTimeMillis :: !(Maybe (Textual Int64))
346+ , _arFilteredDataQualityStandard :: !(Maybe [AggregateRequestFilteredDataQualityStandardItem])
347+ , _arAggregateBy :: !(Maybe [AggregateBy])
348+ , _arBucketBySession :: !(Maybe BucketBySession)
349+ , _arBucketByActivityType :: !(Maybe BucketByActivity)
350+ , _arBucketByTime :: !(Maybe BucketByTime)
351+ , _arStartTimeMillis :: !(Maybe (Textual Int64))
352+ , _arBucketByActivitySegment :: !(Maybe BucketByActivity)
352353 } deriving (Eq,Show,Data,Typeable,Generic)
353354
354355-- | Creates a value of 'AggregateRequest' with the minimum fields required to make a request.
@@ -357,6 +358,8 @@ data AggregateRequest = AggregateRequest'
357358--
358359-- * 'arEndTimeMillis'
359360--
361+-- * 'arFilteredDataQualityStandard'
362+--
360363-- * 'arAggregateBy'
361364--
362365-- * 'arBucketBySession'
@@ -373,6 +376,7 @@ aggregateRequest
373376aggregateRequest =
374377 AggregateRequest'
375378 { _arEndTimeMillis = Nothing
379+ , _arFilteredDataQualityStandard = Nothing
376380 , _arAggregateBy = Nothing
377381 , _arBucketBySession = Nothing
378382 , _arBucketByActivityType = Nothing
@@ -389,6 +393,16 @@ arEndTimeMillis
389393 (\ s a -> s{_arEndTimeMillis = a})
390394 . mapping _Coerce
391395
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})
403+ . _Default
404+ . _Coerce
405+
392406-- | The specification of data to be aggregated. At least one aggregateBy
393407-- spec must be provided. All data that is specified will be aggregated
394408-- using the same bucketing criteria. There will be one dataset in the
@@ -450,7 +464,8 @@ instance FromJSON AggregateRequest where
450464 (\ o ->
451465 AggregateRequest' <$>
452466 (o .:? "endTimeMillis") <*>
453− (o .:? "aggregateBy" .!= mempty)
467+ (o .:? "filteredDataQualityStandard" .!= mempty)
468+ <*> (o .:? "aggregateBy" .!= mempty)
454469 <*> (o .:? "bucketBySession")
455470 <*> (o .:? "bucketByActivityType")
456471 <*> (o .:? "bucketByTime")
@@ -462,6 +477,8 @@ instance ToJSON AggregateRequest where
462477 = object
463478 (catMaybes
464479 [("endTimeMillis" .=) <$> _arEndTimeMillis,
480+ ("filteredDataQualityStandard" .=) <$>
481+ _arFilteredDataQualityStandard,
465482 ("aggregateBy" .=) <$> _arAggregateBy,
466483 ("bucketBySession" .=) <$> _arBucketBySession,
467484 ("bucketByActivityType" .=) <$>
@@ -828,6 +845,7 @@ instance ToJSON DataPoint where
828845data ListSessionsResponse = ListSessionsResponse'
829846 { _lsrNextPageToken :: !(Maybe Text)
830847 , _lsrDeletedSession :: !(Maybe [Session])
848+ , _lsrHasMoreData :: !(Maybe Bool)
831849 , _lsrSession :: !(Maybe [Session])
832850 } deriving (Eq,Show,Data,Typeable,Generic)
833851
@@ -839,6 +857,8 @@ data ListSessionsResponse = ListSessionsResponse'
839857--
840858-- * 'lsrDeletedSession'
841859--
860+-- * 'lsrHasMoreData'
861+--
842862-- * 'lsrSession'
843863listSessionsResponse
844864 :: ListSessionsResponse
@@ -846,6 +866,7 @@ listSessionsResponse =
846866 ListSessionsResponse'
847867 { _lsrNextPageToken = Nothing
848868 , _lsrDeletedSession = Nothing
869+ , _lsrHasMoreData = Nothing
849870 , _lsrSession = Nothing
850871 }
851872
@@ -867,6 +888,12 @@ lsrDeletedSession
867888 . _Default
868889 . _Coerce
869890
891+-- | Flag to indicate server has more data to transfer
892+lsrHasMoreData :: Lens' ListSessionsResponse (Maybe Bool)
893+lsrHasMoreData
894+ = lens _lsrHasMoreData
895+ (\ s a -> s{_lsrHasMoreData = a})
896+
870897-- | Sessions with an end time that is between startTime and endTime of the
871898-- request.
872899lsrSession :: Lens' ListSessionsResponse [Session]
@@ -882,6 +909,7 @@ instance FromJSON ListSessionsResponse where
882909 ListSessionsResponse' <$>
883910 (o .:? "nextPageToken") <*>
884911 (o .:? "deletedSession" .!= mempty)
912+ <*> (o .:? "hasMoreData")
885913 <*> (o .:? "session" .!= mempty))
886914
887915instance ToJSON ListSessionsResponse where
@@ -890,6 +918,7 @@ instance ToJSON ListSessionsResponse where
890918 (catMaybes
891919 [("nextPageToken" .=) <$> _lsrNextPageToken,
892920 ("deletedSession" .=) <$> _lsrDeletedSession,
921+ ("hasMoreData" .=) <$> _lsrHasMoreData,
893922 ("session" .=) <$> _lsrSession])
894923
895924--
@@ -1144,13 +1173,14 @@ instance ToJSON DataTypeField where
11441173--
11451174-- /See:/ 'dataSource' smart constructor.
11461175data DataSource = DataSource'
1147− { _dsApplication :: !(Maybe Application)
1148− , _dsDevice :: !(Maybe Device)
1149− , _dsName :: !(Maybe Text)
1150− , _dsDataType :: !(Maybe DataType)
1151− , _dsType :: !(Maybe DataSourceType)
1152− , _dsDataStreamName :: !(Maybe Text)
1153− , _dsDataStreamId :: !(Maybe Text)
1176+ { _dsApplication :: !(Maybe Application)
1177+ , _dsDevice :: !(Maybe Device)
1178+ , _dsDataQualityStandard :: !(Maybe [DataSourceDataQualityStandardItem])
1179+ , _dsName :: !(Maybe Text)
1180+ , _dsDataType :: !(Maybe DataType)
1181+ , _dsType :: !(Maybe DataSourceType)
1182+ , _dsDataStreamName :: !(Maybe Text)
1183+ , _dsDataStreamId :: !(Maybe Text)
11541184 } deriving (Eq,Show,Data,Typeable,Generic)
11551185
11561186-- | Creates a value of 'DataSource' with the minimum fields required to make a request.
@@ -1161,6 +1191,8 @@ data DataSource = DataSource'
11611191--
11621192-- * 'dsDevice'
11631193--
1194+-- * 'dsDataQualityStandard'
1195+--
11641196-- * 'dsName'
11651197--
11661198-- * 'dsDataType'
@@ -1176,6 +1208,7 @@ dataSource =
11761208 DataSource'
11771209 { _dsApplication = Nothing
11781210 , _dsDevice = Nothing
1211+ , _dsDataQualityStandard = Nothing
11791212 , _dsName = Nothing
11801213 , _dsDataType = Nothing
11811214 , _dsType = Nothing
@@ -1195,6 +1228,14 @@ dsApplication
11951228dsDevice :: Lens' DataSource (Maybe Device)
11961229dsDevice = lens _dsDevice (\ s a -> s{_dsDevice = a})
11971230
1231+-- |
1232+dsDataQualityStandard :: Lens' DataSource [DataSourceDataQualityStandardItem]
1233+dsDataQualityStandard
1234+ = lens _dsDataQualityStandard
1235+ (\ s a -> s{_dsDataQualityStandard = a})
1236+ . _Default
1237+ . _Coerce
1238+
11981239-- | An end-user visible name for this data source.
11991240dsName :: Lens' DataSource (Maybe Text)
12001241dsName = lens _dsName (\ s a -> s{_dsName = a})
@@ -1255,7 +1296,8 @@ instance FromJSON DataSource where
12551296 (\ o ->
12561297 DataSource' <$>
12571298 (o .:? "application") <*> (o .:? "device") <*>
1258− (o .:? "name")
1299+ (o .:? "dataQualityStandard" .!= mempty)
1300+ <*> (o .:? "name")
12591301 <*> (o .:? "dataType")
12601302 <*> (o .:? "type")
12611303 <*> (o .:? "dataStreamName")
@@ -1266,12 +1308,71 @@ instance ToJSON DataSource where
12661308 = object
12671309 (catMaybes
12681310 [("application" .=) <$> _dsApplication,
1269− ("device" .=) <$> _dsDevice, ("name" .=) <$> _dsName,
1311+ ("device" .=) <$> _dsDevice,
1312+ ("dataQualityStandard" .=) <$>
1313+ _dsDataQualityStandard,
1314+ ("name" .=) <$> _dsName,
12701315 ("dataType" .=) <$> _dsDataType,
12711316 ("type" .=) <$> _dsType,
12721317 ("dataStreamName" .=) <$> _dsDataStreamName,
12731318 ("dataStreamId" .=) <$> _dsDataStreamId])
12741319
1320+--
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)
1327+
1328+-- | Creates a value of 'BucketByTimePeriod' with the minimum fields required to make a request.
1329+--
1330+-- Use one of the following lenses to modify other fields as desired:
1331+--
1332+-- * 'bbtpValue'
1333+--
1334+-- * 'bbtpType'
1335+--
1336+-- * 'bbtpTimeZoneId'
1337+bucketByTimePeriod
1338+ :: BucketByTimePeriod
1339+bucketByTimePeriod =
1340+ BucketByTimePeriod'
1341+ { _bbtpValue = Nothing
1342+ , _bbtpType = Nothing
1343+ , _bbtpTimeZoneId = Nothing
1344+ }
1345+
1346+bbtpValue :: Lens' BucketByTimePeriod (Maybe Int32)
1347+bbtpValue
1348+ = lens _bbtpValue (\ s a -> s{_bbtpValue = a}) .
1349+ mapping _Coerce
1350+
1351+bbtpType :: Lens' BucketByTimePeriod (Maybe BucketByTimePeriodType)
1352+bbtpType = lens _bbtpType (\ s a -> s{_bbtpType = a})
1353+
1354+-- | org.joda.timezone.DateTimeZone
1355+bbtpTimeZoneId :: Lens' BucketByTimePeriod (Maybe Text)
1356+bbtpTimeZoneId
1357+ = lens _bbtpTimeZoneId
1358+ (\ s a -> s{_bbtpTimeZoneId = a})
1359+
1360+instance FromJSON BucketByTimePeriod where
1361+ parseJSON
1362+ = withObject "BucketByTimePeriod"
1363+ (\ o ->
1364+ BucketByTimePeriod' <$>
1365+ (o .:? "value") <*> (o .:? "type") <*>
1366+ (o .:? "timeZoneId"))
1367+
1368+instance ToJSON BucketByTimePeriod where
1369+ toJSON BucketByTimePeriod'{..}
1370+ = object
1371+ (catMaybes
1372+ [("value" .=) <$> _bbtpValue,
1373+ ("type" .=) <$> _bbtpType,
1374+ ("timeZoneId" .=) <$> _bbtpTimeZoneId])
1375+
12751376--
12761377-- /See:/ 'valueMapValEntry' smart constructor.
12771378data ValueMapValEntry = ValueMapValEntry'
@@ -1317,22 +1418,30 @@ instance ToJSON ValueMapValEntry where
13171418
13181419--
13191420-- /See:/ 'bucketByTime' smart constructor.
1320−newtype BucketByTime = BucketByTime'
1321− { _bbtDurationMillis :: Maybe (Textual Int64)
1421+data BucketByTime = BucketByTime'
1422+ { _bbtPeriod :: !(Maybe BucketByTimePeriod)
1423+ , _bbtDurationMillis :: !(Maybe (Textual Int64))
13221424 } deriving (Eq,Show,Data,Typeable,Generic)
13231425
13241426-- | Creates a value of 'BucketByTime' with the minimum fields required to make a request.
13251427--
13261428-- Use one of the following lenses to modify other fields as desired:
13271429--
1430+-- * 'bbtPeriod'
1431+--
13281432-- * 'bbtDurationMillis'
13291433bucketByTime
13301434 :: BucketByTime
13311435bucketByTime =
13321436 BucketByTime'
1333− { _bbtDurationMillis = Nothing
1437+ { _bbtPeriod = Nothing
1438+ , _bbtDurationMillis = Nothing
13341439 }
13351440
1441+bbtPeriod :: Lens' BucketByTime (Maybe BucketByTimePeriod)
1442+bbtPeriod
1443+ = lens _bbtPeriod (\ s a -> s{_bbtPeriod = a})
1444+
13361445-- | Specifies that result buckets aggregate data by exactly durationMillis
13371446-- time frames. Time frames that contain no data will be included in the
13381447-- response with an empty dataset.
@@ -1345,16 +1454,18 @@ bbtDurationMillis
13451454instance FromJSON BucketByTime where
13461455 parseJSON
13471456 = withObject "BucketByTime"
1348− (\ o -> BucketByTime' <$> (o .:? "durationMillis"))
1457+ (\ o ->
1458+ BucketByTime' <$>
1459+ (o .:? "period") <*> (o .:? "durationMillis"))
13491460
13501461instance ToJSON BucketByTime where
13511462 toJSON BucketByTime'{..}
13521463 = object
13531464 (catMaybes
1354− [("durationMillis" .=) <$> _bbtDurationMillis])
1465+ [("period" .=) <$> _bbtPeriod,
1466+ ("durationMillis" .=) <$> _bbtDurationMillis])
13551467
1356−-- | See:
1357−-- google3\/java\/com\/google\/android\/apps\/heart\/platform\/api\/DataType.java
1468+-- |
13581469--
13591470-- /See:/ 'dataType' smart constructor.
13601471data DataType = DataType'