on develop help sign in
Regenerating gogol-fitness from latest service definition
59ffd36Brendan Hay
gen/model/fitness/v1/fitness-api.json+143−22
@@ -1,13 +1,13 @@
1{
1{
2 "kind": "discovery#restDescription",
2 "kind": "discovery#restDescription",
3− "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/WRSrXd8ZFNmuEU1-lWdcTz7dfu4\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/YYTaKGUD7QZsoB7peT0bkV-gPP8\"",
4 "discoveryVersion": "v1",
4 "discoveryVersion": "v1",
5 "id": "fitness:v1",
5 "id": "fitness:v1",
6 "name": "fitness",
6 "name": "fitness",
7 "version": "v1",
7 "version": "v1",
8− "revision": "20151021",
8+ "revision": "20160907",
9 "title": "Fitness",
9 "title": "Fitness",
10− "description": "Google Fit API",
10+ "description": "Stores and accesses user data in the fitness store from apps on any platform.",
11 "ownerDomain": "google.com",
11 "ownerDomain": "google.com",
12 "ownerName": "Google",
12 "ownerName": "Google",
13 "icons": {
13 "icons": {
@@ -86,6 +86,12 @@
86 },
86 },
87 "https://www.googleapis.com/auth/fitness.location.write": {
87 "https://www.googleapis.com/auth/fitness.location.write": {
88 "description": "View and store your location data in Google Fit"
88 "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"
89 }
95 }
90 }
96 }
91 }
97 }
@@ -159,6 +165,7 @@
159 "AggregateRequest": {
165 "AggregateRequest": {
160 "id": "AggregateRequest",
166 "id": "AggregateRequest",
161 "type": "object",
167 "type": "object",
168+ "description": "Next id: 10",
162 "properties": {
169 "properties": {
163 "aggregateBy": {
170 "aggregateBy": {
164 "type": "array",
171 "type": "array",
@@ -198,6 +205,37 @@
198 ]
205 ]
199 }
206 }
200 },
207 },
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+ },
201 "startTimeMillis": {
239 "startTimeMillis": {
202 "type": "string",
240 "type": "string",
203 "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.",
241 "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 @@
226 "Application": {
264 "Application": {
227 "id": "Application",
265 "id": "Application",
228 "type": "object",
266 "type": "object",
229− "description": "See: google3/java/com/google/android/apps/heart/platform/api/Application.java",
267+ "description": "",
230 "properties": {
268 "properties": {
231 "detailsUrl": {
269 "detailsUrl": {
232 "type": "string",
270 "type": "string",
@@ -287,6 +325,36 @@
287 "type": "string",
325 "type": "string",
288 "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.",
326 "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.",
289 "format": "int64"
327 "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"
290 }
358 }
291 }
359 }
292 },
360 },
@@ -372,6 +440,37 @@
372 ]
440 ]
373 }
441 }
374 },
442 },
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+ },
375 "dataStreamId": {
474 "dataStreamId": {
376 "type": "string",
475 "type": "string",
377 "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.",
476 "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 @@
432 "DataType": {
531 "DataType": {
433 "id": "DataType",
532 "id": "DataType",
434 "type": "object",
533 "type": "object",
435− "description": "See: google3/java/com/google/android/apps/heart/platform/api/DataType.java",
534+ "description": "",
436 "properties": {
535 "properties": {
437 "field": {
536 "field": {
438 "type": "array",
537 "type": "array",
@@ -589,6 +688,7 @@
589 "description": "A constant representing the type of the device.",
688 "description": "A constant representing the type of the device.",
590 "enum": [
689 "enum": [
591 "chestStrap",
690 "chestStrap",
691+ "headMounted",
592 "phone",
692 "phone",
593 "scale",
693 "scale",
594 "tablet",
694 "tablet",
@@ -601,6 +701,7 @@
601 "",
701 "",
602 "",
702 "",
603 "",
703 "",
704+ "",
604 ""
705 ""
605 ],
706 ],
606 "annotations": {
707 "annotations": {
@@ -656,6 +757,10 @@
656 "$ref": "Session"
757 "$ref": "Session"
657 }
758 }
658 },
759 },
760+ "hasMoreData": {
761+ "type": "boolean",
762+ "description": "Flag to indicate server has more data to transfer"
763+ },
659 "nextPageToken": {
764 "nextPageToken": {
660 "type": "string",
765 "type": "string",
661 "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."
766 "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 @@
830 "scopes": [
935 "scopes": [
831 "https://www.googleapis.com/auth/fitness.activity.write",
936 "https://www.googleapis.com/auth/fitness.activity.write",
832 "https://www.googleapis.com/auth/fitness.body.write",
937 "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"
834 ]
940 ]
835 },
941 },
836 "delete": {
942 "delete": {
837 "id": "fitness.users.dataSources.delete",
943 "id": "fitness.users.dataSources.delete",
838 "path": "{userId}/dataSources/{dataSourceId}",
944 "path": "{userId}/dataSources/{dataSourceId}",
839 "httpMethod": "DELETE",
945 "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.",
841 "parameters": {
947 "parameters": {
842 "dataSourceId": {
948 "dataSourceId": {
843 "type": "string",
949 "type": "string",
@@ -862,14 +968,15 @@
862 "scopes": [
968 "scopes": [
863 "https://www.googleapis.com/auth/fitness.activity.write",
969 "https://www.googleapis.com/auth/fitness.activity.write",
864 "https://www.googleapis.com/auth/fitness.body.write",
970 "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"
866 ]
973 ]
867 },
974 },
868 "get": {
975 "get": {
869 "id": "fitness.users.dataSources.get",
976 "id": "fitness.users.dataSources.get",
870 "path": "{userId}/dataSources/{dataSourceId}",
977 "path": "{userId}/dataSources/{dataSourceId}",
871 "httpMethod": "GET",
978 "httpMethod": "GET",
872− "description": "Returns a data source identified by a data stream ID.",
979+ "description": "Returns the specified data source.",
873 "parameters": {
980 "parameters": {
874 "dataSourceId": {
981 "dataSourceId": {
875 "type": "string",
982 "type": "string",
@@ -897,14 +1004,16 @@
897 "https://www.googleapis.com/auth/fitness.body.read",
1004 "https://www.googleapis.com/auth/fitness.body.read",
898 "https://www.googleapis.com/auth/fitness.body.write",
1005 "https://www.googleapis.com/auth/fitness.body.write",
899 "https://www.googleapis.com/auth/fitness.location.read",
1006 "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"
901 ]
1010 ]
902 },
1011 },
903 "list": {
1012 "list": {
904 "id": "fitness.users.dataSources.list",
1013 "id": "fitness.users.dataSources.list",
905 "path": "{userId}/dataSources",
1014 "path": "{userId}/dataSources",
906 "httpMethod": "GET",
1015 "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.",
908 "parameters": {
1017 "parameters": {
909 "dataTypeName": {
1018 "dataTypeName": {
910 "type": "string",
1019 "type": "string",
@@ -931,14 +1040,16 @@
931 "https://www.googleapis.com/auth/fitness.body.read",
1040 "https://www.googleapis.com/auth/fitness.body.read",
932 "https://www.googleapis.com/auth/fitness.body.write",
1041 "https://www.googleapis.com/auth/fitness.body.write",
933 "https://www.googleapis.com/auth/fitness.location.read",
1042 "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"
935 ]
1046 ]
936 },
1047 },
937 "patch": {
1048 "patch": {
938 "id": "fitness.users.dataSources.patch",
1049 "id": "fitness.users.dataSources.patch",
939 "path": "{userId}/dataSources/{dataSourceId}",
1050 "path": "{userId}/dataSources/{dataSourceId}",
940 "httpMethod": "PATCH",
1051 "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.",
942 "parameters": {
1053 "parameters": {
943 "dataSourceId": {
1054 "dataSourceId": {
944 "type": "string",
1055 "type": "string",
@@ -966,14 +1077,15 @@
966 "scopes": [
1077 "scopes": [
967 "https://www.googleapis.com/auth/fitness.activity.write",
1078 "https://www.googleapis.com/auth/fitness.activity.write",
968 "https://www.googleapis.com/auth/fitness.body.write",
1079 "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"
970 ]
1082 ]
971 },
1083 },
972 "update": {
1084 "update": {
973 "id": "fitness.users.dataSources.update",
1085 "id": "fitness.users.dataSources.update",
974 "path": "{userId}/dataSources/{dataSourceId}",
1086 "path": "{userId}/dataSources/{dataSourceId}",
975 "httpMethod": "PUT",
1087 "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.",
977 "parameters": {
1089 "parameters": {
978 "dataSourceId": {
1090 "dataSourceId": {
979 "type": "string",
1091 "type": "string",
@@ -1001,7 +1113,8 @@
1001 "scopes": [
1113 "scopes": [
1002 "https://www.googleapis.com/auth/fitness.activity.write",
1114 "https://www.googleapis.com/auth/fitness.activity.write",
1003 "https://www.googleapis.com/auth/fitness.body.write",
1115 "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"
1005 ]
1118 ]
1006 }
1119 }
1007 },
1120 },
@@ -1053,7 +1166,8 @@
1053 "scopes": [
1166 "scopes": [
1054 "https://www.googleapis.com/auth/fitness.activity.write",
1167 "https://www.googleapis.com/auth/fitness.activity.write",
1055 "https://www.googleapis.com/auth/fitness.body.write",
1168 "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"
1057 ]
1171 ]
1058 },
1172 },
1059 "get": {
1173 "get": {
@@ -1076,7 +1190,7 @@
1076 },
1190 },
1077 "limit": {
1191 "limit": {
1078 "type": "integer",
1192 "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.",
1080 "format": "int32",
1194 "format": "int32",
1081 "location": "query"
1195 "location": "query"
1082 },
1196 },
@@ -1106,7 +1220,9 @@
1106 "https://www.googleapis.com/auth/fitness.body.read",
1220 "https://www.googleapis.com/auth/fitness.body.read",
1107 "https://www.googleapis.com/auth/fitness.body.write",
1221 "https://www.googleapis.com/auth/fitness.body.write",
1108 "https://www.googleapis.com/auth/fitness.location.read",
1222 "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"
1110 ]
1226 ]
1111 },
1227 },
1112 "patch": {
1228 "patch": {
@@ -1154,7 +1270,8 @@
1154 "scopes": [
1270 "scopes": [
1155 "https://www.googleapis.com/auth/fitness.activity.write",
1271 "https://www.googleapis.com/auth/fitness.activity.write",
1156 "https://www.googleapis.com/auth/fitness.body.write",
1272 "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"
1158 ]
1275 ]
1159 }
1276 }
1160 }
1277 }
@@ -1191,7 +1308,9 @@
1191 "https://www.googleapis.com/auth/fitness.body.read",
1308 "https://www.googleapis.com/auth/fitness.body.read",
1192 "https://www.googleapis.com/auth/fitness.body.write",
1309 "https://www.googleapis.com/auth/fitness.body.write",
1193 "https://www.googleapis.com/auth/fitness.location.read",
1310 "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"
1195 ]
1314 ]
1196 }
1315 }
1197 }
1316 }
@@ -1276,7 +1395,9 @@
1276 "https://www.googleapis.com/auth/fitness.body.read",
1395 "https://www.googleapis.com/auth/fitness.body.read",
1277 "https://www.googleapis.com/auth/fitness.body.write",
1396 "https://www.googleapis.com/auth/fitness.body.write",
1278 "https://www.googleapis.com/auth/fitness.location.read",
1397 "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"
1280 ]
1401 ]
1281 },
1402 },
1282 "update": {
1403 "update": {
gogol-fitness/gen/Network/Google/Fitness.hs+24−1
@@ -13,7 +13,8 @@
13-- Stability : auto-generated
13-- Stability : auto-generated
14-- Portability : non-portable (GHC extensions)
14-- Portability : non-portable (GHC extensions)
15--
15--
16−-- Google Fit API
16+-- Stores and accesses user data in the fitness store from apps on any
17+-- platform.
17--
18--
18-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference>
19-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference>
19module Network.Google.Fitness
20module Network.Google.Fitness
@@ -23,10 +24,12 @@ module Network.Google.Fitness
23
24
24 -- * OAuth Scopes
25 -- * OAuth Scopes
25 , fitnessBodyReadScope
26 , fitnessBodyReadScope
27+ , fitnessNutritionReadScope
26 , fitnessActivityReadScope
28 , fitnessActivityReadScope
27 , fitnessActivityWriteScope
29 , fitnessActivityWriteScope
28 , fitnessLocationReadScope
30 , fitnessLocationReadScope
29 , fitnessLocationWriteScope
31 , fitnessLocationWriteScope
32+ , fitnessNutritionWriteScope
30 , fitnessBodyWriteScope
33 , fitnessBodyWriteScope
31
34
32 -- * API Declaration
35 -- * API Declaration
@@ -109,6 +112,9 @@ module Network.Google.Fitness
109 -- ** DataSourceType
112 -- ** DataSourceType
110 , DataSourceType (..)
113 , DataSourceType (..)
111
114
115+ -- ** BucketByTimePeriodType
116+ , BucketByTimePeriodType (..)
117+
112 -- ** BucketByActivity
118 -- ** BucketByActivity
113 , BucketByActivity
119 , BucketByActivity
114 , bucketByActivity
120 , bucketByActivity
@@ -119,6 +125,7 @@ module Network.Google.Fitness
119 , AggregateRequest
125 , AggregateRequest
120 , aggregateRequest
126 , aggregateRequest
121 , arEndTimeMillis
127 , arEndTimeMillis
128+ , arFilteredDataQualityStandard
122 , arAggregateBy
129 , arAggregateBy
123 , arBucketBySession
130 , arBucketBySession
124 , arBucketByActivityType
131 , arBucketByActivityType
@@ -165,6 +172,7 @@ module Network.Google.Fitness
165 , listSessionsResponse
172 , listSessionsResponse
166 , lsrNextPageToken
173 , lsrNextPageToken
167 , lsrDeletedSession
174 , lsrDeletedSession
175+ , lsrHasMoreData
168 , lsrSession
176 , lsrSession
169
177
170 -- ** AggregateBucket
178 -- ** AggregateBucket
@@ -194,17 +202,28 @@ module Network.Google.Fitness
194 , dtfName
202 , dtfName
195 , dtfOptional
203 , dtfOptional
196
204
205+ -- ** AggregateRequestFilteredDataQualityStandardItem
206+ , AggregateRequestFilteredDataQualityStandardItem (..)
207+
197 -- ** DataSource
208 -- ** DataSource
198 , DataSource
209 , DataSource
199 , dataSource
210 , dataSource
200 , dsApplication
211 , dsApplication
201 , dsDevice
212 , dsDevice
213+ , dsDataQualityStandard
202 , dsName
214 , dsName
203 , dsDataType
215 , dsDataType
204 , dsType
216 , dsType
205 , dsDataStreamName
217 , dsDataStreamName
206 , dsDataStreamId
218 , dsDataStreamId
207
219
220+ -- ** BucketByTimePeriod
221+ , BucketByTimePeriod
222+ , bucketByTimePeriod
223+ , bbtpValue
224+ , bbtpType
225+ , bbtpTimeZoneId
226+
208 -- ** DeviceType
227 -- ** DeviceType
209 , DeviceType (..)
228 , DeviceType (..)
210
229
@@ -217,6 +236,7 @@ module Network.Google.Fitness
217 -- ** BucketByTime
236 -- ** BucketByTime
218 , BucketByTime
237 , BucketByTime
219 , bucketByTime
238 , bucketByTime
239+ , bbtPeriod
220 , bbtDurationMillis
240 , bbtDurationMillis
221
241
222 -- ** DataType
242 -- ** DataType
@@ -238,6 +258,9 @@ module Network.Google.Fitness
238 , sStartTimeMillis
258 , sStartTimeMillis
239 , sDescription
259 , sDescription
240
260
261+ -- ** DataSourceDataQualityStandardItem
262+ , DataSourceDataQualityStandardItem (..)
263+
241 -- ** DataTypeFieldFormat
264 -- ** DataTypeFieldFormat
242 , DataTypeFieldFormat (..)
265 , DataTypeFieldFormat (..)
243 ) where
266 ) where
gogol-fitness/gen/Network/Google/Fitness/Types.hs+30
@@ -21,10 +21,12 @@ module Network.Google.Fitness.Types
21
21
22 -- * OAuth Scopes
22 -- * OAuth Scopes
23 , fitnessBodyReadScope
23 , fitnessBodyReadScope
24+ , fitnessNutritionReadScope
24 , fitnessActivityReadScope
25 , fitnessActivityReadScope
25 , fitnessActivityWriteScope
26 , fitnessActivityWriteScope
26 , fitnessLocationReadScope
27 , fitnessLocationReadScope
27 , fitnessLocationWriteScope
28 , fitnessLocationWriteScope
29+ , fitnessNutritionWriteScope
28 , fitnessBodyWriteScope
30 , fitnessBodyWriteScope
29
31
30 -- * AggregateBucketType
32 -- * AggregateBucketType
@@ -61,6 +63,9 @@ module Network.Google.Fitness.Types
61 -- * DataSourceType
63 -- * DataSourceType
62 , DataSourceType (..)
64 , DataSourceType (..)
63
65
66+ -- * BucketByTimePeriodType
67+ , BucketByTimePeriodType (..)
68+
64 -- * BucketByActivity
69 -- * BucketByActivity
65 , BucketByActivity
70 , BucketByActivity
66 , bucketByActivity
71 , bucketByActivity
@@ -71,6 +76,7 @@ module Network.Google.Fitness.Types
71 , AggregateRequest
76 , AggregateRequest
72 , aggregateRequest
77 , aggregateRequest
73 , arEndTimeMillis
78 , arEndTimeMillis
79+ , arFilteredDataQualityStandard
74 , arAggregateBy
80 , arAggregateBy
75 , arBucketBySession
81 , arBucketBySession
76 , arBucketByActivityType
82 , arBucketByActivityType
@@ -117,6 +123,7 @@ module Network.Google.Fitness.Types
117 , listSessionsResponse
123 , listSessionsResponse
118 , lsrNextPageToken
124 , lsrNextPageToken
119 , lsrDeletedSession
125 , lsrDeletedSession
126+ , lsrHasMoreData
120 , lsrSession
127 , lsrSession
121
128
122 -- * AggregateBucket
129 -- * AggregateBucket
@@ -146,17 +153,28 @@ module Network.Google.Fitness.Types
146 , dtfName
153 , dtfName
147 , dtfOptional
154 , dtfOptional
148
155
156+ -- * AggregateRequestFilteredDataQualityStandardItem
157+ , AggregateRequestFilteredDataQualityStandardItem (..)
158+
149 -- * DataSource
159 -- * DataSource
150 , DataSource
160 , DataSource
151 , dataSource
161 , dataSource
152 , dsApplication
162 , dsApplication
153 , dsDevice
163 , dsDevice
164+ , dsDataQualityStandard
154 , dsName
165 , dsName
155 , dsDataType
166 , dsDataType
156 , dsType
167 , dsType
157 , dsDataStreamName
168 , dsDataStreamName
158 , dsDataStreamId
169 , dsDataStreamId
159
170
171+ -- * BucketByTimePeriod
172+ , BucketByTimePeriod
173+ , bucketByTimePeriod
174+ , bbtpValue
175+ , bbtpType
176+ , bbtpTimeZoneId
177+
160 -- * DeviceType
178 -- * DeviceType
161 , DeviceType (..)
179 , DeviceType (..)
162
180
@@ -169,6 +187,7 @@ module Network.Google.Fitness.Types
169 -- * BucketByTime
187 -- * BucketByTime
170 , BucketByTime
188 , BucketByTime
171 , bucketByTime
189 , bucketByTime
190+ , bbtPeriod
172 , bbtDurationMillis
191 , bbtDurationMillis
173
192
174 -- * DataType
193 -- * DataType
@@ -190,6 +209,9 @@ module Network.Google.Fitness.Types
190 , sStartTimeMillis
209 , sStartTimeMillis
191 , sDescription
210 , sDescription
192
211
212+ -- * DataSourceDataQualityStandardItem
213+ , DataSourceDataQualityStandardItem (..)
214+
193 -- * DataTypeFieldFormat
215 -- * DataTypeFieldFormat
194 , DataTypeFieldFormat (..)
216 , DataTypeFieldFormat (..)
195 ) where
217 ) where
@@ -208,6 +230,10 @@ fitnessService
208fitnessBodyReadScope :: Proxy '["https://www.googleapis.com/auth/fitness.body.read"]
230fitnessBodyReadScope :: Proxy '["https://www.googleapis.com/auth/fitness.body.read"]
209fitnessBodyReadScope = Proxy;
231fitnessBodyReadScope = Proxy;
210
232
233+-- | View nutrition information in Google Fit
234+fitnessNutritionReadScope :: Proxy '["https://www.googleapis.com/auth/fitness.nutrition.read"]
235+fitnessNutritionReadScope = Proxy;
236+
211-- | View your activity information in Google Fit
237-- | View your activity information in Google Fit
212fitnessActivityReadScope :: Proxy '["https://www.googleapis.com/auth/fitness.activity.read"]
238fitnessActivityReadScope :: Proxy '["https://www.googleapis.com/auth/fitness.activity.read"]
213fitnessActivityReadScope = Proxy;
239fitnessActivityReadScope = Proxy;
@@ -224,6 +250,10 @@ fitnessLocationReadScope = Proxy;
224fitnessLocationWriteScope :: Proxy '["https://www.googleapis.com/auth/fitness.location.write"]
250fitnessLocationWriteScope :: Proxy '["https://www.googleapis.com/auth/fitness.location.write"]
225fitnessLocationWriteScope = Proxy;
251fitnessLocationWriteScope = Proxy;
226
252
253+-- | View and store nutrition information in Google Fit
254+fitnessNutritionWriteScope :: Proxy '["https://www.googleapis.com/auth/fitness.nutrition.write"]
255+fitnessNutritionWriteScope = Proxy;
256+
227-- | View and store body sensor data in Google Fit
257-- | View and store body sensor data in Google Fit
228fitnessBodyWriteScope :: Proxy '["https://www.googleapis.com/auth/fitness.body.write"]
258fitnessBodyWriteScope :: Proxy '["https://www.googleapis.com/auth/fitness.body.write"]
229fitnessBodyWriteScope = Proxy;
259fitnessBodyWriteScope = Proxy;
gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs+137−26
@@ -121,8 +121,7 @@ instance ToJSON DataSet where
121 ("minStartTimeNs" .=) <$> _dsMinStartTimeNs,
121 ("minStartTimeNs" .=) <$> _dsMinStartTimeNs,
122 ("maxEndTimeNs" .=) <$> _dsMaxEndTimeNs])
122 ("maxEndTimeNs" .=) <$> _dsMaxEndTimeNs])
123
123
124−-- | See:
124+-- |
125−-- google3\/java\/com\/google\/android\/apps\/heart\/platform\/api\/Application.java
126--
125--
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])
341
340
341+-- | Next id: 10
342--
342--
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)
353
354
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'
357--
358--
358-- * 'arEndTimeMillis'
359-- * 'arEndTimeMillis'
359--
360--
361+-- * 'arFilteredDataQualityStandard'
362+--
360-- * 'arAggregateBy'
363-- * 'arAggregateBy'
361--
364--
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
391
395
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+
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
450 (\ o ->
464 (\ o ->
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
462 = object
477 = object
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)
833
851
@@ -839,6 +857,8 @@ data ListSessionsResponse = ListSessionsResponse'
839--
857--
840-- * 'lsrDeletedSession'
858-- * 'lsrDeletedSession'
841--
859--
860+-- * 'lsrHasMoreData'
861+--
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
850 }
871 }
851
872
@@ -867,6 +888,12 @@ lsrDeletedSession
867 . _Default
888 . _Default
868 . _Coerce
889 . _Coerce
869
890
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+
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))
886
914
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])
894
923
895--
924--
@@ -1144,13 +1173,14 @@ instance ToJSON DataTypeField where
1144--
1173--
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)
1155
1185
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'
1161--
1191--
1162-- * 'dsDevice'
1192-- * 'dsDevice'
1163--
1193--
1194+-- * 'dsDataQualityStandard'
1195+--
1164-- * 'dsName'
1196-- * 'dsName'
1165--
1197--
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})
1197
1230
1231+-- |
1232+dsDataQualityStandard :: Lens' DataSource [DataSourceDataQualityStandardItem]
1233+dsDataQualityStandard
1234+ = lens _dsDataQualityStandard
1235+ (\ s a -> s{_dsDataQualityStandard = a})
1236+ . _Default
1237+ . _Coerce
1238+
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
1255 (\ o ->
1296 (\ o ->
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])
1274
1319
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+
1275--
1376--
1276-- /See:/ 'valueMapValEntry' smart constructor.
1377-- /See:/ 'valueMapValEntry' smart constructor.
1277data ValueMapValEntry = ValueMapValEntry'
1378data ValueMapValEntry = ValueMapValEntry'
@@ -1317,22 +1418,30 @@ instance ToJSON ValueMapValEntry where
1317
1418
1318--
1419--
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)
1323
1425
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.
1325--
1427--
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:
1327--
1429--
1430+-- * 'bbtPeriod'
1431+--
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
1334 }
1439 }
1335
1440
1441+bbtPeriod :: Lens' BucketByTime (Maybe BucketByTimePeriod)
1442+bbtPeriod
1443+ = lens _bbtPeriod (\ s a -> s{_bbtPeriod = a})
1444+
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"
1457+ (\ o ->
1348− (\ o -> BucketByTime' <$> (o .:? "durationMillis"))
1458+ BucketByTime' <$>
1459+ (o .:? "period") <*> (o .:? "durationMillis"))
1349
1460
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])
1355
1467
1356−-- | See:
1468+-- |
1357−-- google3\/java\/com\/google\/android\/apps\/heart\/platform\/api\/DataType.java
1358--
1469--
1359-- /See:/ 'dataType' smart constructor.
1470-- /See:/ 'dataType' smart constructor.
1360data DataType = DataType'
1471data DataType = DataType'
gogol-fitness/gen/Network/Google/Fitness/Types/Sum.hs+150
@@ -86,10 +86,100 @@ instance FromJSON DataSourceType where
86instance ToJSON DataSourceType where
86instance ToJSON DataSourceType where
87 toJSON = toJSONText
87 toJSON = toJSONText
88
88
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+
89-- | A constant representing the type of the device.
177-- | A constant representing the type of the device.
90data DeviceType
178data DeviceType
91 = ChestStrap
179 = ChestStrap
92 -- ^ @chestStrap@
180 -- ^ @chestStrap@
181+ | HeadMounted
182+ -- ^ @headMounted@
93 | Phone
183 | Phone
94 -- ^ @phone@
184 -- ^ @phone@
95 | Scale
185 | Scale
@@ -107,6 +197,7 @@ instance Hashable DeviceType
107instance FromHttpApiData DeviceType where
197instance FromHttpApiData DeviceType where
108 parseQueryParam = \case
198 parseQueryParam = \case
109 "chestStrap" -> Right ChestStrap
199 "chestStrap" -> Right ChestStrap
200+ "headMounted" -> Right HeadMounted
110 "phone" -> Right Phone
201 "phone" -> Right Phone
111 "scale" -> Right Scale
202 "scale" -> Right Scale
112 "tablet" -> Right Tablet
203 "tablet" -> Right Tablet
@@ -117,6 +208,7 @@ instance FromHttpApiData DeviceType where
117instance ToHttpApiData DeviceType where
208instance ToHttpApiData DeviceType where
118 toQueryParam = \case
209 toQueryParam = \case
119 ChestStrap -> "chestStrap"
210 ChestStrap -> "chestStrap"
211+ HeadMounted -> "headMounted"
120 Phone -> "phone"
212 Phone -> "phone"
121 Scale -> "scale"
213 Scale -> "scale"
122 Tablet -> "tablet"
214 Tablet -> "tablet"
@@ -129,6 +221,64 @@ instance FromJSON DeviceType where
129instance ToJSON DeviceType where
221instance ToJSON DeviceType where
130 toJSON = toJSONText
222 toJSON = toJSONText
131
223
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+
132-- | The different supported formats for each field in a data type.
282-- | The different supported formats for each field in a data type.
133data DataTypeFieldFormat
283data DataTypeFieldFormat
134 = Blob
284 = Blob
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSet/Aggregate.hs+3−1
@@ -102,7 +102,9 @@ instance GoogleRequest UsersDataSetAggregate where
102 "https://www.googleapis.com/auth/fitness.body.read",
102 "https://www.googleapis.com/auth/fitness.body.read",
103 "https://www.googleapis.com/auth/fitness.body.write",
103 "https://www.googleapis.com/auth/fitness.body.write",
104 "https://www.googleapis.com/auth/fitness.location.read",
104 "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"]
106 requestClient UsersDataSetAggregate'{..}
108 requestClient UsersDataSetAggregate'{..}
107 = go _udsaUserId (Just AltJSON) _udsaPayload
109 = go _udsaUserId (Just AltJSON) _udsaPayload
108 fitnessService
110 fitnessService
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Create.hs+2−1
@@ -106,7 +106,8 @@ instance GoogleRequest UsersDataSourcesCreate where
106 type Scopes UsersDataSourcesCreate =
106 type Scopes UsersDataSourcesCreate =
107 '["https://www.googleapis.com/auth/fitness.activity.write",
107 '["https://www.googleapis.com/auth/fitness.activity.write",
108 "https://www.googleapis.com/auth/fitness.body.write",
108 "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"]
110 requestClient UsersDataSourcesCreate'{..}
111 requestClient UsersDataSourcesCreate'{..}
111 = go _udscUserId (Just AltJSON) _udscPayload
112 = go _udscUserId (Just AltJSON) _udscPayload
112 fitnessService
113 fitnessService
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/DataSets/Delete.hs+2−1
@@ -149,7 +149,8 @@ instance GoogleRequest UsersDataSourcesDataSetsDelete
149 type Scopes UsersDataSourcesDataSetsDelete =
149 type Scopes UsersDataSourcesDataSetsDelete =
150 '["https://www.googleapis.com/auth/fitness.activity.write",
150 '["https://www.googleapis.com/auth/fitness.activity.write",
151 "https://www.googleapis.com/auth/fitness.body.write",
151 "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"]
153 requestClient UsersDataSourcesDataSetsDelete'{..}
154 requestClient UsersDataSourcesDataSetsDelete'{..}
154 = go _udsdsdUserId _udsdsdDataSourceId
155 = go _udsdsdUserId _udsdsdDataSourceId
155 _udsdsdDataSetId
156 _udsdsdDataSetId
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/DataSets/Get.hs+4−2
@@ -126,7 +126,7 @@ udsdsgDataSetId
126 (\ s a -> s{_udsdsgDataSetId = a})
126 (\ s a -> s{_udsdsgDataSetId = a})
127
127
128-- | If specified, no more than this many data points will be included in the
128-- | 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
130-- will be set in the dataset response.
130-- will be set in the dataset response.
131udsdsgLimit :: Lens' UsersDataSourcesDataSetsGet (Maybe Int32)
131udsdsgLimit :: Lens' UsersDataSourcesDataSetsGet (Maybe Int32)
132udsdsgLimit
132udsdsgLimit
@@ -152,7 +152,9 @@ instance GoogleRequest UsersDataSourcesDataSetsGet
152 "https://www.googleapis.com/auth/fitness.body.read",
152 "https://www.googleapis.com/auth/fitness.body.read",
153 "https://www.googleapis.com/auth/fitness.body.write",
153 "https://www.googleapis.com/auth/fitness.body.write",
154 "https://www.googleapis.com/auth/fitness.location.read",
154 "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"]
156 requestClient UsersDataSourcesDataSetsGet'{..}
158 requestClient UsersDataSourcesDataSetsGet'{..}
157 = go _udsdsgUserId _udsdsgDataSourceId
159 = go _udsdsgUserId _udsdsgDataSourceId
158 _udsdsgDataSetId
160 _udsdsgDataSetId
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/DataSets/Patch.hs+2−1
@@ -145,7 +145,8 @@ instance GoogleRequest UsersDataSourcesDataSetsPatch
145 type Scopes UsersDataSourcesDataSetsPatch =
145 type Scopes UsersDataSourcesDataSetsPatch =
146 '["https://www.googleapis.com/auth/fitness.activity.write",
146 '["https://www.googleapis.com/auth/fitness.activity.write",
147 "https://www.googleapis.com/auth/fitness.body.write",
147 "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"]
149 requestClient UsersDataSourcesDataSetsPatch'{..}
150 requestClient UsersDataSourcesDataSetsPatch'{..}
150 = go _udsdspUserId _udsdspDataSourceId
151 = go _udsdspUserId _udsdspDataSourceId
151 _udsdspDataSetId
152 _udsdspDataSetId
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Delete.hs+6−3
@@ -20,7 +20,8 @@
20-- Stability : auto-generated
20-- Stability : auto-generated
21-- Portability : non-portable (GHC extensions)
21-- Portability : non-portable (GHC extensions)
22--
22--
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.
24--
25--
25-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.delete@.
26-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.delete@.
26module Network.Google.Resource.Fitness.Users.DataSources.Delete
27module Network.Google.Resource.Fitness.Users.DataSources.Delete
@@ -51,7 +52,8 @@ type UsersDataSourcesDeleteResource =
51 Capture "dataSourceId" Text :>
52 Capture "dataSourceId" Text :>
52 QueryParam "alt" AltJSON :> Delete '[JSON] DataSource
53 QueryParam "alt" AltJSON :> Delete '[JSON] DataSource
53
54
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.
55--
57--
56-- /See:/ 'usersDataSourcesDelete' smart constructor.
58-- /See:/ 'usersDataSourcesDelete' smart constructor.
57data UsersDataSourcesDelete = UsersDataSourcesDelete'
59data UsersDataSourcesDelete = UsersDataSourcesDelete'
@@ -93,7 +95,8 @@ instance GoogleRequest UsersDataSourcesDelete where
93 type Scopes UsersDataSourcesDelete =
95 type Scopes UsersDataSourcesDelete =
94 '["https://www.googleapis.com/auth/fitness.activity.write",
96 '["https://www.googleapis.com/auth/fitness.activity.write",
95 "https://www.googleapis.com/auth/fitness.body.write",
97 "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"]
97 requestClient UsersDataSourcesDelete'{..}
100 requestClient UsersDataSourcesDelete'{..}
98 = go _udsdUserId _udsdDataSourceId (Just AltJSON)
101 = go _udsdUserId _udsdDataSourceId (Just AltJSON)
99 fitnessService
102 fitnessService
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Get.hs+5−3
@@ -20,7 +20,7 @@
20-- Stability : auto-generated
20-- Stability : auto-generated
21-- Portability : non-portable (GHC extensions)
21-- Portability : non-portable (GHC extensions)
22--
22--
23−-- Returns a data source identified by a data stream ID.
23+-- Returns the specified data source.
24--
24--
25-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.get@.
25-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.get@.
26module Network.Google.Resource.Fitness.Users.DataSources.Get
26module Network.Google.Resource.Fitness.Users.DataSources.Get
@@ -51,7 +51,7 @@ type UsersDataSourcesGetResource =
51 Capture "dataSourceId" Text :>
51 Capture "dataSourceId" Text :>
52 QueryParam "alt" AltJSON :> Get '[JSON] DataSource
52 QueryParam "alt" AltJSON :> Get '[JSON] DataSource
53
53
54−-- | Returns a data source identified by a data stream ID.
54+-- | Returns the specified data source.
55--
55--
56-- /See:/ 'usersDataSourcesGet' smart constructor.
56-- /See:/ 'usersDataSourcesGet' smart constructor.
57data UsersDataSourcesGet = UsersDataSourcesGet'
57data UsersDataSourcesGet = UsersDataSourcesGet'
@@ -96,7 +96,9 @@ instance GoogleRequest UsersDataSourcesGet where
96 "https://www.googleapis.com/auth/fitness.body.read",
96 "https://www.googleapis.com/auth/fitness.body.read",
97 "https://www.googleapis.com/auth/fitness.body.write",
97 "https://www.googleapis.com/auth/fitness.body.write",
98 "https://www.googleapis.com/auth/fitness.location.read",
98 "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"]
100 requestClient UsersDataSourcesGet'{..}
102 requestClient UsersDataSourcesGet'{..}
101 = go _udsgUserId _udsgDataSourceId (Just AltJSON)
103 = go _udsgUserId _udsgDataSourceId (Just AltJSON)
102 fitnessService
104 fitnessService
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/List.hs+7−5
@@ -21,8 +21,8 @@
21-- Portability : non-portable (GHC extensions)
21-- Portability : non-portable (GHC extensions)
22--
22--
23-- Lists all data sources that are visible to the developer, using the
23-- 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
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
25+-- private data sources that are only visible to other developers, or calls
26-- using other scopes.
26-- using other scopes.
27--
27--
28-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.list@.
28-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.list@.
@@ -56,8 +56,8 @@ type UsersDataSourcesListResource =
56 Get '[JSON] ListDataSourcesResponse
56 Get '[JSON] ListDataSourcesResponse
57
57
58-- | Lists all data sources that are visible to the developer, using the
58-- | 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
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
60+-- private data sources that are only visible to other developers, or calls
61-- using other scopes.
61-- using other scopes.
62--
62--
63-- /See:/ 'usersDataSourcesList' smart constructor.
63-- /See:/ 'usersDataSourcesList' smart constructor.
@@ -106,7 +106,9 @@ instance GoogleRequest UsersDataSourcesList where
106 "https://www.googleapis.com/auth/fitness.body.read",
106 "https://www.googleapis.com/auth/fitness.body.read",
107 "https://www.googleapis.com/auth/fitness.body.write",
107 "https://www.googleapis.com/auth/fitness.body.write",
108 "https://www.googleapis.com/auth/fitness.location.read",
108 "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"]
110 requestClient UsersDataSourcesList'{..}
112 requestClient UsersDataSourcesList'{..}
111 = go _udslUserId (_udslDataTypeName ^. _Default)
113 = go _udslUserId (_udslDataTypeName ^. _Default)
112 (Just AltJSON)
114 (Just AltJSON)
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Patch.hs+10−13
@@ -20,12 +20,10 @@
20-- Stability : auto-generated
20-- Stability : auto-generated
21-- Portability : non-portable (GHC extensions)
21-- Portability : non-portable (GHC extensions)
22--
22--
23−-- Updates a given data source. It is an error to modify the data source\'s
23+-- Updates the specified data source. The dataStreamId, dataType, type,
24−-- data stream ID, data type, type, stream name or device information apart
24+-- dataStreamName, and device properties with the exception of version,
25−-- from the device version. Changing these fields would require a new
25+-- cannot be modified. Data sources are identified by their dataStreamId.
26−-- unique data stream ID and separate data source. Data sources are
27−-- identified by their data stream ID. This method supports patch
26+-- This method supports patch semantics.
28−-- semantics.
29--
27--
30-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.patch@.
28-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.patch@.
31module Network.Google.Resource.Fitness.Users.DataSources.Patch
29module Network.Google.Resource.Fitness.Users.DataSources.Patch
@@ -59,12 +57,10 @@ type UsersDataSourcesPatchResource =
59 ReqBody '[JSON] DataSource :>
57 ReqBody '[JSON] DataSource :>
60 Patch '[JSON] DataSource
58 Patch '[JSON] DataSource
61
59
62−-- | Updates a given data source. It is an error to modify the data source\'s
60+-- | Updates the specified data source. The dataStreamId, dataType, type,
63−-- data stream ID, data type, type, stream name or device information apart
61+-- dataStreamName, and device properties with the exception of version,
64−-- from the device version. Changing these fields would require a new
62+-- cannot be modified. Data sources are identified by their dataStreamId.
65−-- unique data stream ID and separate data source. Data sources are
66−-- identified by their data stream ID. This method supports patch
63+-- This method supports patch semantics.
67−-- semantics.
68--
64--
69-- /See:/ 'usersDataSourcesPatch' smart constructor.
65-- /See:/ 'usersDataSourcesPatch' smart constructor.
70data UsersDataSourcesPatch = UsersDataSourcesPatch'
66data UsersDataSourcesPatch = UsersDataSourcesPatch'
@@ -116,7 +112,8 @@ instance GoogleRequest UsersDataSourcesPatch where
116 type Scopes UsersDataSourcesPatch =
112 type Scopes UsersDataSourcesPatch =
117 '["https://www.googleapis.com/auth/fitness.activity.write",
113 '["https://www.googleapis.com/auth/fitness.activity.write",
118 "https://www.googleapis.com/auth/fitness.body.write",
114 "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"]
120 requestClient UsersDataSourcesPatch'{..}
117 requestClient UsersDataSourcesPatch'{..}
121 = go _udspUserId _udspDataSourceId (Just AltJSON)
118 = go _udspUserId _udspDataSourceId (Just AltJSON)
122 _udspPayload
119 _udspPayload
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Update.hs+8−11
@@ -20,11 +20,9 @@
20-- Stability : auto-generated
20-- Stability : auto-generated
21-- Portability : non-portable (GHC extensions)
21-- Portability : non-portable (GHC extensions)
22--
22--
23−-- Updates a given data source. It is an error to modify the data source\'s
23+-- Updates the specified data source. The dataStreamId, dataType, type,
24−-- data stream ID, data type, type, stream name or device information apart
24+-- dataStreamName, and device properties with the exception of version,
25−-- from the device version. Changing these fields would require a new
25+-- cannot be modified. Data sources are identified by their dataStreamId.
26−-- unique data stream ID and separate data source. Data sources are
27−-- identified by their data stream ID.
28--
26--
29-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.update@.
27-- /See:/ <https://developers.google.com/fit/rest/ Fitness Reference> for @fitness.users.dataSources.update@.
30module Network.Google.Resource.Fitness.Users.DataSources.Update
28module Network.Google.Resource.Fitness.Users.DataSources.Update
@@ -57,11 +55,9 @@ type UsersDataSourcesUpdateResource =
57 QueryParam "alt" AltJSON :>
55 QueryParam "alt" AltJSON :>
58 ReqBody '[JSON] DataSource :> Put '[JSON] DataSource
56 ReqBody '[JSON] DataSource :> Put '[JSON] DataSource
59
57
60−-- | Updates a given data source. It is an error to modify the data source\'s
58+-- | Updates the specified data source. The dataStreamId, dataType, type,
61−-- data stream ID, data type, type, stream name or device information apart
59+-- dataStreamName, and device properties with the exception of version,
62−-- from the device version. Changing these fields would require a new
60+-- cannot be modified. Data sources are identified by their dataStreamId.
63−-- unique data stream ID and separate data source. Data sources are
64−-- identified by their data stream ID.
65--
61--
66-- /See:/ 'usersDataSourcesUpdate' smart constructor.
62-- /See:/ 'usersDataSourcesUpdate' smart constructor.
67data UsersDataSourcesUpdate = UsersDataSourcesUpdate'
63data UsersDataSourcesUpdate = UsersDataSourcesUpdate'
@@ -113,7 +109,8 @@ instance GoogleRequest UsersDataSourcesUpdate where
113 type Scopes UsersDataSourcesUpdate =
109 type Scopes UsersDataSourcesUpdate =
114 '["https://www.googleapis.com/auth/fitness.activity.write",
110 '["https://www.googleapis.com/auth/fitness.activity.write",
115 "https://www.googleapis.com/auth/fitness.body.write",
111 "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"]
117 requestClient UsersDataSourcesUpdate'{..}
114 requestClient UsersDataSourcesUpdate'{..}
118 = go _udsuUserId _udsuDataSourceId (Just AltJSON)
115 = go _udsuUserId _udsuDataSourceId (Just AltJSON)
119 _udsuPayload
116 _udsuPayload
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/List.hs+3−1
@@ -135,7 +135,9 @@ instance GoogleRequest UsersSessionsList where
135 "https://www.googleapis.com/auth/fitness.body.read",
135 "https://www.googleapis.com/auth/fitness.body.read",
136 "https://www.googleapis.com/auth/fitness.body.write",
136 "https://www.googleapis.com/auth/fitness.body.write",
137 "https://www.googleapis.com/auth/fitness.location.read",
137 "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"]
139 requestClient UsersSessionsList'{..}
141 requestClient UsersSessionsList'{..}
140 = go _uslUserId _uslStartTime _uslEndTime
142 = go _uslUserId _uslStartTime _uslEndTime
141 _uslPageToken
143 _uslPageToken
gogol-fitness/gogol-fitness.cabal+2−1
@@ -14,7 +14,8 @@ cabal-version: >= 1.10
14extra-source-files: README.md
14extra-source-files: README.md
15
15
16description:
16description:
17− Google Fit API
17+ Stores and accesses user data in the fitness store from apps on any
18+ platform.
18 .
19 .
19 /Warning:/ This is an experimental prototype/preview release which is still
20 /Warning:/ This is an experimental prototype/preview release which is still
20 under exploratory development and not intended for public use, caveat emptor!
21 under exploratory development and not intended for public use, caveat emptor!