on develop help sign in
Regenerating gogol-fitness from latest service definition
commit59ffd36dce6f63b57c9f424aa03842e5ca1375ea authorBrendan Hay <brendan.g.hay@gmail.com> dateTue 25 Oct 2016, 11:37 (10 years ago) parenteaec028
17 files changed+538−92
gen/model/fitness/v1/fitness-api.json+143−22 gogol-fitness/gen/Network/Google/Fitness.hs+24−1 gogol-fitness/gen/Network/Google/Fitness/Types.hs+30 gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs+137−26 gogol-fitness/gen/Network/Google/Fitness/Types/Sum.hs+150 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSet/Aggregate.hs+3−1 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Create.hs+2−1 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/DataSets/Delete.hs+2−1 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/DataSets/Get.hs+4−2 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/DataSets/Patch.hs+2−1 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Delete.hs+6−3 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Get.hs+5−3 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/List.hs+7−5 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Patch.hs+10−13 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Update.hs+8−11 gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/List.hs+3−1 gogol-fitness/gogol-fitness.cabal+2−1
gen/model/fitness/v1/fitness-api.json+143−22
@@ -1,13 +1,13 @@
11{
22 "kind": "discovery#restDescription",
3− "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/WRSrXd8ZFNmuEU1-lWdcTz7dfu4\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/YYTaKGUD7QZsoB7peT0bkV-gPP8\"",
44 "discoveryVersion": "v1",
55 "id": "fitness:v1",
66 "name": "fitness",
77 "version": "v1",
8− "revision": "20151021",
8+ "revision": "20160907",
99 "title": "Fitness",
10− "description": "Google Fit API",
10+ "description": "Stores and accesses user data in the fitness store from apps on any platform.",
1111 "ownerDomain": "google.com",
1212 "ownerName": "Google",
1313 "icons": {
@@ -86,6 +86,12 @@
8686 },
8787 "https://www.googleapis.com/auth/fitness.location.write": {
8888 "description": "View and store your location data in Google Fit"
89+ },
90+ "https://www.googleapis.com/auth/fitness.nutrition.read": {
91+ "description": "View nutrition information in Google Fit"
92+ },
93+ "https://www.googleapis.com/auth/fitness.nutrition.write": {
94+ "description": "View and store nutrition information in Google Fit"
8995 }
9096 }
9197 }
@@ -159,6 +165,7 @@
159165 "AggregateRequest": {
160166 "id": "AggregateRequest",
161167 "type": "object",
168+ "description": "Next id: 10",
162169 "properties": {
163170 "aggregateBy": {
164171 "type": "array",
@@ -198,6 +205,37 @@
198205 ]
199206 }
200207 },
208+ "filteredDataQualityStandard": {
209+ "type": "array",
210+ "description": "A list of acceptable data quality standards. Only data points which conform to at least one of the specified data quality standards will be returned. If the list is empty, all data points are returned.",
211+ "items": {
212+ "type": "string",
213+ "enum": [
214+ "dataQualityBloodGlucoseIso151972003",
215+ "dataQualityBloodGlucoseIso151972013",
216+ "dataQualityBloodPressureAami",
217+ "dataQualityBloodPressureBhsAA",
218+ "dataQualityBloodPressureBhsAB",
219+ "dataQualityBloodPressureBhsBA",
220+ "dataQualityBloodPressureBhsBB",
221+ "dataQualityBloodPressureEsh2002",
222+ "dataQualityBloodPressureEsh2010",
223+ "dataQualityUnknown"
224+ ],
225+ "enumDescriptions": [
226+ "",
227+ "",
228+ "",
229+ "",
230+ "",
231+ "",
232+ "",
233+ "",
234+ "",
235+ ""
236+ ]
237+ }
238+ },
201239 "startTimeMillis": {
202240 "type": "string",
203241 "description": "The start of a window of time. Data that intersects with this time window will be aggregated. The time is in milliseconds since epoch, inclusive.",
@@ -226,7 +264,7 @@
226264 "Application": {
227265 "id": "Application",
228266 "type": "object",
229− "description": "See: google3/java/com/google/android/apps/heart/platform/api/Application.java",
267+ "description": "",
230268 "properties": {
231269 "detailsUrl": {
232270 "type": "string",
@@ -287,6 +325,36 @@
287325 "type": "string",
288326 "description": "Specifies that result buckets aggregate data by exactly durationMillis time frames. Time frames that contain no data will be included in the response with an empty dataset.",
289327 "format": "int64"
328+ },
329+ "period": {
330+ "$ref": "BucketByTimePeriod"
331+ }
332+ }
333+ },
334+ "BucketByTimePeriod": {
335+ "id": "BucketByTimePeriod",
336+ "type": "object",
337+ "properties": {
338+ "timeZoneId": {
339+ "type": "string",
340+ "description": "org.joda.timezone.DateTimeZone"
341+ },
342+ "type": {
343+ "type": "string",
344+ "enum": [
345+ "day",
346+ "month",
347+ "week"
348+ ],
349+ "enumDescriptions": [
350+ "",
351+ "",
352+ ""
353+ ]
354+ },
355+ "value": {
356+ "type": "integer",
357+ "format": "int32"
290358 }
291359 }
292360 },
@@ -372,6 +440,37 @@
372440 ]
373441 }
374442 },
443+ "dataQualityStandard": {
444+ "type": "array",
445+ "description": "",
446+ "items": {
447+ "type": "string",
448+ "enum": [
449+ "dataQualityBloodGlucoseIso151972003",
450+ "dataQualityBloodGlucoseIso151972013",
451+ "dataQualityBloodPressureAami",
452+ "dataQualityBloodPressureBhsAA",
453+ "dataQualityBloodPressureBhsAB",
454+ "dataQualityBloodPressureBhsBA",
455+ "dataQualityBloodPressureBhsBB",
456+ "dataQualityBloodPressureEsh2002",
457+ "dataQualityBloodPressureEsh2010",
458+ "dataQualityUnknown"
459+ ],
460+ "enumDescriptions": [
461+ "",
462+ "",
463+ "",
464+ "",
465+ "",
466+ "",
467+ "",
468+ "",
469+ "",
470+ ""
471+ ]
472+ }
473+ },
375474 "dataStreamId": {
376475 "type": "string",
377476 "description": "A unique identifier for the data stream produced by this data source. The identifier includes:\n\n \n- The physical device's manufacturer, model, and serial number (UID). \n- The application's package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. \n- The data source's type. \n- The data source's stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version of the hardware/the application isn't used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects may represent the same data stream even if they're not equal.\n\nThe exact format of the data stream ID created by an Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName \n\nThe exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName \n\nWhen any of the optional fields that comprise of the data stream ID are blank, they will be omitted from the data stream ID. The minnimum viable data stream ID would be: type:dataType.name:developer project number\n\nFinally, the developer project number is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form.",
@@ -432,7 +531,7 @@
432531 "DataType": {
433532 "id": "DataType",
434533 "type": "object",
435− "description": "See: google3/java/com/google/android/apps/heart/platform/api/DataType.java",
534+ "description": "",
436535 "properties": {
437536 "field": {
438537 "type": "array",
@@ -589,6 +688,7 @@
589688 "description": "A constant representing the type of the device.",
590689 "enum": [
591690 "chestStrap",
691+ "headMounted",
592692 "phone",
593693 "scale",
594694 "tablet",
@@ -601,6 +701,7 @@
601701 "",
602702 "",
603703 "",
704+ "",
604705 ""
605706 ],
606707 "annotations": {
@@ -656,6 +757,10 @@
656757 "$ref": "Session"
657758 }
658759 },
760+ "hasMoreData": {
761+ "type": "boolean",
762+ "description": "Flag to indicate server has more data to transfer"
763+ },
659764 "nextPageToken": {
660765 "type": "string",
661766 "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
@@ -830,14 +935,15 @@
830935 "scopes": [
831936 "https://www.googleapis.com/auth/fitness.activity.write",
832937 "https://www.googleapis.com/auth/fitness.body.write",
833− "https://www.googleapis.com/auth/fitness.location.write"
938+ "https://www.googleapis.com/auth/fitness.location.write",
939+ "https://www.googleapis.com/auth/fitness.nutrition.write"
834940 ]
835941 },
836942 "delete": {
837943 "id": "fitness.users.dataSources.delete",
838944 "path": "{userId}/dataSources/{dataSourceId}",
839945 "httpMethod": "DELETE",
840− "description": "Delete the data source if there are no datapoints associated with it",
946+ "description": "Deletes the specified data source. The request will fail if the data source contains any data points.",
841947 "parameters": {
842948 "dataSourceId": {
843949 "type": "string",
@@ -862,14 +968,15 @@
862968 "scopes": [
863969 "https://www.googleapis.com/auth/fitness.activity.write",
864970 "https://www.googleapis.com/auth/fitness.body.write",
865− "https://www.googleapis.com/auth/fitness.location.write"
971+ "https://www.googleapis.com/auth/fitness.location.write",
972+ "https://www.googleapis.com/auth/fitness.nutrition.write"
866973 ]
867974 },
868975 "get": {
869976 "id": "fitness.users.dataSources.get",
870977 "path": "{userId}/dataSources/{dataSourceId}",
871978 "httpMethod": "GET",
872− "description": "Returns a data source identified by a data stream ID.",
979+ "description": "Returns the specified data source.",
873980 "parameters": {
874981 "dataSourceId": {
875982 "type": "string",
@@ -897,14 +1004,16 @@
8971004 "https://www.googleapis.com/auth/fitness.body.read",
8981005 "https://www.googleapis.com/auth/fitness.body.write",
8991006 "https://www.googleapis.com/auth/fitness.location.read",
900− "https://www.googleapis.com/auth/fitness.location.write"
1007+ "https://www.googleapis.com/auth/fitness.location.write",
1008+ "https://www.googleapis.com/auth/fitness.nutrition.read",
1009+ "https://www.googleapis.com/auth/fitness.nutrition.write"
9011010 ]
9021011 },
9031012 "list": {
9041013 "id": "fitness.users.dataSources.list",
9051014 "path": "{userId}/dataSources",
9061015 "httpMethod": "GET",
907− "description": "Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive: the user may have private data sources that are only visible to other developers or calls using other scopes.",
1016+ "description": "Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive; the user may have private data sources that are only visible to other developers, or calls using other scopes.",
9081017 "parameters": {
9091018 "dataTypeName": {
9101019 "type": "string",
@@ -931,14 +1040,16 @@
9311040 "https://www.googleapis.com/auth/fitness.body.read",
9321041 "https://www.googleapis.com/auth/fitness.body.write",
9331042 "https://www.googleapis.com/auth/fitness.location.read",
934− "https://www.googleapis.com/auth/fitness.location.write"
1043+ "https://www.googleapis.com/auth/fitness.location.write",
1044+ "https://www.googleapis.com/auth/fitness.nutrition.read",
1045+ "https://www.googleapis.com/auth/fitness.nutrition.write"
9351046 ]
9361047 },
9371048 "patch": {
9381049 "id": "fitness.users.dataSources.patch",
9391050 "path": "{userId}/dataSources/{dataSourceId}",
9401051 "httpMethod": "PATCH",
941− "description": "Updates a given data source. It is an error to modify the data source's data stream ID, data type, type, stream name or device information apart from the device version. Changing these fields would require a new unique data stream ID and separate data source.\n\nData sources are identified by their data stream ID. This method supports patch semantics.",
1052+ "description": "Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified.\n\nData sources are identified by their dataStreamId. This method supports patch semantics.",
9421053 "parameters": {
9431054 "dataSourceId": {
9441055 "type": "string",
@@ -966,14 +1077,15 @@
9661077 "scopes": [
9671078 "https://www.googleapis.com/auth/fitness.activity.write",
9681079 "https://www.googleapis.com/auth/fitness.body.write",
969− "https://www.googleapis.com/auth/fitness.location.write"
1080+ "https://www.googleapis.com/auth/fitness.location.write",
1081+ "https://www.googleapis.com/auth/fitness.nutrition.write"
9701082 ]
9711083 },
9721084 "update": {
9731085 "id": "fitness.users.dataSources.update",
9741086 "path": "{userId}/dataSources/{dataSourceId}",
9751087 "httpMethod": "PUT",
976− "description": "Updates a given data source. It is an error to modify the data source's data stream ID, data type, type, stream name or device information apart from the device version. Changing these fields would require a new unique data stream ID and separate data source.\n\nData sources are identified by their data stream ID.",
1088+ "description": "Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified.\n\nData sources are identified by their dataStreamId.",
9771089 "parameters": {
9781090 "dataSourceId": {
9791091 "type": "string",
@@ -1001,7 +1113,8 @@
10011113 "scopes": [
10021114 "https://www.googleapis.com/auth/fitness.activity.write",
10031115 "https://www.googleapis.com/auth/fitness.body.write",
1004− "https://www.googleapis.com/auth/fitness.location.write"
1116+ "https://www.googleapis.com/auth/fitness.location.write",
1117+ "https://www.googleapis.com/auth/fitness.nutrition.write"
10051118 ]
10061119 }
10071120 },
@@ -1053,7 +1166,8 @@
10531166 "scopes": [
10541167 "https://www.googleapis.com/auth/fitness.activity.write",
10551168 "https://www.googleapis.com/auth/fitness.body.write",
1056− "https://www.googleapis.com/auth/fitness.location.write"
1169+ "https://www.googleapis.com/auth/fitness.location.write",
1170+ "https://www.googleapis.com/auth/fitness.nutrition.write"
10571171 ]
10581172 },
10591173 "get": {
@@ -1076,7 +1190,7 @@
10761190 },
10771191 "limit": {
10781192 "type": "integer",
1079− "description": "If specified, no more than this many data points will be included in the dataset. If the there are more data points in the dataset, nextPageToken will be set in the dataset response.",
1193+ "description": "If specified, no more than this many data points will be included in the dataset. If there are more data points in the dataset, nextPageToken will be set in the dataset response.",
10801194 "format": "int32",
10811195 "location": "query"
10821196 },
@@ -1106,7 +1220,9 @@
11061220 "https://www.googleapis.com/auth/fitness.body.read",
11071221 "https://www.googleapis.com/auth/fitness.body.write",
11081222 "https://www.googleapis.com/auth/fitness.location.read",
1109− "https://www.googleapis.com/auth/fitness.location.write"
1223+ "https://www.googleapis.com/auth/fitness.location.write",
1224+ "https://www.googleapis.com/auth/fitness.nutrition.read",
1225+ "https://www.googleapis.com/auth/fitness.nutrition.write"
11101226 ]
11111227 },
11121228 "patch": {
@@ -1154,7 +1270,8 @@
11541270 "scopes": [
11551271 "https://www.googleapis.com/auth/fitness.activity.write",
11561272 "https://www.googleapis.com/auth/fitness.body.write",
1157− "https://www.googleapis.com/auth/fitness.location.write"
1273+ "https://www.googleapis.com/auth/fitness.location.write",
1274+ "https://www.googleapis.com/auth/fitness.nutrition.write"
11581275 ]
11591276 }
11601277 }
@@ -1191,7 +1308,9 @@
11911308 "https://www.googleapis.com/auth/fitness.body.read",
11921309 "https://www.googleapis.com/auth/fitness.body.write",
11931310 "https://www.googleapis.com/auth/fitness.location.read",
1194− "https://www.googleapis.com/auth/fitness.location.write"
1311+ "https://www.googleapis.com/auth/fitness.location.write",
1312+ "https://www.googleapis.com/auth/fitness.nutrition.read",
1313+ "https://www.googleapis.com/auth/fitness.nutrition.write"
11951314 ]
11961315 }
11971316 }
@@ -1276,7 +1395,9 @@
12761395 "https://www.googleapis.com/auth/fitness.body.read",
12771396 "https://www.googleapis.com/auth/fitness.body.write",
12781397 "https://www.googleapis.com/auth/fitness.location.read",
1279− "https://www.googleapis.com/auth/fitness.location.write"
1398+ "https://www.googleapis.com/auth/fitness.location.write",
1399+ "https://www.googleapis.com/auth/fitness.nutrition.read",
1400+ "https://www.googleapis.com/auth/fitness.nutrition.write"
12801401 ]
12811402 },
12821403 "update": {
gogol-fitness/gen/Network/Google/Fitness.hs+24−1
@@ -13,7 +13,8 @@
1313-- Stability : auto-generated
1414-- Portability : non-portable (GHC extensions)
1515--
16−-- Google Fit API
16+-- Stores and accesses user data in the fitness store from apps on any
17+-- platform.
1718--
1819-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference>
1920module Network.Google.Fitness
@@ -23,10 +24,12 @@ module Network.Google.Fitness
2324
2425 -- * OAuth Scopes
2526 , fitnessBodyReadScope
27+ , fitnessNutritionReadScope
2628 , fitnessActivityReadScope
2729 , fitnessActivityWriteScope
2830 , fitnessLocationReadScope
2931 , fitnessLocationWriteScope
32+ , fitnessNutritionWriteScope
3033 , fitnessBodyWriteScope
3134
3235 -- * API Declaration
@@ -109,6 +112,9 @@ module Network.Google.Fitness
109112 -- ** DataSourceType
110113 , DataSourceType (..)
111114
115+ -- ** BucketByTimePeriodType
116+ , BucketByTimePeriodType (..)
117+
112118 -- ** BucketByActivity
113119 , BucketByActivity
114120 , bucketByActivity
@@ -119,6 +125,7 @@ module Network.Google.Fitness
119125 , AggregateRequest
120126 , aggregateRequest
121127 , arEndTimeMillis
128+ , arFilteredDataQualityStandard
122129 , arAggregateBy
123130 , arBucketBySession
124131 , arBucketByActivityType
@@ -165,6 +172,7 @@ module Network.Google.Fitness
165172 , listSessionsResponse
166173 , lsrNextPageToken
167174 , lsrDeletedSession
175+ , lsrHasMoreData
168176 , lsrSession
169177
170178 -- ** AggregateBucket
@@ -194,17 +202,28 @@ module Network.Google.Fitness
194202 , dtfName
195203 , dtfOptional
196204
205+ -- ** AggregateRequestFilteredDataQualityStandardItem
206+ , AggregateRequestFilteredDataQualityStandardItem (..)
207+
197208 -- ** DataSource
198209 , DataSource
199210 , dataSource
200211 , dsApplication
201212 , dsDevice
213+ , dsDataQualityStandard
202214 , dsName
203215 , dsDataType
204216 , dsType
205217 , dsDataStreamName
206218 , dsDataStreamId
207219
220+ -- ** BucketByTimePeriod
221+ , BucketByTimePeriod
222+ , bucketByTimePeriod
223+ , bbtpValue
224+ , bbtpType
225+ , bbtpTimeZoneId
226+
208227 -- ** DeviceType
209228 , DeviceType (..)
210229
@@ -217,6 +236,7 @@ module Network.Google.Fitness
217236 -- ** BucketByTime
218237 , BucketByTime
219238 , bucketByTime
239+ , bbtPeriod
220240 , bbtDurationMillis
221241
222242 -- ** DataType
@@ -238,6 +258,9 @@ module Network.Google.Fitness
238258 , sStartTimeMillis
239259 , sDescription
240260
261+ -- ** DataSourceDataQualityStandardItem
262+ , DataSourceDataQualityStandardItem (..)
263+
241264 -- ** DataTypeFieldFormat
242265 , DataTypeFieldFormat (..)
243266 ) where
gogol-fitness/gen/Network/Google/Fitness/Types.hs+30
@@ -21,10 +21,12 @@ module Network.Google.Fitness.Types
2121
2222 -- * OAuth Scopes
2323 , fitnessBodyReadScope
24+ , fitnessNutritionReadScope
2425 , fitnessActivityReadScope
2526 , fitnessActivityWriteScope
2627 , fitnessLocationReadScope
2728 , fitnessLocationWriteScope
29+ , fitnessNutritionWriteScope
2830 , fitnessBodyWriteScope
2931
3032 -- * AggregateBucketType
@@ -61,6 +63,9 @@ module Network.Google.Fitness.Types
6163 -- * DataSourceType
6264 , DataSourceType (..)
6365
66+ -- * BucketByTimePeriodType
67+ , BucketByTimePeriodType (..)
68+
6469 -- * BucketByActivity
6570 , BucketByActivity
6671 , bucketByActivity
@@ -71,6 +76,7 @@ module Network.Google.Fitness.Types
7176 , AggregateRequest
7277 , aggregateRequest
7378 , arEndTimeMillis
79+ , arFilteredDataQualityStandard
7480 , arAggregateBy
7581 , arBucketBySession
7682 , arBucketByActivityType
@@ -117,6 +123,7 @@ module Network.Google.Fitness.Types
117123 , listSessionsResponse
118124 , lsrNextPageToken
119125 , lsrDeletedSession
126+ , lsrHasMoreData
120127 , lsrSession
121128
122129 -- * AggregateBucket
@@ -146,17 +153,28 @@ module Network.Google.Fitness.Types
146153 , dtfName
147154 , dtfOptional
148155
156+ -- * AggregateRequestFilteredDataQualityStandardItem
157+ , AggregateRequestFilteredDataQualityStandardItem (..)
158+
149159 -- * DataSource
150160 , DataSource
151161 , dataSource
152162 , dsApplication
153163 , dsDevice
164+ , dsDataQualityStandard
154165 , dsName
155166 , dsDataType
156167 , dsType
157168 , dsDataStreamName
158169 , dsDataStreamId
159170
171+ -- * BucketByTimePeriod
172+ , BucketByTimePeriod
173+ , bucketByTimePeriod
174+ , bbtpValue
175+ , bbtpType
176+ , bbtpTimeZoneId
177+
160178 -- * DeviceType
161179 , DeviceType (..)
162180
@@ -169,6 +187,7 @@ module Network.Google.Fitness.Types
169187 -- * BucketByTime
170188 , BucketByTime
171189 , bucketByTime
190+ , bbtPeriod
172191 , bbtDurationMillis
173192
174193 -- * DataType
@@ -190,6 +209,9 @@ module Network.Google.Fitness.Types
190209 , sStartTimeMillis
191210 , sDescription
192211
212+ -- * DataSourceDataQualityStandardItem
213+ , DataSourceDataQualityStandardItem (..)
214+
193215 -- * DataTypeFieldFormat
194216 , DataTypeFieldFormat (..)
195217 ) where
@@ -208,6 +230,10 @@ fitnessService
208230fitnessBodyReadScope :: Proxy '["https://www.googleapis.com/auth/fitness.body.read"]
209231fitnessBodyReadScope = Proxy;
210232
233+-- | View nutrition information in Google Fit
234+fitnessNutritionReadScope :: Proxy '["https://www.googleapis.com/auth/fitness.nutrition.read"]
235+fitnessNutritionReadScope = Proxy;
236+
211237-- | View your activity information in Google Fit
212238fitnessActivityReadScope :: Proxy '["https://www.googleapis.com/auth/fitness.activity.read"]
213239fitnessActivityReadScope = Proxy;
@@ -224,6 +250,10 @@ fitnessLocationReadScope = Proxy;
224250fitnessLocationWriteScope :: Proxy '["https://www.googleapis.com/auth/fitness.location.write"]
225251fitnessLocationWriteScope = Proxy;
226252
253+-- | View and store nutrition information in Google Fit
254+fitnessNutritionWriteScope :: Proxy '["https://www.googleapis.com/auth/fitness.nutrition.write"]
255+fitnessNutritionWriteScope = Proxy;
256+
227257-- | View and store body sensor data in Google Fit
228258fitnessBodyWriteScope :: Proxy '["https://www.googleapis.com/auth/fitness.body.write"]
229259fitnessBodyWriteScope = Proxy;
gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs+137−26
@@ -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'
gogol-fitness/gen/Network/Google/Fitness/Types/Sum.hs+150
@@ -86,10 +86,100 @@ instance FromJSON DataSourceType where
8686instance ToJSON DataSourceType where
8787 toJSON = toJSONText
8888
89+data BucketByTimePeriodType
90+ = Day
91+ -- ^ @day@
92+ | Month
93+ -- ^ @month@
94+ | Week
95+ -- ^ @week@
96+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
97+
98+instance Hashable BucketByTimePeriodType
99+
100+instance FromHttpApiData BucketByTimePeriodType where
101+ parseQueryParam = \case
102+ "day" -> Right Day
103+ "month" -> Right Month
104+ "week" -> Right Week
105+ x -> Left ("Unable to parse BucketByTimePeriodType from: " <> x)
106+
107+instance ToHttpApiData BucketByTimePeriodType where
108+ toQueryParam = \case
109+ Day -> "day"
110+ Month -> "month"
111+ Week -> "week"
112+
113+instance FromJSON BucketByTimePeriodType where
114+ parseJSON = parseJSONText "BucketByTimePeriodType"
115+
116+instance ToJSON BucketByTimePeriodType where
117+ toJSON = toJSONText
118+
119+data AggregateRequestFilteredDataQualityStandardItem
120+ = DATAQUALITYBLOODGLUCOSEISO151972003
121+ -- ^ @dataQualityBloodGlucoseIso151972003@
122+ | DATAQUALITYBLOODGLUCOSEISO151972013
123+ -- ^ @dataQualityBloodGlucoseIso151972013@
124+ | DataQualityBloodPressureAami
125+ -- ^ @dataQualityBloodPressureAami@
126+ | DataQualityBloodPressureBhsAA
127+ -- ^ @dataQualityBloodPressureBhsAA@
128+ | DataQualityBloodPressureBhsAB
129+ -- ^ @dataQualityBloodPressureBhsAB@
130+ | DataQualityBloodPressureBhsBA
131+ -- ^ @dataQualityBloodPressureBhsBA@
132+ | DataQualityBloodPressureBhsBB
133+ -- ^ @dataQualityBloodPressureBhsBB@
134+ | DATAQUALITYBLOODPRESSUREESH2002
135+ -- ^ @dataQualityBloodPressureEsh2002@
136+ | DATAQUALITYBLOODPRESSUREESH2010
137+ -- ^ @dataQualityBloodPressureEsh2010@
138+ | DataQualityUnknown
139+ -- ^ @dataQualityUnknown@
140+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
141+
142+instance Hashable AggregateRequestFilteredDataQualityStandardItem
143+
144+instance FromHttpApiData AggregateRequestFilteredDataQualityStandardItem where
145+ parseQueryParam = \case
146+ "dataQualityBloodGlucoseIso151972003" -> Right DATAQUALITYBLOODGLUCOSEISO151972003
147+ "dataQualityBloodGlucoseIso151972013" -> Right DATAQUALITYBLOODGLUCOSEISO151972013
148+ "dataQualityBloodPressureAami" -> Right DataQualityBloodPressureAami
149+ "dataQualityBloodPressureBhsAA" -> Right DataQualityBloodPressureBhsAA
150+ "dataQualityBloodPressureBhsAB" -> Right DataQualityBloodPressureBhsAB
151+ "dataQualityBloodPressureBhsBA" -> Right DataQualityBloodPressureBhsBA
152+ "dataQualityBloodPressureBhsBB" -> Right DataQualityBloodPressureBhsBB
153+ "dataQualityBloodPressureEsh2002" -> Right DATAQUALITYBLOODPRESSUREESH2002
154+ "dataQualityBloodPressureEsh2010" -> Right DATAQUALITYBLOODPRESSUREESH2010
155+ "dataQualityUnknown" -> Right DataQualityUnknown
156+ x -> Left ("Unable to parse AggregateRequestFilteredDataQualityStandardItem from: " <> x)
157+
158+instance ToHttpApiData AggregateRequestFilteredDataQualityStandardItem where
159+ toQueryParam = \case
160+ DATAQUALITYBLOODGLUCOSEISO151972003 -> "dataQualityBloodGlucoseIso151972003"
161+ DATAQUALITYBLOODGLUCOSEISO151972013 -> "dataQualityBloodGlucoseIso151972013"
162+ DataQualityBloodPressureAami -> "dataQualityBloodPressureAami"
163+ DataQualityBloodPressureBhsAA -> "dataQualityBloodPressureBhsAA"
164+ DataQualityBloodPressureBhsAB -> "dataQualityBloodPressureBhsAB"
165+ DataQualityBloodPressureBhsBA -> "dataQualityBloodPressureBhsBA"
166+ DataQualityBloodPressureBhsBB -> "dataQualityBloodPressureBhsBB"
167+ DATAQUALITYBLOODPRESSUREESH2002 -> "dataQualityBloodPressureEsh2002"
168+ DATAQUALITYBLOODPRESSUREESH2010 -> "dataQualityBloodPressureEsh2010"
169+ DataQualityUnknown -> "dataQualityUnknown"
170+
171+instance FromJSON AggregateRequestFilteredDataQualityStandardItem where
172+ parseJSON = parseJSONText "AggregateRequestFilteredDataQualityStandardItem"
173+
174+instance ToJSON AggregateRequestFilteredDataQualityStandardItem where
175+ toJSON = toJSONText
176+
89177-- | A constant representing the type of the device.
90178data DeviceType
91179 = ChestStrap
92180 -- ^ @chestStrap@
181+ | HeadMounted
182+ -- ^ @headMounted@
93183 | Phone
94184 -- ^ @phone@
95185 | Scale
@@ -107,6 +197,7 @@ instance Hashable DeviceType
107197instance FromHttpApiData DeviceType where
108198 parseQueryParam = \case
109199 "chestStrap" -> Right ChestStrap
200+ "headMounted" -> Right HeadMounted
110201 "phone" -> Right Phone
111202 "scale" -> Right Scale
112203 "tablet" -> Right Tablet
@@ -117,6 +208,7 @@ instance FromHttpApiData DeviceType where
117208instance ToHttpApiData DeviceType where
118209 toQueryParam = \case
119210 ChestStrap -> "chestStrap"
211+ HeadMounted -> "headMounted"
120212 Phone -> "phone"
121213 Scale -> "scale"
122214 Tablet -> "tablet"
@@ -129,6 +221,64 @@ instance FromJSON DeviceType where
129221instance ToJSON DeviceType where
130222 toJSON = toJSONText
131223
224+data DataSourceDataQualityStandardItem
225+ = DSDQSIDATAQUALITYBLOODGLUCOSEISO151972003
226+ -- ^ @dataQualityBloodGlucoseIso151972003@
227+ | DSDQSIDATAQUALITYBLOODGLUCOSEISO151972013
228+ -- ^ @dataQualityBloodGlucoseIso151972013@
229+ | DSDQSIDataQualityBloodPressureAami
230+ -- ^ @dataQualityBloodPressureAami@
231+ | DSDQSIDataQualityBloodPressureBhsAA
232+ -- ^ @dataQualityBloodPressureBhsAA@
233+ | DSDQSIDataQualityBloodPressureBhsAB
234+ -- ^ @dataQualityBloodPressureBhsAB@
235+ | DSDQSIDataQualityBloodPressureBhsBA
236+ -- ^ @dataQualityBloodPressureBhsBA@
237+ | DSDQSIDataQualityBloodPressureBhsBB
238+ -- ^ @dataQualityBloodPressureBhsBB@
239+ | DSDQSIDATAQUALITYBLOODPRESSUREESH2002
240+ -- ^ @dataQualityBloodPressureEsh2002@
241+ | DSDQSIDATAQUALITYBLOODPRESSUREESH2010
242+ -- ^ @dataQualityBloodPressureEsh2010@
243+ | DSDQSIDataQualityUnknown
244+ -- ^ @dataQualityUnknown@
245+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
246+
247+instance Hashable DataSourceDataQualityStandardItem
248+
249+instance FromHttpApiData DataSourceDataQualityStandardItem where
250+ parseQueryParam = \case
251+ "dataQualityBloodGlucoseIso151972003" -> Right DSDQSIDATAQUALITYBLOODGLUCOSEISO151972003
252+ "dataQualityBloodGlucoseIso151972013" -> Right DSDQSIDATAQUALITYBLOODGLUCOSEISO151972013
253+ "dataQualityBloodPressureAami" -> Right DSDQSIDataQualityBloodPressureAami
254+ "dataQualityBloodPressureBhsAA" -> Right DSDQSIDataQualityBloodPressureBhsAA
255+ "dataQualityBloodPressureBhsAB" -> Right DSDQSIDataQualityBloodPressureBhsAB
256+ "dataQualityBloodPressureBhsBA" -> Right DSDQSIDataQualityBloodPressureBhsBA
257+ "dataQualityBloodPressureBhsBB" -> Right DSDQSIDataQualityBloodPressureBhsBB
258+ "dataQualityBloodPressureEsh2002" -> Right DSDQSIDATAQUALITYBLOODPRESSUREESH2002
259+ "dataQualityBloodPressureEsh2010" -> Right DSDQSIDATAQUALITYBLOODPRESSUREESH2010
260+ "dataQualityUnknown" -> Right DSDQSIDataQualityUnknown
261+ x -> Left ("Unable to parse DataSourceDataQualityStandardItem from: " <> x)
262+
263+instance ToHttpApiData DataSourceDataQualityStandardItem where
264+ toQueryParam = \case
265+ DSDQSIDATAQUALITYBLOODGLUCOSEISO151972003 -> "dataQualityBloodGlucoseIso151972003"
266+ DSDQSIDATAQUALITYBLOODGLUCOSEISO151972013 -> "dataQualityBloodGlucoseIso151972013"
267+ DSDQSIDataQualityBloodPressureAami -> "dataQualityBloodPressureAami"
268+ DSDQSIDataQualityBloodPressureBhsAA -> "dataQualityBloodPressureBhsAA"
269+ DSDQSIDataQualityBloodPressureBhsAB -> "dataQualityBloodPressureBhsAB"
270+ DSDQSIDataQualityBloodPressureBhsBA -> "dataQualityBloodPressureBhsBA"
271+ DSDQSIDataQualityBloodPressureBhsBB -> "dataQualityBloodPressureBhsBB"
272+ DSDQSIDATAQUALITYBLOODPRESSUREESH2002 -> "dataQualityBloodPressureEsh2002"
273+ DSDQSIDATAQUALITYBLOODPRESSUREESH2010 -> "dataQualityBloodPressureEsh2010"
274+ DSDQSIDataQualityUnknown -> "dataQualityUnknown"
275+
276+instance FromJSON DataSourceDataQualityStandardItem where
277+ parseJSON = parseJSONText "DataSourceDataQualityStandardItem"
278+
279+instance ToJSON DataSourceDataQualityStandardItem where
280+ toJSON = toJSONText
281+
132282-- | The different supported formats for each field in a data type.
133283data DataTypeFieldFormat
134284 = Blob
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSet/Aggregate.hs+3−1
@@ -102,7 +102,9 @@ instance GoogleRequest UsersDataSetAggregate where
102102 "https://www.googleapis.com/auth/fitness.body.read",
103103 "https://www.googleapis.com/auth/fitness.body.write",
104104 "https://www.googleapis.com/auth/fitness.location.read",
105− "https://www.googleapis.com/auth/fitness.location.write"]
105+ "https://www.googleapis.com/auth/fitness.location.write",
106+ "https://www.googleapis.com/auth/fitness.nutrition.read",
107+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
106108 requestClient UsersDataSetAggregate'{..}
107109 = go _udsaUserId (Just AltJSON) _udsaPayload
108110 fitnessService
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Create.hs+2−1
@@ -106,7 +106,8 @@ instance GoogleRequest UsersDataSourcesCreate where
106106 type Scopes UsersDataSourcesCreate =
107107 '["https://www.googleapis.com/auth/fitness.activity.write",
108108 "https://www.googleapis.com/auth/fitness.body.write",
109− "https://www.googleapis.com/auth/fitness.location.write"]
109+ "https://www.googleapis.com/auth/fitness.location.write",
110+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
110111 requestClient UsersDataSourcesCreate'{..}
111112 = go _udscUserId (Just AltJSON) _udscPayload
112113 fitnessService
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/DataSets/Delete.hs+2−1
@@ -149,7 +149,8 @@ instance GoogleRequest UsersDataSourcesDataSetsDelete
149149 type Scopes UsersDataSourcesDataSetsDelete =
150150 '["https://www.googleapis.com/auth/fitness.activity.write",
151151 "https://www.googleapis.com/auth/fitness.body.write",
152− "https://www.googleapis.com/auth/fitness.location.write"]
152+ "https://www.googleapis.com/auth/fitness.location.write",
153+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
153154 requestClient UsersDataSourcesDataSetsDelete'{..}
154155 = go _udsdsdUserId _udsdsdDataSourceId
155156 _udsdsdDataSetId
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/DataSets/Get.hs+4−2
@@ -126,7 +126,7 @@ udsdsgDataSetId
126126 (\ s a -> s{_udsdsgDataSetId = a})
127127
128128-- | If specified, no more than this many data points will be included in the
129−-- dataset. If the there are more data points in the dataset, nextPageToken
129+-- dataset. If there are more data points in the dataset, nextPageToken
130130-- will be set in the dataset response.
131131udsdsgLimit :: Lens' UsersDataSourcesDataSetsGet (Maybe Int32)
132132udsdsgLimit
@@ -152,7 +152,9 @@ instance GoogleRequest UsersDataSourcesDataSetsGet
152152 "https://www.googleapis.com/auth/fitness.body.read",
153153 "https://www.googleapis.com/auth/fitness.body.write",
154154 "https://www.googleapis.com/auth/fitness.location.read",
155− "https://www.googleapis.com/auth/fitness.location.write"]
155+ "https://www.googleapis.com/auth/fitness.location.write",
156+ "https://www.googleapis.com/auth/fitness.nutrition.read",
157+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
156158 requestClient UsersDataSourcesDataSetsGet'{..}
157159 = go _udsdsgUserId _udsdsgDataSourceId
158160 _udsdsgDataSetId
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/DataSets/Patch.hs+2−1
@@ -145,7 +145,8 @@ instance GoogleRequest UsersDataSourcesDataSetsPatch
145145 type Scopes UsersDataSourcesDataSetsPatch =
146146 '["https://www.googleapis.com/auth/fitness.activity.write",
147147 "https://www.googleapis.com/auth/fitness.body.write",
148− "https://www.googleapis.com/auth/fitness.location.write"]
148+ "https://www.googleapis.com/auth/fitness.location.write",
149+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
149150 requestClient UsersDataSourcesDataSetsPatch'{..}
150151 = go _udsdspUserId _udsdspDataSourceId
151152 _udsdspDataSetId
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Delete.hs+6−3
@@ -20,7 +20,8 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Delete the data source if there are no datapoints associated with it
23+-- Deletes the specified data source. The request will fail if the data
24+-- source contains any data points.
2425--
2526-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.delete@.
2627module Network.Google.Resource.Fitness.Users.DataSources.Delete
@@ -51,7 +52,8 @@ type UsersDataSourcesDeleteResource =
5152 Capture "dataSourceId" Text :>
5253 QueryParam "alt" AltJSON :> Delete '[JSON] DataSource
5354
54−-- | Delete the data source if there are no datapoints associated with it
55+-- | Deletes the specified data source. The request will fail if the data
56+-- source contains any data points.
5557--
5658-- /See:/ 'usersDataSourcesDelete' smart constructor.
5759data UsersDataSourcesDelete = UsersDataSourcesDelete'
@@ -93,7 +95,8 @@ instance GoogleRequest UsersDataSourcesDelete where
9395 type Scopes UsersDataSourcesDelete =
9496 '["https://www.googleapis.com/auth/fitness.activity.write",
9597 "https://www.googleapis.com/auth/fitness.body.write",
96− "https://www.googleapis.com/auth/fitness.location.write"]
98+ "https://www.googleapis.com/auth/fitness.location.write",
99+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
97100 requestClient UsersDataSourcesDelete'{..}
98101 = go _udsdUserId _udsdDataSourceId (Just AltJSON)
99102 fitnessService
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Get.hs+5−3
@@ -20,7 +20,7 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Returns a data source identified by a data stream ID.
23+-- Returns the specified data source.
2424--
2525-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.get@.
2626module Network.Google.Resource.Fitness.Users.DataSources.Get
@@ -51,7 +51,7 @@ type UsersDataSourcesGetResource =
5151 Capture "dataSourceId" Text :>
5252 QueryParam "alt" AltJSON :> Get '[JSON] DataSource
5353
54−-- | Returns a data source identified by a data stream ID.
54+-- | Returns the specified data source.
5555--
5656-- /See:/ 'usersDataSourcesGet' smart constructor.
5757data UsersDataSourcesGet = UsersDataSourcesGet'
@@ -96,7 +96,9 @@ instance GoogleRequest UsersDataSourcesGet where
9696 "https://www.googleapis.com/auth/fitness.body.read",
9797 "https://www.googleapis.com/auth/fitness.body.write",
9898 "https://www.googleapis.com/auth/fitness.location.read",
99− "https://www.googleapis.com/auth/fitness.location.write"]
99+ "https://www.googleapis.com/auth/fitness.location.write",
100+ "https://www.googleapis.com/auth/fitness.nutrition.read",
101+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
100102 requestClient UsersDataSourcesGet'{..}
101103 = go _udsgUserId _udsgDataSourceId (Just AltJSON)
102104 fitnessService
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/List.hs+7−5
@@ -21,8 +21,8 @@
2121-- Portability : non-portable (GHC extensions)
2222--
2323-- Lists all data sources that are visible to the developer, using the
24−-- OAuth scopes provided. The list is not exhaustive: the user may have
25−-- private data sources that are only visible to other developers or calls
24+-- OAuth scopes provided. The list is not exhaustive; the user may have
25+-- private data sources that are only visible to other developers, or calls
2626-- using other scopes.
2727--
2828-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.list@.
@@ -56,8 +56,8 @@ type UsersDataSourcesListResource =
5656 Get '[JSON] ListDataSourcesResponse
5757
5858-- | Lists all data sources that are visible to the developer, using the
59−-- OAuth scopes provided. The list is not exhaustive: the user may have
60−-- private data sources that are only visible to other developers or calls
59+-- OAuth scopes provided. The list is not exhaustive; the user may have
60+-- private data sources that are only visible to other developers, or calls
6161-- using other scopes.
6262--
6363-- /See:/ 'usersDataSourcesList' smart constructor.
@@ -106,7 +106,9 @@ instance GoogleRequest UsersDataSourcesList where
106106 "https://www.googleapis.com/auth/fitness.body.read",
107107 "https://www.googleapis.com/auth/fitness.body.write",
108108 "https://www.googleapis.com/auth/fitness.location.read",
109− "https://www.googleapis.com/auth/fitness.location.write"]
109+ "https://www.googleapis.com/auth/fitness.location.write",
110+ "https://www.googleapis.com/auth/fitness.nutrition.read",
111+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
110112 requestClient UsersDataSourcesList'{..}
111113 = go _udslUserId (_udslDataTypeName ^. _Default)
112114 (Just AltJSON)
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Patch.hs+10−13
@@ -20,12 +20,10 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Updates a given data source. It is an error to modify the data source\'s
24−-- data stream ID, data type, type, stream name or device information apart
25−-- from the device version. Changing these fields would require a new
26−-- unique data stream ID and separate data source. Data sources are
27−-- identified by their data stream ID. This method supports patch
28−-- semantics.
23+-- Updates the specified data source. The dataStreamId, dataType, type,
24+-- dataStreamName, and device properties with the exception of version,
25+-- cannot be modified. Data sources are identified by their dataStreamId.
26+-- This method supports patch semantics.
2927--
3028-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.patch@.
3129module Network.Google.Resource.Fitness.Users.DataSources.Patch
@@ -59,12 +57,10 @@ type UsersDataSourcesPatchResource =
5957 ReqBody '[JSON] DataSource :>
6058 Patch '[JSON] DataSource
6159
62−-- | Updates a given data source. It is an error to modify the data source\'s
63−-- data stream ID, data type, type, stream name or device information apart
64−-- from the device version. Changing these fields would require a new
65−-- unique data stream ID and separate data source. Data sources are
66−-- identified by their data stream ID. This method supports patch
67−-- semantics.
60+-- | Updates the specified data source. The dataStreamId, dataType, type,
61+-- dataStreamName, and device properties with the exception of version,
62+-- cannot be modified. Data sources are identified by their dataStreamId.
63+-- This method supports patch semantics.
6864--
6965-- /See:/ 'usersDataSourcesPatch' smart constructor.
7066data UsersDataSourcesPatch = UsersDataSourcesPatch'
@@ -116,7 +112,8 @@ instance GoogleRequest UsersDataSourcesPatch where
116112 type Scopes UsersDataSourcesPatch =
117113 '["https://www.googleapis.com/auth/fitness.activity.write",
118114 "https://www.googleapis.com/auth/fitness.body.write",
119− "https://www.googleapis.com/auth/fitness.location.write"]
115+ "https://www.googleapis.com/auth/fitness.location.write",
116+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
120117 requestClient UsersDataSourcesPatch'{..}
121118 = go _udspUserId _udspDataSourceId (Just AltJSON)
122119 _udspPayload
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Update.hs+8−11
@@ -20,11 +20,9 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Updates a given data source. It is an error to modify the data source\'s
24−-- data stream ID, data type, type, stream name or device information apart
25−-- from the device version. Changing these fields would require a new
26−-- unique data stream ID and separate data source. Data sources are
27−-- identified by their data stream ID.
23+-- Updates the specified data source. The dataStreamId, dataType, type,
24+-- dataStreamName, and device properties with the exception of version,
25+-- cannot be modified. Data sources are identified by their dataStreamId.
2826--
2927-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.update@.
3028module Network.Google.Resource.Fitness.Users.DataSources.Update
@@ -57,11 +55,9 @@ type UsersDataSourcesUpdateResource =
5755 QueryParam "alt" AltJSON :>
5856 ReqBody '[JSON] DataSource :> Put '[JSON] DataSource
5957
60−-- | Updates a given data source. It is an error to modify the data source\'s
61−-- data stream ID, data type, type, stream name or device information apart
62−-- from the device version. Changing these fields would require a new
63−-- unique data stream ID and separate data source. Data sources are
64−-- identified by their data stream ID.
58+-- | Updates the specified data source. The dataStreamId, dataType, type,
59+-- dataStreamName, and device properties with the exception of version,
60+-- cannot be modified. Data sources are identified by their dataStreamId.
6561--
6662-- /See:/ 'usersDataSourcesUpdate' smart constructor.
6763data UsersDataSourcesUpdate = UsersDataSourcesUpdate'
@@ -113,7 +109,8 @@ instance GoogleRequest UsersDataSourcesUpdate where
113109 type Scopes UsersDataSourcesUpdate =
114110 '["https://www.googleapis.com/auth/fitness.activity.write",
115111 "https://www.googleapis.com/auth/fitness.body.write",
116− "https://www.googleapis.com/auth/fitness.location.write"]
112+ "https://www.googleapis.com/auth/fitness.location.write",
113+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
117114 requestClient UsersDataSourcesUpdate'{..}
118115 = go _udsuUserId _udsuDataSourceId (Just AltJSON)
119116 _udsuPayload
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/List.hs+3−1
@@ -135,7 +135,9 @@ instance GoogleRequest UsersSessionsList where
135135 "https://www.googleapis.com/auth/fitness.body.read",
136136 "https://www.googleapis.com/auth/fitness.body.write",
137137 "https://www.googleapis.com/auth/fitness.location.read",
138− "https://www.googleapis.com/auth/fitness.location.write"]
138+ "https://www.googleapis.com/auth/fitness.location.write",
139+ "https://www.googleapis.com/auth/fitness.nutrition.read",
140+ "https://www.googleapis.com/auth/fitness.nutrition.write"]
139141 requestClient UsersSessionsList'{..}
140142 = go _uslUserId _uslStartTime _uslEndTime
141143 _uslPageToken
gogol-fitness/gogol-fitness.cabal+2−1
@@ -14,7 +14,8 @@ cabal-version: >= 1.10
1414extra-source-files: README.md
1515
1616description:
17− Google Fit API
17+ Stores and accesses user data in the fitness store from apps on any
18+ platform.
1819 .
1920 /Warning:/ This is an experimental prototype/preview release which is still
2021 under exploratory development and not intended for public use, caveat emptor!