on develop help sign in
Regenerating gogol-drive from latest service definition
b6f5909Brendan Hay
gen/model/drive/v2/drive-api.json+38−5
@@ -1,11 +1,11 @@
1{
1{
2 "kind": "discovery#restDescription",
2 "kind": "discovery#restDescription",
3− "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/UPUy71zSavKXqWFDrZOhX79TDks\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/Bxo7TXXOxzhoC81JSCcKcp551FA\"",
4 "discoveryVersion": "v1",
4 "discoveryVersion": "v1",
5 "id": "drive:v2",
5 "id": "drive:v2",
6 "name": "drive",
6 "name": "drive",
7 "version": "v2",
7 "version": "v2",
8− "revision": "20160425",
8+ "revision": "20161018",
9 "title": "Drive API",
9 "title": "Drive API",
10 "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.",
10 "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.",
11 "ownerDomain": "google.com",
11 "ownerDomain": "google.com",
@@ -299,7 +299,7 @@
299 },
299 },
300 "remainingChangeIds": {
300 "remainingChangeIds": {
301 "type": "string",
301 "type": "string",
302− "description": "The number of remaining change ids.",
302+ "description": "The number of remaining change ids, limited to no more than 2500.",
303 "format": "int64"
303 "format": "int64"
304 },
304 },
305 "rootFolderId": {
305 "rootFolderId": {
@@ -1469,9 +1469,14 @@
1469 "type": "string",
1469 "type": "string",
1470 "description": "The ETag of the permission."
1470 "description": "The ETag of the permission."
1471 },
1471 },
1472+ "expirationDate": {
1473+ "type": "string",
1474+ "description": "The time at which this permission will expire (RFC 3339 date-time).",
1475+ "format": "date-time"
1476+ },
1472 "id": {
1477 "id": {
1473 "type": "string",
1478 "type": "string",
1474− "description": "The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified."
1479+ "description": "The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type anyone, in which case both id and value are ignored."
1475 },
1480 },
1476 "kind": {
1481 "kind": {
1477 "type": "string",
1482 "type": "string",
@@ -1510,7 +1515,7 @@
1510 },
1515 },
1511 "value": {
1516 "value": {
1512 "type": "string",
1517 "type": "string",
1513− "description": "The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified."
1518+ "description": "The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type anyone, in which case both id and value are ignored."
1514 },
1519 },
1515 "withLink": {
1520 "withLink": {
1516 "type": "boolean",
1521 "type": "boolean",
@@ -1727,6 +1732,10 @@
1727 "description": "This is always drive#revisionList.",
1732 "description": "This is always drive#revisionList.",
1728 "default": "drive#revisionList"
1733 "default": "drive#revisionList"
1729 },
1734 },
1735+ "nextPageToken": {
1736+ "type": "string",
1737+ "description": "The page token for the next page of revisions. This field will be absent if the end of the revisions list has been reached. If the token is rejected for any reason, it should be discarded and pagination should be restarted from the first page of results."
1738+ },
1730 "selfLink": {
1739 "selfLink": {
1731 "type": "string",
1740 "type": "string",
1732 "description": "A link back to this list."
1741 "description": "A link back to this list."
@@ -3526,6 +3535,12 @@
3526 "required": true,
3535 "required": true,
3527 "location": "path"
3536 "location": "path"
3528 },
3537 },
3538+ "removeExpiration": {
3539+ "type": "boolean",
3540+ "description": "Whether to remove the expiration date.",
3541+ "default": "false",
3542+ "location": "query"
3543+ },
3529 "transferOwnership": {
3544 "transferOwnership": {
3530 "type": "boolean",
3545 "type": "boolean",
3531 "description": "Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.",
3546 "description": "Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.",
@@ -3566,6 +3581,12 @@
3566 "required": true,
3581 "required": true,
3567 "location": "path"
3582 "location": "path"
3568 },
3583 },
3584+ "removeExpiration": {
3585+ "type": "boolean",
3586+ "description": "Whether to remove the expiration date.",
3587+ "default": "false",
3588+ "location": "query"
3589+ },
3569 "transferOwnership": {
3590 "transferOwnership": {
3570 "type": "boolean",
3591 "type": "boolean",
3571 "description": "Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.",
3592 "description": "Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.",
@@ -4221,6 +4242,18 @@
4221 "description": "The ID of the file.",
4242 "description": "The ID of the file.",
4222 "required": true,
4243 "required": true,
4223 "location": "path"
4244 "location": "path"
4245+ },
4246+ "maxResults": {
4247+ "type": "integer",
4248+ "description": "Maximum number of revisions to return.",
4249+ "format": "int32",
4250+ "minimum": "1",
4251+ "location": "query"
4252+ },
4253+ "pageToken": {
4254+ "type": "string",
4255+ "description": "Page token for revisions. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
4256+ "location": "query"
4224 }
4257 }
4225 },
4258 },
4226 "parameterOrder": [
4259 "parameterOrder": [
gen/model/drive/v3/drive-api.json+45−18
@@ -1,11 +1,11 @@
1{
1{
2 "kind": "discovery#restDescription",
2 "kind": "discovery#restDescription",
3− "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/e0xaiPPUuJmZ-QVxsG58e9kdnk4\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/l3OBP3BL9medgXcel5lvXKXZMZI\"",
4 "discoveryVersion": "v1",
4 "discoveryVersion": "v1",
5 "id": "drive:v3",
5 "id": "drive:v3",
6 "name": "drive",
6 "name": "drive",
7 "version": "v3",
7 "version": "v3",
8− "revision": "20160425",
8+ "revision": "20161018",
9 "title": "Drive API",
9 "title": "Drive API",
10 "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.",
10 "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.",
11 "ownerDomain": "google.com",
11 "ownerDomain": "google.com",
@@ -135,7 +135,7 @@
135 },
135 },
136 "kind": {
136 "kind": {
137 "type": "string",
137 "type": "string",
138− "description": "This is always drive#about.",
138+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#about\".",
139 "default": "drive#about"
139 "default": "drive#about"
140 },
140 },
141 "maxImportSizes": {
141 "maxImportSizes": {
@@ -198,7 +198,7 @@
198 },
198 },
199 "kind": {
199 "kind": {
200 "type": "string",
200 "type": "string",
201− "description": "This is always drive#change.",
201+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#change\".",
202 "default": "drive#change"
202 "default": "drive#change"
203 },
203 },
204 "removed": {
204 "removed": {
@@ -226,7 +226,7 @@
226 },
226 },
227 "kind": {
227 "kind": {
228 "type": "string",
228 "type": "string",
229− "description": "This is always drive#changeList.",
229+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#changeList\".",
230 "default": "drive#changeList"
230 "default": "drive#changeList"
231 },
231 },
232 "newStartPageToken": {
232 "newStartPageToken": {
@@ -334,7 +334,7 @@
334 },
334 },
335 "kind": {
335 "kind": {
336 "type": "string",
336 "type": "string",
337− "description": "This is always drive#comment.",
337+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#comment\".",
338 "default": "drive#comment"
338 "default": "drive#comment"
339 },
339 },
340 "modifiedTime": {
340 "modifiedTime": {
@@ -383,7 +383,7 @@
383 },
383 },
384 "kind": {
384 "kind": {
385 "type": "string",
385 "type": "string",
386− "description": "This is always drive#commentList.",
386+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#commentList\".",
387 "default": "drive#commentList"
387 "default": "drive#commentList"
388 },
388 },
389 "nextPageToken": {
389 "nextPageToken": {
@@ -615,7 +615,7 @@
615 },
615 },
616 "kind": {
616 "kind": {
617 "type": "string",
617 "type": "string",
618− "description": "This is always drive#file.",
618+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#file\".",
619 "default": "drive#file"
619 "default": "drive#file"
620 },
620 },
621 "lastModifyingUser": {
621 "lastModifyingUser": {
@@ -789,7 +789,7 @@
789 },
789 },
790 "kind": {
790 "kind": {
791 "type": "string",
791 "type": "string",
792− "description": "This is always drive#fileList.",
792+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#fileList\".",
793 "default": "drive#fileList"
793 "default": "drive#fileList"
794 },
794 },
795 "nextPageToken": {
795 "nextPageToken": {
@@ -812,7 +812,7 @@
812 },
812 },
813 "kind": {
813 "kind": {
814 "type": "string",
814 "type": "string",
815− "description": "This is always drive#generatedIds",
815+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#generatedIds\".",
816 "default": "drive#generatedIds"
816 "default": "drive#generatedIds"
817 },
817 },
818 "space": {
818 "space": {
@@ -842,13 +842,18 @@
842 "type": "string",
842 "type": "string",
843 "description": "The email address of the user or group to which this permission refers."
843 "description": "The email address of the user or group to which this permission refers."
844 },
844 },
845+ "expirationTime": {
846+ "type": "string",
847+ "description": "The time at which this permission will expire (RFC 3339 date-time).",
848+ "format": "date-time"
849+ },
845 "id": {
850 "id": {
846 "type": "string",
851 "type": "string",
847 "description": "The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId."
852 "description": "The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId."
848 },
853 },
849 "kind": {
854 "kind": {
850 "type": "string",
855 "type": "string",
851− "description": "This is always drive#permission.",
856+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#permission\".",
852 "default": "drive#permission"
857 "default": "drive#permission"
853 },
858 },
854 "photoLink": {
859 "photoLink": {
@@ -882,7 +887,7 @@
882 "properties": {
887 "properties": {
883 "kind": {
888 "kind": {
884 "type": "string",
889 "type": "string",
885− "description": "This is always drive#permissionList.",
890+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#permissionList\".",
886 "default": "drive#permissionList"
891 "default": "drive#permissionList"
887 },
892 },
888 "permissions": {
893 "permissions": {
@@ -935,7 +940,7 @@
935 },
940 },
936 "kind": {
941 "kind": {
937 "type": "string",
942 "type": "string",
938− "description": "This is always drive#reply.",
943+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#reply\".",
939 "default": "drive#reply"
944 "default": "drive#reply"
940 },
945 },
941 "modifiedTime": {
946 "modifiedTime": {
@@ -952,7 +957,7 @@
952 "properties": {
957 "properties": {
953 "kind": {
958 "kind": {
954 "type": "string",
959 "type": "string",
955− "description": "This is always drive#replyList.",
960+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#replyList\".",
956 "default": "drive#replyList"
961 "default": "drive#replyList"
957 },
962 },
958 "nextPageToken": {
963 "nextPageToken": {
@@ -983,7 +988,7 @@
983 },
988 },
984 "kind": {
989 "kind": {
985 "type": "string",
990 "type": "string",
986− "description": "This is always drive#revision.",
991+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#revision\".",
987 "default": "drive#revision"
992 "default": "drive#revision"
988 },
993 },
989 "lastModifyingUser": {
994 "lastModifyingUser": {
@@ -1033,9 +1038,13 @@
1033 "properties": {
1038 "properties": {
1034 "kind": {
1039 "kind": {
1035 "type": "string",
1040 "type": "string",
1036− "description": "This is always drive#revisionList.",
1041+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#revisionList\".",
1037 "default": "drive#revisionList"
1042 "default": "drive#revisionList"
1038 },
1043 },
1044+ "nextPageToken": {
1045+ "type": "string",
1046+ "description": "The page token for the next page of revisions. This will be absent if the end of the revisions list has been reached."
1047+ },
1039 "revisions": {
1048 "revisions": {
1040 "type": "array",
1049 "type": "array",
1041 "description": "The full list of revisions.",
1050 "description": "The full list of revisions.",
@@ -1051,7 +1060,7 @@
1051 "properties": {
1060 "properties": {
1052 "kind": {
1061 "kind": {
1053 "type": "string",
1062 "type": "string",
1054− "description": "This is always drive#startPageToken.",
1063+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#startPageToken\".",
1055 "default": "drive#startPageToken"
1064 "default": "drive#startPageToken"
1056 },
1065 },
1057 "startPageToken": {
1066 "startPageToken": {
@@ -1075,7 +1084,7 @@
1075 },
1084 },
1076 "kind": {
1085 "kind": {
1077 "type": "string",
1086 "type": "string",
1078− "description": "This is always drive#user.",
1087+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#user\".",
1079 "default": "drive#user"
1088 "default": "drive#user"
1080 },
1089 },
1081 "me": {
1090 "me": {
@@ -2034,6 +2043,12 @@
2034 "required": true,
2043 "required": true,
2035 "location": "path"
2044 "location": "path"
2036 },
2045 },
2046+ "removeExpiration": {
2047+ "type": "boolean",
2048+ "description": "Whether to remove the expiration date.",
2049+ "default": "false",
2050+ "location": "query"
2051+ },
2037 "transferOwnership": {
2052 "transferOwnership": {
2038 "type": "boolean",
2053 "type": "boolean",
2039 "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.",
2054 "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.",
@@ -2355,6 +2370,18 @@
2355 "description": "The ID of the file.",
2370 "description": "The ID of the file.",
2356 "required": true,
2371 "required": true,
2357 "location": "path"
2372 "location": "path"
2373+ },
2374+ "pageSize": {
2375+ "type": "integer",
2376+ "description": "The maximum number of revisions to return per page.",
2377+ "format": "int32",
2378+ "minimum": "1",
2379+ "location": "query"
2380+ },
2381+ "pageToken": {
2382+ "type": "string",
2383+ "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.",
2384+ "location": "query"
2358 }
2385 }
2359 },
2386 },
2360 "parameterOrder": [
2387 "parameterOrder": [
gogol-drive/gen/Network/Google/Drive.hs+2
@@ -379,6 +379,7 @@ module Network.Google.Drive
379 , pDisplayName
379 , pDisplayName
380 , pId
380 , pId
381 , pType
381 , pType
382+ , pExpirationTime
382
383
383 -- ** File
384 -- ** File
384 , File
385 , File
@@ -445,6 +446,7 @@ module Network.Google.Drive
445 -- ** RevisionList
446 -- ** RevisionList
446 , RevisionList
447 , RevisionList
447 , revisionList
448 , revisionList
449+ , rllNextPageToken
448 , rllKind
450 , rllKind
449 , rllRevisions
451 , rllRevisions
450
452
gogol-drive/gen/Network/Google/Drive/Types.hs+2
@@ -267,6 +267,7 @@ module Network.Google.Drive.Types
267 , pDisplayName
267 , pDisplayName
268 , pId
268 , pId
269 , pType
269 , pType
270+ , pExpirationTime
270
271
271 -- * File
272 -- * File
272 , File
273 , File
@@ -333,6 +334,7 @@ module Network.Google.Drive.Types
333 -- * RevisionList
334 -- * RevisionList
334 , RevisionList
335 , RevisionList
335 , revisionList
336 , revisionList
337+ , rllNextPageToken
336 , rllKind
338 , rllKind
337 , rllRevisions
339 , rllRevisions
338
340
gogol-drive/gen/Network/Google/Drive/Types/Product.hs+66−24
@@ -54,7 +54,8 @@ flNextPageToken
54 = lens _flNextPageToken
54 = lens _flNextPageToken
55 (\ s a -> s{_flNextPageToken = a})
55 (\ s a -> s{_flNextPageToken = a})
56
56
57+-- | Identifies what kind of resource this is. Value: the fixed string
57−-- | This is always drive#fileList.
58+-- \"drive#fileList\".
58flKind :: Lens' FileList Text
59flKind :: Lens' FileList Text
59flKind = lens _flKind (\ s a -> s{_flKind = a})
60flKind = lens _flKind (\ s a -> s{_flKind = a})
60
61
@@ -276,7 +277,8 @@ rCreatedTime
276 = lens _rCreatedTime (\ s a -> s{_rCreatedTime = a})
277 = lens _rCreatedTime (\ s a -> s{_rCreatedTime = a})
277 . mapping _DateTime
278 . mapping _DateTime
278
279
280+-- | Identifies what kind of resource this is. Value: the fixed string
279−-- | This is always drive#reply.
281+-- \"drive#reply\".
280rKind :: Lens' Reply Text
282rKind :: Lens' Reply Text
281rKind = lens _rKind (\ s a -> s{_rKind = a})
283rKind = lens _rKind (\ s a -> s{_rKind = a})
282
284
@@ -479,7 +481,8 @@ rlNextPageToken
479 = lens _rlNextPageToken
481 = lens _rlNextPageToken
480 (\ s a -> s{_rlNextPageToken = a})
482 (\ s a -> s{_rlNextPageToken = a})
481
483
484+-- | Identifies what kind of resource this is. Value: the fixed string
482−-- | This is always drive#replyList.
485+-- \"drive#replyList\".
483rlKind :: Lens' ReplyList Text
486rlKind :: Lens' ReplyList Text
484rlKind = lens _rlKind (\ s a -> s{_rlKind = a})
487rlKind = lens _rlKind (\ s a -> s{_rlKind = a})
485
488
@@ -833,7 +836,8 @@ chaTime
833 = lens _chaTime (\ s a -> s{_chaTime = a}) .
836 = lens _chaTime (\ s a -> s{_chaTime = a}) .
834 mapping _DateTime
837 mapping _DateTime
835
838
839+-- | Identifies what kind of resource this is. Value: the fixed string
836−-- | This is always drive#change.
840+-- \"drive#change\".
837chaKind :: Lens' Change Text
841chaKind :: Lens' Change Text
838chaKind = lens _chaKind (\ s a -> s{_chaKind = a})
842chaKind = lens _chaKind (\ s a -> s{_chaKind = a})
839
843
@@ -946,7 +950,8 @@ uPhotoLink
946uMe :: Lens' User (Maybe Bool)
950uMe :: Lens' User (Maybe Bool)
947uMe = lens _uMe (\ s a -> s{_uMe = a})
951uMe = lens _uMe (\ s a -> s{_uMe = a})
948
952
953+-- | Identifies what kind of resource this is. Value: the fixed string
949−-- | This is always drive#user.
954+-- \"drive#user\".
950uKind :: Lens' User Text
955uKind :: Lens' User Text
951uKind = lens _uKind (\ s a -> s{_uKind = a})
956uKind = lens _uKind (\ s a -> s{_uKind = a})
952
957
@@ -1042,7 +1047,8 @@ clChanges
1042 _Default
1047 _Default
1043 . _Coerce
1048 . _Coerce
1044
1049
1050+-- | Identifies what kind of resource this is. Value: the fixed string
1045−-- | This is always drive#changeList.
1051+-- \"drive#changeList\".
1046clKind :: Lens' ChangeList Text
1052clKind :: Lens' ChangeList Text
1047clKind = lens _clKind (\ s a -> s{_clKind = a})
1053clKind = lens _clKind (\ s a -> s{_clKind = a})
1048
1054
@@ -1287,7 +1293,8 @@ aImportFormats
1287 = lens _aImportFormats
1293 = lens _aImportFormats
1288 (\ s a -> s{_aImportFormats = a})
1294 (\ s a -> s{_aImportFormats = a})
1289
1295
1296+-- | Identifies what kind of resource this is. Value: the fixed string
1290−-- | This is always drive#about.
1297+-- \"drive#about\".
1291aKind :: Lens' About Text
1298aKind :: Lens' About Text
1292aKind = lens _aKind (\ s a -> s{_aKind = a})
1299aKind = lens _aKind (\ s a -> s{_aKind = a})
1293
1300
@@ -1438,7 +1445,8 @@ startPageToken =
1438 , _sptStartPageToken = Nothing
1445 , _sptStartPageToken = Nothing
1439 }
1446 }
1440
1447
1448+-- | Identifies what kind of resource this is. Value: the fixed string
1441−-- | This is always drive#startPageToken.
1449+-- \"drive#startPageToken\".
1442sptKind :: Lens' StartPageToken Text
1450sptKind :: Lens' StartPageToken Text
1443sptKind = lens _sptKind (\ s a -> s{_sptKind = a})
1451sptKind = lens _sptKind (\ s a -> s{_sptKind = a})
1444
1452
@@ -1825,7 +1833,8 @@ comCreatedTime
1825 (\ s a -> s{_comCreatedTime = a})
1833 (\ s a -> s{_comCreatedTime = a})
1826 . mapping _DateTime
1834 . mapping _DateTime
1827
1835
1836+-- | Identifies what kind of resource this is. Value: the fixed string
1828−-- | This is always drive#comment.
1837+-- \"drive#comment\".
1829comKind :: Lens' Comment Text
1838comKind :: Lens' Comment Text
1830comKind = lens _comKind (\ s a -> s{_comKind = a})
1839comKind = lens _comKind (\ s a -> s{_comKind = a})
1831
1840
@@ -1993,7 +2002,8 @@ revOriginalFilename
1993 = lens _revOriginalFilename
2002 = lens _revOriginalFilename
1994 (\ s a -> s{_revOriginalFilename = a})
2003 (\ s a -> s{_revOriginalFilename = a})
1995
2004
2005+-- | Identifies what kind of resource this is. Value: the fixed string
1996−-- | This is always drive#revision.
2006+-- \"drive#revision\".
1997revKind :: Lens' Revision Text
2007revKind :: Lens' Revision Text
1998revKind = lens _revKind (\ s a -> s{_revKind = a})
2008revKind = lens _revKind (\ s a -> s{_revKind = a})
1999
2009
@@ -2098,6 +2108,7 @@ data Permission = Permission'
2098 , _pDisplayName :: !(Maybe Text)
2108 , _pDisplayName :: !(Maybe Text)
2099 , _pId :: !(Maybe Text)
2109 , _pId :: !(Maybe Text)
2100 , _pType :: !(Maybe Text)
2110 , _pType :: !(Maybe Text)
2111+ , _pExpirationTime :: !(Maybe DateTime')
2101 } deriving (Eq,Show,Data,Typeable,Generic)
2112 } deriving (Eq,Show,Data,Typeable,Generic)
2102
2113
2103-- | Creates a value of 'Permission' with the minimum fields required to make a request.
2114-- | Creates a value of 'Permission' with the minimum fields required to make a request.
@@ -2121,6 +2132,8 @@ data Permission = Permission'
2121-- * 'pId'
2132-- * 'pId'
2122--
2133--
2123-- * 'pType'
2134-- * 'pType'
2135+--
2136+-- * 'pExpirationTime'
2124permission
2137permission
2125 :: Permission
2138 :: Permission
2126permission =
2139permission =
@@ -2134,6 +2147,7 @@ permission =
2134 , _pDisplayName = Nothing
2147 , _pDisplayName = Nothing
2135 , _pId = Nothing
2148 , _pId = Nothing
2136 , _pType = Nothing
2149 , _pType = Nothing
2150+ , _pExpirationTime = Nothing
2137 }
2151 }
2138
2152
2139-- | A link to the user\'s profile photo, if available.
2153-- | A link to the user\'s profile photo, if available.
@@ -2141,7 +2155,8 @@ pPhotoLink :: Lens' Permission (Maybe Text)
2141pPhotoLink
2155pPhotoLink
2142 = lens _pPhotoLink (\ s a -> s{_pPhotoLink = a})
2156 = lens _pPhotoLink (\ s a -> s{_pPhotoLink = a})
2143
2157
2158+-- | Identifies what kind of resource this is. Value: the fixed string
2144−-- | This is always drive#permission.
2159+-- \"drive#permission\".
2145pKind :: Lens' Permission Text
2160pKind :: Lens' Permission Text
2146pKind = lens _pKind (\ s a -> s{_pKind = a})
2161pKind = lens _pKind (\ s a -> s{_pKind = a})
2147
2162
@@ -2182,6 +2197,13 @@ pId = lens _pId (\ s a -> s{_pId = a})
2182pType :: Lens' Permission (Maybe Text)
2197pType :: Lens' Permission (Maybe Text)
2183pType = lens _pType (\ s a -> s{_pType = a})
2198pType = lens _pType (\ s a -> s{_pType = a})
2184
2199
2200+-- | The time at which this permission will expire (RFC 3339 date-time).
2201+pExpirationTime :: Lens' Permission (Maybe UTCTime)
2202+pExpirationTime
2203+ = lens _pExpirationTime
2204+ (\ s a -> s{_pExpirationTime = a})
2205+ . mapping _DateTime
2206+
2185instance FromJSON Permission where
2207instance FromJSON Permission where
2186 parseJSON
2208 parseJSON
2187 = withObject "Permission"
2209 = withObject "Permission"
@@ -2195,7 +2217,8 @@ instance FromJSON Permission where
2195 <*> (o .:? "allowFileDiscovery")
2217 <*> (o .:? "allowFileDiscovery")
2196 <*> (o .:? "displayName")
2218 <*> (o .:? "displayName")
2197 <*> (o .:? "id")
2219 <*> (o .:? "id")
2198− <*> (o .:? "type"))
2220+ <*> (o .:? "type")
2221+ <*> (o .:? "expirationTime"))
2199
2222
2200instance ToJSON Permission where
2223instance ToJSON Permission where
2201 toJSON Permission'{..}
2224 toJSON Permission'{..}
@@ -2207,7 +2230,8 @@ instance ToJSON Permission where
2207 ("emailAddress" .=) <$> _pEmailAddress,
2230 ("emailAddress" .=) <$> _pEmailAddress,
2208 ("allowFileDiscovery" .=) <$> _pAllowFileDiscovery,
2231 ("allowFileDiscovery" .=) <$> _pAllowFileDiscovery,
2209 ("displayName" .=) <$> _pDisplayName,
2232 ("displayName" .=) <$> _pDisplayName,
2210− ("id" .=) <$> _pId, ("type" .=) <$> _pType])
2233+ ("id" .=) <$> _pId, ("type" .=) <$> _pType,
2234+ ("expirationTime" .=) <$> _pExpirationTime])
2211
2235
2212-- | The metadata for a file.
2236-- | The metadata for a file.
2213--
2237--
@@ -2497,7 +2521,8 @@ fOriginalFilename
2497 = lens _fOriginalFilename
2521 = lens _fOriginalFilename
2498 (\ s a -> s{_fOriginalFilename = a})
2522 (\ s a -> s{_fOriginalFilename = a})
2499
2523
2524+-- | Identifies what kind of resource this is. Value: the fixed string
2500−-- | This is always drive#file.
2525+-- \"drive#file\".
2501fKind :: Lens' File Text
2526fKind :: Lens' File Text
2502fKind = lens _fKind (\ s a -> s{_fKind = a})
2527fKind = lens _fKind (\ s a -> s{_fKind = a})
2503
2528
@@ -2821,7 +2846,8 @@ generatedIds =
2821giSpace :: Lens' GeneratedIds (Maybe Text)
2846giSpace :: Lens' GeneratedIds (Maybe Text)
2822giSpace = lens _giSpace (\ s a -> s{_giSpace = a})
2847giSpace = lens _giSpace (\ s a -> s{_giSpace = a})
2823
2848
2849+-- | Identifies what kind of resource this is. Value: the fixed string
2824−-- | This is always drive#generatedIds
2850+-- \"drive#generatedIds\".
2825giKind :: Lens' GeneratedIds Text
2851giKind :: Lens' GeneratedIds Text
2826giKind = lens _giKind (\ s a -> s{_giKind = a})
2852giKind = lens _giKind (\ s a -> s{_giKind = a})
2827
2853
@@ -2881,7 +2907,8 @@ cllNextPageToken
2881 = lens _cllNextPageToken
2907 = lens _cllNextPageToken
2882 (\ s a -> s{_cllNextPageToken = a})
2908 (\ s a -> s{_cllNextPageToken = a})
2883
2909
2910+-- | Identifies what kind of resource this is. Value: the fixed string
2884−-- | This is always drive#commentList.
2911+-- \"drive#commentList\".
2885cllKind :: Lens' CommentList Text
2912cllKind :: Lens' CommentList Text
2886cllKind = lens _cllKind (\ s a -> s{_cllKind = a})
2913cllKind = lens _cllKind (\ s a -> s{_cllKind = a})
2887
2914
@@ -2913,14 +2940,17 @@ instance ToJSON CommentList where
2913--
2940--
2914-- /See:/ 'revisionList' smart constructor.
2941-- /See:/ 'revisionList' smart constructor.
2915data RevisionList = RevisionList'
2942data RevisionList = RevisionList'
2943+ { _rllNextPageToken :: !(Maybe Text)
2916− { _rllKind :: !Text
2944+ , _rllKind :: !Text
2917− , _rllRevisions :: !(Maybe [Revision])
2945+ , _rllRevisions :: !(Maybe [Revision])
2918 } deriving (Eq,Show,Data,Typeable,Generic)
2946 } deriving (Eq,Show,Data,Typeable,Generic)
2919
2947
2920-- | Creates a value of 'RevisionList' with the minimum fields required to make a request.
2948-- | Creates a value of 'RevisionList' with the minimum fields required to make a request.
2921--
2949--
2922-- Use one of the following lenses to modify other fields as desired:
2950-- Use one of the following lenses to modify other fields as desired:
2923--
2951--
2952+-- * 'rllNextPageToken'
2953+--
2924-- * 'rllKind'
2954-- * 'rllKind'
2925--
2955--
2926-- * 'rllRevisions'
2956-- * 'rllRevisions'
@@ -2928,11 +2958,20 @@ revisionList
2928 :: RevisionList
2958 :: RevisionList
2929revisionList =
2959revisionList =
2930 RevisionList'
2960 RevisionList'
2961+ { _rllNextPageToken = Nothing
2931− { _rllKind = "drive#revisionList"
2962+ , _rllKind = "drive#revisionList"
2932 , _rllRevisions = Nothing
2963 , _rllRevisions = Nothing
2933 }
2964 }
2934
2965
2966+-- | The page token for the next page of revisions. This will be absent if
2967+-- the end of the revisions list has been reached.
2968+rllNextPageToken :: Lens' RevisionList (Maybe Text)
2969+rllNextPageToken
2970+ = lens _rllNextPageToken
2971+ (\ s a -> s{_rllNextPageToken = a})
2972+
2973+-- | Identifies what kind of resource this is. Value: the fixed string
2935−-- | This is always drive#revisionList.
2974+-- \"drive#revisionList\".
2936rllKind :: Lens' RevisionList Text
2975rllKind :: Lens' RevisionList Text
2937rllKind = lens _rllKind (\ s a -> s{_rllKind = a})
2976rllKind = lens _rllKind (\ s a -> s{_rllKind = a})
2938
2977
@@ -2948,14 +2987,16 @@ instance FromJSON RevisionList where
2948 = withObject "RevisionList"
2987 = withObject "RevisionList"
2949 (\ o ->
2988 (\ o ->
2950 RevisionList' <$>
2989 RevisionList' <$>
2990+ (o .:? "nextPageToken") <*>
2951− (o .:? "kind" .!= "drive#revisionList") <*>
2991+ (o .:? "kind" .!= "drive#revisionList")
2952− (o .:? "revisions" .!= mempty))
2992+ <*> (o .:? "revisions" .!= mempty))
2953
2993
2954instance ToJSON RevisionList where
2994instance ToJSON RevisionList where
2955 toJSON RevisionList'{..}
2995 toJSON RevisionList'{..}
2956 = object
2996 = object
2957 (catMaybes
2997 (catMaybes
2998+ [("nextPageToken" .=) <$> _rllNextPageToken,
2958− [Just ("kind" .= _rllKind),
2999+ Just ("kind" .= _rllKind),
2959 ("revisions" .=) <$> _rllRevisions])
3000 ("revisions" .=) <$> _rllRevisions])
2960
3001
2961-- | A list of permissions for a file.
3002-- | A list of permissions for a file.
@@ -2981,7 +3022,8 @@ permissionList =
2981 , _plPermissions = Nothing
3022 , _plPermissions = Nothing
2982 }
3023 }
2983
3024
3025+-- | Identifies what kind of resource this is. Value: the fixed string
2984−-- | This is always drive#permissionList.
3026+-- \"drive#permissionList\".
2985plKind :: Lens' PermissionList Text
3027plKind :: Lens' PermissionList Text
2986plKind = lens _plKind (\ s a -> s{_plKind = a})
3028plKind = lens _plKind (\ s a -> s{_plKind = a})
2987
3029
gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Update.hs+17−4
@@ -34,6 +34,7 @@ module Network.Google.Resource.Drive.Permissions.Update
34
34
35 -- * Request Lenses
35 -- * Request Lenses
36 , puPayload
36 , puPayload
37+ , puRemoveExpiration
37 , puTransferOwnership
38 , puTransferOwnership
38 , puFileId
39 , puFileId
39 , puPermissionId
40 , puPermissionId
@@ -51,16 +52,18 @@ type PermissionsUpdateResource =
51 Capture "fileId" Text :>
52 Capture "fileId" Text :>
52 "permissions" :>
53 "permissions" :>
53 Capture "permissionId" Text :>
54 Capture "permissionId" Text :>
54− QueryParam "transferOwnership" Bool :>
55+ QueryParam "removeExpiration" Bool :>
56+ QueryParam "transferOwnership" Bool :>
55− QueryParam "alt" AltJSON :>
57+ QueryParam "alt" AltJSON :>
56− ReqBody '[JSON] Permission :>
58+ ReqBody '[JSON] Permission :>
57− Patch '[JSON] Permission
59+ Patch '[JSON] Permission
58
60
59-- | Updates a permission with patch semantics.
61-- | Updates a permission with patch semantics.
60--
62--
61-- /See:/ 'permissionsUpdate' smart constructor.
63-- /See:/ 'permissionsUpdate' smart constructor.
62data PermissionsUpdate = PermissionsUpdate'
64data PermissionsUpdate = PermissionsUpdate'
63 { _puPayload :: !Permission
65 { _puPayload :: !Permission
66+ , _puRemoveExpiration :: !Bool
64 , _puTransferOwnership :: !Bool
67 , _puTransferOwnership :: !Bool
65 , _puFileId :: !Text
68 , _puFileId :: !Text
66 , _puPermissionId :: !Text
69 , _puPermissionId :: !Text
@@ -72,6 +75,8 @@ data PermissionsUpdate = PermissionsUpdate'
72--
75--
73-- * 'puPayload'
76-- * 'puPayload'
74--
77--
78+-- * 'puRemoveExpiration'
79+--
75-- * 'puTransferOwnership'
80-- * 'puTransferOwnership'
76--
81--
77-- * 'puFileId'
82-- * 'puFileId'
@@ -85,6 +90,7 @@ permissionsUpdate
85permissionsUpdate pPuPayload_ pPuFileId_ pPuPermissionId_ =
90permissionsUpdate pPuPayload_ pPuFileId_ pPuPermissionId_ =
86 PermissionsUpdate'
91 PermissionsUpdate'
87 { _puPayload = pPuPayload_
92 { _puPayload = pPuPayload_
93+ , _puRemoveExpiration = False
88 , _puTransferOwnership = False
94 , _puTransferOwnership = False
89 , _puFileId = pPuFileId_
95 , _puFileId = pPuFileId_
90 , _puPermissionId = pPuPermissionId_
96 , _puPermissionId = pPuPermissionId_
@@ -95,6 +101,12 @@ puPayload :: Lens' PermissionsUpdate Permission
95puPayload
101puPayload
96 = lens _puPayload (\ s a -> s{_puPayload = a})
102 = lens _puPayload (\ s a -> s{_puPayload = a})
97
103
104+-- | Whether to remove the expiration date.
105+puRemoveExpiration :: Lens' PermissionsUpdate Bool
106+puRemoveExpiration
107+ = lens _puRemoveExpiration
108+ (\ s a -> s{_puRemoveExpiration = a})
109+
98-- | Whether to transfer ownership to the specified user and downgrade the
110-- | Whether to transfer ownership to the specified user and downgrade the
99-- current owner to a writer. This parameter is required as an
111-- current owner to a writer. This parameter is required as an
100-- acknowledgement of the side effect.
112-- acknowledgement of the side effect.
@@ -120,6 +132,7 @@ instance GoogleRequest PermissionsUpdate where
120 "https://www.googleapis.com/auth/drive.file"]
132 "https://www.googleapis.com/auth/drive.file"]
121 requestClient PermissionsUpdate'{..}
133 requestClient PermissionsUpdate'{..}
122 = go _puFileId _puPermissionId
134 = go _puFileId _puPermissionId
135+ (Just _puRemoveExpiration)
123 (Just _puTransferOwnership)
136 (Just _puTransferOwnership)
124 (Just AltJSON)
137 (Just AltJSON)
125 _puPayload
138 _puPayload
gogol-drive/gen/Network/Google/Resource/Drive/Revisions/List.hs+32−5
@@ -33,7 +33,9 @@ module Network.Google.Resource.Drive.Revisions.List
33 , RevisionsList
33 , RevisionsList
34
34
35 -- * Request Lenses
35 -- * Request Lenses
36+ , rllPageToken
36 , rllFileId
37 , rllFileId
38+ , rllPageSize
37 ) where
39 ) where
38
40
39import Network.Google.Drive.Types
41import Network.Google.Drive.Types
@@ -47,33 +49,56 @@ type RevisionsListResource =
47 "files" :>
49 "files" :>
48 Capture "fileId" Text :>
50 Capture "fileId" Text :>
49 "revisions" :>
51 "revisions" :>
52+ QueryParam "pageToken" Text :>
53+ QueryParam "pageSize" (Textual Int32) :>
50− QueryParam "alt" AltJSON :> Get '[JSON] RevisionList
54+ QueryParam "alt" AltJSON :> Get '[JSON] RevisionList
51
55
52-- | Lists a file\'s revisions.
56-- | Lists a file\'s revisions.
53--
57--
54-- /See:/ 'revisionsList' smart constructor.
58-- /See:/ 'revisionsList' smart constructor.
55−newtype RevisionsList = RevisionsList'
59+data RevisionsList = RevisionsList'
60+ { _rllPageToken :: !(Maybe Text)
56− { _rllFileId :: Text
61+ , _rllFileId :: !Text
62+ , _rllPageSize :: !(Maybe (Textual Int32))
57 } deriving (Eq,Show,Data,Typeable,Generic)
63 } deriving (Eq,Show,Data,Typeable,Generic)
58
64
59-- | Creates a value of 'RevisionsList' with the minimum fields required to make a request.
65-- | Creates a value of 'RevisionsList' with the minimum fields required to make a request.
60--
66--
61-- Use one of the following lenses to modify other fields as desired:
67-- Use one of the following lenses to modify other fields as desired:
62--
68--
69+-- * 'rllPageToken'
70+--
63-- * 'rllFileId'
71-- * 'rllFileId'
72+--
73+-- * 'rllPageSize'
64revisionsList
74revisionsList
65 :: Text -- ^ 'rllFileId'
75 :: Text -- ^ 'rllFileId'
66 -> RevisionsList
76 -> RevisionsList
67revisionsList pRllFileId_ =
77revisionsList pRllFileId_ =
68 RevisionsList'
78 RevisionsList'
79+ { _rllPageToken = Nothing
69− { _rllFileId = pRllFileId_
80+ , _rllFileId = pRllFileId_
81+ , _rllPageSize = Nothing
70 }
82 }
71
83
84+-- | The token for continuing a previous list request on the next page. This
85+-- should be set to the value of \'nextPageToken\' from the previous
86+-- response.
87+rllPageToken :: Lens' RevisionsList (Maybe Text)
88+rllPageToken
89+ = lens _rllPageToken (\ s a -> s{_rllPageToken = a})
90+
72-- | The ID of the file.
91-- | The ID of the file.
73rllFileId :: Lens' RevisionsList Text
92rllFileId :: Lens' RevisionsList Text
74rllFileId
93rllFileId
75 = lens _rllFileId (\ s a -> s{_rllFileId = a})
94 = lens _rllFileId (\ s a -> s{_rllFileId = a})
76
95
96+-- | The maximum number of revisions to return per page.
97+rllPageSize :: Lens' RevisionsList (Maybe Int32)
98+rllPageSize
99+ = lens _rllPageSize (\ s a -> s{_rllPageSize = a}) .
100+ mapping _Coerce
101+
77instance GoogleRequest RevisionsList where
102instance GoogleRequest RevisionsList where
78 type Rs RevisionsList = RevisionList
103 type Rs RevisionsList = RevisionList
79 type Scopes RevisionsList =
104 type Scopes RevisionsList =
@@ -85,7 +110,9 @@ instance GoogleRequest RevisionsList where
85 "https://www.googleapis.com/auth/drive.photos.readonly",
110 "https://www.googleapis.com/auth/drive.photos.readonly",
86 "https://www.googleapis.com/auth/drive.readonly"]
111 "https://www.googleapis.com/auth/drive.readonly"]
87 requestClient RevisionsList'{..}
112 requestClient RevisionsList'{..}
113+ = go _rllFileId _rllPageToken _rllPageSize
114+ (Just AltJSON)
88− = go _rllFileId (Just AltJSON) driveService
115+ driveService
89 where go
116 where go
90 = buildClient (Proxy :: Proxy RevisionsListResource)
117 = buildClient (Proxy :: Proxy RevisionsListResource)
91 mempty
118 mempty