on develop help sign in
Regenerating gogol-drive from latest service definition
commitb6f5909383346811c24de4ccfa67f95f5a902aa3 authorBrendan Hay <brendan.g.hay@gmail.com> dateTue 25 Oct 2016, 11:37 (10 years ago) parent065628c
7 files changed+202−56
gen/model/drive/v2/drive-api.json+38−5 gen/model/drive/v3/drive-api.json+45−18 gogol-drive/gen/Network/Google/Drive.hs+2 gogol-drive/gen/Network/Google/Drive/Types.hs+2 gogol-drive/gen/Network/Google/Drive/Types/Product.hs+66−24 gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Update.hs+17−4 gogol-drive/gen/Network/Google/Resource/Drive/Revisions/List.hs+32−5
gen/model/drive/v2/drive-api.json+38−5
@@ -1,11 +1,11 @@
11{
22 "kind": "discovery#restDescription",
3− "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/UPUy71zSavKXqWFDrZOhX79TDks\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/Bxo7TXXOxzhoC81JSCcKcp551FA\"",
44 "discoveryVersion": "v1",
55 "id": "drive:v2",
66 "name": "drive",
77 "version": "v2",
8− "revision": "20160425",
8+ "revision": "20161018",
99 "title": "Drive API",
1010 "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.",
1111 "ownerDomain": "google.com",
@@ -299,7 +299,7 @@
299299 },
300300 "remainingChangeIds": {
301301 "type": "string",
302− "description": "The number of remaining change ids.",
302+ "description": "The number of remaining change ids, limited to no more than 2500.",
303303 "format": "int64"
304304 },
305305 "rootFolderId": {
@@ -1469,9 +1469,14 @@
14691469 "type": "string",
14701470 "description": "The ETag of the permission."
14711471 },
1472+ "expirationDate": {
1473+ "type": "string",
1474+ "description": "The time at which this permission will expire (RFC 3339 date-time).",
1475+ "format": "date-time"
1476+ },
14721477 "id": {
14731478 "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."
14751480 },
14761481 "kind": {
14771482 "type": "string",
@@ -1510,7 +1515,7 @@
15101515 },
15111516 "value": {
15121517 "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."
15141519 },
15151520 "withLink": {
15161521 "type": "boolean",
@@ -1727,6 +1732,10 @@
17271732 "description": "This is always drive#revisionList.",
17281733 "default": "drive#revisionList"
17291734 },
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+ },
17301739 "selfLink": {
17311740 "type": "string",
17321741 "description": "A link back to this list."
@@ -3526,6 +3535,12 @@
35263535 "required": true,
35273536 "location": "path"
35283537 },
3538+ "removeExpiration": {
3539+ "type": "boolean",
3540+ "description": "Whether to remove the expiration date.",
3541+ "default": "false",
3542+ "location": "query"
3543+ },
35293544 "transferOwnership": {
35303545 "type": "boolean",
35313546 "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 @@
35663581 "required": true,
35673582 "location": "path"
35683583 },
3584+ "removeExpiration": {
3585+ "type": "boolean",
3586+ "description": "Whether to remove the expiration date.",
3587+ "default": "false",
3588+ "location": "query"
3589+ },
35693590 "transferOwnership": {
35703591 "type": "boolean",
35713592 "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 @@
42214242 "description": "The ID of the file.",
42224243 "required": true,
42234244 "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"
42244257 }
42254258 },
42264259 "parameterOrder": [
gen/model/drive/v3/drive-api.json+45−18
@@ -1,11 +1,11 @@
11{
22 "kind": "discovery#restDescription",
3− "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/e0xaiPPUuJmZ-QVxsG58e9kdnk4\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/l3OBP3BL9medgXcel5lvXKXZMZI\"",
44 "discoveryVersion": "v1",
55 "id": "drive:v3",
66 "name": "drive",
77 "version": "v3",
8− "revision": "20160425",
8+ "revision": "20161018",
99 "title": "Drive API",
1010 "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.",
1111 "ownerDomain": "google.com",
@@ -135,7 +135,7 @@
135135 },
136136 "kind": {
137137 "type": "string",
138− "description": "This is always drive#about.",
138+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#about\".",
139139 "default": "drive#about"
140140 },
141141 "maxImportSizes": {
@@ -198,7 +198,7 @@
198198 },
199199 "kind": {
200200 "type": "string",
201− "description": "This is always drive#change.",
201+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#change\".",
202202 "default": "drive#change"
203203 },
204204 "removed": {
@@ -226,7 +226,7 @@
226226 },
227227 "kind": {
228228 "type": "string",
229− "description": "This is always drive#changeList.",
229+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#changeList\".",
230230 "default": "drive#changeList"
231231 },
232232 "newStartPageToken": {
@@ -334,7 +334,7 @@
334334 },
335335 "kind": {
336336 "type": "string",
337− "description": "This is always drive#comment.",
337+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#comment\".",
338338 "default": "drive#comment"
339339 },
340340 "modifiedTime": {
@@ -383,7 +383,7 @@
383383 },
384384 "kind": {
385385 "type": "string",
386− "description": "This is always drive#commentList.",
386+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#commentList\".",
387387 "default": "drive#commentList"
388388 },
389389 "nextPageToken": {
@@ -615,7 +615,7 @@
615615 },
616616 "kind": {
617617 "type": "string",
618− "description": "This is always drive#file.",
618+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#file\".",
619619 "default": "drive#file"
620620 },
621621 "lastModifyingUser": {
@@ -789,7 +789,7 @@
789789 },
790790 "kind": {
791791 "type": "string",
792− "description": "This is always drive#fileList.",
792+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#fileList\".",
793793 "default": "drive#fileList"
794794 },
795795 "nextPageToken": {
@@ -812,7 +812,7 @@
812812 },
813813 "kind": {
814814 "type": "string",
815− "description": "This is always drive#generatedIds",
815+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#generatedIds\".",
816816 "default": "drive#generatedIds"
817817 },
818818 "space": {
@@ -842,13 +842,18 @@
842842 "type": "string",
843843 "description": "The email address of the user or group to which this permission refers."
844844 },
845+ "expirationTime": {
846+ "type": "string",
847+ "description": "The time at which this permission will expire (RFC 3339 date-time).",
848+ "format": "date-time"
849+ },
845850 "id": {
846851 "type": "string",
847852 "description": "The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId."
848853 },
849854 "kind": {
850855 "type": "string",
851− "description": "This is always drive#permission.",
856+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#permission\".",
852857 "default": "drive#permission"
853858 },
854859 "photoLink": {
@@ -882,7 +887,7 @@
882887 "properties": {
883888 "kind": {
884889 "type": "string",
885− "description": "This is always drive#permissionList.",
890+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#permissionList\".",
886891 "default": "drive#permissionList"
887892 },
888893 "permissions": {
@@ -935,7 +940,7 @@
935940 },
936941 "kind": {
937942 "type": "string",
938− "description": "This is always drive#reply.",
943+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#reply\".",
939944 "default": "drive#reply"
940945 },
941946 "modifiedTime": {
@@ -952,7 +957,7 @@
952957 "properties": {
953958 "kind": {
954959 "type": "string",
955− "description": "This is always drive#replyList.",
960+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#replyList\".",
956961 "default": "drive#replyList"
957962 },
958963 "nextPageToken": {
@@ -983,7 +988,7 @@
983988 },
984989 "kind": {
985990 "type": "string",
986− "description": "This is always drive#revision.",
991+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#revision\".",
987992 "default": "drive#revision"
988993 },
989994 "lastModifyingUser": {
@@ -1033,9 +1038,13 @@
10331038 "properties": {
10341039 "kind": {
10351040 "type": "string",
1036− "description": "This is always drive#revisionList.",
1041+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#revisionList\".",
10371042 "default": "drive#revisionList"
10381043 },
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+ },
10391048 "revisions": {
10401049 "type": "array",
10411050 "description": "The full list of revisions.",
@@ -1051,7 +1060,7 @@
10511060 "properties": {
10521061 "kind": {
10531062 "type": "string",
1054− "description": "This is always drive#startPageToken.",
1063+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#startPageToken\".",
10551064 "default": "drive#startPageToken"
10561065 },
10571066 "startPageToken": {
@@ -1075,7 +1084,7 @@
10751084 },
10761085 "kind": {
10771086 "type": "string",
1078− "description": "This is always drive#user.",
1087+ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#user\".",
10791088 "default": "drive#user"
10801089 },
10811090 "me": {
@@ -2034,6 +2043,12 @@
20342043 "required": true,
20352044 "location": "path"
20362045 },
2046+ "removeExpiration": {
2047+ "type": "boolean",
2048+ "description": "Whether to remove the expiration date.",
2049+ "default": "false",
2050+ "location": "query"
2051+ },
20372052 "transferOwnership": {
20382053 "type": "boolean",
20392054 "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 @@
23552370 "description": "The ID of the file.",
23562371 "required": true,
23572372 "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"
23582385 }
23592386 },
23602387 "parameterOrder": [
gogol-drive/gen/Network/Google/Drive.hs+2
@@ -379,6 +379,7 @@ module Network.Google.Drive
379379 , pDisplayName
380380 , pId
381381 , pType
382+ , pExpirationTime
382383
383384 -- ** File
384385 , File
@@ -445,6 +446,7 @@ module Network.Google.Drive
445446 -- ** RevisionList
446447 , RevisionList
447448 , revisionList
449+ , rllNextPageToken
448450 , rllKind
449451 , rllRevisions
450452
gogol-drive/gen/Network/Google/Drive/Types.hs+2
@@ -267,6 +267,7 @@ module Network.Google.Drive.Types
267267 , pDisplayName
268268 , pId
269269 , pType
270+ , pExpirationTime
270271
271272 -- * File
272273 , File
@@ -333,6 +334,7 @@ module Network.Google.Drive.Types
333334 -- * RevisionList
334335 , RevisionList
335336 , revisionList
337+ , rllNextPageToken
336338 , rllKind
337339 , rllRevisions
338340
gogol-drive/gen/Network/Google/Drive/Types/Product.hs+66−24
@@ -54,7 +54,8 @@ flNextPageToken
5454 = lens _flNextPageToken
5555 (\ s a -> s{_flNextPageToken = a})
5656
57−-- | This is always drive#fileList.
57+-- | Identifies what kind of resource this is. Value: the fixed string
58+-- \"drive#fileList\".
5859flKind :: Lens' FileList Text
5960flKind = lens _flKind (\ s a -> s{_flKind = a})
6061
@@ -276,7 +277,8 @@ rCreatedTime
276277 = lens _rCreatedTime (\ s a -> s{_rCreatedTime = a})
277278 . mapping _DateTime
278279
279−-- | This is always drive#reply.
280+-- | Identifies what kind of resource this is. Value: the fixed string
281+-- \"drive#reply\".
280282rKind :: Lens' Reply Text
281283rKind = lens _rKind (\ s a -> s{_rKind = a})
282284
@@ -479,7 +481,8 @@ rlNextPageToken
479481 = lens _rlNextPageToken
480482 (\ s a -> s{_rlNextPageToken = a})
481483
482−-- | This is always drive#replyList.
484+-- | Identifies what kind of resource this is. Value: the fixed string
485+-- \"drive#replyList\".
483486rlKind :: Lens' ReplyList Text
484487rlKind = lens _rlKind (\ s a -> s{_rlKind = a})
485488
@@ -833,7 +836,8 @@ chaTime
833836 = lens _chaTime (\ s a -> s{_chaTime = a}) .
834837 mapping _DateTime
835838
836−-- | This is always drive#change.
839+-- | Identifies what kind of resource this is. Value: the fixed string
840+-- \"drive#change\".
837841chaKind :: Lens' Change Text
838842chaKind = lens _chaKind (\ s a -> s{_chaKind = a})
839843
@@ -946,7 +950,8 @@ uPhotoLink
946950uMe :: Lens' User (Maybe Bool)
947951uMe = lens _uMe (\ s a -> s{_uMe = a})
948952
949−-- | This is always drive#user.
953+-- | Identifies what kind of resource this is. Value: the fixed string
954+-- \"drive#user\".
950955uKind :: Lens' User Text
951956uKind = lens _uKind (\ s a -> s{_uKind = a})
952957
@@ -1042,7 +1047,8 @@ clChanges
10421047 _Default
10431048 . _Coerce
10441049
1045−-- | This is always drive#changeList.
1050+-- | Identifies what kind of resource this is. Value: the fixed string
1051+-- \"drive#changeList\".
10461052clKind :: Lens' ChangeList Text
10471053clKind = lens _clKind (\ s a -> s{_clKind = a})
10481054
@@ -1287,7 +1293,8 @@ aImportFormats
12871293 = lens _aImportFormats
12881294 (\ s a -> s{_aImportFormats = a})
12891295
1290−-- | This is always drive#about.
1296+-- | Identifies what kind of resource this is. Value: the fixed string
1297+-- \"drive#about\".
12911298aKind :: Lens' About Text
12921299aKind = lens _aKind (\ s a -> s{_aKind = a})
12931300
@@ -1438,7 +1445,8 @@ startPageToken =
14381445 , _sptStartPageToken = Nothing
14391446 }
14401447
1441−-- | This is always drive#startPageToken.
1448+-- | Identifies what kind of resource this is. Value: the fixed string
1449+-- \"drive#startPageToken\".
14421450sptKind :: Lens' StartPageToken Text
14431451sptKind = lens _sptKind (\ s a -> s{_sptKind = a})
14441452
@@ -1825,7 +1833,8 @@ comCreatedTime
18251833 (\ s a -> s{_comCreatedTime = a})
18261834 . mapping _DateTime
18271835
1828−-- | This is always drive#comment.
1836+-- | Identifies what kind of resource this is. Value: the fixed string
1837+-- \"drive#comment\".
18291838comKind :: Lens' Comment Text
18301839comKind = lens _comKind (\ s a -> s{_comKind = a})
18311840
@@ -1993,7 +2002,8 @@ revOriginalFilename
19932002 = lens _revOriginalFilename
19942003 (\ s a -> s{_revOriginalFilename = a})
19952004
1996−-- | This is always drive#revision.
2005+-- | Identifies what kind of resource this is. Value: the fixed string
2006+-- \"drive#revision\".
19972007revKind :: Lens' Revision Text
19982008revKind = lens _revKind (\ s a -> s{_revKind = a})
19992009
@@ -2098,6 +2108,7 @@ data Permission = Permission'
20982108 , _pDisplayName :: !(Maybe Text)
20992109 , _pId :: !(Maybe Text)
21002110 , _pType :: !(Maybe Text)
2111+ , _pExpirationTime :: !(Maybe DateTime')
21012112 } deriving (Eq,Show,Data,Typeable,Generic)
21022113
21032114-- | Creates a value of 'Permission' with the minimum fields required to make a request.
@@ -2121,6 +2132,8 @@ data Permission = Permission'
21212132-- * 'pId'
21222133--
21232134-- * 'pType'
2135+--
2136+-- * 'pExpirationTime'
21242137permission
21252138 :: Permission
21262139permission =
@@ -2134,6 +2147,7 @@ permission =
21342147 , _pDisplayName = Nothing
21352148 , _pId = Nothing
21362149 , _pType = Nothing
2150+ , _pExpirationTime = Nothing
21372151 }
21382152
21392153-- | A link to the user\'s profile photo, if available.
@@ -2141,7 +2155,8 @@ pPhotoLink :: Lens' Permission (Maybe Text)
21412155pPhotoLink
21422156 = lens _pPhotoLink (\ s a -> s{_pPhotoLink = a})
21432157
2144−-- | This is always drive#permission.
2158+-- | Identifies what kind of resource this is. Value: the fixed string
2159+-- \"drive#permission\".
21452160pKind :: Lens' Permission Text
21462161pKind = lens _pKind (\ s a -> s{_pKind = a})
21472162
@@ -2182,6 +2197,13 @@ pId = lens _pId (\ s a -> s{_pId = a})
21822197pType :: Lens' Permission (Maybe Text)
21832198pType = lens _pType (\ s a -> s{_pType = a})
21842199
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+
21852207instance FromJSON Permission where
21862208 parseJSON
21872209 = withObject "Permission"
@@ -2195,7 +2217,8 @@ instance FromJSON Permission where
21952217 <*> (o .:? "allowFileDiscovery")
21962218 <*> (o .:? "displayName")
21972219 <*> (o .:? "id")
2198− <*> (o .:? "type"))
2220+ <*> (o .:? "type")
2221+ <*> (o .:? "expirationTime"))
21992222
22002223instance ToJSON Permission where
22012224 toJSON Permission'{..}
@@ -2207,7 +2230,8 @@ instance ToJSON Permission where
22072230 ("emailAddress" .=) <$> _pEmailAddress,
22082231 ("allowFileDiscovery" .=) <$> _pAllowFileDiscovery,
22092232 ("displayName" .=) <$> _pDisplayName,
2210− ("id" .=) <$> _pId, ("type" .=) <$> _pType])
2233+ ("id" .=) <$> _pId, ("type" .=) <$> _pType,
2234+ ("expirationTime" .=) <$> _pExpirationTime])
22112235
22122236-- | The metadata for a file.
22132237--
@@ -2497,7 +2521,8 @@ fOriginalFilename
24972521 = lens _fOriginalFilename
24982522 (\ s a -> s{_fOriginalFilename = a})
24992523
2500−-- | This is always drive#file.
2524+-- | Identifies what kind of resource this is. Value: the fixed string
2525+-- \"drive#file\".
25012526fKind :: Lens' File Text
25022527fKind = lens _fKind (\ s a -> s{_fKind = a})
25032528
@@ -2821,7 +2846,8 @@ generatedIds =
28212846giSpace :: Lens' GeneratedIds (Maybe Text)
28222847giSpace = lens _giSpace (\ s a -> s{_giSpace = a})
28232848
2824−-- | This is always drive#generatedIds
2849+-- | Identifies what kind of resource this is. Value: the fixed string
2850+-- \"drive#generatedIds\".
28252851giKind :: Lens' GeneratedIds Text
28262852giKind = lens _giKind (\ s a -> s{_giKind = a})
28272853
@@ -2881,7 +2907,8 @@ cllNextPageToken
28812907 = lens _cllNextPageToken
28822908 (\ s a -> s{_cllNextPageToken = a})
28832909
2884−-- | This is always drive#commentList.
2910+-- | Identifies what kind of resource this is. Value: the fixed string
2911+-- \"drive#commentList\".
28852912cllKind :: Lens' CommentList Text
28862913cllKind = lens _cllKind (\ s a -> s{_cllKind = a})
28872914
@@ -2913,14 +2940,17 @@ instance ToJSON CommentList where
29132940--
29142941-- /See:/ 'revisionList' smart constructor.
29152942data RevisionList = RevisionList'
2916− { _rllKind :: !Text
2917− , _rllRevisions :: !(Maybe [Revision])
2943+ { _rllNextPageToken :: !(Maybe Text)
2944+ , _rllKind :: !Text
2945+ , _rllRevisions :: !(Maybe [Revision])
29182946 } deriving (Eq,Show,Data,Typeable,Generic)
29192947
29202948-- | Creates a value of 'RevisionList' with the minimum fields required to make a request.
29212949--
29222950-- Use one of the following lenses to modify other fields as desired:
29232951--
2952+-- * 'rllNextPageToken'
2953+--
29242954-- * 'rllKind'
29252955--
29262956-- * 'rllRevisions'
@@ -2928,11 +2958,20 @@ revisionList
29282958 :: RevisionList
29292959revisionList =
29302960 RevisionList'
2931− { _rllKind = "drive#revisionList"
2961+ { _rllNextPageToken = Nothing
2962+ , _rllKind = "drive#revisionList"
29322963 , _rllRevisions = Nothing
29332964 }
29342965
2935−-- | This is always drive#revisionList.
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
2974+-- \"drive#revisionList\".
29362975rllKind :: Lens' RevisionList Text
29372976rllKind = lens _rllKind (\ s a -> s{_rllKind = a})
29382977
@@ -2948,14 +2987,16 @@ instance FromJSON RevisionList where
29482987 = withObject "RevisionList"
29492988 (\ o ->
29502989 RevisionList' <$>
2951− (o .:? "kind" .!= "drive#revisionList") <*>
2952− (o .:? "revisions" .!= mempty))
2990+ (o .:? "nextPageToken") <*>
2991+ (o .:? "kind" .!= "drive#revisionList")
2992+ <*> (o .:? "revisions" .!= mempty))
29532993
29542994instance ToJSON RevisionList where
29552995 toJSON RevisionList'{..}
29562996 = object
29572997 (catMaybes
2958− [Just ("kind" .= _rllKind),
2998+ [("nextPageToken" .=) <$> _rllNextPageToken,
2999+ Just ("kind" .= _rllKind),
29593000 ("revisions" .=) <$> _rllRevisions])
29603001
29613002-- | A list of permissions for a file.
@@ -2981,7 +3022,8 @@ permissionList =
29813022 , _plPermissions = Nothing
29823023 }
29833024
2984−-- | This is always drive#permissionList.
3025+-- | Identifies what kind of resource this is. Value: the fixed string
3026+-- \"drive#permissionList\".
29853027plKind :: Lens' PermissionList Text
29863028plKind = lens _plKind (\ s a -> s{_plKind = a})
29873029
gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Update.hs+17−4
@@ -34,6 +34,7 @@ module Network.Google.Resource.Drive.Permissions.Update
3434
3535 -- * Request Lenses
3636 , puPayload
37+ , puRemoveExpiration
3738 , puTransferOwnership
3839 , puFileId
3940 , puPermissionId
@@ -51,16 +52,18 @@ type PermissionsUpdateResource =
5152 Capture "fileId" Text :>
5253 "permissions" :>
5354 Capture "permissionId" Text :>
54− QueryParam "transferOwnership" Bool :>
55− QueryParam "alt" AltJSON :>
56− ReqBody '[JSON] Permission :>
57− Patch '[JSON] Permission
55+ QueryParam "removeExpiration" Bool :>
56+ QueryParam "transferOwnership" Bool :>
57+ QueryParam "alt" AltJSON :>
58+ ReqBody '[JSON] Permission :>
59+ Patch '[JSON] Permission
5860
5961-- | Updates a permission with patch semantics.
6062--
6163-- /See:/ 'permissionsUpdate' smart constructor.
6264data PermissionsUpdate = PermissionsUpdate'
6365 { _puPayload :: !Permission
66+ , _puRemoveExpiration :: !Bool
6467 , _puTransferOwnership :: !Bool
6568 , _puFileId :: !Text
6669 , _puPermissionId :: !Text
@@ -72,6 +75,8 @@ data PermissionsUpdate = PermissionsUpdate'
7275--
7376-- * 'puPayload'
7477--
78+-- * 'puRemoveExpiration'
79+--
7580-- * 'puTransferOwnership'
7681--
7782-- * 'puFileId'
@@ -85,6 +90,7 @@ permissionsUpdate
8590permissionsUpdate pPuPayload_ pPuFileId_ pPuPermissionId_ =
8691 PermissionsUpdate'
8792 { _puPayload = pPuPayload_
93+ , _puRemoveExpiration = False
8894 , _puTransferOwnership = False
8995 , _puFileId = pPuFileId_
9096 , _puPermissionId = pPuPermissionId_
@@ -95,6 +101,12 @@ puPayload :: Lens' PermissionsUpdate Permission
95101puPayload
96102 = lens _puPayload (\ s a -> s{_puPayload = a})
97103
104+-- | Whether to remove the expiration date.
105+puRemoveExpiration :: Lens' PermissionsUpdate Bool
106+puRemoveExpiration
107+ = lens _puRemoveExpiration
108+ (\ s a -> s{_puRemoveExpiration = a})
109+
98110-- | Whether to transfer ownership to the specified user and downgrade the
99111-- current owner to a writer. This parameter is required as an
100112-- acknowledgement of the side effect.
@@ -120,6 +132,7 @@ instance GoogleRequest PermissionsUpdate where
120132 "https://www.googleapis.com/auth/drive.file"]
121133 requestClient PermissionsUpdate'{..}
122134 = go _puFileId _puPermissionId
135+ (Just _puRemoveExpiration)
123136 (Just _puTransferOwnership)
124137 (Just AltJSON)
125138 _puPayload
gogol-drive/gen/Network/Google/Resource/Drive/Revisions/List.hs+32−5
@@ -33,7 +33,9 @@ module Network.Google.Resource.Drive.Revisions.List
3333 , RevisionsList
3434
3535 -- * Request Lenses
36+ , rllPageToken
3637 , rllFileId
38+ , rllPageSize
3739 ) where
3840
3941import Network.Google.Drive.Types
@@ -47,33 +49,56 @@ type RevisionsListResource =
4749 "files" :>
4850 Capture "fileId" Text :>
4951 "revisions" :>
50− QueryParam "alt" AltJSON :> Get '[JSON] RevisionList
52+ QueryParam "pageToken" Text :>
53+ QueryParam "pageSize" (Textual Int32) :>
54+ QueryParam "alt" AltJSON :> Get '[JSON] RevisionList
5155
5256-- | Lists a file\'s revisions.
5357--
5458-- /See:/ 'revisionsList' smart constructor.
55−newtype RevisionsList = RevisionsList'
56− { _rllFileId :: Text
59+data RevisionsList = RevisionsList'
60+ { _rllPageToken :: !(Maybe Text)
61+ , _rllFileId :: !Text
62+ , _rllPageSize :: !(Maybe (Textual Int32))
5763 } deriving (Eq,Show,Data,Typeable,Generic)
5864
5965-- | Creates a value of 'RevisionsList' with the minimum fields required to make a request.
6066--
6167-- Use one of the following lenses to modify other fields as desired:
6268--
69+-- * 'rllPageToken'
70+--
6371-- * 'rllFileId'
72+--
73+-- * 'rllPageSize'
6474revisionsList
6575 :: Text -- ^ 'rllFileId'
6676 -> RevisionsList
6777revisionsList pRllFileId_ =
6878 RevisionsList'
69− { _rllFileId = pRllFileId_
79+ { _rllPageToken = Nothing
80+ , _rllFileId = pRllFileId_
81+ , _rllPageSize = Nothing
7082 }
7183
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+
7291-- | The ID of the file.
7392rllFileId :: Lens' RevisionsList Text
7493rllFileId
7594 = lens _rllFileId (\ s a -> s{_rllFileId = a})
7695
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+
77102instance GoogleRequest RevisionsList where
78103 type Rs RevisionsList = RevisionList
79104 type Scopes RevisionsList =
@@ -85,7 +110,9 @@ instance GoogleRequest RevisionsList where
85110 "https://www.googleapis.com/auth/drive.photos.readonly",
86111 "https://www.googleapis.com/auth/drive.readonly"]
87112 requestClient RevisionsList'{..}
88− = go _rllFileId (Just AltJSON) driveService
113+ = go _rllFileId _rllPageToken _rllPageSize
114+ (Just AltJSON)
115+ driveService
89116 where go
90117 = buildClient (Proxy :: Proxy RevisionsListResource)
91118 mempty