OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.drive.v3; | 3 library googleapis.drive.v3; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError, Media, UploadOptions, | 13 show |
14 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, | 14 ApiRequestError, |
15 ByteRange; | 15 DetailedApiRequestError, |
| 16 Media, |
| 17 UploadOptions, |
| 18 ResumableUploadOptions, |
| 19 DownloadOptions, |
| 20 PartialDownloadOptions, |
| 21 ByteRange; |
16 | 22 |
17 const core.String USER_AGENT = 'dart-api-client drive/v3'; | 23 const core.String USER_AGENT = 'dart-api-client drive/v3'; |
18 | 24 |
19 /** | 25 /// Manages files in Drive including uploading, downloading, searching, |
20 * Manages files in Drive including uploading, downloading, searching, detecting | 26 /// detecting changes, and updating sharing permissions. |
21 * changes, and updating sharing permissions. | |
22 */ | |
23 class DriveApi { | 27 class DriveApi { |
24 /** View and manage the files in your Google Drive */ | 28 /// View and manage the files in your Google Drive |
25 static const DriveScope = "https://www.googleapis.com/auth/drive"; | 29 static const DriveScope = "https://www.googleapis.com/auth/drive"; |
26 | 30 |
27 /** View and manage its own configuration data in your Google Drive */ | 31 /// View and manage its own configuration data in your Google Drive |
28 static const DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdat
a"; | 32 static const DriveAppdataScope = |
| 33 "https://www.googleapis.com/auth/drive.appdata"; |
29 | 34 |
30 /** | 35 /// View and manage Google Drive files and folders that you have opened or |
31 * View and manage Google Drive files and folders that you have opened or | 36 /// created with this app |
32 * created with this app | |
33 */ | |
34 static const DriveFileScope = "https://www.googleapis.com/auth/drive.file"; | 37 static const DriveFileScope = "https://www.googleapis.com/auth/drive.file"; |
35 | 38 |
36 /** View and manage metadata of files in your Google Drive */ | 39 /// View and manage metadata of files in your Google Drive |
37 static const DriveMetadataScope = "https://www.googleapis.com/auth/drive.metad
ata"; | 40 static const DriveMetadataScope = |
| 41 "https://www.googleapis.com/auth/drive.metadata"; |
38 | 42 |
39 /** View metadata for files in your Google Drive */ | 43 /// View metadata for files in your Google Drive |
40 static const DriveMetadataReadonlyScope = "https://www.googleapis.com/auth/dri
ve.metadata.readonly"; | 44 static const DriveMetadataReadonlyScope = |
| 45 "https://www.googleapis.com/auth/drive.metadata.readonly"; |
41 | 46 |
42 /** View the photos, videos and albums in your Google Photos */ | 47 /// View the photos, videos and albums in your Google Photos |
43 static const DrivePhotosReadonlyScope = "https://www.googleapis.com/auth/drive
.photos.readonly"; | 48 static const DrivePhotosReadonlyScope = |
| 49 "https://www.googleapis.com/auth/drive.photos.readonly"; |
44 | 50 |
45 /** View the files in your Google Drive */ | 51 /// View the files in your Google Drive |
46 static const DriveReadonlyScope = "https://www.googleapis.com/auth/drive.reado
nly"; | 52 static const DriveReadonlyScope = |
| 53 "https://www.googleapis.com/auth/drive.readonly"; |
47 | 54 |
48 /** Modify your Google Apps Script scripts' behavior */ | 55 /// Modify your Google Apps Script scripts' behavior |
49 static const DriveScriptsScope = "https://www.googleapis.com/auth/drive.script
s"; | 56 static const DriveScriptsScope = |
50 | 57 "https://www.googleapis.com/auth/drive.scripts"; |
51 | 58 |
52 final commons.ApiRequester _requester; | 59 final commons.ApiRequester _requester; |
53 | 60 |
54 AboutResourceApi get about => new AboutResourceApi(_requester); | 61 AboutResourceApi get about => new AboutResourceApi(_requester); |
55 ChangesResourceApi get changes => new ChangesResourceApi(_requester); | 62 ChangesResourceApi get changes => new ChangesResourceApi(_requester); |
56 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); | 63 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); |
57 CommentsResourceApi get comments => new CommentsResourceApi(_requester); | 64 CommentsResourceApi get comments => new CommentsResourceApi(_requester); |
58 FilesResourceApi get files => new FilesResourceApi(_requester); | 65 FilesResourceApi get files => new FilesResourceApi(_requester); |
59 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste
r); | 66 PermissionsResourceApi get permissions => |
| 67 new PermissionsResourceApi(_requester); |
60 RepliesResourceApi get replies => new RepliesResourceApi(_requester); | 68 RepliesResourceApi get replies => new RepliesResourceApi(_requester); |
61 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester); | 69 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester); |
62 TeamdrivesResourceApi get teamdrives => new TeamdrivesResourceApi(_requester); | 70 TeamdrivesResourceApi get teamdrives => new TeamdrivesResourceApi(_requester); |
63 | 71 |
64 DriveApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com
/", core.String servicePath: "drive/v3/"}) : | 72 DriveApi(http.Client client, |
65 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 73 {core.String rootUrl: "https://www.googleapis.com/", |
| 74 core.String servicePath: "drive/v3/"}) |
| 75 : _requester = |
| 76 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
66 } | 77 } |
67 | 78 |
68 | |
69 class AboutResourceApi { | 79 class AboutResourceApi { |
70 final commons.ApiRequester _requester; | 80 final commons.ApiRequester _requester; |
71 | 81 |
72 AboutResourceApi(commons.ApiRequester client) : | 82 AboutResourceApi(commons.ApiRequester client) : _requester = client; |
73 _requester = client; | |
74 | 83 |
75 /** | 84 /// Gets information about the user, the user's Drive, and system |
76 * Gets information about the user, the user's Drive, and system capabilities. | 85 /// capabilities. |
77 * | 86 /// |
78 * Request parameters: | 87 /// Request parameters: |
79 * | 88 /// |
80 * Completes with a [About]. | 89 /// Completes with a [About]. |
81 * | 90 /// |
82 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 91 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
83 * error. | 92 /// an error. |
84 * | 93 /// |
85 * If the used [http.Client] completes with an error when making a REST call, | 94 /// If the used [http.Client] completes with an error when making a REST |
86 * this method will complete with the same error. | 95 /// call, this method will complete with the same error. |
87 */ | |
88 async.Future<About> get() { | 96 async.Future<About> get() { |
89 var _url = null; | 97 var _url = null; |
90 var _queryParams = new core.Map(); | 98 var _queryParams = new core.Map(); |
91 var _uploadMedia = null; | 99 var _uploadMedia = null; |
92 var _uploadOptions = null; | 100 var _uploadOptions = null; |
93 var _downloadOptions = commons.DownloadOptions.Metadata; | 101 var _downloadOptions = commons.DownloadOptions.Metadata; |
94 var _body = null; | 102 var _body = null; |
95 | 103 |
96 | |
97 _url = 'about'; | 104 _url = 'about'; |
98 | 105 |
99 var _response = _requester.request(_url, | 106 var _response = _requester.request(_url, "GET", |
100 "GET", | 107 body: _body, |
101 body: _body, | 108 queryParams: _queryParams, |
102 queryParams: _queryParams, | 109 uploadOptions: _uploadOptions, |
103 uploadOptions: _uploadOptions, | 110 uploadMedia: _uploadMedia, |
104 uploadMedia: _uploadMedia, | 111 downloadOptions: _downloadOptions); |
105 downloadOptions: _downloadOptions); | |
106 return _response.then((data) => new About.fromJson(data)); | 112 return _response.then((data) => new About.fromJson(data)); |
107 } | 113 } |
108 | |
109 } | 114 } |
110 | 115 |
111 | |
112 class ChangesResourceApi { | 116 class ChangesResourceApi { |
113 final commons.ApiRequester _requester; | 117 final commons.ApiRequester _requester; |
114 | 118 |
115 ChangesResourceApi(commons.ApiRequester client) : | 119 ChangesResourceApi(commons.ApiRequester client) : _requester = client; |
116 _requester = client; | |
117 | 120 |
118 /** | 121 /// Gets the starting pageToken for listing future changes. |
119 * Gets the starting pageToken for listing future changes. | 122 /// |
120 * | 123 /// Request parameters: |
121 * Request parameters: | 124 /// |
122 * | 125 /// [supportsTeamDrives] - Whether the requesting application supports Team |
123 * [supportsTeamDrives] - Whether the requesting application supports Team | 126 /// Drives. |
124 * Drives. | 127 /// |
125 * | 128 /// [teamDriveId] - The ID of the Team Drive for which the starting pageToken |
126 * [teamDriveId] - The ID of the Team Drive for which the starting pageToken | 129 /// for listing future changes from that Team Drive will be returned. |
127 * for listing future changes from that Team Drive will be returned. | 130 /// |
128 * | 131 /// Completes with a [StartPageToken]. |
129 * Completes with a [StartPageToken]. | 132 /// |
130 * | 133 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
131 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 134 /// an error. |
132 * error. | 135 /// |
133 * | 136 /// If the used [http.Client] completes with an error when making a REST |
134 * If the used [http.Client] completes with an error when making a REST call, | 137 /// call, this method will complete with the same error. |
135 * this method will complete with the same error. | 138 async.Future<StartPageToken> getStartPageToken( |
136 */ | 139 {core.bool supportsTeamDrives, core.String teamDriveId}) { |
137 async.Future<StartPageToken> getStartPageToken({core.bool supportsTeamDrives,
core.String teamDriveId}) { | |
138 var _url = null; | 140 var _url = null; |
139 var _queryParams = new core.Map(); | 141 var _queryParams = new core.Map(); |
140 var _uploadMedia = null; | 142 var _uploadMedia = null; |
141 var _uploadOptions = null; | 143 var _uploadOptions = null; |
142 var _downloadOptions = commons.DownloadOptions.Metadata; | 144 var _downloadOptions = commons.DownloadOptions.Metadata; |
143 var _body = null; | 145 var _body = null; |
144 | 146 |
145 if (supportsTeamDrives != null) { | 147 if (supportsTeamDrives != null) { |
146 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 148 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
147 } | 149 } |
148 if (teamDriveId != null) { | 150 if (teamDriveId != null) { |
149 _queryParams["teamDriveId"] = [teamDriveId]; | 151 _queryParams["teamDriveId"] = [teamDriveId]; |
150 } | 152 } |
151 | 153 |
152 _url = 'changes/startPageToken'; | 154 _url = 'changes/startPageToken'; |
153 | 155 |
154 var _response = _requester.request(_url, | 156 var _response = _requester.request(_url, "GET", |
155 "GET", | 157 body: _body, |
156 body: _body, | 158 queryParams: _queryParams, |
157 queryParams: _queryParams, | 159 uploadOptions: _uploadOptions, |
158 uploadOptions: _uploadOptions, | 160 uploadMedia: _uploadMedia, |
159 uploadMedia: _uploadMedia, | 161 downloadOptions: _downloadOptions); |
160 downloadOptions: _downloadOptions); | |
161 return _response.then((data) => new StartPageToken.fromJson(data)); | 162 return _response.then((data) => new StartPageToken.fromJson(data)); |
162 } | 163 } |
163 | 164 |
164 /** | 165 /// Lists the changes for a user or Team Drive. |
165 * Lists the changes for a user or Team Drive. | 166 /// |
166 * | 167 /// Request parameters: |
167 * Request parameters: | 168 /// |
168 * | 169 /// [pageToken] - The token for continuing a previous list request on the |
169 * [pageToken] - The token for continuing a previous list request on the next | 170 /// next page. This should be set to the value of 'nextPageToken' from the |
170 * page. This should be set to the value of 'nextPageToken' from the previous | 171 /// previous response or to the response from the getStartPageToken method. |
171 * response or to the response from the getStartPageToken method. | 172 /// |
172 * | 173 /// [includeCorpusRemovals] - Whether changes should include the file |
173 * [includeCorpusRemovals] - Whether changes should include the file resource | 174 /// resource if the file is still accessible by the user at the time of the |
174 * if the file is still accessible by the user at the time of the request, | 175 /// request, even when a file was removed from the list of changes and there |
175 * even when a file was removed from the list of changes and there will be no | 176 /// will be no further change entries for this file. |
176 * further change entries for this file. | 177 /// |
177 * | 178 /// [includeRemoved] - Whether to include changes indicating that items have |
178 * [includeRemoved] - Whether to include changes indicating that items have | 179 /// been removed from the list of changes, for example by deletion or loss of |
179 * been removed from the list of changes, for example by deletion or loss of | 180 /// access. |
180 * access. | 181 /// |
181 * | 182 /// [includeTeamDriveItems] - Whether Team Drive files or changes should be |
182 * [includeTeamDriveItems] - Whether Team Drive files or changes should be | 183 /// included in results. |
183 * included in results. | 184 /// |
184 * | 185 /// [pageSize] - The maximum number of changes to return per page. |
185 * [pageSize] - The maximum number of changes to return per page. | 186 /// Value must be between "1" and "1000". |
186 * Value must be between "1" and "1000". | 187 /// |
187 * | 188 /// [restrictToMyDrive] - Whether to restrict the results to changes inside |
188 * [restrictToMyDrive] - Whether to restrict the results to changes inside the | 189 /// the My Drive hierarchy. This omits changes to files such as those in the |
189 * My Drive hierarchy. This omits changes to files such as those in the | 190 /// Application Data folder or shared files which have not been added to My |
190 * Application Data folder or shared files which have not been added to My | 191 /// Drive. |
191 * Drive. | 192 /// |
192 * | 193 /// [spaces] - A comma-separated list of spaces to query within the user |
193 * [spaces] - A comma-separated list of spaces to query within the user | 194 /// corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. |
194 * corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. | 195 /// |
195 * | 196 /// [supportsTeamDrives] - Whether the requesting application supports Team |
196 * [supportsTeamDrives] - Whether the requesting application supports Team | 197 /// Drives. |
197 * Drives. | 198 /// |
198 * | 199 /// [teamDriveId] - The Team Drive from which changes will be returned. If |
199 * [teamDriveId] - The Team Drive from which changes will be returned. If | 200 /// specified the change IDs will be reflective of the Team Drive; use the |
200 * specified the change IDs will be reflective of the Team Drive; use the | 201 /// combined Team Drive ID and change ID as an identifier. |
201 * combined Team Drive ID and change ID as an identifier. | 202 /// |
202 * | 203 /// Completes with a [ChangeList]. |
203 * Completes with a [ChangeList]. | 204 /// |
204 * | 205 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
205 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 206 /// an error. |
206 * error. | 207 /// |
207 * | 208 /// If the used [http.Client] completes with an error when making a REST |
208 * If the used [http.Client] completes with an error when making a REST call, | 209 /// call, this method will complete with the same error. |
209 * this method will complete with the same error. | 210 async.Future<ChangeList> list(core.String pageToken, |
210 */ | 211 {core.bool includeCorpusRemovals, |
211 async.Future<ChangeList> list(core.String pageToken, {core.bool includeCorpusR
emovals, core.bool includeRemoved, core.bool includeTeamDriveItems, core.int pag
eSize, core.bool restrictToMyDrive, core.String spaces, core.bool supportsTeamDr
ives, core.String teamDriveId}) { | 212 core.bool includeRemoved, |
| 213 core.bool includeTeamDriveItems, |
| 214 core.int pageSize, |
| 215 core.bool restrictToMyDrive, |
| 216 core.String spaces, |
| 217 core.bool supportsTeamDrives, |
| 218 core.String teamDriveId}) { |
212 var _url = null; | 219 var _url = null; |
213 var _queryParams = new core.Map(); | 220 var _queryParams = new core.Map(); |
214 var _uploadMedia = null; | 221 var _uploadMedia = null; |
215 var _uploadOptions = null; | 222 var _uploadOptions = null; |
216 var _downloadOptions = commons.DownloadOptions.Metadata; | 223 var _downloadOptions = commons.DownloadOptions.Metadata; |
217 var _body = null; | 224 var _body = null; |
218 | 225 |
219 if (pageToken == null) { | 226 if (pageToken == null) { |
220 throw new core.ArgumentError("Parameter pageToken is required."); | 227 throw new core.ArgumentError("Parameter pageToken is required."); |
221 } | 228 } |
(...skipping 18 matching lines...) Expand all Loading... |
240 } | 247 } |
241 if (supportsTeamDrives != null) { | 248 if (supportsTeamDrives != null) { |
242 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 249 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
243 } | 250 } |
244 if (teamDriveId != null) { | 251 if (teamDriveId != null) { |
245 _queryParams["teamDriveId"] = [teamDriveId]; | 252 _queryParams["teamDriveId"] = [teamDriveId]; |
246 } | 253 } |
247 | 254 |
248 _url = 'changes'; | 255 _url = 'changes'; |
249 | 256 |
250 var _response = _requester.request(_url, | 257 var _response = _requester.request(_url, "GET", |
251 "GET", | 258 body: _body, |
252 body: _body, | 259 queryParams: _queryParams, |
253 queryParams: _queryParams, | 260 uploadOptions: _uploadOptions, |
254 uploadOptions: _uploadOptions, | 261 uploadMedia: _uploadMedia, |
255 uploadMedia: _uploadMedia, | 262 downloadOptions: _downloadOptions); |
256 downloadOptions: _downloadOptions); | |
257 return _response.then((data) => new ChangeList.fromJson(data)); | 263 return _response.then((data) => new ChangeList.fromJson(data)); |
258 } | 264 } |
259 | 265 |
260 /** | 266 /// Subscribes to changes for a user. |
261 * Subscribes to changes for a user. | 267 /// |
262 * | 268 /// [request] - The metadata request object. |
263 * [request] - The metadata request object. | 269 /// |
264 * | 270 /// Request parameters: |
265 * Request parameters: | 271 /// |
266 * | 272 /// [pageToken] - The token for continuing a previous list request on the |
267 * [pageToken] - The token for continuing a previous list request on the next | 273 /// next page. This should be set to the value of 'nextPageToken' from the |
268 * page. This should be set to the value of 'nextPageToken' from the previous | 274 /// previous response or to the response from the getStartPageToken method. |
269 * response or to the response from the getStartPageToken method. | 275 /// |
270 * | 276 /// [includeCorpusRemovals] - Whether changes should include the file |
271 * [includeCorpusRemovals] - Whether changes should include the file resource | 277 /// resource if the file is still accessible by the user at the time of the |
272 * if the file is still accessible by the user at the time of the request, | 278 /// request, even when a file was removed from the list of changes and there |
273 * even when a file was removed from the list of changes and there will be no | 279 /// will be no further change entries for this file. |
274 * further change entries for this file. | 280 /// |
275 * | 281 /// [includeRemoved] - Whether to include changes indicating that items have |
276 * [includeRemoved] - Whether to include changes indicating that items have | 282 /// been removed from the list of changes, for example by deletion or loss of |
277 * been removed from the list of changes, for example by deletion or loss of | 283 /// access. |
278 * access. | 284 /// |
279 * | 285 /// [includeTeamDriveItems] - Whether Team Drive files or changes should be |
280 * [includeTeamDriveItems] - Whether Team Drive files or changes should be | 286 /// included in results. |
281 * included in results. | 287 /// |
282 * | 288 /// [pageSize] - The maximum number of changes to return per page. |
283 * [pageSize] - The maximum number of changes to return per page. | 289 /// Value must be between "1" and "1000". |
284 * Value must be between "1" and "1000". | 290 /// |
285 * | 291 /// [restrictToMyDrive] - Whether to restrict the results to changes inside |
286 * [restrictToMyDrive] - Whether to restrict the results to changes inside the | 292 /// the My Drive hierarchy. This omits changes to files such as those in the |
287 * My Drive hierarchy. This omits changes to files such as those in the | 293 /// Application Data folder or shared files which have not been added to My |
288 * Application Data folder or shared files which have not been added to My | 294 /// Drive. |
289 * Drive. | 295 /// |
290 * | 296 /// [spaces] - A comma-separated list of spaces to query within the user |
291 * [spaces] - A comma-separated list of spaces to query within the user | 297 /// corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. |
292 * corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. | 298 /// |
293 * | 299 /// [supportsTeamDrives] - Whether the requesting application supports Team |
294 * [supportsTeamDrives] - Whether the requesting application supports Team | 300 /// Drives. |
295 * Drives. | 301 /// |
296 * | 302 /// [teamDriveId] - The Team Drive from which changes will be returned. If |
297 * [teamDriveId] - The Team Drive from which changes will be returned. If | 303 /// specified the change IDs will be reflective of the Team Drive; use the |
298 * specified the change IDs will be reflective of the Team Drive; use the | 304 /// combined Team Drive ID and change ID as an identifier. |
299 * combined Team Drive ID and change ID as an identifier. | 305 /// |
300 * | 306 /// Completes with a [Channel]. |
301 * Completes with a [Channel]. | 307 /// |
302 * | 308 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
303 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 309 /// an error. |
304 * error. | 310 /// |
305 * | 311 /// If the used [http.Client] completes with an error when making a REST |
306 * If the used [http.Client] completes with an error when making a REST call, | 312 /// call, this method will complete with the same error. |
307 * this method will complete with the same error. | 313 async.Future<Channel> watch(Channel request, core.String pageToken, |
308 */ | 314 {core.bool includeCorpusRemovals, |
309 async.Future<Channel> watch(Channel request, core.String pageToken, {core.bool
includeCorpusRemovals, core.bool includeRemoved, core.bool includeTeamDriveItem
s, core.int pageSize, core.bool restrictToMyDrive, core.String spaces, core.bool
supportsTeamDrives, core.String teamDriveId}) { | 315 core.bool includeRemoved, |
| 316 core.bool includeTeamDriveItems, |
| 317 core.int pageSize, |
| 318 core.bool restrictToMyDrive, |
| 319 core.String spaces, |
| 320 core.bool supportsTeamDrives, |
| 321 core.String teamDriveId}) { |
310 var _url = null; | 322 var _url = null; |
311 var _queryParams = new core.Map(); | 323 var _queryParams = new core.Map(); |
312 var _uploadMedia = null; | 324 var _uploadMedia = null; |
313 var _uploadOptions = null; | 325 var _uploadOptions = null; |
314 var _downloadOptions = commons.DownloadOptions.Metadata; | 326 var _downloadOptions = commons.DownloadOptions.Metadata; |
315 var _body = null; | 327 var _body = null; |
316 | 328 |
317 if (request != null) { | 329 if (request != null) { |
318 _body = convert.JSON.encode((request).toJson()); | 330 _body = convert.JSON.encode((request).toJson()); |
319 } | 331 } |
(...skipping 21 matching lines...) Expand all Loading... |
341 } | 353 } |
342 if (supportsTeamDrives != null) { | 354 if (supportsTeamDrives != null) { |
343 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 355 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
344 } | 356 } |
345 if (teamDriveId != null) { | 357 if (teamDriveId != null) { |
346 _queryParams["teamDriveId"] = [teamDriveId]; | 358 _queryParams["teamDriveId"] = [teamDriveId]; |
347 } | 359 } |
348 | 360 |
349 _url = 'changes/watch'; | 361 _url = 'changes/watch'; |
350 | 362 |
351 var _response = _requester.request(_url, | 363 var _response = _requester.request(_url, "POST", |
352 "POST", | 364 body: _body, |
353 body: _body, | 365 queryParams: _queryParams, |
354 queryParams: _queryParams, | 366 uploadOptions: _uploadOptions, |
355 uploadOptions: _uploadOptions, | 367 uploadMedia: _uploadMedia, |
356 uploadMedia: _uploadMedia, | 368 downloadOptions: _downloadOptions); |
357 downloadOptions: _downloadOptions); | |
358 return _response.then((data) => new Channel.fromJson(data)); | 369 return _response.then((data) => new Channel.fromJson(data)); |
359 } | 370 } |
360 | |
361 } | 371 } |
362 | 372 |
363 | |
364 class ChannelsResourceApi { | 373 class ChannelsResourceApi { |
365 final commons.ApiRequester _requester; | 374 final commons.ApiRequester _requester; |
366 | 375 |
367 ChannelsResourceApi(commons.ApiRequester client) : | 376 ChannelsResourceApi(commons.ApiRequester client) : _requester = client; |
368 _requester = client; | |
369 | 377 |
370 /** | 378 /// Stop watching resources through this channel |
371 * Stop watching resources through this channel | 379 /// |
372 * | 380 /// [request] - The metadata request object. |
373 * [request] - The metadata request object. | 381 /// |
374 * | 382 /// Request parameters: |
375 * Request parameters: | 383 /// |
376 * | 384 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
377 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 385 /// an error. |
378 * error. | 386 /// |
379 * | 387 /// If the used [http.Client] completes with an error when making a REST |
380 * If the used [http.Client] completes with an error when making a REST call, | 388 /// call, this method will complete with the same error. |
381 * this method will complete with the same error. | |
382 */ | |
383 async.Future stop(Channel request) { | 389 async.Future stop(Channel request) { |
384 var _url = null; | 390 var _url = null; |
385 var _queryParams = new core.Map(); | 391 var _queryParams = new core.Map(); |
386 var _uploadMedia = null; | 392 var _uploadMedia = null; |
387 var _uploadOptions = null; | 393 var _uploadOptions = null; |
388 var _downloadOptions = commons.DownloadOptions.Metadata; | 394 var _downloadOptions = commons.DownloadOptions.Metadata; |
389 var _body = null; | 395 var _body = null; |
390 | 396 |
391 if (request != null) { | 397 if (request != null) { |
392 _body = convert.JSON.encode((request).toJson()); | 398 _body = convert.JSON.encode((request).toJson()); |
393 } | 399 } |
394 | 400 |
395 _downloadOptions = null; | 401 _downloadOptions = null; |
396 | 402 |
397 _url = 'channels/stop'; | 403 _url = 'channels/stop'; |
398 | 404 |
399 var _response = _requester.request(_url, | 405 var _response = _requester.request(_url, "POST", |
400 "POST", | 406 body: _body, |
401 body: _body, | 407 queryParams: _queryParams, |
402 queryParams: _queryParams, | 408 uploadOptions: _uploadOptions, |
403 uploadOptions: _uploadOptions, | 409 uploadMedia: _uploadMedia, |
404 uploadMedia: _uploadMedia, | 410 downloadOptions: _downloadOptions); |
405 downloadOptions: _downloadOptions); | |
406 return _response.then((data) => null); | 411 return _response.then((data) => null); |
407 } | 412 } |
408 | |
409 } | 413 } |
410 | 414 |
411 | |
412 class CommentsResourceApi { | 415 class CommentsResourceApi { |
413 final commons.ApiRequester _requester; | 416 final commons.ApiRequester _requester; |
414 | 417 |
415 CommentsResourceApi(commons.ApiRequester client) : | 418 CommentsResourceApi(commons.ApiRequester client) : _requester = client; |
416 _requester = client; | |
417 | 419 |
418 /** | 420 /// Creates a new comment on a file. |
419 * Creates a new comment on a file. | 421 /// |
420 * | 422 /// [request] - The metadata request object. |
421 * [request] - The metadata request object. | 423 /// |
422 * | 424 /// Request parameters: |
423 * Request parameters: | 425 /// |
424 * | 426 /// [fileId] - The ID of the file. |
425 * [fileId] - The ID of the file. | 427 /// |
426 * | 428 /// Completes with a [Comment]. |
427 * Completes with a [Comment]. | 429 /// |
428 * | 430 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
429 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 431 /// an error. |
430 * error. | 432 /// |
431 * | 433 /// If the used [http.Client] completes with an error when making a REST |
432 * If the used [http.Client] completes with an error when making a REST call, | 434 /// call, this method will complete with the same error. |
433 * this method will complete with the same error. | |
434 */ | |
435 async.Future<Comment> create(Comment request, core.String fileId) { | 435 async.Future<Comment> create(Comment request, core.String fileId) { |
436 var _url = null; | 436 var _url = null; |
437 var _queryParams = new core.Map(); | 437 var _queryParams = new core.Map(); |
438 var _uploadMedia = null; | 438 var _uploadMedia = null; |
439 var _uploadOptions = null; | 439 var _uploadOptions = null; |
440 var _downloadOptions = commons.DownloadOptions.Metadata; | 440 var _downloadOptions = commons.DownloadOptions.Metadata; |
441 var _body = null; | 441 var _body = null; |
442 | 442 |
443 if (request != null) { | 443 if (request != null) { |
444 _body = convert.JSON.encode((request).toJson()); | 444 _body = convert.JSON.encode((request).toJson()); |
445 } | 445 } |
446 if (fileId == null) { | 446 if (fileId == null) { |
447 throw new core.ArgumentError("Parameter fileId is required."); | 447 throw new core.ArgumentError("Parameter fileId is required."); |
448 } | 448 } |
449 | 449 |
450 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments'; | 450 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments'; |
451 | 451 |
452 var _response = _requester.request(_url, | 452 var _response = _requester.request(_url, "POST", |
453 "POST", | 453 body: _body, |
454 body: _body, | 454 queryParams: _queryParams, |
455 queryParams: _queryParams, | 455 uploadOptions: _uploadOptions, |
456 uploadOptions: _uploadOptions, | 456 uploadMedia: _uploadMedia, |
457 uploadMedia: _uploadMedia, | 457 downloadOptions: _downloadOptions); |
458 downloadOptions: _downloadOptions); | |
459 return _response.then((data) => new Comment.fromJson(data)); | 458 return _response.then((data) => new Comment.fromJson(data)); |
460 } | 459 } |
461 | 460 |
462 /** | 461 /// Deletes a comment. |
463 * Deletes a comment. | 462 /// |
464 * | 463 /// Request parameters: |
465 * Request parameters: | 464 /// |
466 * | 465 /// [fileId] - The ID of the file. |
467 * [fileId] - The ID of the file. | 466 /// |
468 * | 467 /// [commentId] - The ID of the comment. |
469 * [commentId] - The ID of the comment. | 468 /// |
470 * | 469 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
471 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 470 /// an error. |
472 * error. | 471 /// |
473 * | 472 /// If the used [http.Client] completes with an error when making a REST |
474 * If the used [http.Client] completes with an error when making a REST call, | 473 /// call, this method will complete with the same error. |
475 * this method will complete with the same error. | |
476 */ | |
477 async.Future delete(core.String fileId, core.String commentId) { | 474 async.Future delete(core.String fileId, core.String commentId) { |
478 var _url = null; | 475 var _url = null; |
479 var _queryParams = new core.Map(); | 476 var _queryParams = new core.Map(); |
480 var _uploadMedia = null; | 477 var _uploadMedia = null; |
481 var _uploadOptions = null; | 478 var _uploadOptions = null; |
482 var _downloadOptions = commons.DownloadOptions.Metadata; | 479 var _downloadOptions = commons.DownloadOptions.Metadata; |
483 var _body = null; | 480 var _body = null; |
484 | 481 |
485 if (fileId == null) { | 482 if (fileId == null) { |
486 throw new core.ArgumentError("Parameter fileId is required."); | 483 throw new core.ArgumentError("Parameter fileId is required."); |
487 } | 484 } |
488 if (commentId == null) { | 485 if (commentId == null) { |
489 throw new core.ArgumentError("Parameter commentId is required."); | 486 throw new core.ArgumentError("Parameter commentId is required."); |
490 } | 487 } |
491 | 488 |
492 _downloadOptions = null; | 489 _downloadOptions = null; |
493 | 490 |
494 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' +
commons.Escaper.ecapeVariable('$commentId'); | 491 _url = 'files/' + |
| 492 commons.Escaper.ecapeVariable('$fileId') + |
| 493 '/comments/' + |
| 494 commons.Escaper.ecapeVariable('$commentId'); |
495 | 495 |
496 var _response = _requester.request(_url, | 496 var _response = _requester.request(_url, "DELETE", |
497 "DELETE", | 497 body: _body, |
498 body: _body, | 498 queryParams: _queryParams, |
499 queryParams: _queryParams, | 499 uploadOptions: _uploadOptions, |
500 uploadOptions: _uploadOptions, | 500 uploadMedia: _uploadMedia, |
501 uploadMedia: _uploadMedia, | 501 downloadOptions: _downloadOptions); |
502 downloadOptions: _downloadOptions); | |
503 return _response.then((data) => null); | 502 return _response.then((data) => null); |
504 } | 503 } |
505 | 504 |
506 /** | 505 /// Gets a comment by ID. |
507 * Gets a comment by ID. | 506 /// |
508 * | 507 /// Request parameters: |
509 * Request parameters: | 508 /// |
510 * | 509 /// [fileId] - The ID of the file. |
511 * [fileId] - The ID of the file. | 510 /// |
512 * | 511 /// [commentId] - The ID of the comment. |
513 * [commentId] - The ID of the comment. | 512 /// |
514 * | 513 /// [includeDeleted] - Whether to return deleted comments. Deleted comments |
515 * [includeDeleted] - Whether to return deleted comments. Deleted comments | 514 /// will not include their original content. |
516 * will not include their original content. | 515 /// |
517 * | 516 /// Completes with a [Comment]. |
518 * Completes with a [Comment]. | 517 /// |
519 * | 518 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
520 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 519 /// an error. |
521 * error. | 520 /// |
522 * | 521 /// If the used [http.Client] completes with an error when making a REST |
523 * If the used [http.Client] completes with an error when making a REST call, | 522 /// call, this method will complete with the same error. |
524 * this method will complete with the same error. | 523 async.Future<Comment> get(core.String fileId, core.String commentId, |
525 */ | 524 {core.bool includeDeleted}) { |
526 async.Future<Comment> get(core.String fileId, core.String commentId, {core.boo
l includeDeleted}) { | |
527 var _url = null; | 525 var _url = null; |
528 var _queryParams = new core.Map(); | 526 var _queryParams = new core.Map(); |
529 var _uploadMedia = null; | 527 var _uploadMedia = null; |
530 var _uploadOptions = null; | 528 var _uploadOptions = null; |
531 var _downloadOptions = commons.DownloadOptions.Metadata; | 529 var _downloadOptions = commons.DownloadOptions.Metadata; |
532 var _body = null; | 530 var _body = null; |
533 | 531 |
534 if (fileId == null) { | 532 if (fileId == null) { |
535 throw new core.ArgumentError("Parameter fileId is required."); | 533 throw new core.ArgumentError("Parameter fileId is required."); |
536 } | 534 } |
537 if (commentId == null) { | 535 if (commentId == null) { |
538 throw new core.ArgumentError("Parameter commentId is required."); | 536 throw new core.ArgumentError("Parameter commentId is required."); |
539 } | 537 } |
540 if (includeDeleted != null) { | 538 if (includeDeleted != null) { |
541 _queryParams["includeDeleted"] = ["${includeDeleted}"]; | 539 _queryParams["includeDeleted"] = ["${includeDeleted}"]; |
542 } | 540 } |
543 | 541 |
544 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' +
commons.Escaper.ecapeVariable('$commentId'); | 542 _url = 'files/' + |
| 543 commons.Escaper.ecapeVariable('$fileId') + |
| 544 '/comments/' + |
| 545 commons.Escaper.ecapeVariable('$commentId'); |
545 | 546 |
546 var _response = _requester.request(_url, | 547 var _response = _requester.request(_url, "GET", |
547 "GET", | 548 body: _body, |
548 body: _body, | 549 queryParams: _queryParams, |
549 queryParams: _queryParams, | 550 uploadOptions: _uploadOptions, |
550 uploadOptions: _uploadOptions, | 551 uploadMedia: _uploadMedia, |
551 uploadMedia: _uploadMedia, | 552 downloadOptions: _downloadOptions); |
552 downloadOptions: _downloadOptions); | |
553 return _response.then((data) => new Comment.fromJson(data)); | 553 return _response.then((data) => new Comment.fromJson(data)); |
554 } | 554 } |
555 | 555 |
556 /** | 556 /// Lists a file's comments. |
557 * Lists a file's comments. | 557 /// |
558 * | 558 /// Request parameters: |
559 * Request parameters: | 559 /// |
560 * | 560 /// [fileId] - The ID of the file. |
561 * [fileId] - The ID of the file. | 561 /// |
562 * | 562 /// [includeDeleted] - Whether to include deleted comments. Deleted comments |
563 * [includeDeleted] - Whether to include deleted comments. Deleted comments | 563 /// will not include their original content. |
564 * will not include their original content. | 564 /// |
565 * | 565 /// [pageSize] - The maximum number of comments to return per page. |
566 * [pageSize] - The maximum number of comments to return per page. | 566 /// Value must be between "1" and "100". |
567 * Value must be between "1" and "100". | 567 /// |
568 * | 568 /// [pageToken] - The token for continuing a previous list request on the |
569 * [pageToken] - The token for continuing a previous list request on the next | 569 /// next page. This should be set to the value of 'nextPageToken' from the |
570 * page. This should be set to the value of 'nextPageToken' from the previous | 570 /// previous response. |
571 * response. | 571 /// |
572 * | 572 /// [startModifiedTime] - The minimum value of 'modifiedTime' for the result |
573 * [startModifiedTime] - The minimum value of 'modifiedTime' for the result | 573 /// comments (RFC 3339 date-time). |
574 * comments (RFC 3339 date-time). | 574 /// |
575 * | 575 /// Completes with a [CommentList]. |
576 * Completes with a [CommentList]. | 576 /// |
577 * | 577 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
578 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 578 /// an error. |
579 * error. | 579 /// |
580 * | 580 /// If the used [http.Client] completes with an error when making a REST |
581 * If the used [http.Client] completes with an error when making a REST call, | 581 /// call, this method will complete with the same error. |
582 * this method will complete with the same error. | 582 async.Future<CommentList> list(core.String fileId, |
583 */ | 583 {core.bool includeDeleted, |
584 async.Future<CommentList> list(core.String fileId, {core.bool includeDeleted,
core.int pageSize, core.String pageToken, core.String startModifiedTime}) { | 584 core.int pageSize, |
| 585 core.String pageToken, |
| 586 core.String startModifiedTime}) { |
585 var _url = null; | 587 var _url = null; |
586 var _queryParams = new core.Map(); | 588 var _queryParams = new core.Map(); |
587 var _uploadMedia = null; | 589 var _uploadMedia = null; |
588 var _uploadOptions = null; | 590 var _uploadOptions = null; |
589 var _downloadOptions = commons.DownloadOptions.Metadata; | 591 var _downloadOptions = commons.DownloadOptions.Metadata; |
590 var _body = null; | 592 var _body = null; |
591 | 593 |
592 if (fileId == null) { | 594 if (fileId == null) { |
593 throw new core.ArgumentError("Parameter fileId is required."); | 595 throw new core.ArgumentError("Parameter fileId is required."); |
594 } | 596 } |
595 if (includeDeleted != null) { | 597 if (includeDeleted != null) { |
596 _queryParams["includeDeleted"] = ["${includeDeleted}"]; | 598 _queryParams["includeDeleted"] = ["${includeDeleted}"]; |
597 } | 599 } |
598 if (pageSize != null) { | 600 if (pageSize != null) { |
599 _queryParams["pageSize"] = ["${pageSize}"]; | 601 _queryParams["pageSize"] = ["${pageSize}"]; |
600 } | 602 } |
601 if (pageToken != null) { | 603 if (pageToken != null) { |
602 _queryParams["pageToken"] = [pageToken]; | 604 _queryParams["pageToken"] = [pageToken]; |
603 } | 605 } |
604 if (startModifiedTime != null) { | 606 if (startModifiedTime != null) { |
605 _queryParams["startModifiedTime"] = [startModifiedTime]; | 607 _queryParams["startModifiedTime"] = [startModifiedTime]; |
606 } | 608 } |
607 | 609 |
608 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments'; | 610 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments'; |
609 | 611 |
610 var _response = _requester.request(_url, | 612 var _response = _requester.request(_url, "GET", |
611 "GET", | 613 body: _body, |
612 body: _body, | 614 queryParams: _queryParams, |
613 queryParams: _queryParams, | 615 uploadOptions: _uploadOptions, |
614 uploadOptions: _uploadOptions, | 616 uploadMedia: _uploadMedia, |
615 uploadMedia: _uploadMedia, | 617 downloadOptions: _downloadOptions); |
616 downloadOptions: _downloadOptions); | |
617 return _response.then((data) => new CommentList.fromJson(data)); | 618 return _response.then((data) => new CommentList.fromJson(data)); |
618 } | 619 } |
619 | 620 |
620 /** | 621 /// Updates a comment with patch semantics. |
621 * Updates a comment with patch semantics. | 622 /// |
622 * | 623 /// [request] - The metadata request object. |
623 * [request] - The metadata request object. | 624 /// |
624 * | 625 /// Request parameters: |
625 * Request parameters: | 626 /// |
626 * | 627 /// [fileId] - The ID of the file. |
627 * [fileId] - The ID of the file. | 628 /// |
628 * | 629 /// [commentId] - The ID of the comment. |
629 * [commentId] - The ID of the comment. | 630 /// |
630 * | 631 /// Completes with a [Comment]. |
631 * Completes with a [Comment]. | 632 /// |
632 * | 633 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
633 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 634 /// an error. |
634 * error. | 635 /// |
635 * | 636 /// If the used [http.Client] completes with an error when making a REST |
636 * If the used [http.Client] completes with an error when making a REST call, | 637 /// call, this method will complete with the same error. |
637 * this method will complete with the same error. | 638 async.Future<Comment> update( |
638 */ | 639 Comment request, core.String fileId, core.String commentId) { |
639 async.Future<Comment> update(Comment request, core.String fileId, core.String
commentId) { | |
640 var _url = null; | 640 var _url = null; |
641 var _queryParams = new core.Map(); | 641 var _queryParams = new core.Map(); |
642 var _uploadMedia = null; | 642 var _uploadMedia = null; |
643 var _uploadOptions = null; | 643 var _uploadOptions = null; |
644 var _downloadOptions = commons.DownloadOptions.Metadata; | 644 var _downloadOptions = commons.DownloadOptions.Metadata; |
645 var _body = null; | 645 var _body = null; |
646 | 646 |
647 if (request != null) { | 647 if (request != null) { |
648 _body = convert.JSON.encode((request).toJson()); | 648 _body = convert.JSON.encode((request).toJson()); |
649 } | 649 } |
650 if (fileId == null) { | 650 if (fileId == null) { |
651 throw new core.ArgumentError("Parameter fileId is required."); | 651 throw new core.ArgumentError("Parameter fileId is required."); |
652 } | 652 } |
653 if (commentId == null) { | 653 if (commentId == null) { |
654 throw new core.ArgumentError("Parameter commentId is required."); | 654 throw new core.ArgumentError("Parameter commentId is required."); |
655 } | 655 } |
656 | 656 |
657 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' +
commons.Escaper.ecapeVariable('$commentId'); | 657 _url = 'files/' + |
| 658 commons.Escaper.ecapeVariable('$fileId') + |
| 659 '/comments/' + |
| 660 commons.Escaper.ecapeVariable('$commentId'); |
658 | 661 |
659 var _response = _requester.request(_url, | 662 var _response = _requester.request(_url, "PATCH", |
660 "PATCH", | 663 body: _body, |
661 body: _body, | 664 queryParams: _queryParams, |
662 queryParams: _queryParams, | 665 uploadOptions: _uploadOptions, |
663 uploadOptions: _uploadOptions, | 666 uploadMedia: _uploadMedia, |
664 uploadMedia: _uploadMedia, | 667 downloadOptions: _downloadOptions); |
665 downloadOptions: _downloadOptions); | |
666 return _response.then((data) => new Comment.fromJson(data)); | 668 return _response.then((data) => new Comment.fromJson(data)); |
667 } | 669 } |
668 | |
669 } | 670 } |
670 | 671 |
671 | |
672 class FilesResourceApi { | 672 class FilesResourceApi { |
673 final commons.ApiRequester _requester; | 673 final commons.ApiRequester _requester; |
674 | 674 |
675 FilesResourceApi(commons.ApiRequester client) : | 675 FilesResourceApi(commons.ApiRequester client) : _requester = client; |
676 _requester = client; | |
677 | 676 |
678 /** | 677 /// Creates a copy of a file and applies any requested updates with patch |
679 * Creates a copy of a file and applies any requested updates with patch | 678 /// semantics. |
680 * semantics. | 679 /// |
681 * | 680 /// [request] - The metadata request object. |
682 * [request] - The metadata request object. | 681 /// |
683 * | 682 /// Request parameters: |
684 * Request parameters: | 683 /// |
685 * | 684 /// [fileId] - The ID of the file. |
686 * [fileId] - The ID of the file. | 685 /// |
687 * | 686 /// [ignoreDefaultVisibility] - Whether to ignore the domain's default |
688 * [ignoreDefaultVisibility] - Whether to ignore the domain's default | 687 /// visibility settings for the created file. Domain administrators can |
689 * visibility settings for the created file. Domain administrators can choose | 688 /// choose to make all uploaded files visible to the domain by default; this |
690 * to make all uploaded files visible to the domain by default; this parameter | 689 /// parameter bypasses that behavior for the request. Permissions are still |
691 * bypasses that behavior for the request. Permissions are still inherited | 690 /// inherited from parent folders. |
692 * from parent folders. | 691 /// |
693 * | 692 /// [keepRevisionForever] - Whether to set the 'keepForever' field in the new |
694 * [keepRevisionForever] - Whether to set the 'keepForever' field in the new | 693 /// head revision. This is only applicable to files with binary content in |
695 * head revision. This is only applicable to files with binary content in | 694 /// Drive. |
696 * Drive. | 695 /// |
697 * | 696 /// [ocrLanguage] - A language hint for OCR processing during image import |
698 * [ocrLanguage] - A language hint for OCR processing during image import (ISO | 697 /// (ISO 639-1 code). |
699 * 639-1 code). | 698 /// |
700 * | 699 /// [supportsTeamDrives] - Whether the requesting application supports Team |
701 * [supportsTeamDrives] - Whether the requesting application supports Team | 700 /// Drives. |
702 * Drives. | 701 /// |
703 * | 702 /// Completes with a [File]. |
704 * Completes with a [File]. | 703 /// |
705 * | 704 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
706 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 705 /// an error. |
707 * error. | 706 /// |
708 * | 707 /// If the used [http.Client] completes with an error when making a REST |
709 * If the used [http.Client] completes with an error when making a REST call, | 708 /// call, this method will complete with the same error. |
710 * this method will complete with the same error. | 709 async.Future<File> copy(File request, core.String fileId, |
711 */ | 710 {core.bool ignoreDefaultVisibility, |
712 async.Future<File> copy(File request, core.String fileId, {core.bool ignoreDef
aultVisibility, core.bool keepRevisionForever, core.String ocrLanguage, core.boo
l supportsTeamDrives}) { | 711 core.bool keepRevisionForever, |
| 712 core.String ocrLanguage, |
| 713 core.bool supportsTeamDrives}) { |
713 var _url = null; | 714 var _url = null; |
714 var _queryParams = new core.Map(); | 715 var _queryParams = new core.Map(); |
715 var _uploadMedia = null; | 716 var _uploadMedia = null; |
716 var _uploadOptions = null; | 717 var _uploadOptions = null; |
717 var _downloadOptions = commons.DownloadOptions.Metadata; | 718 var _downloadOptions = commons.DownloadOptions.Metadata; |
718 var _body = null; | 719 var _body = null; |
719 | 720 |
720 if (request != null) { | 721 if (request != null) { |
721 _body = convert.JSON.encode((request).toJson()); | 722 _body = convert.JSON.encode((request).toJson()); |
722 } | 723 } |
723 if (fileId == null) { | 724 if (fileId == null) { |
724 throw new core.ArgumentError("Parameter fileId is required."); | 725 throw new core.ArgumentError("Parameter fileId is required."); |
725 } | 726 } |
726 if (ignoreDefaultVisibility != null) { | 727 if (ignoreDefaultVisibility != null) { |
727 _queryParams["ignoreDefaultVisibility"] = ["${ignoreDefaultVisibility}"]; | 728 _queryParams["ignoreDefaultVisibility"] = ["${ignoreDefaultVisibility}"]; |
728 } | 729 } |
729 if (keepRevisionForever != null) { | 730 if (keepRevisionForever != null) { |
730 _queryParams["keepRevisionForever"] = ["${keepRevisionForever}"]; | 731 _queryParams["keepRevisionForever"] = ["${keepRevisionForever}"]; |
731 } | 732 } |
732 if (ocrLanguage != null) { | 733 if (ocrLanguage != null) { |
733 _queryParams["ocrLanguage"] = [ocrLanguage]; | 734 _queryParams["ocrLanguage"] = [ocrLanguage]; |
734 } | 735 } |
735 if (supportsTeamDrives != null) { | 736 if (supportsTeamDrives != null) { |
736 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 737 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
737 } | 738 } |
738 | 739 |
739 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/copy'; | 740 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/copy'; |
740 | 741 |
741 var _response = _requester.request(_url, | 742 var _response = _requester.request(_url, "POST", |
742 "POST", | 743 body: _body, |
743 body: _body, | 744 queryParams: _queryParams, |
744 queryParams: _queryParams, | 745 uploadOptions: _uploadOptions, |
745 uploadOptions: _uploadOptions, | 746 uploadMedia: _uploadMedia, |
746 uploadMedia: _uploadMedia, | 747 downloadOptions: _downloadOptions); |
747 downloadOptions: _downloadOptions); | |
748 return _response.then((data) => new File.fromJson(data)); | 748 return _response.then((data) => new File.fromJson(data)); |
749 } | 749 } |
750 | 750 |
751 /** | 751 /// Creates a new file. |
752 * Creates a new file. | 752 /// |
753 * | 753 /// [request] - The metadata request object. |
754 * [request] - The metadata request object. | 754 /// |
755 * | 755 /// Request parameters: |
756 * Request parameters: | 756 /// |
757 * | 757 /// [ignoreDefaultVisibility] - Whether to ignore the domain's default |
758 * [ignoreDefaultVisibility] - Whether to ignore the domain's default | 758 /// visibility settings for the created file. Domain administrators can |
759 * visibility settings for the created file. Domain administrators can choose | 759 /// choose to make all uploaded files visible to the domain by default; this |
760 * to make all uploaded files visible to the domain by default; this parameter | 760 /// parameter bypasses that behavior for the request. Permissions are still |
761 * bypasses that behavior for the request. Permissions are still inherited | 761 /// inherited from parent folders. |
762 * from parent folders. | 762 /// |
763 * | 763 /// [keepRevisionForever] - Whether to set the 'keepForever' field in the new |
764 * [keepRevisionForever] - Whether to set the 'keepForever' field in the new | 764 /// head revision. This is only applicable to files with binary content in |
765 * head revision. This is only applicable to files with binary content in | 765 /// Drive. |
766 * Drive. | 766 /// |
767 * | 767 /// [ocrLanguage] - A language hint for OCR processing during image import |
768 * [ocrLanguage] - A language hint for OCR processing during image import (ISO | 768 /// (ISO 639-1 code). |
769 * 639-1 code). | 769 /// |
770 * | 770 /// [supportsTeamDrives] - Whether the requesting application supports Team |
771 * [supportsTeamDrives] - Whether the requesting application supports Team | 771 /// Drives. |
772 * Drives. | 772 /// |
773 * | 773 /// [useContentAsIndexableText] - Whether to use the uploaded content as |
774 * [useContentAsIndexableText] - Whether to use the uploaded content as | 774 /// indexable text. |
775 * indexable text. | 775 /// |
776 * | 776 /// [uploadMedia] - The media to upload. |
777 * [uploadMedia] - The media to upload. | 777 /// |
778 * | 778 /// [uploadOptions] - Options for the media upload. Streaming Media without |
779 * [uploadOptions] - Options for the media upload. Streaming Media without the | 779 /// the length being known ahead of time is only supported via resumable |
780 * length being known ahead of time is only supported via resumable uploads. | 780 /// uploads. |
781 * | 781 /// |
782 * Completes with a [File]. | 782 /// Completes with a [File]. |
783 * | 783 /// |
784 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 784 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
785 * error. | 785 /// an error. |
786 * | 786 /// |
787 * If the used [http.Client] completes with an error when making a REST call, | 787 /// If the used [http.Client] completes with an error when making a REST |
788 * this method will complete with the same error. | 788 /// call, this method will complete with the same error. |
789 */ | 789 async.Future<File> create(File request, |
790 async.Future<File> create(File request, {core.bool ignoreDefaultVisibility, co
re.bool keepRevisionForever, core.String ocrLanguage, core.bool supportsTeamDriv
es, core.bool useContentAsIndexableText, commons.UploadOptions uploadOptions : c
ommons.UploadOptions.Default, commons.Media uploadMedia}) { | 790 {core.bool ignoreDefaultVisibility, |
| 791 core.bool keepRevisionForever, |
| 792 core.String ocrLanguage, |
| 793 core.bool supportsTeamDrives, |
| 794 core.bool useContentAsIndexableText, |
| 795 commons.UploadOptions uploadOptions: commons.UploadOptions.Default, |
| 796 commons.Media uploadMedia}) { |
791 var _url = null; | 797 var _url = null; |
792 var _queryParams = new core.Map(); | 798 var _queryParams = new core.Map(); |
793 var _uploadMedia = null; | 799 var _uploadMedia = null; |
794 var _uploadOptions = null; | 800 var _uploadOptions = null; |
795 var _downloadOptions = commons.DownloadOptions.Metadata; | 801 var _downloadOptions = commons.DownloadOptions.Metadata; |
796 var _body = null; | 802 var _body = null; |
797 | 803 |
798 if (request != null) { | 804 if (request != null) { |
799 _body = convert.JSON.encode((request).toJson()); | 805 _body = convert.JSON.encode((request).toJson()); |
800 } | 806 } |
801 if (ignoreDefaultVisibility != null) { | 807 if (ignoreDefaultVisibility != null) { |
802 _queryParams["ignoreDefaultVisibility"] = ["${ignoreDefaultVisibility}"]; | 808 _queryParams["ignoreDefaultVisibility"] = ["${ignoreDefaultVisibility}"]; |
803 } | 809 } |
804 if (keepRevisionForever != null) { | 810 if (keepRevisionForever != null) { |
805 _queryParams["keepRevisionForever"] = ["${keepRevisionForever}"]; | 811 _queryParams["keepRevisionForever"] = ["${keepRevisionForever}"]; |
806 } | 812 } |
807 if (ocrLanguage != null) { | 813 if (ocrLanguage != null) { |
808 _queryParams["ocrLanguage"] = [ocrLanguage]; | 814 _queryParams["ocrLanguage"] = [ocrLanguage]; |
809 } | 815 } |
810 if (supportsTeamDrives != null) { | 816 if (supportsTeamDrives != null) { |
811 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 817 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
812 } | 818 } |
813 if (useContentAsIndexableText != null) { | 819 if (useContentAsIndexableText != null) { |
814 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText}
"]; | 820 _queryParams["useContentAsIndexableText"] = [ |
| 821 "${useContentAsIndexableText}" |
| 822 ]; |
815 } | 823 } |
816 | 824 |
817 _uploadMedia = uploadMedia; | 825 _uploadMedia = uploadMedia; |
818 _uploadOptions = uploadOptions; | 826 _uploadOptions = uploadOptions; |
819 | 827 |
820 if (_uploadMedia == null) { | 828 if (_uploadMedia == null) { |
821 _url = 'files'; | 829 _url = 'files'; |
822 } else if (_uploadOptions is commons.ResumableUploadOptions) { | 830 } else if (_uploadOptions is commons.ResumableUploadOptions) { |
823 _url = '/resumable/upload/drive/v3/files'; | 831 _url = '/resumable/upload/drive/v3/files'; |
824 } else { | 832 } else { |
825 _url = '/upload/drive/v3/files'; | 833 _url = '/upload/drive/v3/files'; |
826 } | 834 } |
827 | 835 |
828 | 836 var _response = _requester.request(_url, "POST", |
829 var _response = _requester.request(_url, | 837 body: _body, |
830 "POST", | 838 queryParams: _queryParams, |
831 body: _body, | 839 uploadOptions: _uploadOptions, |
832 queryParams: _queryParams, | 840 uploadMedia: _uploadMedia, |
833 uploadOptions: _uploadOptions, | 841 downloadOptions: _downloadOptions); |
834 uploadMedia: _uploadMedia, | |
835 downloadOptions: _downloadOptions); | |
836 return _response.then((data) => new File.fromJson(data)); | 842 return _response.then((data) => new File.fromJson(data)); |
837 } | 843 } |
838 | 844 |
839 /** | 845 /// Permanently deletes a file owned by the user without moving it to the |
840 * Permanently deletes a file owned by the user without moving it to the | 846 /// trash. If the file belongs to a Team Drive the user must be an organizer |
841 * trash. If the file belongs to a Team Drive the user must be an organizer on | 847 /// on the parent. If the target is a folder, all descendants owned by the |
842 * the parent. If the target is a folder, all descendants owned by the user | 848 /// user are also deleted. |
843 * are also deleted. | 849 /// |
844 * | 850 /// Request parameters: |
845 * Request parameters: | 851 /// |
846 * | 852 /// [fileId] - The ID of the file. |
847 * [fileId] - The ID of the file. | 853 /// |
848 * | 854 /// [supportsTeamDrives] - Whether the requesting application supports Team |
849 * [supportsTeamDrives] - Whether the requesting application supports Team | 855 /// Drives. |
850 * Drives. | 856 /// |
851 * | 857 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
852 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 858 /// an error. |
853 * error. | 859 /// |
854 * | 860 /// If the used [http.Client] completes with an error when making a REST |
855 * If the used [http.Client] completes with an error when making a REST call, | 861 /// call, this method will complete with the same error. |
856 * this method will complete with the same error. | |
857 */ | |
858 async.Future delete(core.String fileId, {core.bool supportsTeamDrives}) { | 862 async.Future delete(core.String fileId, {core.bool supportsTeamDrives}) { |
859 var _url = null; | 863 var _url = null; |
860 var _queryParams = new core.Map(); | 864 var _queryParams = new core.Map(); |
861 var _uploadMedia = null; | 865 var _uploadMedia = null; |
862 var _uploadOptions = null; | 866 var _uploadOptions = null; |
863 var _downloadOptions = commons.DownloadOptions.Metadata; | 867 var _downloadOptions = commons.DownloadOptions.Metadata; |
864 var _body = null; | 868 var _body = null; |
865 | 869 |
866 if (fileId == null) { | 870 if (fileId == null) { |
867 throw new core.ArgumentError("Parameter fileId is required."); | 871 throw new core.ArgumentError("Parameter fileId is required."); |
868 } | 872 } |
869 if (supportsTeamDrives != null) { | 873 if (supportsTeamDrives != null) { |
870 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 874 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
871 } | 875 } |
872 | 876 |
873 _downloadOptions = null; | 877 _downloadOptions = null; |
874 | 878 |
875 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); | 879 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); |
876 | 880 |
877 var _response = _requester.request(_url, | 881 var _response = _requester.request(_url, "DELETE", |
878 "DELETE", | 882 body: _body, |
879 body: _body, | 883 queryParams: _queryParams, |
880 queryParams: _queryParams, | 884 uploadOptions: _uploadOptions, |
881 uploadOptions: _uploadOptions, | 885 uploadMedia: _uploadMedia, |
882 uploadMedia: _uploadMedia, | 886 downloadOptions: _downloadOptions); |
883 downloadOptions: _downloadOptions); | |
884 return _response.then((data) => null); | 887 return _response.then((data) => null); |
885 } | 888 } |
886 | 889 |
887 /** | 890 /// Permanently deletes all of the user's trashed files. |
888 * Permanently deletes all of the user's trashed files. | 891 /// |
889 * | 892 /// Request parameters: |
890 * Request parameters: | 893 /// |
891 * | 894 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
892 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 895 /// an error. |
893 * error. | 896 /// |
894 * | 897 /// If the used [http.Client] completes with an error when making a REST |
895 * If the used [http.Client] completes with an error when making a REST call, | 898 /// call, this method will complete with the same error. |
896 * this method will complete with the same error. | |
897 */ | |
898 async.Future emptyTrash() { | 899 async.Future emptyTrash() { |
899 var _url = null; | 900 var _url = null; |
900 var _queryParams = new core.Map(); | 901 var _queryParams = new core.Map(); |
901 var _uploadMedia = null; | 902 var _uploadMedia = null; |
902 var _uploadOptions = null; | 903 var _uploadOptions = null; |
903 var _downloadOptions = commons.DownloadOptions.Metadata; | 904 var _downloadOptions = commons.DownloadOptions.Metadata; |
904 var _body = null; | 905 var _body = null; |
905 | 906 |
906 | |
907 _downloadOptions = null; | 907 _downloadOptions = null; |
908 | 908 |
909 _url = 'files/trash'; | 909 _url = 'files/trash'; |
910 | 910 |
911 var _response = _requester.request(_url, | 911 var _response = _requester.request(_url, "DELETE", |
912 "DELETE", | 912 body: _body, |
913 body: _body, | 913 queryParams: _queryParams, |
914 queryParams: _queryParams, | 914 uploadOptions: _uploadOptions, |
915 uploadOptions: _uploadOptions, | 915 uploadMedia: _uploadMedia, |
916 uploadMedia: _uploadMedia, | 916 downloadOptions: _downloadOptions); |
917 downloadOptions: _downloadOptions); | |
918 return _response.then((data) => null); | 917 return _response.then((data) => null); |
919 } | 918 } |
920 | 919 |
921 /** | 920 /// Exports a Google Doc to the requested MIME type and returns the exported |
922 * Exports a Google Doc to the requested MIME type and returns the exported | 921 /// content. Please note that the exported content is limited to 10MB. |
923 * content. Please note that the exported content is limited to 10MB. | 922 /// |
924 * | 923 /// Request parameters: |
925 * Request parameters: | 924 /// |
926 * | 925 /// [fileId] - The ID of the file. |
927 * [fileId] - The ID of the file. | 926 /// |
928 * | 927 /// [mimeType] - The MIME type of the format requested for this export. |
929 * [mimeType] - The MIME type of the format requested for this export. | 928 /// |
930 * | 929 /// [downloadOptions] - Options for downloading. A download can be either a |
931 * [downloadOptions] - Options for downloading. A download can be either a | 930 /// Metadata (default) or Media download. Partial Media downloads are |
932 * Metadata (default) or Media download. Partial Media downloads are possible | 931 /// possible as well. |
933 * as well. | 932 /// |
934 * | 933 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
935 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 934 /// an error. |
936 * error. | 935 /// |
937 * | 936 /// If the used [http.Client] completes with an error when making a REST |
938 * If the used [http.Client] completes with an error when making a REST call, | 937 /// call, this method will complete with the same error. |
939 * this method will complete with the same error. | 938 async.Future export(core.String fileId, core.String mimeType, |
940 */ | 939 {commons.DownloadOptions downloadOptions: |
941 async.Future export(core.String fileId, core.String mimeType, {commons.Downloa
dOptions downloadOptions: commons.DownloadOptions.Metadata}) { | 940 commons.DownloadOptions.Metadata}) { |
942 var _url = null; | 941 var _url = null; |
943 var _queryParams = new core.Map(); | 942 var _queryParams = new core.Map(); |
944 var _uploadMedia = null; | 943 var _uploadMedia = null; |
945 var _uploadOptions = null; | 944 var _uploadOptions = null; |
946 var _downloadOptions = commons.DownloadOptions.Metadata; | 945 var _downloadOptions = commons.DownloadOptions.Metadata; |
947 var _body = null; | 946 var _body = null; |
948 | 947 |
949 if (fileId == null) { | 948 if (fileId == null) { |
950 throw new core.ArgumentError("Parameter fileId is required."); | 949 throw new core.ArgumentError("Parameter fileId is required."); |
951 } | 950 } |
952 if (mimeType == null) { | 951 if (mimeType == null) { |
953 throw new core.ArgumentError("Parameter mimeType is required."); | 952 throw new core.ArgumentError("Parameter mimeType is required."); |
954 } | 953 } |
955 _queryParams["mimeType"] = [mimeType]; | 954 _queryParams["mimeType"] = [mimeType]; |
956 | 955 |
957 _downloadOptions = downloadOptions; | 956 _downloadOptions = downloadOptions; |
958 | 957 |
959 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/export'; | 958 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/export'; |
960 | 959 |
961 var _response = _requester.request(_url, | 960 var _response = _requester.request(_url, "GET", |
962 "GET", | 961 body: _body, |
963 body: _body, | 962 queryParams: _queryParams, |
964 queryParams: _queryParams, | 963 uploadOptions: _uploadOptions, |
965 uploadOptions: _uploadOptions, | 964 uploadMedia: _uploadMedia, |
966 uploadMedia: _uploadMedia, | 965 downloadOptions: _downloadOptions); |
967 downloadOptions: _downloadOptions); | |
968 if (_downloadOptions == null || | 966 if (_downloadOptions == null || |
969 _downloadOptions == commons.DownloadOptions.Metadata) { | 967 _downloadOptions == commons.DownloadOptions.Metadata) { |
970 return _response.then((data) => null); | 968 return _response.then((data) => null); |
971 } else { | 969 } else { |
972 return _response; | 970 return _response; |
973 } | 971 } |
974 } | 972 } |
975 | 973 |
976 /** | 974 /// Generates a set of file IDs which can be provided in create requests. |
977 * Generates a set of file IDs which can be provided in create requests. | 975 /// |
978 * | 976 /// Request parameters: |
979 * Request parameters: | 977 /// |
980 * | 978 /// [count] - The number of IDs to return. |
981 * [count] - The number of IDs to return. | 979 /// Value must be between "1" and "1000". |
982 * Value must be between "1" and "1000". | 980 /// |
983 * | 981 /// [space] - The space in which the IDs can be used to create new files. |
984 * [space] - The space in which the IDs can be used to create new files. | 982 /// Supported values are 'drive' and 'appDataFolder'. |
985 * Supported values are 'drive' and 'appDataFolder'. | 983 /// |
986 * | 984 /// Completes with a [GeneratedIds]. |
987 * Completes with a [GeneratedIds]. | 985 /// |
988 * | 986 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
989 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 987 /// an error. |
990 * error. | 988 /// |
991 * | 989 /// If the used [http.Client] completes with an error when making a REST |
992 * If the used [http.Client] completes with an error when making a REST call, | 990 /// call, this method will complete with the same error. |
993 * this method will complete with the same error. | |
994 */ | |
995 async.Future<GeneratedIds> generateIds({core.int count, core.String space}) { | 991 async.Future<GeneratedIds> generateIds({core.int count, core.String space}) { |
996 var _url = null; | 992 var _url = null; |
997 var _queryParams = new core.Map(); | 993 var _queryParams = new core.Map(); |
998 var _uploadMedia = null; | 994 var _uploadMedia = null; |
999 var _uploadOptions = null; | 995 var _uploadOptions = null; |
1000 var _downloadOptions = commons.DownloadOptions.Metadata; | 996 var _downloadOptions = commons.DownloadOptions.Metadata; |
1001 var _body = null; | 997 var _body = null; |
1002 | 998 |
1003 if (count != null) { | 999 if (count != null) { |
1004 _queryParams["count"] = ["${count}"]; | 1000 _queryParams["count"] = ["${count}"]; |
1005 } | 1001 } |
1006 if (space != null) { | 1002 if (space != null) { |
1007 _queryParams["space"] = [space]; | 1003 _queryParams["space"] = [space]; |
1008 } | 1004 } |
1009 | 1005 |
1010 _url = 'files/generateIds'; | 1006 _url = 'files/generateIds'; |
1011 | 1007 |
1012 var _response = _requester.request(_url, | 1008 var _response = _requester.request(_url, "GET", |
1013 "GET", | 1009 body: _body, |
1014 body: _body, | 1010 queryParams: _queryParams, |
1015 queryParams: _queryParams, | 1011 uploadOptions: _uploadOptions, |
1016 uploadOptions: _uploadOptions, | 1012 uploadMedia: _uploadMedia, |
1017 uploadMedia: _uploadMedia, | 1013 downloadOptions: _downloadOptions); |
1018 downloadOptions: _downloadOptions); | |
1019 return _response.then((data) => new GeneratedIds.fromJson(data)); | 1014 return _response.then((data) => new GeneratedIds.fromJson(data)); |
1020 } | 1015 } |
1021 | 1016 |
1022 /** | 1017 /// Gets a file's metadata or content by ID. |
1023 * Gets a file's metadata or content by ID. | 1018 /// |
1024 * | 1019 /// Request parameters: |
1025 * Request parameters: | 1020 /// |
1026 * | 1021 /// [fileId] - The ID of the file. |
1027 * [fileId] - The ID of the file. | 1022 /// |
1028 * | 1023 /// [acknowledgeAbuse] - Whether the user is acknowledging the risk of |
1029 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of | 1024 /// downloading known malware or other abusive files. This is only applicable |
1030 * downloading known malware or other abusive files. This is only applicable | 1025 /// when alt=media. |
1031 * when alt=media. | 1026 /// |
1032 * | 1027 /// [supportsTeamDrives] - Whether the requesting application supports Team |
1033 * [supportsTeamDrives] - Whether the requesting application supports Team | 1028 /// Drives. |
1034 * Drives. | 1029 /// |
1035 * | 1030 /// [downloadOptions] - Options for downloading. A download can be either a |
1036 * [downloadOptions] - Options for downloading. A download can be either a | 1031 /// Metadata (default) or Media download. Partial Media downloads are |
1037 * Metadata (default) or Media download. Partial Media downloads are possible | 1032 /// possible as well. |
1038 * as well. | 1033 /// |
1039 * | 1034 /// Completes with a |
1040 * Completes with a | 1035 /// |
1041 * | 1036 /// - [File] for Metadata downloads (see [downloadOptions]). |
1042 * - [File] for Metadata downloads (see [downloadOptions]). | 1037 /// |
1043 * | 1038 /// - [commons.Media] for Media downloads (see [downloadOptions]). |
1044 * - [commons.Media] for Media downloads (see [downloadOptions]). | 1039 /// |
1045 * | 1040 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1046 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1041 /// an error. |
1047 * error. | 1042 /// |
1048 * | 1043 /// If the used [http.Client] completes with an error when making a REST |
1049 * If the used [http.Client] completes with an error when making a REST call, | 1044 /// call, this method will complete with the same error. |
1050 * this method will complete with the same error. | 1045 async.Future get(core.String fileId, |
1051 */ | 1046 {core.bool acknowledgeAbuse, |
1052 async.Future get(core.String fileId, {core.bool acknowledgeAbuse, core.bool su
pportsTeamDrives, commons.DownloadOptions downloadOptions: commons.DownloadOptio
ns.Metadata}) { | 1047 core.bool supportsTeamDrives, |
| 1048 commons.DownloadOptions downloadOptions: |
| 1049 commons.DownloadOptions.Metadata}) { |
1053 var _url = null; | 1050 var _url = null; |
1054 var _queryParams = new core.Map(); | 1051 var _queryParams = new core.Map(); |
1055 var _uploadMedia = null; | 1052 var _uploadMedia = null; |
1056 var _uploadOptions = null; | 1053 var _uploadOptions = null; |
1057 var _downloadOptions = commons.DownloadOptions.Metadata; | 1054 var _downloadOptions = commons.DownloadOptions.Metadata; |
1058 var _body = null; | 1055 var _body = null; |
1059 | 1056 |
1060 if (fileId == null) { | 1057 if (fileId == null) { |
1061 throw new core.ArgumentError("Parameter fileId is required."); | 1058 throw new core.ArgumentError("Parameter fileId is required."); |
1062 } | 1059 } |
1063 if (acknowledgeAbuse != null) { | 1060 if (acknowledgeAbuse != null) { |
1064 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"]; | 1061 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"]; |
1065 } | 1062 } |
1066 if (supportsTeamDrives != null) { | 1063 if (supportsTeamDrives != null) { |
1067 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 1064 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
1068 } | 1065 } |
1069 | 1066 |
1070 _downloadOptions = downloadOptions; | 1067 _downloadOptions = downloadOptions; |
1071 | 1068 |
1072 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); | 1069 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); |
1073 | 1070 |
1074 var _response = _requester.request(_url, | 1071 var _response = _requester.request(_url, "GET", |
1075 "GET", | 1072 body: _body, |
1076 body: _body, | 1073 queryParams: _queryParams, |
1077 queryParams: _queryParams, | 1074 uploadOptions: _uploadOptions, |
1078 uploadOptions: _uploadOptions, | 1075 uploadMedia: _uploadMedia, |
1079 uploadMedia: _uploadMedia, | 1076 downloadOptions: _downloadOptions); |
1080 downloadOptions: _downloadOptions); | |
1081 if (_downloadOptions == null || | 1077 if (_downloadOptions == null || |
1082 _downloadOptions == commons.DownloadOptions.Metadata) { | 1078 _downloadOptions == commons.DownloadOptions.Metadata) { |
1083 return _response.then((data) => new File.fromJson(data)); | 1079 return _response.then((data) => new File.fromJson(data)); |
1084 } else { | 1080 } else { |
1085 return _response; | 1081 return _response; |
1086 } | 1082 } |
1087 } | 1083 } |
1088 | 1084 |
1089 /** | 1085 /// Lists or searches files. |
1090 * Lists or searches files. | 1086 /// |
1091 * | 1087 /// Request parameters: |
1092 * Request parameters: | 1088 /// |
1093 * | 1089 /// [corpora] - Comma-separated list of bodies of items (files/documents) to |
1094 * [corpora] - Comma-separated list of bodies of items (files/documents) to | 1090 /// which the query applies. Supported bodies are 'user', 'domain', |
1095 * which the query applies. Supported bodies are 'user', 'domain', 'teamDrive' | 1091 /// 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with |
1096 * and 'allTeamDrives'. 'allTeamDrives' must be combined with 'user'; all | 1092 /// 'user'; all other values must be used in isolation. Prefer 'user' or |
1097 * other values must be used in isolation. Prefer 'user' or 'teamDrive' to | 1093 /// 'teamDrive' to 'allTeamDrives' for efficiency. |
1098 * 'allTeamDrives' for efficiency. | 1094 /// |
1099 * | 1095 /// [corpus] - The source of files to list. Deprecated: use 'corpora' |
1100 * [corpus] - The source of files to list. Deprecated: use 'corpora' instead. | 1096 /// instead. |
1101 * Possible string values are: | 1097 /// Possible string values are: |
1102 * - "domain" : Files shared to the user's domain. | 1098 /// - "domain" : Files shared to the user's domain. |
1103 * - "user" : Files owned by or shared to the user. | 1099 /// - "user" : Files owned by or shared to the user. |
1104 * | 1100 /// |
1105 * [includeTeamDriveItems] - Whether Team Drive items should be included in | 1101 /// [includeTeamDriveItems] - Whether Team Drive items should be included in |
1106 * results. | 1102 /// results. |
1107 * | 1103 /// |
1108 * [orderBy] - A comma-separated list of sort keys. Valid keys are | 1104 /// [orderBy] - A comma-separated list of sort keys. Valid keys are |
1109 * 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', | 1105 /// 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', |
1110 * 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and | 1106 /// 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', |
1111 * 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed | 1107 /// 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but |
1112 * with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime | 1108 /// may be reversed with the 'desc' modifier. Example usage: |
1113 * desc,name. Please note that there is a current limitation for users with | 1109 /// ?orderBy=folder,modifiedTime desc,name. Please note that there is a |
1114 * approximately one million files in which the requested sort order is | 1110 /// current limitation for users with approximately one million files in |
1115 * ignored. | 1111 /// which the requested sort order is ignored. |
1116 * | 1112 /// |
1117 * [pageSize] - The maximum number of files to return per page. Partial or | 1113 /// [pageSize] - The maximum number of files to return per page. Partial or |
1118 * empty result pages are possible even before the end of the files list has | 1114 /// empty result pages are possible even before the end of the files list has |
1119 * been reached. | 1115 /// been reached. |
1120 * Value must be between "1" and "1000". | 1116 /// Value must be between "1" and "1000". |
1121 * | 1117 /// |
1122 * [pageToken] - The token for continuing a previous list request on the next | 1118 /// [pageToken] - The token for continuing a previous list request on the |
1123 * page. This should be set to the value of 'nextPageToken' from the previous | 1119 /// next page. This should be set to the value of 'nextPageToken' from the |
1124 * response. | 1120 /// previous response. |
1125 * | 1121 /// |
1126 * [q] - A query for filtering the file results. See the "Search for Files" | 1122 /// [q] - A query for filtering the file results. See the "Search for Files" |
1127 * guide for supported syntax. | 1123 /// guide for supported syntax. |
1128 * | 1124 /// |
1129 * [spaces] - A comma-separated list of spaces to query within the corpus. | 1125 /// [spaces] - A comma-separated list of spaces to query within the corpus. |
1130 * Supported values are 'drive', 'appDataFolder' and 'photos'. | 1126 /// Supported values are 'drive', 'appDataFolder' and 'photos'. |
1131 * | 1127 /// |
1132 * [supportsTeamDrives] - Whether the requesting application supports Team | 1128 /// [supportsTeamDrives] - Whether the requesting application supports Team |
1133 * Drives. | 1129 /// Drives. |
1134 * | 1130 /// |
1135 * [teamDriveId] - ID of Team Drive to search. | 1131 /// [teamDriveId] - ID of Team Drive to search. |
1136 * | 1132 /// |
1137 * Completes with a [FileList]. | 1133 /// Completes with a [FileList]. |
1138 * | 1134 /// |
1139 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1135 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1140 * error. | 1136 /// an error. |
1141 * | 1137 /// |
1142 * If the used [http.Client] completes with an error when making a REST call, | 1138 /// If the used [http.Client] completes with an error when making a REST |
1143 * this method will complete with the same error. | 1139 /// call, this method will complete with the same error. |
1144 */ | 1140 async.Future<FileList> list( |
1145 async.Future<FileList> list({core.String corpora, core.String corpus, core.boo
l includeTeamDriveItems, core.String orderBy, core.int pageSize, core.String pag
eToken, core.String q, core.String spaces, core.bool supportsTeamDrives, core.St
ring teamDriveId}) { | 1141 {core.String corpora, |
| 1142 core.String corpus, |
| 1143 core.bool includeTeamDriveItems, |
| 1144 core.String orderBy, |
| 1145 core.int pageSize, |
| 1146 core.String pageToken, |
| 1147 core.String q, |
| 1148 core.String spaces, |
| 1149 core.bool supportsTeamDrives, |
| 1150 core.String teamDriveId}) { |
1146 var _url = null; | 1151 var _url = null; |
1147 var _queryParams = new core.Map(); | 1152 var _queryParams = new core.Map(); |
1148 var _uploadMedia = null; | 1153 var _uploadMedia = null; |
1149 var _uploadOptions = null; | 1154 var _uploadOptions = null; |
1150 var _downloadOptions = commons.DownloadOptions.Metadata; | 1155 var _downloadOptions = commons.DownloadOptions.Metadata; |
1151 var _body = null; | 1156 var _body = null; |
1152 | 1157 |
1153 if (corpora != null) { | 1158 if (corpora != null) { |
1154 _queryParams["corpora"] = [corpora]; | 1159 _queryParams["corpora"] = [corpora]; |
1155 } | 1160 } |
(...skipping 20 matching lines...) Expand all Loading... |
1176 } | 1181 } |
1177 if (supportsTeamDrives != null) { | 1182 if (supportsTeamDrives != null) { |
1178 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 1183 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
1179 } | 1184 } |
1180 if (teamDriveId != null) { | 1185 if (teamDriveId != null) { |
1181 _queryParams["teamDriveId"] = [teamDriveId]; | 1186 _queryParams["teamDriveId"] = [teamDriveId]; |
1182 } | 1187 } |
1183 | 1188 |
1184 _url = 'files'; | 1189 _url = 'files'; |
1185 | 1190 |
1186 var _response = _requester.request(_url, | 1191 var _response = _requester.request(_url, "GET", |
1187 "GET", | 1192 body: _body, |
1188 body: _body, | 1193 queryParams: _queryParams, |
1189 queryParams: _queryParams, | 1194 uploadOptions: _uploadOptions, |
1190 uploadOptions: _uploadOptions, | 1195 uploadMedia: _uploadMedia, |
1191 uploadMedia: _uploadMedia, | 1196 downloadOptions: _downloadOptions); |
1192 downloadOptions: _downloadOptions); | |
1193 return _response.then((data) => new FileList.fromJson(data)); | 1197 return _response.then((data) => new FileList.fromJson(data)); |
1194 } | 1198 } |
1195 | 1199 |
1196 /** | 1200 /// Updates a file's metadata and/or content with patch semantics. |
1197 * Updates a file's metadata and/or content with patch semantics. | 1201 /// |
1198 * | 1202 /// [request] - The metadata request object. |
1199 * [request] - The metadata request object. | 1203 /// |
1200 * | 1204 /// Request parameters: |
1201 * Request parameters: | 1205 /// |
1202 * | 1206 /// [fileId] - The ID of the file. |
1203 * [fileId] - The ID of the file. | 1207 /// |
1204 * | 1208 /// [addParents] - A comma-separated list of parent IDs to add. |
1205 * [addParents] - A comma-separated list of parent IDs to add. | 1209 /// |
1206 * | 1210 /// [keepRevisionForever] - Whether to set the 'keepForever' field in the new |
1207 * [keepRevisionForever] - Whether to set the 'keepForever' field in the new | 1211 /// head revision. This is only applicable to files with binary content in |
1208 * head revision. This is only applicable to files with binary content in | 1212 /// Drive. |
1209 * Drive. | 1213 /// |
1210 * | 1214 /// [ocrLanguage] - A language hint for OCR processing during image import |
1211 * [ocrLanguage] - A language hint for OCR processing during image import (ISO | 1215 /// (ISO 639-1 code). |
1212 * 639-1 code). | 1216 /// |
1213 * | 1217 /// [removeParents] - A comma-separated list of parent IDs to remove. |
1214 * [removeParents] - A comma-separated list of parent IDs to remove. | 1218 /// |
1215 * | 1219 /// [supportsTeamDrives] - Whether the requesting application supports Team |
1216 * [supportsTeamDrives] - Whether the requesting application supports Team | 1220 /// Drives. |
1217 * Drives. | 1221 /// |
1218 * | 1222 /// [useContentAsIndexableText] - Whether to use the uploaded content as |
1219 * [useContentAsIndexableText] - Whether to use the uploaded content as | 1223 /// indexable text. |
1220 * indexable text. | 1224 /// |
1221 * | 1225 /// [uploadMedia] - The media to upload. |
1222 * [uploadMedia] - The media to upload. | 1226 /// |
1223 * | 1227 /// [uploadOptions] - Options for the media upload. Streaming Media without |
1224 * [uploadOptions] - Options for the media upload. Streaming Media without the | 1228 /// the length being known ahead of time is only supported via resumable |
1225 * length being known ahead of time is only supported via resumable uploads. | 1229 /// uploads. |
1226 * | 1230 /// |
1227 * Completes with a [File]. | 1231 /// Completes with a [File]. |
1228 * | 1232 /// |
1229 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1233 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1230 * error. | 1234 /// an error. |
1231 * | 1235 /// |
1232 * If the used [http.Client] completes with an error when making a REST call, | 1236 /// If the used [http.Client] completes with an error when making a REST |
1233 * this method will complete with the same error. | 1237 /// call, this method will complete with the same error. |
1234 */ | 1238 async.Future<File> update(File request, core.String fileId, |
1235 async.Future<File> update(File request, core.String fileId, {core.String addPa
rents, core.bool keepRevisionForever, core.String ocrLanguage, core.String remov
eParents, core.bool supportsTeamDrives, core.bool useContentAsIndexableText, com
mons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Media
uploadMedia}) { | 1239 {core.String addParents, |
| 1240 core.bool keepRevisionForever, |
| 1241 core.String ocrLanguage, |
| 1242 core.String removeParents, |
| 1243 core.bool supportsTeamDrives, |
| 1244 core.bool useContentAsIndexableText, |
| 1245 commons.UploadOptions uploadOptions: commons.UploadOptions.Default, |
| 1246 commons.Media uploadMedia}) { |
1236 var _url = null; | 1247 var _url = null; |
1237 var _queryParams = new core.Map(); | 1248 var _queryParams = new core.Map(); |
1238 var _uploadMedia = null; | 1249 var _uploadMedia = null; |
1239 var _uploadOptions = null; | 1250 var _uploadOptions = null; |
1240 var _downloadOptions = commons.DownloadOptions.Metadata; | 1251 var _downloadOptions = commons.DownloadOptions.Metadata; |
1241 var _body = null; | 1252 var _body = null; |
1242 | 1253 |
1243 if (request != null) { | 1254 if (request != null) { |
1244 _body = convert.JSON.encode((request).toJson()); | 1255 _body = convert.JSON.encode((request).toJson()); |
1245 } | 1256 } |
1246 if (fileId == null) { | 1257 if (fileId == null) { |
1247 throw new core.ArgumentError("Parameter fileId is required."); | 1258 throw new core.ArgumentError("Parameter fileId is required."); |
1248 } | 1259 } |
1249 if (addParents != null) { | 1260 if (addParents != null) { |
1250 _queryParams["addParents"] = [addParents]; | 1261 _queryParams["addParents"] = [addParents]; |
1251 } | 1262 } |
1252 if (keepRevisionForever != null) { | 1263 if (keepRevisionForever != null) { |
1253 _queryParams["keepRevisionForever"] = ["${keepRevisionForever}"]; | 1264 _queryParams["keepRevisionForever"] = ["${keepRevisionForever}"]; |
1254 } | 1265 } |
1255 if (ocrLanguage != null) { | 1266 if (ocrLanguage != null) { |
1256 _queryParams["ocrLanguage"] = [ocrLanguage]; | 1267 _queryParams["ocrLanguage"] = [ocrLanguage]; |
1257 } | 1268 } |
1258 if (removeParents != null) { | 1269 if (removeParents != null) { |
1259 _queryParams["removeParents"] = [removeParents]; | 1270 _queryParams["removeParents"] = [removeParents]; |
1260 } | 1271 } |
1261 if (supportsTeamDrives != null) { | 1272 if (supportsTeamDrives != null) { |
1262 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 1273 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
1263 } | 1274 } |
1264 if (useContentAsIndexableText != null) { | 1275 if (useContentAsIndexableText != null) { |
1265 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText}
"]; | 1276 _queryParams["useContentAsIndexableText"] = [ |
| 1277 "${useContentAsIndexableText}" |
| 1278 ]; |
1266 } | 1279 } |
1267 | 1280 |
1268 _uploadMedia = uploadMedia; | 1281 _uploadMedia = uploadMedia; |
1269 _uploadOptions = uploadOptions; | 1282 _uploadOptions = uploadOptions; |
1270 | 1283 |
1271 if (_uploadMedia == null) { | 1284 if (_uploadMedia == null) { |
1272 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); | 1285 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); |
1273 } else if (_uploadOptions is commons.ResumableUploadOptions) { | 1286 } else if (_uploadOptions is commons.ResumableUploadOptions) { |
1274 _url = '/resumable/upload/drive/v3/files/' + commons.Escaper.ecapeVariable
('$fileId'); | 1287 _url = '/resumable/upload/drive/v3/files/' + |
| 1288 commons.Escaper.ecapeVariable('$fileId'); |
1275 } else { | 1289 } else { |
1276 _url = '/upload/drive/v3/files/' + commons.Escaper.ecapeVariable('$fileId'
); | 1290 _url = |
| 1291 '/upload/drive/v3/files/' + commons.Escaper.ecapeVariable('$fileId'); |
1277 } | 1292 } |
1278 | 1293 |
1279 | 1294 var _response = _requester.request(_url, "PATCH", |
1280 var _response = _requester.request(_url, | 1295 body: _body, |
1281 "PATCH", | 1296 queryParams: _queryParams, |
1282 body: _body, | 1297 uploadOptions: _uploadOptions, |
1283 queryParams: _queryParams, | 1298 uploadMedia: _uploadMedia, |
1284 uploadOptions: _uploadOptions, | 1299 downloadOptions: _downloadOptions); |
1285 uploadMedia: _uploadMedia, | |
1286 downloadOptions: _downloadOptions); | |
1287 return _response.then((data) => new File.fromJson(data)); | 1300 return _response.then((data) => new File.fromJson(data)); |
1288 } | 1301 } |
1289 | 1302 |
1290 /** | 1303 /// Subscribes to changes to a file |
1291 * Subscribes to changes to a file | 1304 /// |
1292 * | 1305 /// [request] - The metadata request object. |
1293 * [request] - The metadata request object. | 1306 /// |
1294 * | 1307 /// Request parameters: |
1295 * Request parameters: | 1308 /// |
1296 * | 1309 /// [fileId] - The ID of the file. |
1297 * [fileId] - The ID of the file. | 1310 /// |
1298 * | 1311 /// [acknowledgeAbuse] - Whether the user is acknowledging the risk of |
1299 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of | 1312 /// downloading known malware or other abusive files. This is only applicable |
1300 * downloading known malware or other abusive files. This is only applicable | 1313 /// when alt=media. |
1301 * when alt=media. | 1314 /// |
1302 * | 1315 /// [supportsTeamDrives] - Whether the requesting application supports Team |
1303 * [supportsTeamDrives] - Whether the requesting application supports Team | 1316 /// Drives. |
1304 * Drives. | 1317 /// |
1305 * | 1318 /// [downloadOptions] - Options for downloading. A download can be either a |
1306 * [downloadOptions] - Options for downloading. A download can be either a | 1319 /// Metadata (default) or Media download. Partial Media downloads are |
1307 * Metadata (default) or Media download. Partial Media downloads are possible | 1320 /// possible as well. |
1308 * as well. | 1321 /// |
1309 * | 1322 /// Completes with a |
1310 * Completes with a | 1323 /// |
1311 * | 1324 /// - [Channel] for Metadata downloads (see [downloadOptions]). |
1312 * - [Channel] for Metadata downloads (see [downloadOptions]). | 1325 /// |
1313 * | 1326 /// - [commons.Media] for Media downloads (see [downloadOptions]). |
1314 * - [commons.Media] for Media downloads (see [downloadOptions]). | 1327 /// |
1315 * | 1328 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1316 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1329 /// an error. |
1317 * error. | 1330 /// |
1318 * | 1331 /// If the used [http.Client] completes with an error when making a REST |
1319 * If the used [http.Client] completes with an error when making a REST call, | 1332 /// call, this method will complete with the same error. |
1320 * this method will complete with the same error. | 1333 async.Future watch(Channel request, core.String fileId, |
1321 */ | 1334 {core.bool acknowledgeAbuse, |
1322 async.Future watch(Channel request, core.String fileId, {core.bool acknowledge
Abuse, core.bool supportsTeamDrives, commons.DownloadOptions downloadOptions: co
mmons.DownloadOptions.Metadata}) { | 1335 core.bool supportsTeamDrives, |
| 1336 commons.DownloadOptions downloadOptions: |
| 1337 commons.DownloadOptions.Metadata}) { |
1323 var _url = null; | 1338 var _url = null; |
1324 var _queryParams = new core.Map(); | 1339 var _queryParams = new core.Map(); |
1325 var _uploadMedia = null; | 1340 var _uploadMedia = null; |
1326 var _uploadOptions = null; | 1341 var _uploadOptions = null; |
1327 var _downloadOptions = commons.DownloadOptions.Metadata; | 1342 var _downloadOptions = commons.DownloadOptions.Metadata; |
1328 var _body = null; | 1343 var _body = null; |
1329 | 1344 |
1330 if (request != null) { | 1345 if (request != null) { |
1331 _body = convert.JSON.encode((request).toJson()); | 1346 _body = convert.JSON.encode((request).toJson()); |
1332 } | 1347 } |
1333 if (fileId == null) { | 1348 if (fileId == null) { |
1334 throw new core.ArgumentError("Parameter fileId is required."); | 1349 throw new core.ArgumentError("Parameter fileId is required."); |
1335 } | 1350 } |
1336 if (acknowledgeAbuse != null) { | 1351 if (acknowledgeAbuse != null) { |
1337 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"]; | 1352 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"]; |
1338 } | 1353 } |
1339 if (supportsTeamDrives != null) { | 1354 if (supportsTeamDrives != null) { |
1340 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 1355 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
1341 } | 1356 } |
1342 | 1357 |
1343 _downloadOptions = downloadOptions; | 1358 _downloadOptions = downloadOptions; |
1344 | 1359 |
1345 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/watch'; | 1360 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/watch'; |
1346 | 1361 |
1347 var _response = _requester.request(_url, | 1362 var _response = _requester.request(_url, "POST", |
1348 "POST", | 1363 body: _body, |
1349 body: _body, | 1364 queryParams: _queryParams, |
1350 queryParams: _queryParams, | 1365 uploadOptions: _uploadOptions, |
1351 uploadOptions: _uploadOptions, | 1366 uploadMedia: _uploadMedia, |
1352 uploadMedia: _uploadMedia, | 1367 downloadOptions: _downloadOptions); |
1353 downloadOptions: _downloadOptions); | |
1354 if (_downloadOptions == null || | 1368 if (_downloadOptions == null || |
1355 _downloadOptions == commons.DownloadOptions.Metadata) { | 1369 _downloadOptions == commons.DownloadOptions.Metadata) { |
1356 return _response.then((data) => new Channel.fromJson(data)); | 1370 return _response.then((data) => new Channel.fromJson(data)); |
1357 } else { | 1371 } else { |
1358 return _response; | 1372 return _response; |
1359 } | 1373 } |
1360 } | 1374 } |
1361 | |
1362 } | 1375 } |
1363 | 1376 |
1364 | |
1365 class PermissionsResourceApi { | 1377 class PermissionsResourceApi { |
1366 final commons.ApiRequester _requester; | 1378 final commons.ApiRequester _requester; |
1367 | 1379 |
1368 PermissionsResourceApi(commons.ApiRequester client) : | 1380 PermissionsResourceApi(commons.ApiRequester client) : _requester = client; |
1369 _requester = client; | |
1370 | 1381 |
1371 /** | 1382 /// Creates a permission for a file or Team Drive. |
1372 * Creates a permission for a file or Team Drive. | 1383 /// |
1373 * | 1384 /// [request] - The metadata request object. |
1374 * [request] - The metadata request object. | 1385 /// |
1375 * | 1386 /// Request parameters: |
1376 * Request parameters: | 1387 /// |
1377 * | 1388 /// [fileId] - The ID of the file or Team Drive. |
1378 * [fileId] - The ID of the file or Team Drive. | 1389 /// |
1379 * | 1390 /// [emailMessage] - A custom message to include in the notification email. |
1380 * [emailMessage] - A custom message to include in the notification email. | 1391 /// |
1381 * | 1392 /// [sendNotificationEmail] - Whether to send a notification email when |
1382 * [sendNotificationEmail] - Whether to send a notification email when sharing | 1393 /// sharing to users or groups. This defaults to true for users and groups, |
1383 * to users or groups. This defaults to true for users and groups, and is not | 1394 /// and is not allowed for other requests. It must not be disabled for |
1384 * allowed for other requests. It must not be disabled for ownership | 1395 /// ownership transfers. |
1385 * transfers. | 1396 /// |
1386 * | 1397 /// [supportsTeamDrives] - Whether the requesting application supports Team |
1387 * [supportsTeamDrives] - Whether the requesting application supports Team | 1398 /// Drives. |
1388 * Drives. | 1399 /// |
1389 * | 1400 /// [transferOwnership] - Whether to transfer ownership to the specified user |
1390 * [transferOwnership] - Whether to transfer ownership to the specified user | 1401 /// and downgrade the current owner to a writer. This parameter is required |
1391 * and downgrade the current owner to a writer. This parameter is required as | 1402 /// as an acknowledgement of the side effect. |
1392 * an acknowledgement of the side effect. | 1403 /// |
1393 * | 1404 /// Completes with a [Permission]. |
1394 * Completes with a [Permission]. | 1405 /// |
1395 * | 1406 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1396 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1407 /// an error. |
1397 * error. | 1408 /// |
1398 * | 1409 /// If the used [http.Client] completes with an error when making a REST |
1399 * If the used [http.Client] completes with an error when making a REST call, | 1410 /// call, this method will complete with the same error. |
1400 * this method will complete with the same error. | 1411 async.Future<Permission> create(Permission request, core.String fileId, |
1401 */ | 1412 {core.String emailMessage, |
1402 async.Future<Permission> create(Permission request, core.String fileId, {core.
String emailMessage, core.bool sendNotificationEmail, core.bool supportsTeamDriv
es, core.bool transferOwnership}) { | 1413 core.bool sendNotificationEmail, |
| 1414 core.bool supportsTeamDrives, |
| 1415 core.bool transferOwnership}) { |
1403 var _url = null; | 1416 var _url = null; |
1404 var _queryParams = new core.Map(); | 1417 var _queryParams = new core.Map(); |
1405 var _uploadMedia = null; | 1418 var _uploadMedia = null; |
1406 var _uploadOptions = null; | 1419 var _uploadOptions = null; |
1407 var _downloadOptions = commons.DownloadOptions.Metadata; | 1420 var _downloadOptions = commons.DownloadOptions.Metadata; |
1408 var _body = null; | 1421 var _body = null; |
1409 | 1422 |
1410 if (request != null) { | 1423 if (request != null) { |
1411 _body = convert.JSON.encode((request).toJson()); | 1424 _body = convert.JSON.encode((request).toJson()); |
1412 } | 1425 } |
1413 if (fileId == null) { | 1426 if (fileId == null) { |
1414 throw new core.ArgumentError("Parameter fileId is required."); | 1427 throw new core.ArgumentError("Parameter fileId is required."); |
1415 } | 1428 } |
1416 if (emailMessage != null) { | 1429 if (emailMessage != null) { |
1417 _queryParams["emailMessage"] = [emailMessage]; | 1430 _queryParams["emailMessage"] = [emailMessage]; |
1418 } | 1431 } |
1419 if (sendNotificationEmail != null) { | 1432 if (sendNotificationEmail != null) { |
1420 _queryParams["sendNotificationEmail"] = ["${sendNotificationEmail}"]; | 1433 _queryParams["sendNotificationEmail"] = ["${sendNotificationEmail}"]; |
1421 } | 1434 } |
1422 if (supportsTeamDrives != null) { | 1435 if (supportsTeamDrives != null) { |
1423 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 1436 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
1424 } | 1437 } |
1425 if (transferOwnership != null) { | 1438 if (transferOwnership != null) { |
1426 _queryParams["transferOwnership"] = ["${transferOwnership}"]; | 1439 _queryParams["transferOwnership"] = ["${transferOwnership}"]; |
1427 } | 1440 } |
1428 | 1441 |
1429 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions'; | 1442 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions'; |
1430 | 1443 |
1431 var _response = _requester.request(_url, | 1444 var _response = _requester.request(_url, "POST", |
1432 "POST", | 1445 body: _body, |
1433 body: _body, | 1446 queryParams: _queryParams, |
1434 queryParams: _queryParams, | 1447 uploadOptions: _uploadOptions, |
1435 uploadOptions: _uploadOptions, | 1448 uploadMedia: _uploadMedia, |
1436 uploadMedia: _uploadMedia, | 1449 downloadOptions: _downloadOptions); |
1437 downloadOptions: _downloadOptions); | |
1438 return _response.then((data) => new Permission.fromJson(data)); | 1450 return _response.then((data) => new Permission.fromJson(data)); |
1439 } | 1451 } |
1440 | 1452 |
1441 /** | 1453 /// Deletes a permission. |
1442 * Deletes a permission. | 1454 /// |
1443 * | 1455 /// Request parameters: |
1444 * Request parameters: | 1456 /// |
1445 * | 1457 /// [fileId] - The ID of the file or Team Drive. |
1446 * [fileId] - The ID of the file or Team Drive. | 1458 /// |
1447 * | 1459 /// [permissionId] - The ID of the permission. |
1448 * [permissionId] - The ID of the permission. | 1460 /// |
1449 * | 1461 /// [supportsTeamDrives] - Whether the requesting application supports Team |
1450 * [supportsTeamDrives] - Whether the requesting application supports Team | 1462 /// Drives. |
1451 * Drives. | 1463 /// |
1452 * | 1464 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1453 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1465 /// an error. |
1454 * error. | 1466 /// |
1455 * | 1467 /// If the used [http.Client] completes with an error when making a REST |
1456 * If the used [http.Client] completes with an error when making a REST call, | 1468 /// call, this method will complete with the same error. |
1457 * this method will complete with the same error. | 1469 async.Future delete(core.String fileId, core.String permissionId, |
1458 */ | 1470 {core.bool supportsTeamDrives}) { |
1459 async.Future delete(core.String fileId, core.String permissionId, {core.bool s
upportsTeamDrives}) { | |
1460 var _url = null; | 1471 var _url = null; |
1461 var _queryParams = new core.Map(); | 1472 var _queryParams = new core.Map(); |
1462 var _uploadMedia = null; | 1473 var _uploadMedia = null; |
1463 var _uploadOptions = null; | 1474 var _uploadOptions = null; |
1464 var _downloadOptions = commons.DownloadOptions.Metadata; | 1475 var _downloadOptions = commons.DownloadOptions.Metadata; |
1465 var _body = null; | 1476 var _body = null; |
1466 | 1477 |
1467 if (fileId == null) { | 1478 if (fileId == null) { |
1468 throw new core.ArgumentError("Parameter fileId is required."); | 1479 throw new core.ArgumentError("Parameter fileId is required."); |
1469 } | 1480 } |
1470 if (permissionId == null) { | 1481 if (permissionId == null) { |
1471 throw new core.ArgumentError("Parameter permissionId is required."); | 1482 throw new core.ArgumentError("Parameter permissionId is required."); |
1472 } | 1483 } |
1473 if (supportsTeamDrives != null) { | 1484 if (supportsTeamDrives != null) { |
1474 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 1485 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
1475 } | 1486 } |
1476 | 1487 |
1477 _downloadOptions = null; | 1488 _downloadOptions = null; |
1478 | 1489 |
1479 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/'
+ commons.Escaper.ecapeVariable('$permissionId'); | 1490 _url = 'files/' + |
| 1491 commons.Escaper.ecapeVariable('$fileId') + |
| 1492 '/permissions/' + |
| 1493 commons.Escaper.ecapeVariable('$permissionId'); |
1480 | 1494 |
1481 var _response = _requester.request(_url, | 1495 var _response = _requester.request(_url, "DELETE", |
1482 "DELETE", | 1496 body: _body, |
1483 body: _body, | 1497 queryParams: _queryParams, |
1484 queryParams: _queryParams, | 1498 uploadOptions: _uploadOptions, |
1485 uploadOptions: _uploadOptions, | 1499 uploadMedia: _uploadMedia, |
1486 uploadMedia: _uploadMedia, | 1500 downloadOptions: _downloadOptions); |
1487 downloadOptions: _downloadOptions); | |
1488 return _response.then((data) => null); | 1501 return _response.then((data) => null); |
1489 } | 1502 } |
1490 | 1503 |
1491 /** | 1504 /// Gets a permission by ID. |
1492 * Gets a permission by ID. | 1505 /// |
1493 * | 1506 /// Request parameters: |
1494 * Request parameters: | 1507 /// |
1495 * | 1508 /// [fileId] - The ID of the file. |
1496 * [fileId] - The ID of the file. | 1509 /// |
1497 * | 1510 /// [permissionId] - The ID of the permission. |
1498 * [permissionId] - The ID of the permission. | 1511 /// |
1499 * | 1512 /// [supportsTeamDrives] - Whether the requesting application supports Team |
1500 * [supportsTeamDrives] - Whether the requesting application supports Team | 1513 /// Drives. |
1501 * Drives. | 1514 /// |
1502 * | 1515 /// Completes with a [Permission]. |
1503 * Completes with a [Permission]. | 1516 /// |
1504 * | 1517 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1505 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1518 /// an error. |
1506 * error. | 1519 /// |
1507 * | 1520 /// If the used [http.Client] completes with an error when making a REST |
1508 * If the used [http.Client] completes with an error when making a REST call, | 1521 /// call, this method will complete with the same error. |
1509 * this method will complete with the same error. | 1522 async.Future<Permission> get(core.String fileId, core.String permissionId, |
1510 */ | 1523 {core.bool supportsTeamDrives}) { |
1511 async.Future<Permission> get(core.String fileId, core.String permissionId, {co
re.bool supportsTeamDrives}) { | |
1512 var _url = null; | 1524 var _url = null; |
1513 var _queryParams = new core.Map(); | 1525 var _queryParams = new core.Map(); |
1514 var _uploadMedia = null; | 1526 var _uploadMedia = null; |
1515 var _uploadOptions = null; | 1527 var _uploadOptions = null; |
1516 var _downloadOptions = commons.DownloadOptions.Metadata; | 1528 var _downloadOptions = commons.DownloadOptions.Metadata; |
1517 var _body = null; | 1529 var _body = null; |
1518 | 1530 |
1519 if (fileId == null) { | 1531 if (fileId == null) { |
1520 throw new core.ArgumentError("Parameter fileId is required."); | 1532 throw new core.ArgumentError("Parameter fileId is required."); |
1521 } | 1533 } |
1522 if (permissionId == null) { | 1534 if (permissionId == null) { |
1523 throw new core.ArgumentError("Parameter permissionId is required."); | 1535 throw new core.ArgumentError("Parameter permissionId is required."); |
1524 } | 1536 } |
1525 if (supportsTeamDrives != null) { | 1537 if (supportsTeamDrives != null) { |
1526 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 1538 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
1527 } | 1539 } |
1528 | 1540 |
1529 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/'
+ commons.Escaper.ecapeVariable('$permissionId'); | 1541 _url = 'files/' + |
| 1542 commons.Escaper.ecapeVariable('$fileId') + |
| 1543 '/permissions/' + |
| 1544 commons.Escaper.ecapeVariable('$permissionId'); |
1530 | 1545 |
1531 var _response = _requester.request(_url, | 1546 var _response = _requester.request(_url, "GET", |
1532 "GET", | 1547 body: _body, |
1533 body: _body, | 1548 queryParams: _queryParams, |
1534 queryParams: _queryParams, | 1549 uploadOptions: _uploadOptions, |
1535 uploadOptions: _uploadOptions, | 1550 uploadMedia: _uploadMedia, |
1536 uploadMedia: _uploadMedia, | 1551 downloadOptions: _downloadOptions); |
1537 downloadOptions: _downloadOptions); | |
1538 return _response.then((data) => new Permission.fromJson(data)); | 1552 return _response.then((data) => new Permission.fromJson(data)); |
1539 } | 1553 } |
1540 | 1554 |
1541 /** | 1555 /// Lists a file's or Team Drive's permissions. |
1542 * Lists a file's or Team Drive's permissions. | 1556 /// |
1543 * | 1557 /// Request parameters: |
1544 * Request parameters: | 1558 /// |
1545 * | 1559 /// [fileId] - The ID of the file or Team Drive. |
1546 * [fileId] - The ID of the file or Team Drive. | 1560 /// |
1547 * | 1561 /// [pageSize] - The maximum number of permissions to return per page. When |
1548 * [pageSize] - The maximum number of permissions to return per page. When not | 1562 /// not set for files in a Team Drive, at most 100 results will be returned. |
1549 * set for files in a Team Drive, at most 100 results will be returned. When | 1563 /// When not set for files that are not in a Team Drive, the entire list will |
1550 * not set for files that are not in a Team Drive, the entire list will be | 1564 /// be returned. |
1551 * returned. | 1565 /// Value must be between "1" and "100". |
1552 * Value must be between "1" and "100". | 1566 /// |
1553 * | 1567 /// [pageToken] - The token for continuing a previous list request on the |
1554 * [pageToken] - The token for continuing a previous list request on the next | 1568 /// next page. This should be set to the value of 'nextPageToken' from the |
1555 * page. This should be set to the value of 'nextPageToken' from the previous | 1569 /// previous response. |
1556 * response. | 1570 /// |
1557 * | 1571 /// [supportsTeamDrives] - Whether the requesting application supports Team |
1558 * [supportsTeamDrives] - Whether the requesting application supports Team | 1572 /// Drives. |
1559 * Drives. | 1573 /// |
1560 * | 1574 /// Completes with a [PermissionList]. |
1561 * Completes with a [PermissionList]. | 1575 /// |
1562 * | 1576 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1563 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1577 /// an error. |
1564 * error. | 1578 /// |
1565 * | 1579 /// If the used [http.Client] completes with an error when making a REST |
1566 * If the used [http.Client] completes with an error when making a REST call, | 1580 /// call, this method will complete with the same error. |
1567 * this method will complete with the same error. | 1581 async.Future<PermissionList> list(core.String fileId, |
1568 */ | 1582 {core.int pageSize, |
1569 async.Future<PermissionList> list(core.String fileId, {core.int pageSize, core
.String pageToken, core.bool supportsTeamDrives}) { | 1583 core.String pageToken, |
| 1584 core.bool supportsTeamDrives}) { |
1570 var _url = null; | 1585 var _url = null; |
1571 var _queryParams = new core.Map(); | 1586 var _queryParams = new core.Map(); |
1572 var _uploadMedia = null; | 1587 var _uploadMedia = null; |
1573 var _uploadOptions = null; | 1588 var _uploadOptions = null; |
1574 var _downloadOptions = commons.DownloadOptions.Metadata; | 1589 var _downloadOptions = commons.DownloadOptions.Metadata; |
1575 var _body = null; | 1590 var _body = null; |
1576 | 1591 |
1577 if (fileId == null) { | 1592 if (fileId == null) { |
1578 throw new core.ArgumentError("Parameter fileId is required."); | 1593 throw new core.ArgumentError("Parameter fileId is required."); |
1579 } | 1594 } |
1580 if (pageSize != null) { | 1595 if (pageSize != null) { |
1581 _queryParams["pageSize"] = ["${pageSize}"]; | 1596 _queryParams["pageSize"] = ["${pageSize}"]; |
1582 } | 1597 } |
1583 if (pageToken != null) { | 1598 if (pageToken != null) { |
1584 _queryParams["pageToken"] = [pageToken]; | 1599 _queryParams["pageToken"] = [pageToken]; |
1585 } | 1600 } |
1586 if (supportsTeamDrives != null) { | 1601 if (supportsTeamDrives != null) { |
1587 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 1602 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
1588 } | 1603 } |
1589 | 1604 |
1590 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions'; | 1605 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions'; |
1591 | 1606 |
1592 var _response = _requester.request(_url, | 1607 var _response = _requester.request(_url, "GET", |
1593 "GET", | 1608 body: _body, |
1594 body: _body, | 1609 queryParams: _queryParams, |
1595 queryParams: _queryParams, | 1610 uploadOptions: _uploadOptions, |
1596 uploadOptions: _uploadOptions, | 1611 uploadMedia: _uploadMedia, |
1597 uploadMedia: _uploadMedia, | 1612 downloadOptions: _downloadOptions); |
1598 downloadOptions: _downloadOptions); | |
1599 return _response.then((data) => new PermissionList.fromJson(data)); | 1613 return _response.then((data) => new PermissionList.fromJson(data)); |
1600 } | 1614 } |
1601 | 1615 |
1602 /** | 1616 /// Updates a permission with patch semantics. |
1603 * Updates a permission with patch semantics. | 1617 /// |
1604 * | 1618 /// [request] - The metadata request object. |
1605 * [request] - The metadata request object. | 1619 /// |
1606 * | 1620 /// Request parameters: |
1607 * Request parameters: | 1621 /// |
1608 * | 1622 /// [fileId] - The ID of the file or Team Drive. |
1609 * [fileId] - The ID of the file or Team Drive. | 1623 /// |
1610 * | 1624 /// [permissionId] - The ID of the permission. |
1611 * [permissionId] - The ID of the permission. | 1625 /// |
1612 * | 1626 /// [removeExpiration] - Whether to remove the expiration date. |
1613 * [removeExpiration] - Whether to remove the expiration date. | 1627 /// |
1614 * | 1628 /// [supportsTeamDrives] - Whether the requesting application supports Team |
1615 * [supportsTeamDrives] - Whether the requesting application supports Team | 1629 /// Drives. |
1616 * Drives. | 1630 /// |
1617 * | 1631 /// [transferOwnership] - Whether to transfer ownership to the specified user |
1618 * [transferOwnership] - Whether to transfer ownership to the specified user | 1632 /// and downgrade the current owner to a writer. This parameter is required |
1619 * and downgrade the current owner to a writer. This parameter is required as | 1633 /// as an acknowledgement of the side effect. |
1620 * an acknowledgement of the side effect. | 1634 /// |
1621 * | 1635 /// Completes with a [Permission]. |
1622 * Completes with a [Permission]. | 1636 /// |
1623 * | 1637 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1624 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1638 /// an error. |
1625 * error. | 1639 /// |
1626 * | 1640 /// If the used [http.Client] completes with an error when making a REST |
1627 * If the used [http.Client] completes with an error when making a REST call, | 1641 /// call, this method will complete with the same error. |
1628 * this method will complete with the same error. | 1642 async.Future<Permission> update( |
1629 */ | 1643 Permission request, core.String fileId, core.String permissionId, |
1630 async.Future<Permission> update(Permission request, core.String fileId, core.S
tring permissionId, {core.bool removeExpiration, core.bool supportsTeamDrives, c
ore.bool transferOwnership}) { | 1644 {core.bool removeExpiration, |
| 1645 core.bool supportsTeamDrives, |
| 1646 core.bool transferOwnership}) { |
1631 var _url = null; | 1647 var _url = null; |
1632 var _queryParams = new core.Map(); | 1648 var _queryParams = new core.Map(); |
1633 var _uploadMedia = null; | 1649 var _uploadMedia = null; |
1634 var _uploadOptions = null; | 1650 var _uploadOptions = null; |
1635 var _downloadOptions = commons.DownloadOptions.Metadata; | 1651 var _downloadOptions = commons.DownloadOptions.Metadata; |
1636 var _body = null; | 1652 var _body = null; |
1637 | 1653 |
1638 if (request != null) { | 1654 if (request != null) { |
1639 _body = convert.JSON.encode((request).toJson()); | 1655 _body = convert.JSON.encode((request).toJson()); |
1640 } | 1656 } |
1641 if (fileId == null) { | 1657 if (fileId == null) { |
1642 throw new core.ArgumentError("Parameter fileId is required."); | 1658 throw new core.ArgumentError("Parameter fileId is required."); |
1643 } | 1659 } |
1644 if (permissionId == null) { | 1660 if (permissionId == null) { |
1645 throw new core.ArgumentError("Parameter permissionId is required."); | 1661 throw new core.ArgumentError("Parameter permissionId is required."); |
1646 } | 1662 } |
1647 if (removeExpiration != null) { | 1663 if (removeExpiration != null) { |
1648 _queryParams["removeExpiration"] = ["${removeExpiration}"]; | 1664 _queryParams["removeExpiration"] = ["${removeExpiration}"]; |
1649 } | 1665 } |
1650 if (supportsTeamDrives != null) { | 1666 if (supportsTeamDrives != null) { |
1651 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; | 1667 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
1652 } | 1668 } |
1653 if (transferOwnership != null) { | 1669 if (transferOwnership != null) { |
1654 _queryParams["transferOwnership"] = ["${transferOwnership}"]; | 1670 _queryParams["transferOwnership"] = ["${transferOwnership}"]; |
1655 } | 1671 } |
1656 | 1672 |
1657 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/'
+ commons.Escaper.ecapeVariable('$permissionId'); | 1673 _url = 'files/' + |
| 1674 commons.Escaper.ecapeVariable('$fileId') + |
| 1675 '/permissions/' + |
| 1676 commons.Escaper.ecapeVariable('$permissionId'); |
1658 | 1677 |
1659 var _response = _requester.request(_url, | 1678 var _response = _requester.request(_url, "PATCH", |
1660 "PATCH", | 1679 body: _body, |
1661 body: _body, | 1680 queryParams: _queryParams, |
1662 queryParams: _queryParams, | 1681 uploadOptions: _uploadOptions, |
1663 uploadOptions: _uploadOptions, | 1682 uploadMedia: _uploadMedia, |
1664 uploadMedia: _uploadMedia, | 1683 downloadOptions: _downloadOptions); |
1665 downloadOptions: _downloadOptions); | |
1666 return _response.then((data) => new Permission.fromJson(data)); | 1684 return _response.then((data) => new Permission.fromJson(data)); |
1667 } | 1685 } |
1668 | |
1669 } | 1686 } |
1670 | 1687 |
1671 | |
1672 class RepliesResourceApi { | 1688 class RepliesResourceApi { |
1673 final commons.ApiRequester _requester; | 1689 final commons.ApiRequester _requester; |
1674 | 1690 |
1675 RepliesResourceApi(commons.ApiRequester client) : | 1691 RepliesResourceApi(commons.ApiRequester client) : _requester = client; |
1676 _requester = client; | |
1677 | 1692 |
1678 /** | 1693 /// Creates a new reply to a comment. |
1679 * Creates a new reply to a comment. | 1694 /// |
1680 * | 1695 /// [request] - The metadata request object. |
1681 * [request] - The metadata request object. | 1696 /// |
1682 * | 1697 /// Request parameters: |
1683 * Request parameters: | 1698 /// |
1684 * | 1699 /// [fileId] - The ID of the file. |
1685 * [fileId] - The ID of the file. | 1700 /// |
1686 * | 1701 /// [commentId] - The ID of the comment. |
1687 * [commentId] - The ID of the comment. | 1702 /// |
1688 * | 1703 /// Completes with a [Reply]. |
1689 * Completes with a [Reply]. | 1704 /// |
1690 * | 1705 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1691 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1706 /// an error. |
1692 * error. | 1707 /// |
1693 * | 1708 /// If the used [http.Client] completes with an error when making a REST |
1694 * If the used [http.Client] completes with an error when making a REST call, | 1709 /// call, this method will complete with the same error. |
1695 * this method will complete with the same error. | 1710 async.Future<Reply> create( |
1696 */ | 1711 Reply request, core.String fileId, core.String commentId) { |
1697 async.Future<Reply> create(Reply request, core.String fileId, core.String comm
entId) { | |
1698 var _url = null; | 1712 var _url = null; |
1699 var _queryParams = new core.Map(); | 1713 var _queryParams = new core.Map(); |
1700 var _uploadMedia = null; | 1714 var _uploadMedia = null; |
1701 var _uploadOptions = null; | 1715 var _uploadOptions = null; |
1702 var _downloadOptions = commons.DownloadOptions.Metadata; | 1716 var _downloadOptions = commons.DownloadOptions.Metadata; |
1703 var _body = null; | 1717 var _body = null; |
1704 | 1718 |
1705 if (request != null) { | 1719 if (request != null) { |
1706 _body = convert.JSON.encode((request).toJson()); | 1720 _body = convert.JSON.encode((request).toJson()); |
1707 } | 1721 } |
1708 if (fileId == null) { | 1722 if (fileId == null) { |
1709 throw new core.ArgumentError("Parameter fileId is required."); | 1723 throw new core.ArgumentError("Parameter fileId is required."); |
1710 } | 1724 } |
1711 if (commentId == null) { | 1725 if (commentId == null) { |
1712 throw new core.ArgumentError("Parameter commentId is required."); | 1726 throw new core.ArgumentError("Parameter commentId is required."); |
1713 } | 1727 } |
1714 | 1728 |
1715 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' +
commons.Escaper.ecapeVariable('$commentId') + '/replies'; | 1729 _url = 'files/' + |
| 1730 commons.Escaper.ecapeVariable('$fileId') + |
| 1731 '/comments/' + |
| 1732 commons.Escaper.ecapeVariable('$commentId') + |
| 1733 '/replies'; |
1716 | 1734 |
1717 var _response = _requester.request(_url, | 1735 var _response = _requester.request(_url, "POST", |
1718 "POST", | 1736 body: _body, |
1719 body: _body, | 1737 queryParams: _queryParams, |
1720 queryParams: _queryParams, | 1738 uploadOptions: _uploadOptions, |
1721 uploadOptions: _uploadOptions, | 1739 uploadMedia: _uploadMedia, |
1722 uploadMedia: _uploadMedia, | 1740 downloadOptions: _downloadOptions); |
1723 downloadOptions: _downloadOptions); | |
1724 return _response.then((data) => new Reply.fromJson(data)); | 1741 return _response.then((data) => new Reply.fromJson(data)); |
1725 } | 1742 } |
1726 | 1743 |
1727 /** | 1744 /// Deletes a reply. |
1728 * Deletes a reply. | 1745 /// |
1729 * | 1746 /// Request parameters: |
1730 * Request parameters: | 1747 /// |
1731 * | 1748 /// [fileId] - The ID of the file. |
1732 * [fileId] - The ID of the file. | 1749 /// |
1733 * | 1750 /// [commentId] - The ID of the comment. |
1734 * [commentId] - The ID of the comment. | 1751 /// |
1735 * | 1752 /// [replyId] - The ID of the reply. |
1736 * [replyId] - The ID of the reply. | 1753 /// |
1737 * | 1754 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1738 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1755 /// an error. |
1739 * error. | 1756 /// |
1740 * | 1757 /// If the used [http.Client] completes with an error when making a REST |
1741 * If the used [http.Client] completes with an error when making a REST call, | 1758 /// call, this method will complete with the same error. |
1742 * this method will complete with the same error. | 1759 async.Future delete( |
1743 */ | 1760 core.String fileId, core.String commentId, core.String replyId) { |
1744 async.Future delete(core.String fileId, core.String commentId, core.String rep
lyId) { | |
1745 var _url = null; | 1761 var _url = null; |
1746 var _queryParams = new core.Map(); | 1762 var _queryParams = new core.Map(); |
1747 var _uploadMedia = null; | 1763 var _uploadMedia = null; |
1748 var _uploadOptions = null; | 1764 var _uploadOptions = null; |
1749 var _downloadOptions = commons.DownloadOptions.Metadata; | 1765 var _downloadOptions = commons.DownloadOptions.Metadata; |
1750 var _body = null; | 1766 var _body = null; |
1751 | 1767 |
1752 if (fileId == null) { | 1768 if (fileId == null) { |
1753 throw new core.ArgumentError("Parameter fileId is required."); | 1769 throw new core.ArgumentError("Parameter fileId is required."); |
1754 } | 1770 } |
1755 if (commentId == null) { | 1771 if (commentId == null) { |
1756 throw new core.ArgumentError("Parameter commentId is required."); | 1772 throw new core.ArgumentError("Parameter commentId is required."); |
1757 } | 1773 } |
1758 if (replyId == null) { | 1774 if (replyId == null) { |
1759 throw new core.ArgumentError("Parameter replyId is required."); | 1775 throw new core.ArgumentError("Parameter replyId is required."); |
1760 } | 1776 } |
1761 | 1777 |
1762 _downloadOptions = null; | 1778 _downloadOptions = null; |
1763 | 1779 |
1764 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' +
commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap
eVariable('$replyId'); | 1780 _url = 'files/' + |
| 1781 commons.Escaper.ecapeVariable('$fileId') + |
| 1782 '/comments/' + |
| 1783 commons.Escaper.ecapeVariable('$commentId') + |
| 1784 '/replies/' + |
| 1785 commons.Escaper.ecapeVariable('$replyId'); |
1765 | 1786 |
1766 var _response = _requester.request(_url, | 1787 var _response = _requester.request(_url, "DELETE", |
1767 "DELETE", | 1788 body: _body, |
1768 body: _body, | 1789 queryParams: _queryParams, |
1769 queryParams: _queryParams, | 1790 uploadOptions: _uploadOptions, |
1770 uploadOptions: _uploadOptions, | 1791 uploadMedia: _uploadMedia, |
1771 uploadMedia: _uploadMedia, | 1792 downloadOptions: _downloadOptions); |
1772 downloadOptions: _downloadOptions); | |
1773 return _response.then((data) => null); | 1793 return _response.then((data) => null); |
1774 } | 1794 } |
1775 | 1795 |
1776 /** | 1796 /// Gets a reply by ID. |
1777 * Gets a reply by ID. | 1797 /// |
1778 * | 1798 /// Request parameters: |
1779 * Request parameters: | 1799 /// |
1780 * | 1800 /// [fileId] - The ID of the file. |
1781 * [fileId] - The ID of the file. | 1801 /// |
1782 * | 1802 /// [commentId] - The ID of the comment. |
1783 * [commentId] - The ID of the comment. | 1803 /// |
1784 * | 1804 /// [replyId] - The ID of the reply. |
1785 * [replyId] - The ID of the reply. | 1805 /// |
1786 * | 1806 /// [includeDeleted] - Whether to return deleted replies. Deleted replies |
1787 * [includeDeleted] - Whether to return deleted replies. Deleted replies will | 1807 /// will not include their original content. |
1788 * not include their original content. | 1808 /// |
1789 * | 1809 /// Completes with a [Reply]. |
1790 * Completes with a [Reply]. | 1810 /// |
1791 * | 1811 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1792 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1812 /// an error. |
1793 * error. | 1813 /// |
1794 * | 1814 /// If the used [http.Client] completes with an error when making a REST |
1795 * If the used [http.Client] completes with an error when making a REST call, | 1815 /// call, this method will complete with the same error. |
1796 * this method will complete with the same error. | 1816 async.Future<Reply> get( |
1797 */ | 1817 core.String fileId, core.String commentId, core.String replyId, |
1798 async.Future<Reply> get(core.String fileId, core.String commentId, core.String
replyId, {core.bool includeDeleted}) { | 1818 {core.bool includeDeleted}) { |
1799 var _url = null; | 1819 var _url = null; |
1800 var _queryParams = new core.Map(); | 1820 var _queryParams = new core.Map(); |
1801 var _uploadMedia = null; | 1821 var _uploadMedia = null; |
1802 var _uploadOptions = null; | 1822 var _uploadOptions = null; |
1803 var _downloadOptions = commons.DownloadOptions.Metadata; | 1823 var _downloadOptions = commons.DownloadOptions.Metadata; |
1804 var _body = null; | 1824 var _body = null; |
1805 | 1825 |
1806 if (fileId == null) { | 1826 if (fileId == null) { |
1807 throw new core.ArgumentError("Parameter fileId is required."); | 1827 throw new core.ArgumentError("Parameter fileId is required."); |
1808 } | 1828 } |
1809 if (commentId == null) { | 1829 if (commentId == null) { |
1810 throw new core.ArgumentError("Parameter commentId is required."); | 1830 throw new core.ArgumentError("Parameter commentId is required."); |
1811 } | 1831 } |
1812 if (replyId == null) { | 1832 if (replyId == null) { |
1813 throw new core.ArgumentError("Parameter replyId is required."); | 1833 throw new core.ArgumentError("Parameter replyId is required."); |
1814 } | 1834 } |
1815 if (includeDeleted != null) { | 1835 if (includeDeleted != null) { |
1816 _queryParams["includeDeleted"] = ["${includeDeleted}"]; | 1836 _queryParams["includeDeleted"] = ["${includeDeleted}"]; |
1817 } | 1837 } |
1818 | 1838 |
1819 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' +
commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap
eVariable('$replyId'); | 1839 _url = 'files/' + |
| 1840 commons.Escaper.ecapeVariable('$fileId') + |
| 1841 '/comments/' + |
| 1842 commons.Escaper.ecapeVariable('$commentId') + |
| 1843 '/replies/' + |
| 1844 commons.Escaper.ecapeVariable('$replyId'); |
1820 | 1845 |
1821 var _response = _requester.request(_url, | 1846 var _response = _requester.request(_url, "GET", |
1822 "GET", | 1847 body: _body, |
1823 body: _body, | 1848 queryParams: _queryParams, |
1824 queryParams: _queryParams, | 1849 uploadOptions: _uploadOptions, |
1825 uploadOptions: _uploadOptions, | 1850 uploadMedia: _uploadMedia, |
1826 uploadMedia: _uploadMedia, | 1851 downloadOptions: _downloadOptions); |
1827 downloadOptions: _downloadOptions); | |
1828 return _response.then((data) => new Reply.fromJson(data)); | 1852 return _response.then((data) => new Reply.fromJson(data)); |
1829 } | 1853 } |
1830 | 1854 |
1831 /** | 1855 /// Lists a comment's replies. |
1832 * Lists a comment's replies. | 1856 /// |
1833 * | 1857 /// Request parameters: |
1834 * Request parameters: | 1858 /// |
1835 * | 1859 /// [fileId] - The ID of the file. |
1836 * [fileId] - The ID of the file. | 1860 /// |
1837 * | 1861 /// [commentId] - The ID of the comment. |
1838 * [commentId] - The ID of the comment. | 1862 /// |
1839 * | 1863 /// [includeDeleted] - Whether to include deleted replies. Deleted replies |
1840 * [includeDeleted] - Whether to include deleted replies. Deleted replies will | 1864 /// will not include their original content. |
1841 * not include their original content. | 1865 /// |
1842 * | 1866 /// [pageSize] - The maximum number of replies to return per page. |
1843 * [pageSize] - The maximum number of replies to return per page. | 1867 /// Value must be between "1" and "100". |
1844 * Value must be between "1" and "100". | 1868 /// |
1845 * | 1869 /// [pageToken] - The token for continuing a previous list request on the |
1846 * [pageToken] - The token for continuing a previous list request on the next | 1870 /// next page. This should be set to the value of 'nextPageToken' from the |
1847 * page. This should be set to the value of 'nextPageToken' from the previous | 1871 /// previous response. |
1848 * response. | 1872 /// |
1849 * | 1873 /// Completes with a [ReplyList]. |
1850 * Completes with a [ReplyList]. | 1874 /// |
1851 * | 1875 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1852 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1876 /// an error. |
1853 * error. | 1877 /// |
1854 * | 1878 /// If the used [http.Client] completes with an error when making a REST |
1855 * If the used [http.Client] completes with an error when making a REST call, | 1879 /// call, this method will complete with the same error. |
1856 * this method will complete with the same error. | 1880 async.Future<ReplyList> list(core.String fileId, core.String commentId, |
1857 */ | 1881 {core.bool includeDeleted, core.int pageSize, core.String pageToken}) { |
1858 async.Future<ReplyList> list(core.String fileId, core.String commentId, {core.
bool includeDeleted, core.int pageSize, core.String pageToken}) { | |
1859 var _url = null; | 1882 var _url = null; |
1860 var _queryParams = new core.Map(); | 1883 var _queryParams = new core.Map(); |
1861 var _uploadMedia = null; | 1884 var _uploadMedia = null; |
1862 var _uploadOptions = null; | 1885 var _uploadOptions = null; |
1863 var _downloadOptions = commons.DownloadOptions.Metadata; | 1886 var _downloadOptions = commons.DownloadOptions.Metadata; |
1864 var _body = null; | 1887 var _body = null; |
1865 | 1888 |
1866 if (fileId == null) { | 1889 if (fileId == null) { |
1867 throw new core.ArgumentError("Parameter fileId is required."); | 1890 throw new core.ArgumentError("Parameter fileId is required."); |
1868 } | 1891 } |
1869 if (commentId == null) { | 1892 if (commentId == null) { |
1870 throw new core.ArgumentError("Parameter commentId is required."); | 1893 throw new core.ArgumentError("Parameter commentId is required."); |
1871 } | 1894 } |
1872 if (includeDeleted != null) { | 1895 if (includeDeleted != null) { |
1873 _queryParams["includeDeleted"] = ["${includeDeleted}"]; | 1896 _queryParams["includeDeleted"] = ["${includeDeleted}"]; |
1874 } | 1897 } |
1875 if (pageSize != null) { | 1898 if (pageSize != null) { |
1876 _queryParams["pageSize"] = ["${pageSize}"]; | 1899 _queryParams["pageSize"] = ["${pageSize}"]; |
1877 } | 1900 } |
1878 if (pageToken != null) { | 1901 if (pageToken != null) { |
1879 _queryParams["pageToken"] = [pageToken]; | 1902 _queryParams["pageToken"] = [pageToken]; |
1880 } | 1903 } |
1881 | 1904 |
1882 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' +
commons.Escaper.ecapeVariable('$commentId') + '/replies'; | 1905 _url = 'files/' + |
| 1906 commons.Escaper.ecapeVariable('$fileId') + |
| 1907 '/comments/' + |
| 1908 commons.Escaper.ecapeVariable('$commentId') + |
| 1909 '/replies'; |
1883 | 1910 |
1884 var _response = _requester.request(_url, | 1911 var _response = _requester.request(_url, "GET", |
1885 "GET", | 1912 body: _body, |
1886 body: _body, | 1913 queryParams: _queryParams, |
1887 queryParams: _queryParams, | 1914 uploadOptions: _uploadOptions, |
1888 uploadOptions: _uploadOptions, | 1915 uploadMedia: _uploadMedia, |
1889 uploadMedia: _uploadMedia, | 1916 downloadOptions: _downloadOptions); |
1890 downloadOptions: _downloadOptions); | |
1891 return _response.then((data) => new ReplyList.fromJson(data)); | 1917 return _response.then((data) => new ReplyList.fromJson(data)); |
1892 } | 1918 } |
1893 | 1919 |
1894 /** | 1920 /// Updates a reply with patch semantics. |
1895 * Updates a reply with patch semantics. | 1921 /// |
1896 * | 1922 /// [request] - The metadata request object. |
1897 * [request] - The metadata request object. | 1923 /// |
1898 * | 1924 /// Request parameters: |
1899 * Request parameters: | 1925 /// |
1900 * | 1926 /// [fileId] - The ID of the file. |
1901 * [fileId] - The ID of the file. | 1927 /// |
1902 * | 1928 /// [commentId] - The ID of the comment. |
1903 * [commentId] - The ID of the comment. | 1929 /// |
1904 * | 1930 /// [replyId] - The ID of the reply. |
1905 * [replyId] - The ID of the reply. | 1931 /// |
1906 * | 1932 /// Completes with a [Reply]. |
1907 * Completes with a [Reply]. | 1933 /// |
1908 * | 1934 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1909 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1935 /// an error. |
1910 * error. | 1936 /// |
1911 * | 1937 /// If the used [http.Client] completes with an error when making a REST |
1912 * If the used [http.Client] completes with an error when making a REST call, | 1938 /// call, this method will complete with the same error. |
1913 * this method will complete with the same error. | 1939 async.Future<Reply> update(Reply request, core.String fileId, |
1914 */ | 1940 core.String commentId, core.String replyId) { |
1915 async.Future<Reply> update(Reply request, core.String fileId, core.String comm
entId, core.String replyId) { | |
1916 var _url = null; | 1941 var _url = null; |
1917 var _queryParams = new core.Map(); | 1942 var _queryParams = new core.Map(); |
1918 var _uploadMedia = null; | 1943 var _uploadMedia = null; |
1919 var _uploadOptions = null; | 1944 var _uploadOptions = null; |
1920 var _downloadOptions = commons.DownloadOptions.Metadata; | 1945 var _downloadOptions = commons.DownloadOptions.Metadata; |
1921 var _body = null; | 1946 var _body = null; |
1922 | 1947 |
1923 if (request != null) { | 1948 if (request != null) { |
1924 _body = convert.JSON.encode((request).toJson()); | 1949 _body = convert.JSON.encode((request).toJson()); |
1925 } | 1950 } |
1926 if (fileId == null) { | 1951 if (fileId == null) { |
1927 throw new core.ArgumentError("Parameter fileId is required."); | 1952 throw new core.ArgumentError("Parameter fileId is required."); |
1928 } | 1953 } |
1929 if (commentId == null) { | 1954 if (commentId == null) { |
1930 throw new core.ArgumentError("Parameter commentId is required."); | 1955 throw new core.ArgumentError("Parameter commentId is required."); |
1931 } | 1956 } |
1932 if (replyId == null) { | 1957 if (replyId == null) { |
1933 throw new core.ArgumentError("Parameter replyId is required."); | 1958 throw new core.ArgumentError("Parameter replyId is required."); |
1934 } | 1959 } |
1935 | 1960 |
1936 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/comments/' +
commons.Escaper.ecapeVariable('$commentId') + '/replies/' + commons.Escaper.ecap
eVariable('$replyId'); | 1961 _url = 'files/' + |
| 1962 commons.Escaper.ecapeVariable('$fileId') + |
| 1963 '/comments/' + |
| 1964 commons.Escaper.ecapeVariable('$commentId') + |
| 1965 '/replies/' + |
| 1966 commons.Escaper.ecapeVariable('$replyId'); |
1937 | 1967 |
1938 var _response = _requester.request(_url, | 1968 var _response = _requester.request(_url, "PATCH", |
1939 "PATCH", | 1969 body: _body, |
1940 body: _body, | 1970 queryParams: _queryParams, |
1941 queryParams: _queryParams, | 1971 uploadOptions: _uploadOptions, |
1942 uploadOptions: _uploadOptions, | 1972 uploadMedia: _uploadMedia, |
1943 uploadMedia: _uploadMedia, | 1973 downloadOptions: _downloadOptions); |
1944 downloadOptions: _downloadOptions); | |
1945 return _response.then((data) => new Reply.fromJson(data)); | 1974 return _response.then((data) => new Reply.fromJson(data)); |
1946 } | 1975 } |
1947 | |
1948 } | 1976 } |
1949 | 1977 |
1950 | |
1951 class RevisionsResourceApi { | 1978 class RevisionsResourceApi { |
1952 final commons.ApiRequester _requester; | 1979 final commons.ApiRequester _requester; |
1953 | 1980 |
1954 RevisionsResourceApi(commons.ApiRequester client) : | 1981 RevisionsResourceApi(commons.ApiRequester client) : _requester = client; |
1955 _requester = client; | |
1956 | 1982 |
1957 /** | 1983 /// Permanently deletes a revision. This method is only applicable to files |
1958 * Permanently deletes a revision. This method is only applicable to files | 1984 /// with binary content in Drive. |
1959 * with binary content in Drive. | 1985 /// |
1960 * | 1986 /// Request parameters: |
1961 * Request parameters: | 1987 /// |
1962 * | 1988 /// [fileId] - The ID of the file. |
1963 * [fileId] - The ID of the file. | 1989 /// |
1964 * | 1990 /// [revisionId] - The ID of the revision. |
1965 * [revisionId] - The ID of the revision. | 1991 /// |
1966 * | 1992 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1967 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1993 /// an error. |
1968 * error. | 1994 /// |
1969 * | 1995 /// If the used [http.Client] completes with an error when making a REST |
1970 * If the used [http.Client] completes with an error when making a REST call, | 1996 /// call, this method will complete with the same error. |
1971 * this method will complete with the same error. | |
1972 */ | |
1973 async.Future delete(core.String fileId, core.String revisionId) { | 1997 async.Future delete(core.String fileId, core.String revisionId) { |
1974 var _url = null; | 1998 var _url = null; |
1975 var _queryParams = new core.Map(); | 1999 var _queryParams = new core.Map(); |
1976 var _uploadMedia = null; | 2000 var _uploadMedia = null; |
1977 var _uploadOptions = null; | 2001 var _uploadOptions = null; |
1978 var _downloadOptions = commons.DownloadOptions.Metadata; | 2002 var _downloadOptions = commons.DownloadOptions.Metadata; |
1979 var _body = null; | 2003 var _body = null; |
1980 | 2004 |
1981 if (fileId == null) { | 2005 if (fileId == null) { |
1982 throw new core.ArgumentError("Parameter fileId is required."); | 2006 throw new core.ArgumentError("Parameter fileId is required."); |
1983 } | 2007 } |
1984 if (revisionId == null) { | 2008 if (revisionId == null) { |
1985 throw new core.ArgumentError("Parameter revisionId is required."); | 2009 throw new core.ArgumentError("Parameter revisionId is required."); |
1986 } | 2010 } |
1987 | 2011 |
1988 _downloadOptions = null; | 2012 _downloadOptions = null; |
1989 | 2013 |
1990 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' +
commons.Escaper.ecapeVariable('$revisionId'); | 2014 _url = 'files/' + |
| 2015 commons.Escaper.ecapeVariable('$fileId') + |
| 2016 '/revisions/' + |
| 2017 commons.Escaper.ecapeVariable('$revisionId'); |
1991 | 2018 |
1992 var _response = _requester.request(_url, | 2019 var _response = _requester.request(_url, "DELETE", |
1993 "DELETE", | 2020 body: _body, |
1994 body: _body, | 2021 queryParams: _queryParams, |
1995 queryParams: _queryParams, | 2022 uploadOptions: _uploadOptions, |
1996 uploadOptions: _uploadOptions, | 2023 uploadMedia: _uploadMedia, |
1997 uploadMedia: _uploadMedia, | 2024 downloadOptions: _downloadOptions); |
1998 downloadOptions: _downloadOptions); | |
1999 return _response.then((data) => null); | 2025 return _response.then((data) => null); |
2000 } | 2026 } |
2001 | 2027 |
2002 /** | 2028 /// Gets a revision's metadata or content by ID. |
2003 * Gets a revision's metadata or content by ID. | 2029 /// |
2004 * | 2030 /// Request parameters: |
2005 * Request parameters: | 2031 /// |
2006 * | 2032 /// [fileId] - The ID of the file. |
2007 * [fileId] - The ID of the file. | 2033 /// |
2008 * | 2034 /// [revisionId] - The ID of the revision. |
2009 * [revisionId] - The ID of the revision. | 2035 /// |
2010 * | 2036 /// [acknowledgeAbuse] - Whether the user is acknowledging the risk of |
2011 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of | 2037 /// downloading known malware or other abusive files. This is only applicable |
2012 * downloading known malware or other abusive files. This is only applicable | 2038 /// when alt=media. |
2013 * when alt=media. | 2039 /// |
2014 * | 2040 /// [downloadOptions] - Options for downloading. A download can be either a |
2015 * [downloadOptions] - Options for downloading. A download can be either a | 2041 /// Metadata (default) or Media download. Partial Media downloads are |
2016 * Metadata (default) or Media download. Partial Media downloads are possible | 2042 /// possible as well. |
2017 * as well. | 2043 /// |
2018 * | 2044 /// Completes with a |
2019 * Completes with a | 2045 /// |
2020 * | 2046 /// - [Revision] for Metadata downloads (see [downloadOptions]). |
2021 * - [Revision] for Metadata downloads (see [downloadOptions]). | 2047 /// |
2022 * | 2048 /// - [commons.Media] for Media downloads (see [downloadOptions]). |
2023 * - [commons.Media] for Media downloads (see [downloadOptions]). | 2049 /// |
2024 * | 2050 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2025 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2051 /// an error. |
2026 * error. | 2052 /// |
2027 * | 2053 /// If the used [http.Client] completes with an error when making a REST |
2028 * If the used [http.Client] completes with an error when making a REST call, | 2054 /// call, this method will complete with the same error. |
2029 * this method will complete with the same error. | 2055 async.Future get(core.String fileId, core.String revisionId, |
2030 */ | 2056 {core.bool acknowledgeAbuse, |
2031 async.Future get(core.String fileId, core.String revisionId, {core.bool acknow
ledgeAbuse, commons.DownloadOptions downloadOptions: commons.DownloadOptions.Met
adata}) { | 2057 commons.DownloadOptions downloadOptions: |
| 2058 commons.DownloadOptions.Metadata}) { |
2032 var _url = null; | 2059 var _url = null; |
2033 var _queryParams = new core.Map(); | 2060 var _queryParams = new core.Map(); |
2034 var _uploadMedia = null; | 2061 var _uploadMedia = null; |
2035 var _uploadOptions = null; | 2062 var _uploadOptions = null; |
2036 var _downloadOptions = commons.DownloadOptions.Metadata; | 2063 var _downloadOptions = commons.DownloadOptions.Metadata; |
2037 var _body = null; | 2064 var _body = null; |
2038 | 2065 |
2039 if (fileId == null) { | 2066 if (fileId == null) { |
2040 throw new core.ArgumentError("Parameter fileId is required."); | 2067 throw new core.ArgumentError("Parameter fileId is required."); |
2041 } | 2068 } |
2042 if (revisionId == null) { | 2069 if (revisionId == null) { |
2043 throw new core.ArgumentError("Parameter revisionId is required."); | 2070 throw new core.ArgumentError("Parameter revisionId is required."); |
2044 } | 2071 } |
2045 if (acknowledgeAbuse != null) { | 2072 if (acknowledgeAbuse != null) { |
2046 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"]; | 2073 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"]; |
2047 } | 2074 } |
2048 | 2075 |
2049 _downloadOptions = downloadOptions; | 2076 _downloadOptions = downloadOptions; |
2050 | 2077 |
2051 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' +
commons.Escaper.ecapeVariable('$revisionId'); | 2078 _url = 'files/' + |
| 2079 commons.Escaper.ecapeVariable('$fileId') + |
| 2080 '/revisions/' + |
| 2081 commons.Escaper.ecapeVariable('$revisionId'); |
2052 | 2082 |
2053 var _response = _requester.request(_url, | 2083 var _response = _requester.request(_url, "GET", |
2054 "GET", | 2084 body: _body, |
2055 body: _body, | 2085 queryParams: _queryParams, |
2056 queryParams: _queryParams, | 2086 uploadOptions: _uploadOptions, |
2057 uploadOptions: _uploadOptions, | 2087 uploadMedia: _uploadMedia, |
2058 uploadMedia: _uploadMedia, | 2088 downloadOptions: _downloadOptions); |
2059 downloadOptions: _downloadOptions); | |
2060 if (_downloadOptions == null || | 2089 if (_downloadOptions == null || |
2061 _downloadOptions == commons.DownloadOptions.Metadata) { | 2090 _downloadOptions == commons.DownloadOptions.Metadata) { |
2062 return _response.then((data) => new Revision.fromJson(data)); | 2091 return _response.then((data) => new Revision.fromJson(data)); |
2063 } else { | 2092 } else { |
2064 return _response; | 2093 return _response; |
2065 } | 2094 } |
2066 } | 2095 } |
2067 | 2096 |
2068 /** | 2097 /// Lists a file's revisions. |
2069 * Lists a file's revisions. | 2098 /// |
2070 * | 2099 /// Request parameters: |
2071 * Request parameters: | 2100 /// |
2072 * | 2101 /// [fileId] - The ID of the file. |
2073 * [fileId] - The ID of the file. | 2102 /// |
2074 * | 2103 /// [pageSize] - The maximum number of revisions to return per page. |
2075 * [pageSize] - The maximum number of revisions to return per page. | 2104 /// Value must be between "1" and "1000". |
2076 * Value must be between "1" and "1000". | 2105 /// |
2077 * | 2106 /// [pageToken] - The token for continuing a previous list request on the |
2078 * [pageToken] - The token for continuing a previous list request on the next | 2107 /// next page. This should be set to the value of 'nextPageToken' from the |
2079 * page. This should be set to the value of 'nextPageToken' from the previous | 2108 /// previous response. |
2080 * response. | 2109 /// |
2081 * | 2110 /// Completes with a [RevisionList]. |
2082 * Completes with a [RevisionList]. | 2111 /// |
2083 * | 2112 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2084 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2113 /// an error. |
2085 * error. | 2114 /// |
2086 * | 2115 /// If the used [http.Client] completes with an error when making a REST |
2087 * If the used [http.Client] completes with an error when making a REST call, | 2116 /// call, this method will complete with the same error. |
2088 * this method will complete with the same error. | 2117 async.Future<RevisionList> list(core.String fileId, |
2089 */ | 2118 {core.int pageSize, core.String pageToken}) { |
2090 async.Future<RevisionList> list(core.String fileId, {core.int pageSize, core.S
tring pageToken}) { | |
2091 var _url = null; | 2119 var _url = null; |
2092 var _queryParams = new core.Map(); | 2120 var _queryParams = new core.Map(); |
2093 var _uploadMedia = null; | 2121 var _uploadMedia = null; |
2094 var _uploadOptions = null; | 2122 var _uploadOptions = null; |
2095 var _downloadOptions = commons.DownloadOptions.Metadata; | 2123 var _downloadOptions = commons.DownloadOptions.Metadata; |
2096 var _body = null; | 2124 var _body = null; |
2097 | 2125 |
2098 if (fileId == null) { | 2126 if (fileId == null) { |
2099 throw new core.ArgumentError("Parameter fileId is required."); | 2127 throw new core.ArgumentError("Parameter fileId is required."); |
2100 } | 2128 } |
2101 if (pageSize != null) { | 2129 if (pageSize != null) { |
2102 _queryParams["pageSize"] = ["${pageSize}"]; | 2130 _queryParams["pageSize"] = ["${pageSize}"]; |
2103 } | 2131 } |
2104 if (pageToken != null) { | 2132 if (pageToken != null) { |
2105 _queryParams["pageToken"] = [pageToken]; | 2133 _queryParams["pageToken"] = [pageToken]; |
2106 } | 2134 } |
2107 | 2135 |
2108 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions'; | 2136 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions'; |
2109 | 2137 |
2110 var _response = _requester.request(_url, | 2138 var _response = _requester.request(_url, "GET", |
2111 "GET", | 2139 body: _body, |
2112 body: _body, | 2140 queryParams: _queryParams, |
2113 queryParams: _queryParams, | 2141 uploadOptions: _uploadOptions, |
2114 uploadOptions: _uploadOptions, | 2142 uploadMedia: _uploadMedia, |
2115 uploadMedia: _uploadMedia, | 2143 downloadOptions: _downloadOptions); |
2116 downloadOptions: _downloadOptions); | |
2117 return _response.then((data) => new RevisionList.fromJson(data)); | 2144 return _response.then((data) => new RevisionList.fromJson(data)); |
2118 } | 2145 } |
2119 | 2146 |
2120 /** | 2147 /// Updates a revision with patch semantics. |
2121 * Updates a revision with patch semantics. | 2148 /// |
2122 * | 2149 /// [request] - The metadata request object. |
2123 * [request] - The metadata request object. | 2150 /// |
2124 * | 2151 /// Request parameters: |
2125 * Request parameters: | 2152 /// |
2126 * | 2153 /// [fileId] - The ID of the file. |
2127 * [fileId] - The ID of the file. | 2154 /// |
2128 * | 2155 /// [revisionId] - The ID of the revision. |
2129 * [revisionId] - The ID of the revision. | 2156 /// |
2130 * | 2157 /// Completes with a [Revision]. |
2131 * Completes with a [Revision]. | 2158 /// |
2132 * | 2159 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2133 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2160 /// an error. |
2134 * error. | 2161 /// |
2135 * | 2162 /// If the used [http.Client] completes with an error when making a REST |
2136 * If the used [http.Client] completes with an error when making a REST call, | 2163 /// call, this method will complete with the same error. |
2137 * this method will complete with the same error. | 2164 async.Future<Revision> update( |
2138 */ | 2165 Revision request, core.String fileId, core.String revisionId) { |
2139 async.Future<Revision> update(Revision request, core.String fileId, core.Strin
g revisionId) { | |
2140 var _url = null; | 2166 var _url = null; |
2141 var _queryParams = new core.Map(); | 2167 var _queryParams = new core.Map(); |
2142 var _uploadMedia = null; | 2168 var _uploadMedia = null; |
2143 var _uploadOptions = null; | 2169 var _uploadOptions = null; |
2144 var _downloadOptions = commons.DownloadOptions.Metadata; | 2170 var _downloadOptions = commons.DownloadOptions.Metadata; |
2145 var _body = null; | 2171 var _body = null; |
2146 | 2172 |
2147 if (request != null) { | 2173 if (request != null) { |
2148 _body = convert.JSON.encode((request).toJson()); | 2174 _body = convert.JSON.encode((request).toJson()); |
2149 } | 2175 } |
2150 if (fileId == null) { | 2176 if (fileId == null) { |
2151 throw new core.ArgumentError("Parameter fileId is required."); | 2177 throw new core.ArgumentError("Parameter fileId is required."); |
2152 } | 2178 } |
2153 if (revisionId == null) { | 2179 if (revisionId == null) { |
2154 throw new core.ArgumentError("Parameter revisionId is required."); | 2180 throw new core.ArgumentError("Parameter revisionId is required."); |
2155 } | 2181 } |
2156 | 2182 |
2157 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/revisions/' +
commons.Escaper.ecapeVariable('$revisionId'); | 2183 _url = 'files/' + |
| 2184 commons.Escaper.ecapeVariable('$fileId') + |
| 2185 '/revisions/' + |
| 2186 commons.Escaper.ecapeVariable('$revisionId'); |
2158 | 2187 |
2159 var _response = _requester.request(_url, | 2188 var _response = _requester.request(_url, "PATCH", |
2160 "PATCH", | 2189 body: _body, |
2161 body: _body, | 2190 queryParams: _queryParams, |
2162 queryParams: _queryParams, | 2191 uploadOptions: _uploadOptions, |
2163 uploadOptions: _uploadOptions, | 2192 uploadMedia: _uploadMedia, |
2164 uploadMedia: _uploadMedia, | 2193 downloadOptions: _downloadOptions); |
2165 downloadOptions: _downloadOptions); | |
2166 return _response.then((data) => new Revision.fromJson(data)); | 2194 return _response.then((data) => new Revision.fromJson(data)); |
2167 } | 2195 } |
2168 | |
2169 } | 2196 } |
2170 | 2197 |
2171 | |
2172 class TeamdrivesResourceApi { | 2198 class TeamdrivesResourceApi { |
2173 final commons.ApiRequester _requester; | 2199 final commons.ApiRequester _requester; |
2174 | 2200 |
2175 TeamdrivesResourceApi(commons.ApiRequester client) : | 2201 TeamdrivesResourceApi(commons.ApiRequester client) : _requester = client; |
2176 _requester = client; | |
2177 | 2202 |
2178 /** | 2203 /// Creates a new Team Drive. |
2179 * Creates a new Team Drive. | 2204 /// |
2180 * | 2205 /// [request] - The metadata request object. |
2181 * [request] - The metadata request object. | 2206 /// |
2182 * | 2207 /// Request parameters: |
2183 * Request parameters: | 2208 /// |
2184 * | 2209 /// [requestId] - An ID, such as a random UUID, which uniquely identifies |
2185 * [requestId] - An ID, such as a random UUID, which uniquely identifies this | 2210 /// this user's request for idempotent creation of a Team Drive. A repeated |
2186 * user's request for idempotent creation of a Team Drive. A repeated request | 2211 /// request by the same user and with the same request ID will avoid creating |
2187 * by the same user and with the same request ID will avoid creating | 2212 /// duplicates by attempting to create the same Team Drive. If the Team Drive |
2188 * duplicates by attempting to create the same Team Drive. If the Team Drive | 2213 /// already exists a 409 error will be returned. |
2189 * already exists a 409 error will be returned. | 2214 /// |
2190 * | 2215 /// Completes with a [TeamDrive]. |
2191 * Completes with a [TeamDrive]. | 2216 /// |
2192 * | 2217 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2193 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2218 /// an error. |
2194 * error. | 2219 /// |
2195 * | 2220 /// If the used [http.Client] completes with an error when making a REST |
2196 * If the used [http.Client] completes with an error when making a REST call, | 2221 /// call, this method will complete with the same error. |
2197 * this method will complete with the same error. | |
2198 */ | |
2199 async.Future<TeamDrive> create(TeamDrive request, core.String requestId) { | 2222 async.Future<TeamDrive> create(TeamDrive request, core.String requestId) { |
2200 var _url = null; | 2223 var _url = null; |
2201 var _queryParams = new core.Map(); | 2224 var _queryParams = new core.Map(); |
2202 var _uploadMedia = null; | 2225 var _uploadMedia = null; |
2203 var _uploadOptions = null; | 2226 var _uploadOptions = null; |
2204 var _downloadOptions = commons.DownloadOptions.Metadata; | 2227 var _downloadOptions = commons.DownloadOptions.Metadata; |
2205 var _body = null; | 2228 var _body = null; |
2206 | 2229 |
2207 if (request != null) { | 2230 if (request != null) { |
2208 _body = convert.JSON.encode((request).toJson()); | 2231 _body = convert.JSON.encode((request).toJson()); |
2209 } | 2232 } |
2210 if (requestId == null) { | 2233 if (requestId == null) { |
2211 throw new core.ArgumentError("Parameter requestId is required."); | 2234 throw new core.ArgumentError("Parameter requestId is required."); |
2212 } | 2235 } |
2213 _queryParams["requestId"] = [requestId]; | 2236 _queryParams["requestId"] = [requestId]; |
2214 | 2237 |
2215 _url = 'teamdrives'; | 2238 _url = 'teamdrives'; |
2216 | 2239 |
2217 var _response = _requester.request(_url, | 2240 var _response = _requester.request(_url, "POST", |
2218 "POST", | 2241 body: _body, |
2219 body: _body, | 2242 queryParams: _queryParams, |
2220 queryParams: _queryParams, | 2243 uploadOptions: _uploadOptions, |
2221 uploadOptions: _uploadOptions, | 2244 uploadMedia: _uploadMedia, |
2222 uploadMedia: _uploadMedia, | 2245 downloadOptions: _downloadOptions); |
2223 downloadOptions: _downloadOptions); | |
2224 return _response.then((data) => new TeamDrive.fromJson(data)); | 2246 return _response.then((data) => new TeamDrive.fromJson(data)); |
2225 } | 2247 } |
2226 | 2248 |
2227 /** | 2249 /// Permanently deletes a Team Drive for which the user is an organizer. The |
2228 * Permanently deletes a Team Drive for which the user is an organizer. The | 2250 /// Team Drive cannot contain any untrashed items. |
2229 * Team Drive cannot contain any untrashed items. | 2251 /// |
2230 * | 2252 /// Request parameters: |
2231 * Request parameters: | 2253 /// |
2232 * | 2254 /// [teamDriveId] - The ID of the Team Drive |
2233 * [teamDriveId] - The ID of the Team Drive | 2255 /// |
2234 * | 2256 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2235 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2257 /// an error. |
2236 * error. | 2258 /// |
2237 * | 2259 /// If the used [http.Client] completes with an error when making a REST |
2238 * If the used [http.Client] completes with an error when making a REST call, | 2260 /// call, this method will complete with the same error. |
2239 * this method will complete with the same error. | |
2240 */ | |
2241 async.Future delete(core.String teamDriveId) { | 2261 async.Future delete(core.String teamDriveId) { |
2242 var _url = null; | 2262 var _url = null; |
2243 var _queryParams = new core.Map(); | 2263 var _queryParams = new core.Map(); |
2244 var _uploadMedia = null; | 2264 var _uploadMedia = null; |
2245 var _uploadOptions = null; | 2265 var _uploadOptions = null; |
2246 var _downloadOptions = commons.DownloadOptions.Metadata; | 2266 var _downloadOptions = commons.DownloadOptions.Metadata; |
2247 var _body = null; | 2267 var _body = null; |
2248 | 2268 |
2249 if (teamDriveId == null) { | 2269 if (teamDriveId == null) { |
2250 throw new core.ArgumentError("Parameter teamDriveId is required."); | 2270 throw new core.ArgumentError("Parameter teamDriveId is required."); |
2251 } | 2271 } |
2252 | 2272 |
2253 _downloadOptions = null; | 2273 _downloadOptions = null; |
2254 | 2274 |
2255 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); | 2275 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); |
2256 | 2276 |
2257 var _response = _requester.request(_url, | 2277 var _response = _requester.request(_url, "DELETE", |
2258 "DELETE", | 2278 body: _body, |
2259 body: _body, | 2279 queryParams: _queryParams, |
2260 queryParams: _queryParams, | 2280 uploadOptions: _uploadOptions, |
2261 uploadOptions: _uploadOptions, | 2281 uploadMedia: _uploadMedia, |
2262 uploadMedia: _uploadMedia, | 2282 downloadOptions: _downloadOptions); |
2263 downloadOptions: _downloadOptions); | |
2264 return _response.then((data) => null); | 2283 return _response.then((data) => null); |
2265 } | 2284 } |
2266 | 2285 |
2267 /** | 2286 /// Gets a Team Drive's metadata by ID. |
2268 * Gets a Team Drive's metadata by ID. | 2287 /// |
2269 * | 2288 /// Request parameters: |
2270 * Request parameters: | 2289 /// |
2271 * | 2290 /// [teamDriveId] - The ID of the Team Drive |
2272 * [teamDriveId] - The ID of the Team Drive | 2291 /// |
2273 * | 2292 /// Completes with a [TeamDrive]. |
2274 * Completes with a [TeamDrive]. | 2293 /// |
2275 * | 2294 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2276 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2295 /// an error. |
2277 * error. | 2296 /// |
2278 * | 2297 /// If the used [http.Client] completes with an error when making a REST |
2279 * If the used [http.Client] completes with an error when making a REST call, | 2298 /// call, this method will complete with the same error. |
2280 * this method will complete with the same error. | |
2281 */ | |
2282 async.Future<TeamDrive> get(core.String teamDriveId) { | 2299 async.Future<TeamDrive> get(core.String teamDriveId) { |
2283 var _url = null; | 2300 var _url = null; |
2284 var _queryParams = new core.Map(); | 2301 var _queryParams = new core.Map(); |
2285 var _uploadMedia = null; | 2302 var _uploadMedia = null; |
2286 var _uploadOptions = null; | 2303 var _uploadOptions = null; |
2287 var _downloadOptions = commons.DownloadOptions.Metadata; | 2304 var _downloadOptions = commons.DownloadOptions.Metadata; |
2288 var _body = null; | 2305 var _body = null; |
2289 | 2306 |
2290 if (teamDriveId == null) { | 2307 if (teamDriveId == null) { |
2291 throw new core.ArgumentError("Parameter teamDriveId is required."); | 2308 throw new core.ArgumentError("Parameter teamDriveId is required."); |
2292 } | 2309 } |
2293 | 2310 |
2294 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); | 2311 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); |
2295 | 2312 |
2296 var _response = _requester.request(_url, | 2313 var _response = _requester.request(_url, "GET", |
2297 "GET", | 2314 body: _body, |
2298 body: _body, | 2315 queryParams: _queryParams, |
2299 queryParams: _queryParams, | 2316 uploadOptions: _uploadOptions, |
2300 uploadOptions: _uploadOptions, | 2317 uploadMedia: _uploadMedia, |
2301 uploadMedia: _uploadMedia, | 2318 downloadOptions: _downloadOptions); |
2302 downloadOptions: _downloadOptions); | |
2303 return _response.then((data) => new TeamDrive.fromJson(data)); | 2319 return _response.then((data) => new TeamDrive.fromJson(data)); |
2304 } | 2320 } |
2305 | 2321 |
2306 /** | 2322 /// Lists the user's Team Drives. |
2307 * Lists the user's Team Drives. | 2323 /// |
2308 * | 2324 /// Request parameters: |
2309 * Request parameters: | 2325 /// |
2310 * | 2326 /// [pageSize] - Maximum number of Team Drives to return. |
2311 * [pageSize] - Maximum number of Team Drives to return. | 2327 /// Value must be between "1" and "100". |
2312 * Value must be between "1" and "100". | 2328 /// |
2313 * | 2329 /// [pageToken] - Page token for Team Drives. |
2314 * [pageToken] - Page token for Team Drives. | 2330 /// |
2315 * | 2331 /// Completes with a [TeamDriveList]. |
2316 * Completes with a [TeamDriveList]. | 2332 /// |
2317 * | 2333 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2318 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2334 /// an error. |
2319 * error. | 2335 /// |
2320 * | 2336 /// If the used [http.Client] completes with an error when making a REST |
2321 * If the used [http.Client] completes with an error when making a REST call, | 2337 /// call, this method will complete with the same error. |
2322 * this method will complete with the same error. | |
2323 */ | |
2324 async.Future<TeamDriveList> list({core.int pageSize, core.String pageToken}) { | 2338 async.Future<TeamDriveList> list({core.int pageSize, core.String pageToken}) { |
2325 var _url = null; | 2339 var _url = null; |
2326 var _queryParams = new core.Map(); | 2340 var _queryParams = new core.Map(); |
2327 var _uploadMedia = null; | 2341 var _uploadMedia = null; |
2328 var _uploadOptions = null; | 2342 var _uploadOptions = null; |
2329 var _downloadOptions = commons.DownloadOptions.Metadata; | 2343 var _downloadOptions = commons.DownloadOptions.Metadata; |
2330 var _body = null; | 2344 var _body = null; |
2331 | 2345 |
2332 if (pageSize != null) { | 2346 if (pageSize != null) { |
2333 _queryParams["pageSize"] = ["${pageSize}"]; | 2347 _queryParams["pageSize"] = ["${pageSize}"]; |
2334 } | 2348 } |
2335 if (pageToken != null) { | 2349 if (pageToken != null) { |
2336 _queryParams["pageToken"] = [pageToken]; | 2350 _queryParams["pageToken"] = [pageToken]; |
2337 } | 2351 } |
2338 | 2352 |
2339 _url = 'teamdrives'; | 2353 _url = 'teamdrives'; |
2340 | 2354 |
2341 var _response = _requester.request(_url, | 2355 var _response = _requester.request(_url, "GET", |
2342 "GET", | 2356 body: _body, |
2343 body: _body, | 2357 queryParams: _queryParams, |
2344 queryParams: _queryParams, | 2358 uploadOptions: _uploadOptions, |
2345 uploadOptions: _uploadOptions, | 2359 uploadMedia: _uploadMedia, |
2346 uploadMedia: _uploadMedia, | 2360 downloadOptions: _downloadOptions); |
2347 downloadOptions: _downloadOptions); | |
2348 return _response.then((data) => new TeamDriveList.fromJson(data)); | 2361 return _response.then((data) => new TeamDriveList.fromJson(data)); |
2349 } | 2362 } |
2350 | 2363 |
2351 /** | 2364 /// Updates a Team Drive's metadata |
2352 * Updates a Team Drive's metadata | 2365 /// |
2353 * | 2366 /// [request] - The metadata request object. |
2354 * [request] - The metadata request object. | 2367 /// |
2355 * | 2368 /// Request parameters: |
2356 * Request parameters: | 2369 /// |
2357 * | 2370 /// [teamDriveId] - The ID of the Team Drive |
2358 * [teamDriveId] - The ID of the Team Drive | 2371 /// |
2359 * | 2372 /// Completes with a [TeamDrive]. |
2360 * Completes with a [TeamDrive]. | 2373 /// |
2361 * | 2374 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2362 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2375 /// an error. |
2363 * error. | 2376 /// |
2364 * | 2377 /// If the used [http.Client] completes with an error when making a REST |
2365 * If the used [http.Client] completes with an error when making a REST call, | 2378 /// call, this method will complete with the same error. |
2366 * this method will complete with the same error. | |
2367 */ | |
2368 async.Future<TeamDrive> update(TeamDrive request, core.String teamDriveId) { | 2379 async.Future<TeamDrive> update(TeamDrive request, core.String teamDriveId) { |
2369 var _url = null; | 2380 var _url = null; |
2370 var _queryParams = new core.Map(); | 2381 var _queryParams = new core.Map(); |
2371 var _uploadMedia = null; | 2382 var _uploadMedia = null; |
2372 var _uploadOptions = null; | 2383 var _uploadOptions = null; |
2373 var _downloadOptions = commons.DownloadOptions.Metadata; | 2384 var _downloadOptions = commons.DownloadOptions.Metadata; |
2374 var _body = null; | 2385 var _body = null; |
2375 | 2386 |
2376 if (request != null) { | 2387 if (request != null) { |
2377 _body = convert.JSON.encode((request).toJson()); | 2388 _body = convert.JSON.encode((request).toJson()); |
2378 } | 2389 } |
2379 if (teamDriveId == null) { | 2390 if (teamDriveId == null) { |
2380 throw new core.ArgumentError("Parameter teamDriveId is required."); | 2391 throw new core.ArgumentError("Parameter teamDriveId is required."); |
2381 } | 2392 } |
2382 | 2393 |
2383 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); | 2394 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); |
2384 | 2395 |
2385 var _response = _requester.request(_url, | 2396 var _response = _requester.request(_url, "PATCH", |
2386 "PATCH", | 2397 body: _body, |
2387 body: _body, | 2398 queryParams: _queryParams, |
2388 queryParams: _queryParams, | 2399 uploadOptions: _uploadOptions, |
2389 uploadOptions: _uploadOptions, | 2400 uploadMedia: _uploadMedia, |
2390 uploadMedia: _uploadMedia, | 2401 downloadOptions: _downloadOptions); |
2391 downloadOptions: _downloadOptions); | |
2392 return _response.then((data) => new TeamDrive.fromJson(data)); | 2402 return _response.then((data) => new TeamDrive.fromJson(data)); |
2393 } | 2403 } |
2394 | |
2395 } | 2404 } |
2396 | 2405 |
| 2406 /// The user's storage quota limits and usage. All fields are measured in |
| 2407 /// bytes. |
| 2408 class AboutStorageQuota { |
| 2409 /// The usage limit, if applicable. This will not be present if the user has |
| 2410 /// unlimited storage. |
| 2411 core.String limit; |
2397 | 2412 |
| 2413 /// The total usage across all services. |
| 2414 core.String usage; |
2398 | 2415 |
2399 /** | 2416 /// The usage by all files in Google Drive. |
2400 * The user's storage quota limits and usage. All fields are measured in bytes. | |
2401 */ | |
2402 class AboutStorageQuota { | |
2403 /** | |
2404 * The usage limit, if applicable. This will not be present if the user has | |
2405 * unlimited storage. | |
2406 */ | |
2407 core.String limit; | |
2408 /** The total usage across all services. */ | |
2409 core.String usage; | |
2410 /** The usage by all files in Google Drive. */ | |
2411 core.String usageInDrive; | 2417 core.String usageInDrive; |
2412 /** The usage by trashed files in Google Drive. */ | 2418 |
| 2419 /// The usage by trashed files in Google Drive. |
2413 core.String usageInDriveTrash; | 2420 core.String usageInDriveTrash; |
2414 | 2421 |
2415 AboutStorageQuota(); | 2422 AboutStorageQuota(); |
2416 | 2423 |
2417 AboutStorageQuota.fromJson(core.Map _json) { | 2424 AboutStorageQuota.fromJson(core.Map _json) { |
2418 if (_json.containsKey("limit")) { | 2425 if (_json.containsKey("limit")) { |
2419 limit = _json["limit"]; | 2426 limit = _json["limit"]; |
2420 } | 2427 } |
2421 if (_json.containsKey("usage")) { | 2428 if (_json.containsKey("usage")) { |
2422 usage = _json["usage"]; | 2429 usage = _json["usage"]; |
2423 } | 2430 } |
2424 if (_json.containsKey("usageInDrive")) { | 2431 if (_json.containsKey("usageInDrive")) { |
2425 usageInDrive = _json["usageInDrive"]; | 2432 usageInDrive = _json["usageInDrive"]; |
2426 } | 2433 } |
2427 if (_json.containsKey("usageInDriveTrash")) { | 2434 if (_json.containsKey("usageInDriveTrash")) { |
2428 usageInDriveTrash = _json["usageInDriveTrash"]; | 2435 usageInDriveTrash = _json["usageInDriveTrash"]; |
2429 } | 2436 } |
2430 } | 2437 } |
2431 | 2438 |
2432 core.Map<core.String, core.Object> toJson() { | 2439 core.Map<core.String, core.Object> toJson() { |
2433 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2440 final core.Map<core.String, core.Object> _json = |
| 2441 new core.Map<core.String, core.Object>(); |
2434 if (limit != null) { | 2442 if (limit != null) { |
2435 _json["limit"] = limit; | 2443 _json["limit"] = limit; |
2436 } | 2444 } |
2437 if (usage != null) { | 2445 if (usage != null) { |
2438 _json["usage"] = usage; | 2446 _json["usage"] = usage; |
2439 } | 2447 } |
2440 if (usageInDrive != null) { | 2448 if (usageInDrive != null) { |
2441 _json["usageInDrive"] = usageInDrive; | 2449 _json["usageInDrive"] = usageInDrive; |
2442 } | 2450 } |
2443 if (usageInDriveTrash != null) { | 2451 if (usageInDriveTrash != null) { |
2444 _json["usageInDriveTrash"] = usageInDriveTrash; | 2452 _json["usageInDriveTrash"] = usageInDriveTrash; |
2445 } | 2453 } |
2446 return _json; | 2454 return _json; |
2447 } | 2455 } |
2448 } | 2456 } |
2449 | 2457 |
2450 class AboutTeamDriveThemes { | 2458 class AboutTeamDriveThemes { |
2451 /** A link to this Team Drive theme's background image. */ | 2459 /// A link to this Team Drive theme's background image. |
2452 core.String backgroundImageLink; | 2460 core.String backgroundImageLink; |
2453 /** The color of this Team Drive theme as an RGB hex string. */ | 2461 |
| 2462 /// The color of this Team Drive theme as an RGB hex string. |
2454 core.String colorRgb; | 2463 core.String colorRgb; |
2455 /** The ID of the theme. */ | 2464 |
| 2465 /// The ID of the theme. |
2456 core.String id; | 2466 core.String id; |
2457 | 2467 |
2458 AboutTeamDriveThemes(); | 2468 AboutTeamDriveThemes(); |
2459 | 2469 |
2460 AboutTeamDriveThemes.fromJson(core.Map _json) { | 2470 AboutTeamDriveThemes.fromJson(core.Map _json) { |
2461 if (_json.containsKey("backgroundImageLink")) { | 2471 if (_json.containsKey("backgroundImageLink")) { |
2462 backgroundImageLink = _json["backgroundImageLink"]; | 2472 backgroundImageLink = _json["backgroundImageLink"]; |
2463 } | 2473 } |
2464 if (_json.containsKey("colorRgb")) { | 2474 if (_json.containsKey("colorRgb")) { |
2465 colorRgb = _json["colorRgb"]; | 2475 colorRgb = _json["colorRgb"]; |
2466 } | 2476 } |
2467 if (_json.containsKey("id")) { | 2477 if (_json.containsKey("id")) { |
2468 id = _json["id"]; | 2478 id = _json["id"]; |
2469 } | 2479 } |
2470 } | 2480 } |
2471 | 2481 |
2472 core.Map<core.String, core.Object> toJson() { | 2482 core.Map<core.String, core.Object> toJson() { |
2473 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2483 final core.Map<core.String, core.Object> _json = |
| 2484 new core.Map<core.String, core.Object>(); |
2474 if (backgroundImageLink != null) { | 2485 if (backgroundImageLink != null) { |
2475 _json["backgroundImageLink"] = backgroundImageLink; | 2486 _json["backgroundImageLink"] = backgroundImageLink; |
2476 } | 2487 } |
2477 if (colorRgb != null) { | 2488 if (colorRgb != null) { |
2478 _json["colorRgb"] = colorRgb; | 2489 _json["colorRgb"] = colorRgb; |
2479 } | 2490 } |
2480 if (id != null) { | 2491 if (id != null) { |
2481 _json["id"] = id; | 2492 _json["id"] = id; |
2482 } | 2493 } |
2483 return _json; | 2494 return _json; |
2484 } | 2495 } |
2485 } | 2496 } |
2486 | 2497 |
2487 /** Information about the user, the user's Drive, and system capabilities. */ | 2498 /// Information about the user, the user's Drive, and system capabilities. |
2488 class About { | 2499 class About { |
2489 /** Whether the user has installed the requesting app. */ | 2500 /// Whether the user has installed the requesting app. |
2490 core.bool appInstalled; | 2501 core.bool appInstalled; |
2491 /** | 2502 |
2492 * A map of source MIME type to possible targets for all supported exports. | 2503 /// A map of source MIME type to possible targets for all supported exports. |
2493 */ | |
2494 core.Map<core.String, core.List<core.String>> exportFormats; | 2504 core.Map<core.String, core.List<core.String>> exportFormats; |
2495 /** The currently supported folder colors as RGB hex strings. */ | 2505 |
| 2506 /// The currently supported folder colors as RGB hex strings. |
2496 core.List<core.String> folderColorPalette; | 2507 core.List<core.String> folderColorPalette; |
2497 /** | 2508 |
2498 * A map of source MIME type to possible targets for all supported imports. | 2509 /// A map of source MIME type to possible targets for all supported imports. |
2499 */ | |
2500 core.Map<core.String, core.List<core.String>> importFormats; | 2510 core.Map<core.String, core.List<core.String>> importFormats; |
2501 /** | 2511 |
2502 * Identifies what kind of resource this is. Value: the fixed string | 2512 /// Identifies what kind of resource this is. Value: the fixed string |
2503 * "drive#about". | 2513 /// "drive#about". |
2504 */ | |
2505 core.String kind; | 2514 core.String kind; |
2506 /** A map of maximum import sizes by MIME type, in bytes. */ | 2515 |
| 2516 /// A map of maximum import sizes by MIME type, in bytes. |
2507 core.Map<core.String, core.String> maxImportSizes; | 2517 core.Map<core.String, core.String> maxImportSizes; |
2508 /** The maximum upload size in bytes. */ | 2518 |
| 2519 /// The maximum upload size in bytes. |
2509 core.String maxUploadSize; | 2520 core.String maxUploadSize; |
2510 /** | 2521 |
2511 * The user's storage quota limits and usage. All fields are measured in | 2522 /// The user's storage quota limits and usage. All fields are measured in |
2512 * bytes. | 2523 /// bytes. |
2513 */ | |
2514 AboutStorageQuota storageQuota; | 2524 AboutStorageQuota storageQuota; |
2515 /** A list of themes that are supported for Team Drives. */ | 2525 |
| 2526 /// A list of themes that are supported for Team Drives. |
2516 core.List<AboutTeamDriveThemes> teamDriveThemes; | 2527 core.List<AboutTeamDriveThemes> teamDriveThemes; |
2517 /** The authenticated user. */ | 2528 |
| 2529 /// The authenticated user. |
2518 User user; | 2530 User user; |
2519 | 2531 |
2520 About(); | 2532 About(); |
2521 | 2533 |
2522 About.fromJson(core.Map _json) { | 2534 About.fromJson(core.Map _json) { |
2523 if (_json.containsKey("appInstalled")) { | 2535 if (_json.containsKey("appInstalled")) { |
2524 appInstalled = _json["appInstalled"]; | 2536 appInstalled = _json["appInstalled"]; |
2525 } | 2537 } |
2526 if (_json.containsKey("exportFormats")) { | 2538 if (_json.containsKey("exportFormats")) { |
2527 exportFormats = _json["exportFormats"]; | 2539 exportFormats = _json["exportFormats"]; |
(...skipping 10 matching lines...) Expand all Loading... |
2538 if (_json.containsKey("maxImportSizes")) { | 2550 if (_json.containsKey("maxImportSizes")) { |
2539 maxImportSizes = _json["maxImportSizes"]; | 2551 maxImportSizes = _json["maxImportSizes"]; |
2540 } | 2552 } |
2541 if (_json.containsKey("maxUploadSize")) { | 2553 if (_json.containsKey("maxUploadSize")) { |
2542 maxUploadSize = _json["maxUploadSize"]; | 2554 maxUploadSize = _json["maxUploadSize"]; |
2543 } | 2555 } |
2544 if (_json.containsKey("storageQuota")) { | 2556 if (_json.containsKey("storageQuota")) { |
2545 storageQuota = new AboutStorageQuota.fromJson(_json["storageQuota"]); | 2557 storageQuota = new AboutStorageQuota.fromJson(_json["storageQuota"]); |
2546 } | 2558 } |
2547 if (_json.containsKey("teamDriveThemes")) { | 2559 if (_json.containsKey("teamDriveThemes")) { |
2548 teamDriveThemes = _json["teamDriveThemes"].map((value) => new AboutTeamDri
veThemes.fromJson(value)).toList(); | 2560 teamDriveThemes = _json["teamDriveThemes"] |
| 2561 .map((value) => new AboutTeamDriveThemes.fromJson(value)) |
| 2562 .toList(); |
2549 } | 2563 } |
2550 if (_json.containsKey("user")) { | 2564 if (_json.containsKey("user")) { |
2551 user = new User.fromJson(_json["user"]); | 2565 user = new User.fromJson(_json["user"]); |
2552 } | 2566 } |
2553 } | 2567 } |
2554 | 2568 |
2555 core.Map<core.String, core.Object> toJson() { | 2569 core.Map<core.String, core.Object> toJson() { |
2556 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2570 final core.Map<core.String, core.Object> _json = |
| 2571 new core.Map<core.String, core.Object>(); |
2557 if (appInstalled != null) { | 2572 if (appInstalled != null) { |
2558 _json["appInstalled"] = appInstalled; | 2573 _json["appInstalled"] = appInstalled; |
2559 } | 2574 } |
2560 if (exportFormats != null) { | 2575 if (exportFormats != null) { |
2561 _json["exportFormats"] = exportFormats; | 2576 _json["exportFormats"] = exportFormats; |
2562 } | 2577 } |
2563 if (folderColorPalette != null) { | 2578 if (folderColorPalette != null) { |
2564 _json["folderColorPalette"] = folderColorPalette; | 2579 _json["folderColorPalette"] = folderColorPalette; |
2565 } | 2580 } |
2566 if (importFormats != null) { | 2581 if (importFormats != null) { |
2567 _json["importFormats"] = importFormats; | 2582 _json["importFormats"] = importFormats; |
2568 } | 2583 } |
2569 if (kind != null) { | 2584 if (kind != null) { |
2570 _json["kind"] = kind; | 2585 _json["kind"] = kind; |
2571 } | 2586 } |
2572 if (maxImportSizes != null) { | 2587 if (maxImportSizes != null) { |
2573 _json["maxImportSizes"] = maxImportSizes; | 2588 _json["maxImportSizes"] = maxImportSizes; |
2574 } | 2589 } |
2575 if (maxUploadSize != null) { | 2590 if (maxUploadSize != null) { |
2576 _json["maxUploadSize"] = maxUploadSize; | 2591 _json["maxUploadSize"] = maxUploadSize; |
2577 } | 2592 } |
2578 if (storageQuota != null) { | 2593 if (storageQuota != null) { |
2579 _json["storageQuota"] = (storageQuota).toJson(); | 2594 _json["storageQuota"] = (storageQuota).toJson(); |
2580 } | 2595 } |
2581 if (teamDriveThemes != null) { | 2596 if (teamDriveThemes != null) { |
2582 _json["teamDriveThemes"] = teamDriveThemes.map((value) => (value).toJson()
).toList(); | 2597 _json["teamDriveThemes"] = |
| 2598 teamDriveThemes.map((value) => (value).toJson()).toList(); |
2583 } | 2599 } |
2584 if (user != null) { | 2600 if (user != null) { |
2585 _json["user"] = (user).toJson(); | 2601 _json["user"] = (user).toJson(); |
2586 } | 2602 } |
2587 return _json; | 2603 return _json; |
2588 } | 2604 } |
2589 } | 2605 } |
2590 | 2606 |
2591 /** A change to a file or Team Drive. */ | 2607 /// A change to a file or Team Drive. |
2592 class Change { | 2608 class Change { |
2593 /** | 2609 /// The updated state of the file. Present if the type is file and the file |
2594 * The updated state of the file. Present if the type is file and the file has | 2610 /// has not been removed from this list of changes. |
2595 * not been removed from this list of changes. | |
2596 */ | |
2597 File file; | 2611 File file; |
2598 /** The ID of the file which has changed. */ | 2612 |
| 2613 /// The ID of the file which has changed. |
2599 core.String fileId; | 2614 core.String fileId; |
2600 /** | 2615 |
2601 * Identifies what kind of resource this is. Value: the fixed string | 2616 /// Identifies what kind of resource this is. Value: the fixed string |
2602 * "drive#change". | 2617 /// "drive#change". |
2603 */ | |
2604 core.String kind; | 2618 core.String kind; |
2605 /** | 2619 |
2606 * Whether the file or Team Drive has been removed from this list of changes, | 2620 /// Whether the file or Team Drive has been removed from this list of |
2607 * for example by deletion or loss of access. | 2621 /// changes, for example by deletion or loss of access. |
2608 */ | |
2609 core.bool removed; | 2622 core.bool removed; |
2610 /** | 2623 |
2611 * The updated state of the Team Drive. Present if the type is teamDrive, the | 2624 /// The updated state of the Team Drive. Present if the type is teamDrive, |
2612 * user is still a member of the Team Drive, and the Team Drive has not been | 2625 /// the user is still a member of the Team Drive, and the Team Drive has not |
2613 * removed. | 2626 /// been removed. |
2614 */ | |
2615 TeamDrive teamDrive; | 2627 TeamDrive teamDrive; |
2616 /** The ID of the Team Drive associated with this change. */ | 2628 |
| 2629 /// The ID of the Team Drive associated with this change. |
2617 core.String teamDriveId; | 2630 core.String teamDriveId; |
2618 /** The time of this change (RFC 3339 date-time). */ | 2631 |
| 2632 /// The time of this change (RFC 3339 date-time). |
2619 core.DateTime time; | 2633 core.DateTime time; |
2620 /** The type of the change. Possible values are file and teamDrive. */ | 2634 |
| 2635 /// The type of the change. Possible values are file and teamDrive. |
2621 core.String type; | 2636 core.String type; |
2622 | 2637 |
2623 Change(); | 2638 Change(); |
2624 | 2639 |
2625 Change.fromJson(core.Map _json) { | 2640 Change.fromJson(core.Map _json) { |
2626 if (_json.containsKey("file")) { | 2641 if (_json.containsKey("file")) { |
2627 file = new File.fromJson(_json["file"]); | 2642 file = new File.fromJson(_json["file"]); |
2628 } | 2643 } |
2629 if (_json.containsKey("fileId")) { | 2644 if (_json.containsKey("fileId")) { |
2630 fileId = _json["fileId"]; | 2645 fileId = _json["fileId"]; |
(...skipping 12 matching lines...) Expand all Loading... |
2643 } | 2658 } |
2644 if (_json.containsKey("time")) { | 2659 if (_json.containsKey("time")) { |
2645 time = core.DateTime.parse(_json["time"]); | 2660 time = core.DateTime.parse(_json["time"]); |
2646 } | 2661 } |
2647 if (_json.containsKey("type")) { | 2662 if (_json.containsKey("type")) { |
2648 type = _json["type"]; | 2663 type = _json["type"]; |
2649 } | 2664 } |
2650 } | 2665 } |
2651 | 2666 |
2652 core.Map<core.String, core.Object> toJson() { | 2667 core.Map<core.String, core.Object> toJson() { |
2653 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2668 final core.Map<core.String, core.Object> _json = |
| 2669 new core.Map<core.String, core.Object>(); |
2654 if (file != null) { | 2670 if (file != null) { |
2655 _json["file"] = (file).toJson(); | 2671 _json["file"] = (file).toJson(); |
2656 } | 2672 } |
2657 if (fileId != null) { | 2673 if (fileId != null) { |
2658 _json["fileId"] = fileId; | 2674 _json["fileId"] = fileId; |
2659 } | 2675 } |
2660 if (kind != null) { | 2676 if (kind != null) { |
2661 _json["kind"] = kind; | 2677 _json["kind"] = kind; |
2662 } | 2678 } |
2663 if (removed != null) { | 2679 if (removed != null) { |
2664 _json["removed"] = removed; | 2680 _json["removed"] = removed; |
2665 } | 2681 } |
2666 if (teamDrive != null) { | 2682 if (teamDrive != null) { |
2667 _json["teamDrive"] = (teamDrive).toJson(); | 2683 _json["teamDrive"] = (teamDrive).toJson(); |
2668 } | 2684 } |
2669 if (teamDriveId != null) { | 2685 if (teamDriveId != null) { |
2670 _json["teamDriveId"] = teamDriveId; | 2686 _json["teamDriveId"] = teamDriveId; |
2671 } | 2687 } |
2672 if (time != null) { | 2688 if (time != null) { |
2673 _json["time"] = (time).toIso8601String(); | 2689 _json["time"] = (time).toIso8601String(); |
2674 } | 2690 } |
2675 if (type != null) { | 2691 if (type != null) { |
2676 _json["type"] = type; | 2692 _json["type"] = type; |
2677 } | 2693 } |
2678 return _json; | 2694 return _json; |
2679 } | 2695 } |
2680 } | 2696 } |
2681 | 2697 |
2682 /** A list of changes for a user. */ | 2698 /// A list of changes for a user. |
2683 class ChangeList { | 2699 class ChangeList { |
2684 /** | 2700 /// The list of changes. If nextPageToken is populated, then this list may be |
2685 * The list of changes. If nextPageToken is populated, then this list may be | 2701 /// incomplete and an additional page of results should be fetched. |
2686 * incomplete and an additional page of results should be fetched. | |
2687 */ | |
2688 core.List<Change> changes; | 2702 core.List<Change> changes; |
2689 /** | 2703 |
2690 * Identifies what kind of resource this is. Value: the fixed string | 2704 /// Identifies what kind of resource this is. Value: the fixed string |
2691 * "drive#changeList". | 2705 /// "drive#changeList". |
2692 */ | |
2693 core.String kind; | 2706 core.String kind; |
2694 /** | 2707 |
2695 * The starting page token for future changes. This will be present only if | 2708 /// The starting page token for future changes. This will be present only if |
2696 * the end of the current changes list has been reached. | 2709 /// the end of the current changes list has been reached. |
2697 */ | |
2698 core.String newStartPageToken; | 2710 core.String newStartPageToken; |
2699 /** | 2711 |
2700 * The page token for the next page of changes. This will be absent if the end | 2712 /// The page token for the next page of changes. This will be absent if the |
2701 * of the changes list has been reached. If the token is rejected for any | 2713 /// end of the changes list has been reached. If the token is rejected for |
2702 * reason, it should be discarded, and pagination should be restarted from the | 2714 /// any reason, it should be discarded, and pagination should be restarted |
2703 * first page of results. | 2715 /// from the first page of results. |
2704 */ | |
2705 core.String nextPageToken; | 2716 core.String nextPageToken; |
2706 | 2717 |
2707 ChangeList(); | 2718 ChangeList(); |
2708 | 2719 |
2709 ChangeList.fromJson(core.Map _json) { | 2720 ChangeList.fromJson(core.Map _json) { |
2710 if (_json.containsKey("changes")) { | 2721 if (_json.containsKey("changes")) { |
2711 changes = _json["changes"].map((value) => new Change.fromJson(value)).toLi
st(); | 2722 changes = |
| 2723 _json["changes"].map((value) => new Change.fromJson(value)).toList(); |
2712 } | 2724 } |
2713 if (_json.containsKey("kind")) { | 2725 if (_json.containsKey("kind")) { |
2714 kind = _json["kind"]; | 2726 kind = _json["kind"]; |
2715 } | 2727 } |
2716 if (_json.containsKey("newStartPageToken")) { | 2728 if (_json.containsKey("newStartPageToken")) { |
2717 newStartPageToken = _json["newStartPageToken"]; | 2729 newStartPageToken = _json["newStartPageToken"]; |
2718 } | 2730 } |
2719 if (_json.containsKey("nextPageToken")) { | 2731 if (_json.containsKey("nextPageToken")) { |
2720 nextPageToken = _json["nextPageToken"]; | 2732 nextPageToken = _json["nextPageToken"]; |
2721 } | 2733 } |
2722 } | 2734 } |
2723 | 2735 |
2724 core.Map<core.String, core.Object> toJson() { | 2736 core.Map<core.String, core.Object> toJson() { |
2725 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2737 final core.Map<core.String, core.Object> _json = |
| 2738 new core.Map<core.String, core.Object>(); |
2726 if (changes != null) { | 2739 if (changes != null) { |
2727 _json["changes"] = changes.map((value) => (value).toJson()).toList(); | 2740 _json["changes"] = changes.map((value) => (value).toJson()).toList(); |
2728 } | 2741 } |
2729 if (kind != null) { | 2742 if (kind != null) { |
2730 _json["kind"] = kind; | 2743 _json["kind"] = kind; |
2731 } | 2744 } |
2732 if (newStartPageToken != null) { | 2745 if (newStartPageToken != null) { |
2733 _json["newStartPageToken"] = newStartPageToken; | 2746 _json["newStartPageToken"] = newStartPageToken; |
2734 } | 2747 } |
2735 if (nextPageToken != null) { | 2748 if (nextPageToken != null) { |
2736 _json["nextPageToken"] = nextPageToken; | 2749 _json["nextPageToken"] = nextPageToken; |
2737 } | 2750 } |
2738 return _json; | 2751 return _json; |
2739 } | 2752 } |
2740 } | 2753 } |
2741 | 2754 |
2742 /** An notification channel used to watch for resource changes. */ | 2755 /// An notification channel used to watch for resource changes. |
2743 class Channel { | 2756 class Channel { |
2744 /** The address where notifications are delivered for this channel. */ | 2757 /// The address where notifications are delivered for this channel. |
2745 core.String address; | 2758 core.String address; |
2746 /** | 2759 |
2747 * Date and time of notification channel expiration, expressed as a Unix | 2760 /// Date and time of notification channel expiration, expressed as a Unix |
2748 * timestamp, in milliseconds. Optional. | 2761 /// timestamp, in milliseconds. Optional. |
2749 */ | |
2750 core.String expiration; | 2762 core.String expiration; |
2751 /** A UUID or similar unique string that identifies this channel. */ | 2763 |
| 2764 /// A UUID or similar unique string that identifies this channel. |
2752 core.String id; | 2765 core.String id; |
2753 /** | 2766 |
2754 * Identifies this as a notification channel used to watch for changes to a | 2767 /// Identifies this as a notification channel used to watch for changes to a |
2755 * resource. Value: the fixed string "api#channel". | 2768 /// resource. Value: the fixed string "api#channel". |
2756 */ | |
2757 core.String kind; | 2769 core.String kind; |
2758 /** Additional parameters controlling delivery channel behavior. Optional. */ | 2770 |
| 2771 /// Additional parameters controlling delivery channel behavior. Optional. |
2759 core.Map<core.String, core.String> params; | 2772 core.Map<core.String, core.String> params; |
2760 /** A Boolean value to indicate whether payload is wanted. Optional. */ | 2773 |
| 2774 /// A Boolean value to indicate whether payload is wanted. Optional. |
2761 core.bool payload; | 2775 core.bool payload; |
2762 /** | 2776 |
2763 * An opaque ID that identifies the resource being watched on this channel. | 2777 /// An opaque ID that identifies the resource being watched on this channel. |
2764 * Stable across different API versions. | 2778 /// Stable across different API versions. |
2765 */ | |
2766 core.String resourceId; | 2779 core.String resourceId; |
2767 /** A version-specific identifier for the watched resource. */ | 2780 |
| 2781 /// A version-specific identifier for the watched resource. |
2768 core.String resourceUri; | 2782 core.String resourceUri; |
2769 /** | 2783 |
2770 * An arbitrary string delivered to the target address with each notification | 2784 /// An arbitrary string delivered to the target address with each |
2771 * delivered over this channel. Optional. | 2785 /// notification delivered over this channel. Optional. |
2772 */ | |
2773 core.String token; | 2786 core.String token; |
2774 /** The type of delivery mechanism used for this channel. */ | 2787 |
| 2788 /// The type of delivery mechanism used for this channel. |
2775 core.String type; | 2789 core.String type; |
2776 | 2790 |
2777 Channel(); | 2791 Channel(); |
2778 | 2792 |
2779 Channel.fromJson(core.Map _json) { | 2793 Channel.fromJson(core.Map _json) { |
2780 if (_json.containsKey("address")) { | 2794 if (_json.containsKey("address")) { |
2781 address = _json["address"]; | 2795 address = _json["address"]; |
2782 } | 2796 } |
2783 if (_json.containsKey("expiration")) { | 2797 if (_json.containsKey("expiration")) { |
2784 expiration = _json["expiration"]; | 2798 expiration = _json["expiration"]; |
(...skipping 18 matching lines...) Expand all Loading... |
2803 } | 2817 } |
2804 if (_json.containsKey("token")) { | 2818 if (_json.containsKey("token")) { |
2805 token = _json["token"]; | 2819 token = _json["token"]; |
2806 } | 2820 } |
2807 if (_json.containsKey("type")) { | 2821 if (_json.containsKey("type")) { |
2808 type = _json["type"]; | 2822 type = _json["type"]; |
2809 } | 2823 } |
2810 } | 2824 } |
2811 | 2825 |
2812 core.Map<core.String, core.Object> toJson() { | 2826 core.Map<core.String, core.Object> toJson() { |
2813 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2827 final core.Map<core.String, core.Object> _json = |
| 2828 new core.Map<core.String, core.Object>(); |
2814 if (address != null) { | 2829 if (address != null) { |
2815 _json["address"] = address; | 2830 _json["address"] = address; |
2816 } | 2831 } |
2817 if (expiration != null) { | 2832 if (expiration != null) { |
2818 _json["expiration"] = expiration; | 2833 _json["expiration"] = expiration; |
2819 } | 2834 } |
2820 if (id != null) { | 2835 if (id != null) { |
2821 _json["id"] = id; | 2836 _json["id"] = id; |
2822 } | 2837 } |
2823 if (kind != null) { | 2838 if (kind != null) { |
(...skipping 14 matching lines...) Expand all Loading... |
2838 if (token != null) { | 2853 if (token != null) { |
2839 _json["token"] = token; | 2854 _json["token"] = token; |
2840 } | 2855 } |
2841 if (type != null) { | 2856 if (type != null) { |
2842 _json["type"] = type; | 2857 _json["type"] = type; |
2843 } | 2858 } |
2844 return _json; | 2859 return _json; |
2845 } | 2860 } |
2846 } | 2861 } |
2847 | 2862 |
2848 /** | 2863 /// The file content to which the comment refers, typically within the anchor |
2849 * The file content to which the comment refers, typically within the anchor | 2864 /// region. For a text file, for example, this would be the text at the |
2850 * region. For a text file, for example, this would be the text at the location | 2865 /// location of the comment. |
2851 * of the comment. | |
2852 */ | |
2853 class CommentQuotedFileContent { | 2866 class CommentQuotedFileContent { |
2854 /** The MIME type of the quoted content. */ | 2867 /// The MIME type of the quoted content. |
2855 core.String mimeType; | 2868 core.String mimeType; |
2856 /** | 2869 |
2857 * The quoted content itself. This is interpreted as plain text if set through | 2870 /// The quoted content itself. This is interpreted as plain text if set |
2858 * the API. | 2871 /// through the API. |
2859 */ | |
2860 core.String value; | 2872 core.String value; |
2861 | 2873 |
2862 CommentQuotedFileContent(); | 2874 CommentQuotedFileContent(); |
2863 | 2875 |
2864 CommentQuotedFileContent.fromJson(core.Map _json) { | 2876 CommentQuotedFileContent.fromJson(core.Map _json) { |
2865 if (_json.containsKey("mimeType")) { | 2877 if (_json.containsKey("mimeType")) { |
2866 mimeType = _json["mimeType"]; | 2878 mimeType = _json["mimeType"]; |
2867 } | 2879 } |
2868 if (_json.containsKey("value")) { | 2880 if (_json.containsKey("value")) { |
2869 value = _json["value"]; | 2881 value = _json["value"]; |
2870 } | 2882 } |
2871 } | 2883 } |
2872 | 2884 |
2873 core.Map<core.String, core.Object> toJson() { | 2885 core.Map<core.String, core.Object> toJson() { |
2874 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2886 final core.Map<core.String, core.Object> _json = |
| 2887 new core.Map<core.String, core.Object>(); |
2875 if (mimeType != null) { | 2888 if (mimeType != null) { |
2876 _json["mimeType"] = mimeType; | 2889 _json["mimeType"] = mimeType; |
2877 } | 2890 } |
2878 if (value != null) { | 2891 if (value != null) { |
2879 _json["value"] = value; | 2892 _json["value"] = value; |
2880 } | 2893 } |
2881 return _json; | 2894 return _json; |
2882 } | 2895 } |
2883 } | 2896 } |
2884 | 2897 |
2885 /** A comment on a file. */ | 2898 /// A comment on a file. |
2886 class Comment { | 2899 class Comment { |
2887 /** | 2900 /// A region of the document represented as a JSON string. See anchor |
2888 * A region of the document represented as a JSON string. See anchor | 2901 /// documentation for details on how to define and interpret anchor |
2889 * documentation for details on how to define and interpret anchor properties. | 2902 /// properties. |
2890 */ | |
2891 core.String anchor; | 2903 core.String anchor; |
2892 /** The user who created the comment. */ | 2904 |
| 2905 /// The user who created the comment. |
2893 User author; | 2906 User author; |
2894 /** | 2907 |
2895 * The plain text content of the comment. This field is used for setting the | 2908 /// The plain text content of the comment. This field is used for setting the |
2896 * content, while htmlContent should be displayed. | 2909 /// content, while htmlContent should be displayed. |
2897 */ | |
2898 core.String content; | 2910 core.String content; |
2899 /** The time at which the comment was created (RFC 3339 date-time). */ | 2911 |
| 2912 /// The time at which the comment was created (RFC 3339 date-time). |
2900 core.DateTime createdTime; | 2913 core.DateTime createdTime; |
2901 /** | 2914 |
2902 * Whether the comment has been deleted. A deleted comment has no content. | 2915 /// Whether the comment has been deleted. A deleted comment has no content. |
2903 */ | |
2904 core.bool deleted; | 2916 core.bool deleted; |
2905 /** The content of the comment with HTML formatting. */ | 2917 |
| 2918 /// The content of the comment with HTML formatting. |
2906 core.String htmlContent; | 2919 core.String htmlContent; |
2907 /** The ID of the comment. */ | 2920 |
| 2921 /// The ID of the comment. |
2908 core.String id; | 2922 core.String id; |
2909 /** | 2923 |
2910 * Identifies what kind of resource this is. Value: the fixed string | 2924 /// Identifies what kind of resource this is. Value: the fixed string |
2911 * "drive#comment". | 2925 /// "drive#comment". |
2912 */ | |
2913 core.String kind; | 2926 core.String kind; |
2914 /** | 2927 |
2915 * The last time the comment or any of its replies was modified (RFC 3339 | 2928 /// The last time the comment or any of its replies was modified (RFC 3339 |
2916 * date-time). | 2929 /// date-time). |
2917 */ | |
2918 core.DateTime modifiedTime; | 2930 core.DateTime modifiedTime; |
2919 /** | 2931 |
2920 * The file content to which the comment refers, typically within the anchor | 2932 /// The file content to which the comment refers, typically within the anchor |
2921 * region. For a text file, for example, this would be the text at the | 2933 /// region. For a text file, for example, this would be the text at the |
2922 * location of the comment. | 2934 /// location of the comment. |
2923 */ | |
2924 CommentQuotedFileContent quotedFileContent; | 2935 CommentQuotedFileContent quotedFileContent; |
2925 /** The full list of replies to the comment in chronological order. */ | 2936 |
| 2937 /// The full list of replies to the comment in chronological order. |
2926 core.List<Reply> replies; | 2938 core.List<Reply> replies; |
2927 /** Whether the comment has been resolved by one of its replies. */ | 2939 |
| 2940 /// Whether the comment has been resolved by one of its replies. |
2928 core.bool resolved; | 2941 core.bool resolved; |
2929 | 2942 |
2930 Comment(); | 2943 Comment(); |
2931 | 2944 |
2932 Comment.fromJson(core.Map _json) { | 2945 Comment.fromJson(core.Map _json) { |
2933 if (_json.containsKey("anchor")) { | 2946 if (_json.containsKey("anchor")) { |
2934 anchor = _json["anchor"]; | 2947 anchor = _json["anchor"]; |
2935 } | 2948 } |
2936 if (_json.containsKey("author")) { | 2949 if (_json.containsKey("author")) { |
2937 author = new User.fromJson(_json["author"]); | 2950 author = new User.fromJson(_json["author"]); |
(...skipping 13 matching lines...) Expand all Loading... |
2951 if (_json.containsKey("id")) { | 2964 if (_json.containsKey("id")) { |
2952 id = _json["id"]; | 2965 id = _json["id"]; |
2953 } | 2966 } |
2954 if (_json.containsKey("kind")) { | 2967 if (_json.containsKey("kind")) { |
2955 kind = _json["kind"]; | 2968 kind = _json["kind"]; |
2956 } | 2969 } |
2957 if (_json.containsKey("modifiedTime")) { | 2970 if (_json.containsKey("modifiedTime")) { |
2958 modifiedTime = core.DateTime.parse(_json["modifiedTime"]); | 2971 modifiedTime = core.DateTime.parse(_json["modifiedTime"]); |
2959 } | 2972 } |
2960 if (_json.containsKey("quotedFileContent")) { | 2973 if (_json.containsKey("quotedFileContent")) { |
2961 quotedFileContent = new CommentQuotedFileContent.fromJson(_json["quotedFil
eContent"]); | 2974 quotedFileContent = |
| 2975 new CommentQuotedFileContent.fromJson(_json["quotedFileContent"]); |
2962 } | 2976 } |
2963 if (_json.containsKey("replies")) { | 2977 if (_json.containsKey("replies")) { |
2964 replies = _json["replies"].map((value) => new Reply.fromJson(value)).toLis
t(); | 2978 replies = |
| 2979 _json["replies"].map((value) => new Reply.fromJson(value)).toList(); |
2965 } | 2980 } |
2966 if (_json.containsKey("resolved")) { | 2981 if (_json.containsKey("resolved")) { |
2967 resolved = _json["resolved"]; | 2982 resolved = _json["resolved"]; |
2968 } | 2983 } |
2969 } | 2984 } |
2970 | 2985 |
2971 core.Map<core.String, core.Object> toJson() { | 2986 core.Map<core.String, core.Object> toJson() { |
2972 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2987 final core.Map<core.String, core.Object> _json = |
| 2988 new core.Map<core.String, core.Object>(); |
2973 if (anchor != null) { | 2989 if (anchor != null) { |
2974 _json["anchor"] = anchor; | 2990 _json["anchor"] = anchor; |
2975 } | 2991 } |
2976 if (author != null) { | 2992 if (author != null) { |
2977 _json["author"] = (author).toJson(); | 2993 _json["author"] = (author).toJson(); |
2978 } | 2994 } |
2979 if (content != null) { | 2995 if (content != null) { |
2980 _json["content"] = content; | 2996 _json["content"] = content; |
2981 } | 2997 } |
2982 if (createdTime != null) { | 2998 if (createdTime != null) { |
(...skipping 20 matching lines...) Expand all Loading... |
3003 if (replies != null) { | 3019 if (replies != null) { |
3004 _json["replies"] = replies.map((value) => (value).toJson()).toList(); | 3020 _json["replies"] = replies.map((value) => (value).toJson()).toList(); |
3005 } | 3021 } |
3006 if (resolved != null) { | 3022 if (resolved != null) { |
3007 _json["resolved"] = resolved; | 3023 _json["resolved"] = resolved; |
3008 } | 3024 } |
3009 return _json; | 3025 return _json; |
3010 } | 3026 } |
3011 } | 3027 } |
3012 | 3028 |
3013 /** A list of comments on a file. */ | 3029 /// A list of comments on a file. |
3014 class CommentList { | 3030 class CommentList { |
3015 /** | 3031 /// The list of comments. If nextPageToken is populated, then this list may |
3016 * The list of comments. If nextPageToken is populated, then this list may be | 3032 /// be incomplete and an additional page of results should be fetched. |
3017 * incomplete and an additional page of results should be fetched. | |
3018 */ | |
3019 core.List<Comment> comments; | 3033 core.List<Comment> comments; |
3020 /** | 3034 |
3021 * Identifies what kind of resource this is. Value: the fixed string | 3035 /// Identifies what kind of resource this is. Value: the fixed string |
3022 * "drive#commentList". | 3036 /// "drive#commentList". |
3023 */ | |
3024 core.String kind; | 3037 core.String kind; |
3025 /** | 3038 |
3026 * The page token for the next page of comments. This will be absent if the | 3039 /// The page token for the next page of comments. This will be absent if the |
3027 * end of the comments list has been reached. If the token is rejected for any | 3040 /// end of the comments list has been reached. If the token is rejected for |
3028 * reason, it should be discarded, and pagination should be restarted from the | 3041 /// any reason, it should be discarded, and pagination should be restarted |
3029 * first page of results. | 3042 /// from the first page of results. |
3030 */ | |
3031 core.String nextPageToken; | 3043 core.String nextPageToken; |
3032 | 3044 |
3033 CommentList(); | 3045 CommentList(); |
3034 | 3046 |
3035 CommentList.fromJson(core.Map _json) { | 3047 CommentList.fromJson(core.Map _json) { |
3036 if (_json.containsKey("comments")) { | 3048 if (_json.containsKey("comments")) { |
3037 comments = _json["comments"].map((value) => new Comment.fromJson(value)).t
oList(); | 3049 comments = _json["comments"] |
| 3050 .map((value) => new Comment.fromJson(value)) |
| 3051 .toList(); |
3038 } | 3052 } |
3039 if (_json.containsKey("kind")) { | 3053 if (_json.containsKey("kind")) { |
3040 kind = _json["kind"]; | 3054 kind = _json["kind"]; |
3041 } | 3055 } |
3042 if (_json.containsKey("nextPageToken")) { | 3056 if (_json.containsKey("nextPageToken")) { |
3043 nextPageToken = _json["nextPageToken"]; | 3057 nextPageToken = _json["nextPageToken"]; |
3044 } | 3058 } |
3045 } | 3059 } |
3046 | 3060 |
3047 core.Map<core.String, core.Object> toJson() { | 3061 core.Map<core.String, core.Object> toJson() { |
3048 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3062 final core.Map<core.String, core.Object> _json = |
| 3063 new core.Map<core.String, core.Object>(); |
3049 if (comments != null) { | 3064 if (comments != null) { |
3050 _json["comments"] = comments.map((value) => (value).toJson()).toList(); | 3065 _json["comments"] = comments.map((value) => (value).toJson()).toList(); |
3051 } | 3066 } |
3052 if (kind != null) { | 3067 if (kind != null) { |
3053 _json["kind"] = kind; | 3068 _json["kind"] = kind; |
3054 } | 3069 } |
3055 if (nextPageToken != null) { | 3070 if (nextPageToken != null) { |
3056 _json["nextPageToken"] = nextPageToken; | 3071 _json["nextPageToken"] = nextPageToken; |
3057 } | 3072 } |
3058 return _json; | 3073 return _json; |
3059 } | 3074 } |
3060 } | 3075 } |
3061 | 3076 |
3062 /** | 3077 /// Capabilities the current user has on this file. Each capability corresponds |
3063 * Capabilities the current user has on this file. Each capability corresponds | 3078 /// to a fine-grained action that a user may take. |
3064 * to a fine-grained action that a user may take. | |
3065 */ | |
3066 class FileCapabilities { | 3079 class FileCapabilities { |
3067 /** | 3080 /// Whether the current user can add children to this folder. This is always |
3068 * Whether the current user can add children to this folder. This is always | 3081 /// false when the item is not a folder. |
3069 * false when the item is not a folder. | |
3070 */ | |
3071 core.bool canAddChildren; | 3082 core.bool canAddChildren; |
3072 /** | 3083 |
3073 * Whether the current user can change whether viewers can copy the contents | 3084 /// Whether the current user can change whether viewers can copy the contents |
3074 * of this file. | 3085 /// of this file. |
3075 */ | |
3076 core.bool canChangeViewersCanCopyContent; | 3086 core.bool canChangeViewersCanCopyContent; |
3077 /** Whether the current user can comment on this file. */ | 3087 |
| 3088 /// Whether the current user can comment on this file. |
3078 core.bool canComment; | 3089 core.bool canComment; |
3079 /** | 3090 |
3080 * Whether the current user can copy this file. For a Team Drive item, whether | 3091 /// Whether the current user can copy this file. For a Team Drive item, |
3081 * the current user can copy non-folder descendants of this item, or this item | 3092 /// whether the current user can copy non-folder descendants of this item, or |
3082 * itself if it is not a folder. | 3093 /// this item itself if it is not a folder. |
3083 */ | |
3084 core.bool canCopy; | 3094 core.bool canCopy; |
3085 /** Whether the current user can delete this file. */ | 3095 |
| 3096 /// Whether the current user can delete this file. |
3086 core.bool canDelete; | 3097 core.bool canDelete; |
3087 /** Whether the current user can download this file. */ | 3098 |
| 3099 /// Whether the current user can download this file. |
3088 core.bool canDownload; | 3100 core.bool canDownload; |
3089 /** Whether the current user can edit this file. */ | 3101 |
| 3102 /// Whether the current user can edit this file. |
3090 core.bool canEdit; | 3103 core.bool canEdit; |
3091 /** | 3104 |
3092 * Whether the current user can list the children of this folder. This is | 3105 /// Whether the current user can list the children of this folder. This is |
3093 * always false when the item is not a folder. | 3106 /// always false when the item is not a folder. |
3094 */ | |
3095 core.bool canListChildren; | 3107 core.bool canListChildren; |
3096 /** | 3108 |
3097 * Whether the current user can move this item into a Team Drive. If the item | 3109 /// Whether the current user can move this item into a Team Drive. If the |
3098 * is in a Team Drive, this field is equivalent to canMoveTeamDriveItem. | 3110 /// item is in a Team Drive, this field is equivalent to |
3099 */ | 3111 /// canMoveTeamDriveItem. |
3100 core.bool canMoveItemIntoTeamDrive; | 3112 core.bool canMoveItemIntoTeamDrive; |
3101 /** | 3113 |
3102 * Whether the current user can move this Team Drive item by changing its | 3114 /// Whether the current user can move this Team Drive item by changing its |
3103 * parent. Note that a request to change the parent for this item may still | 3115 /// parent. Note that a request to change the parent for this item may still |
3104 * fail depending on the new parent that is being added. Only populated for | 3116 /// fail depending on the new parent that is being added. Only populated for |
3105 * Team Drive files. | 3117 /// Team Drive files. |
3106 */ | |
3107 core.bool canMoveTeamDriveItem; | 3118 core.bool canMoveTeamDriveItem; |
3108 /** | 3119 |
3109 * Whether the current user can read the revisions resource of this file. For | 3120 /// Whether the current user can read the revisions resource of this file. |
3110 * a Team Drive item, whether revisions of non-folder descendants of this | 3121 /// For a Team Drive item, whether revisions of non-folder descendants of |
3111 * item, or this item itself if it is not a folder, can be read. | 3122 /// this item, or this item itself if it is not a folder, can be read. |
3112 */ | |
3113 core.bool canReadRevisions; | 3123 core.bool canReadRevisions; |
3114 /** | 3124 |
3115 * Whether the current user can read the Team Drive to which this file | 3125 /// Whether the current user can read the Team Drive to which this file |
3116 * belongs. Only populated for Team Drive files. | 3126 /// belongs. Only populated for Team Drive files. |
3117 */ | |
3118 core.bool canReadTeamDrive; | 3127 core.bool canReadTeamDrive; |
3119 /** | 3128 |
3120 * Whether the current user can remove children from this folder. This is | 3129 /// Whether the current user can remove children from this folder. This is |
3121 * always false when the item is not a folder. | 3130 /// always false when the item is not a folder. |
3122 */ | |
3123 core.bool canRemoveChildren; | 3131 core.bool canRemoveChildren; |
3124 /** Whether the current user can rename this file. */ | 3132 |
| 3133 /// Whether the current user can rename this file. |
3125 core.bool canRename; | 3134 core.bool canRename; |
3126 /** | 3135 |
3127 * Whether the current user can modify the sharing settings for this file. | 3136 /// Whether the current user can modify the sharing settings for this file. |
3128 */ | |
3129 core.bool canShare; | 3137 core.bool canShare; |
3130 /** Whether the current user can move this file to trash. */ | 3138 |
| 3139 /// Whether the current user can move this file to trash. |
3131 core.bool canTrash; | 3140 core.bool canTrash; |
3132 /** Whether the current user can restore this file from trash. */ | 3141 |
| 3142 /// Whether the current user can restore this file from trash. |
3133 core.bool canUntrash; | 3143 core.bool canUntrash; |
3134 | 3144 |
3135 FileCapabilities(); | 3145 FileCapabilities(); |
3136 | 3146 |
3137 FileCapabilities.fromJson(core.Map _json) { | 3147 FileCapabilities.fromJson(core.Map _json) { |
3138 if (_json.containsKey("canAddChildren")) { | 3148 if (_json.containsKey("canAddChildren")) { |
3139 canAddChildren = _json["canAddChildren"]; | 3149 canAddChildren = _json["canAddChildren"]; |
3140 } | 3150 } |
3141 if (_json.containsKey("canChangeViewersCanCopyContent")) { | 3151 if (_json.containsKey("canChangeViewersCanCopyContent")) { |
3142 canChangeViewersCanCopyContent = _json["canChangeViewersCanCopyContent"]; | 3152 canChangeViewersCanCopyContent = _json["canChangeViewersCanCopyContent"]; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3182 } | 3192 } |
3183 if (_json.containsKey("canTrash")) { | 3193 if (_json.containsKey("canTrash")) { |
3184 canTrash = _json["canTrash"]; | 3194 canTrash = _json["canTrash"]; |
3185 } | 3195 } |
3186 if (_json.containsKey("canUntrash")) { | 3196 if (_json.containsKey("canUntrash")) { |
3187 canUntrash = _json["canUntrash"]; | 3197 canUntrash = _json["canUntrash"]; |
3188 } | 3198 } |
3189 } | 3199 } |
3190 | 3200 |
3191 core.Map<core.String, core.Object> toJson() { | 3201 core.Map<core.String, core.Object> toJson() { |
3192 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3202 final core.Map<core.String, core.Object> _json = |
| 3203 new core.Map<core.String, core.Object>(); |
3193 if (canAddChildren != null) { | 3204 if (canAddChildren != null) { |
3194 _json["canAddChildren"] = canAddChildren; | 3205 _json["canAddChildren"] = canAddChildren; |
3195 } | 3206 } |
3196 if (canChangeViewersCanCopyContent != null) { | 3207 if (canChangeViewersCanCopyContent != null) { |
3197 _json["canChangeViewersCanCopyContent"] = canChangeViewersCanCopyContent; | 3208 _json["canChangeViewersCanCopyContent"] = canChangeViewersCanCopyContent; |
3198 } | 3209 } |
3199 if (canComment != null) { | 3210 if (canComment != null) { |
3200 _json["canComment"] = canComment; | 3211 _json["canComment"] = canComment; |
3201 } | 3212 } |
3202 if (canCopy != null) { | 3213 if (canCopy != null) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3238 if (canTrash != null) { | 3249 if (canTrash != null) { |
3239 _json["canTrash"] = canTrash; | 3250 _json["canTrash"] = canTrash; |
3240 } | 3251 } |
3241 if (canUntrash != null) { | 3252 if (canUntrash != null) { |
3242 _json["canUntrash"] = canUntrash; | 3253 _json["canUntrash"] = canUntrash; |
3243 } | 3254 } |
3244 return _json; | 3255 return _json; |
3245 } | 3256 } |
3246 } | 3257 } |
3247 | 3258 |
3248 /** | 3259 /// A thumbnail for the file. This will only be used if Drive cannot generate a |
3249 * A thumbnail for the file. This will only be used if Drive cannot generate a | 3260 /// standard thumbnail. |
3250 * standard thumbnail. | |
3251 */ | |
3252 class FileContentHintsThumbnail { | 3261 class FileContentHintsThumbnail { |
3253 /** The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). */ | 3262 /// The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). |
3254 core.String image; | 3263 core.String image; |
3255 core.List<core.int> get imageAsBytes { | 3264 core.List<core.int> get imageAsBytes { |
3256 return convert.BASE64.decode(image); | 3265 return convert.BASE64.decode(image); |
3257 } | 3266 } |
3258 | 3267 |
3259 void set imageAsBytes(core.List<core.int> _bytes) { | 3268 void set imageAsBytes(core.List<core.int> _bytes) { |
3260 image = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "
-"); | 3269 image = |
| 3270 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
3261 } | 3271 } |
3262 /** The MIME type of the thumbnail. */ | 3272 |
| 3273 /// The MIME type of the thumbnail. |
3263 core.String mimeType; | 3274 core.String mimeType; |
3264 | 3275 |
3265 FileContentHintsThumbnail(); | 3276 FileContentHintsThumbnail(); |
3266 | 3277 |
3267 FileContentHintsThumbnail.fromJson(core.Map _json) { | 3278 FileContentHintsThumbnail.fromJson(core.Map _json) { |
3268 if (_json.containsKey("image")) { | 3279 if (_json.containsKey("image")) { |
3269 image = _json["image"]; | 3280 image = _json["image"]; |
3270 } | 3281 } |
3271 if (_json.containsKey("mimeType")) { | 3282 if (_json.containsKey("mimeType")) { |
3272 mimeType = _json["mimeType"]; | 3283 mimeType = _json["mimeType"]; |
3273 } | 3284 } |
3274 } | 3285 } |
3275 | 3286 |
3276 core.Map<core.String, core.Object> toJson() { | 3287 core.Map<core.String, core.Object> toJson() { |
3277 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3288 final core.Map<core.String, core.Object> _json = |
| 3289 new core.Map<core.String, core.Object>(); |
3278 if (image != null) { | 3290 if (image != null) { |
3279 _json["image"] = image; | 3291 _json["image"] = image; |
3280 } | 3292 } |
3281 if (mimeType != null) { | 3293 if (mimeType != null) { |
3282 _json["mimeType"] = mimeType; | 3294 _json["mimeType"] = mimeType; |
3283 } | 3295 } |
3284 return _json; | 3296 return _json; |
3285 } | 3297 } |
3286 } | 3298 } |
3287 | 3299 |
3288 /** | 3300 /// Additional information about the content of the file. These fields are |
3289 * Additional information about the content of the file. These fields are never | 3301 /// never populated in responses. |
3290 * populated in responses. | |
3291 */ | |
3292 class FileContentHints { | 3302 class FileContentHints { |
3293 /** | 3303 /// Text to be indexed for the file to improve fullText queries. This is |
3294 * Text to be indexed for the file to improve fullText queries. This is | 3304 /// limited to 128KB in length and may contain HTML elements. |
3295 * limited to 128KB in length and may contain HTML elements. | |
3296 */ | |
3297 core.String indexableText; | 3305 core.String indexableText; |
3298 /** | 3306 |
3299 * A thumbnail for the file. This will only be used if Drive cannot generate a | 3307 /// A thumbnail for the file. This will only be used if Drive cannot generate |
3300 * standard thumbnail. | 3308 /// a standard thumbnail. |
3301 */ | |
3302 FileContentHintsThumbnail thumbnail; | 3309 FileContentHintsThumbnail thumbnail; |
3303 | 3310 |
3304 FileContentHints(); | 3311 FileContentHints(); |
3305 | 3312 |
3306 FileContentHints.fromJson(core.Map _json) { | 3313 FileContentHints.fromJson(core.Map _json) { |
3307 if (_json.containsKey("indexableText")) { | 3314 if (_json.containsKey("indexableText")) { |
3308 indexableText = _json["indexableText"]; | 3315 indexableText = _json["indexableText"]; |
3309 } | 3316 } |
3310 if (_json.containsKey("thumbnail")) { | 3317 if (_json.containsKey("thumbnail")) { |
3311 thumbnail = new FileContentHintsThumbnail.fromJson(_json["thumbnail"]); | 3318 thumbnail = new FileContentHintsThumbnail.fromJson(_json["thumbnail"]); |
3312 } | 3319 } |
3313 } | 3320 } |
3314 | 3321 |
3315 core.Map<core.String, core.Object> toJson() { | 3322 core.Map<core.String, core.Object> toJson() { |
3316 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3323 final core.Map<core.String, core.Object> _json = |
| 3324 new core.Map<core.String, core.Object>(); |
3317 if (indexableText != null) { | 3325 if (indexableText != null) { |
3318 _json["indexableText"] = indexableText; | 3326 _json["indexableText"] = indexableText; |
3319 } | 3327 } |
3320 if (thumbnail != null) { | 3328 if (thumbnail != null) { |
3321 _json["thumbnail"] = (thumbnail).toJson(); | 3329 _json["thumbnail"] = (thumbnail).toJson(); |
3322 } | 3330 } |
3323 return _json; | 3331 return _json; |
3324 } | 3332 } |
3325 } | 3333 } |
3326 | 3334 |
3327 /** Geographic location information stored in the image. */ | 3335 /// Geographic location information stored in the image. |
3328 class FileImageMediaMetadataLocation { | 3336 class FileImageMediaMetadataLocation { |
3329 /** The altitude stored in the image. */ | 3337 /// The altitude stored in the image. |
3330 core.double altitude; | 3338 core.double altitude; |
3331 /** The latitude stored in the image. */ | 3339 |
| 3340 /// The latitude stored in the image. |
3332 core.double latitude; | 3341 core.double latitude; |
3333 /** The longitude stored in the image. */ | 3342 |
| 3343 /// The longitude stored in the image. |
3334 core.double longitude; | 3344 core.double longitude; |
3335 | 3345 |
3336 FileImageMediaMetadataLocation(); | 3346 FileImageMediaMetadataLocation(); |
3337 | 3347 |
3338 FileImageMediaMetadataLocation.fromJson(core.Map _json) { | 3348 FileImageMediaMetadataLocation.fromJson(core.Map _json) { |
3339 if (_json.containsKey("altitude")) { | 3349 if (_json.containsKey("altitude")) { |
3340 altitude = _json["altitude"]; | 3350 altitude = _json["altitude"]; |
3341 } | 3351 } |
3342 if (_json.containsKey("latitude")) { | 3352 if (_json.containsKey("latitude")) { |
3343 latitude = _json["latitude"]; | 3353 latitude = _json["latitude"]; |
3344 } | 3354 } |
3345 if (_json.containsKey("longitude")) { | 3355 if (_json.containsKey("longitude")) { |
3346 longitude = _json["longitude"]; | 3356 longitude = _json["longitude"]; |
3347 } | 3357 } |
3348 } | 3358 } |
3349 | 3359 |
3350 core.Map<core.String, core.Object> toJson() { | 3360 core.Map<core.String, core.Object> toJson() { |
3351 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3361 final core.Map<core.String, core.Object> _json = |
| 3362 new core.Map<core.String, core.Object>(); |
3352 if (altitude != null) { | 3363 if (altitude != null) { |
3353 _json["altitude"] = altitude; | 3364 _json["altitude"] = altitude; |
3354 } | 3365 } |
3355 if (latitude != null) { | 3366 if (latitude != null) { |
3356 _json["latitude"] = latitude; | 3367 _json["latitude"] = latitude; |
3357 } | 3368 } |
3358 if (longitude != null) { | 3369 if (longitude != null) { |
3359 _json["longitude"] = longitude; | 3370 _json["longitude"] = longitude; |
3360 } | 3371 } |
3361 return _json; | 3372 return _json; |
3362 } | 3373 } |
3363 } | 3374 } |
3364 | 3375 |
3365 /** Additional metadata about image media, if available. */ | 3376 /// Additional metadata about image media, if available. |
3366 class FileImageMediaMetadata { | 3377 class FileImageMediaMetadata { |
3367 /** The aperture used to create the photo (f-number). */ | 3378 /// The aperture used to create the photo (f-number). |
3368 core.double aperture; | 3379 core.double aperture; |
3369 /** The make of the camera used to create the photo. */ | 3380 |
| 3381 /// The make of the camera used to create the photo. |
3370 core.String cameraMake; | 3382 core.String cameraMake; |
3371 /** The model of the camera used to create the photo. */ | 3383 |
| 3384 /// The model of the camera used to create the photo. |
3372 core.String cameraModel; | 3385 core.String cameraModel; |
3373 /** The color space of the photo. */ | 3386 |
| 3387 /// The color space of the photo. |
3374 core.String colorSpace; | 3388 core.String colorSpace; |
3375 /** The exposure bias of the photo (APEX value). */ | 3389 |
| 3390 /// The exposure bias of the photo (APEX value). |
3376 core.double exposureBias; | 3391 core.double exposureBias; |
3377 /** The exposure mode used to create the photo. */ | 3392 |
| 3393 /// The exposure mode used to create the photo. |
3378 core.String exposureMode; | 3394 core.String exposureMode; |
3379 /** The length of the exposure, in seconds. */ | 3395 |
| 3396 /// The length of the exposure, in seconds. |
3380 core.double exposureTime; | 3397 core.double exposureTime; |
3381 /** Whether a flash was used to create the photo. */ | 3398 |
| 3399 /// Whether a flash was used to create the photo. |
3382 core.bool flashUsed; | 3400 core.bool flashUsed; |
3383 /** The focal length used to create the photo, in millimeters. */ | 3401 |
| 3402 /// The focal length used to create the photo, in millimeters. |
3384 core.double focalLength; | 3403 core.double focalLength; |
3385 /** The height of the image in pixels. */ | 3404 |
| 3405 /// The height of the image in pixels. |
3386 core.int height; | 3406 core.int height; |
3387 /** The ISO speed used to create the photo. */ | 3407 |
| 3408 /// The ISO speed used to create the photo. |
3388 core.int isoSpeed; | 3409 core.int isoSpeed; |
3389 /** The lens used to create the photo. */ | 3410 |
| 3411 /// The lens used to create the photo. |
3390 core.String lens; | 3412 core.String lens; |
3391 /** Geographic location information stored in the image. */ | 3413 |
| 3414 /// Geographic location information stored in the image. |
3392 FileImageMediaMetadataLocation location; | 3415 FileImageMediaMetadataLocation location; |
3393 /** | 3416 |
3394 * The smallest f-number of the lens at the focal length used to create the | 3417 /// The smallest f-number of the lens at the focal length used to create the |
3395 * photo (APEX value). | 3418 /// photo (APEX value). |
3396 */ | |
3397 core.double maxApertureValue; | 3419 core.double maxApertureValue; |
3398 /** The metering mode used to create the photo. */ | 3420 |
| 3421 /// The metering mode used to create the photo. |
3399 core.String meteringMode; | 3422 core.String meteringMode; |
3400 /** | 3423 |
3401 * The rotation in clockwise degrees from the image's original orientation. | 3424 /// The rotation in clockwise degrees from the image's original orientation. |
3402 */ | |
3403 core.int rotation; | 3425 core.int rotation; |
3404 /** The type of sensor used to create the photo. */ | 3426 |
| 3427 /// The type of sensor used to create the photo. |
3405 core.String sensor; | 3428 core.String sensor; |
3406 /** The distance to the subject of the photo, in meters. */ | 3429 |
| 3430 /// The distance to the subject of the photo, in meters. |
3407 core.int subjectDistance; | 3431 core.int subjectDistance; |
3408 /** The date and time the photo was taken (EXIF DateTime). */ | 3432 |
| 3433 /// The date and time the photo was taken (EXIF DateTime). |
3409 core.String time; | 3434 core.String time; |
3410 /** The white balance mode used to create the photo. */ | 3435 |
| 3436 /// The white balance mode used to create the photo. |
3411 core.String whiteBalance; | 3437 core.String whiteBalance; |
3412 /** The width of the image in pixels. */ | 3438 |
| 3439 /// The width of the image in pixels. |
3413 core.int width; | 3440 core.int width; |
3414 | 3441 |
3415 FileImageMediaMetadata(); | 3442 FileImageMediaMetadata(); |
3416 | 3443 |
3417 FileImageMediaMetadata.fromJson(core.Map _json) { | 3444 FileImageMediaMetadata.fromJson(core.Map _json) { |
3418 if (_json.containsKey("aperture")) { | 3445 if (_json.containsKey("aperture")) { |
3419 aperture = _json["aperture"]; | 3446 aperture = _json["aperture"]; |
3420 } | 3447 } |
3421 if (_json.containsKey("cameraMake")) { | 3448 if (_json.containsKey("cameraMake")) { |
3422 cameraMake = _json["cameraMake"]; | 3449 cameraMake = _json["cameraMake"]; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3474 } | 3501 } |
3475 if (_json.containsKey("whiteBalance")) { | 3502 if (_json.containsKey("whiteBalance")) { |
3476 whiteBalance = _json["whiteBalance"]; | 3503 whiteBalance = _json["whiteBalance"]; |
3477 } | 3504 } |
3478 if (_json.containsKey("width")) { | 3505 if (_json.containsKey("width")) { |
3479 width = _json["width"]; | 3506 width = _json["width"]; |
3480 } | 3507 } |
3481 } | 3508 } |
3482 | 3509 |
3483 core.Map<core.String, core.Object> toJson() { | 3510 core.Map<core.String, core.Object> toJson() { |
3484 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3511 final core.Map<core.String, core.Object> _json = |
| 3512 new core.Map<core.String, core.Object>(); |
3485 if (aperture != null) { | 3513 if (aperture != null) { |
3486 _json["aperture"] = aperture; | 3514 _json["aperture"] = aperture; |
3487 } | 3515 } |
3488 if (cameraMake != null) { | 3516 if (cameraMake != null) { |
3489 _json["cameraMake"] = cameraMake; | 3517 _json["cameraMake"] = cameraMake; |
3490 } | 3518 } |
3491 if (cameraModel != null) { | 3519 if (cameraModel != null) { |
3492 _json["cameraModel"] = cameraModel; | 3520 _json["cameraModel"] = cameraModel; |
3493 } | 3521 } |
3494 if (colorSpace != null) { | 3522 if (colorSpace != null) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3542 if (whiteBalance != null) { | 3570 if (whiteBalance != null) { |
3543 _json["whiteBalance"] = whiteBalance; | 3571 _json["whiteBalance"] = whiteBalance; |
3544 } | 3572 } |
3545 if (width != null) { | 3573 if (width != null) { |
3546 _json["width"] = width; | 3574 _json["width"] = width; |
3547 } | 3575 } |
3548 return _json; | 3576 return _json; |
3549 } | 3577 } |
3550 } | 3578 } |
3551 | 3579 |
3552 /** | 3580 /// Additional metadata about video media. This may not be available |
3553 * Additional metadata about video media. This may not be available immediately | 3581 /// immediately upon upload. |
3554 * upon upload. | |
3555 */ | |
3556 class FileVideoMediaMetadata { | 3582 class FileVideoMediaMetadata { |
3557 /** The duration of the video in milliseconds. */ | 3583 /// The duration of the video in milliseconds. |
3558 core.String durationMillis; | 3584 core.String durationMillis; |
3559 /** The height of the video in pixels. */ | 3585 |
| 3586 /// The height of the video in pixels. |
3560 core.int height; | 3587 core.int height; |
3561 /** The width of the video in pixels. */ | 3588 |
| 3589 /// The width of the video in pixels. |
3562 core.int width; | 3590 core.int width; |
3563 | 3591 |
3564 FileVideoMediaMetadata(); | 3592 FileVideoMediaMetadata(); |
3565 | 3593 |
3566 FileVideoMediaMetadata.fromJson(core.Map _json) { | 3594 FileVideoMediaMetadata.fromJson(core.Map _json) { |
3567 if (_json.containsKey("durationMillis")) { | 3595 if (_json.containsKey("durationMillis")) { |
3568 durationMillis = _json["durationMillis"]; | 3596 durationMillis = _json["durationMillis"]; |
3569 } | 3597 } |
3570 if (_json.containsKey("height")) { | 3598 if (_json.containsKey("height")) { |
3571 height = _json["height"]; | 3599 height = _json["height"]; |
3572 } | 3600 } |
3573 if (_json.containsKey("width")) { | 3601 if (_json.containsKey("width")) { |
3574 width = _json["width"]; | 3602 width = _json["width"]; |
3575 } | 3603 } |
3576 } | 3604 } |
3577 | 3605 |
3578 core.Map<core.String, core.Object> toJson() { | 3606 core.Map<core.String, core.Object> toJson() { |
3579 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3607 final core.Map<core.String, core.Object> _json = |
| 3608 new core.Map<core.String, core.Object>(); |
3580 if (durationMillis != null) { | 3609 if (durationMillis != null) { |
3581 _json["durationMillis"] = durationMillis; | 3610 _json["durationMillis"] = durationMillis; |
3582 } | 3611 } |
3583 if (height != null) { | 3612 if (height != null) { |
3584 _json["height"] = height; | 3613 _json["height"] = height; |
3585 } | 3614 } |
3586 if (width != null) { | 3615 if (width != null) { |
3587 _json["width"] = width; | 3616 _json["width"] = width; |
3588 } | 3617 } |
3589 return _json; | 3618 return _json; |
3590 } | 3619 } |
3591 } | 3620 } |
3592 | 3621 |
3593 /** The metadata for a file. */ | 3622 /// The metadata for a file. |
3594 class File { | 3623 class File { |
3595 /** | 3624 /// A collection of arbitrary key-value pairs which are private to the |
3596 * A collection of arbitrary key-value pairs which are private to the | 3625 /// requesting app. |
3597 * requesting app. | 3626 /// Entries with null values are cleared in update and copy requests. |
3598 * Entries with null values are cleared in update and copy requests. | |
3599 */ | |
3600 core.Map<core.String, core.String> appProperties; | 3627 core.Map<core.String, core.String> appProperties; |
3601 /** | 3628 |
3602 * Capabilities the current user has on this file. Each capability corresponds | 3629 /// Capabilities the current user has on this file. Each capability |
3603 * to a fine-grained action that a user may take. | 3630 /// corresponds to a fine-grained action that a user may take. |
3604 */ | |
3605 FileCapabilities capabilities; | 3631 FileCapabilities capabilities; |
3606 /** | 3632 |
3607 * Additional information about the content of the file. These fields are | 3633 /// Additional information about the content of the file. These fields are |
3608 * never populated in responses. | 3634 /// never populated in responses. |
3609 */ | |
3610 FileContentHints contentHints; | 3635 FileContentHints contentHints; |
3611 /** The time at which the file was created (RFC 3339 date-time). */ | 3636 |
| 3637 /// The time at which the file was created (RFC 3339 date-time). |
3612 core.DateTime createdTime; | 3638 core.DateTime createdTime; |
3613 /** A short description of the file. */ | 3639 |
| 3640 /// A short description of the file. |
3614 core.String description; | 3641 core.String description; |
3615 /** | 3642 |
3616 * Whether the file has been explicitly trashed, as opposed to recursively | 3643 /// Whether the file has been explicitly trashed, as opposed to recursively |
3617 * trashed from a parent folder. | 3644 /// trashed from a parent folder. |
3618 */ | |
3619 core.bool explicitlyTrashed; | 3645 core.bool explicitlyTrashed; |
3620 /** | 3646 |
3621 * The final component of fullFileExtension. This is only available for files | 3647 /// The final component of fullFileExtension. This is only available for |
3622 * with binary content in Drive. | 3648 /// files with binary content in Drive. |
3623 */ | |
3624 core.String fileExtension; | 3649 core.String fileExtension; |
3625 /** | 3650 |
3626 * The color for a folder as an RGB hex string. The supported colors are | 3651 /// The color for a folder as an RGB hex string. The supported colors are |
3627 * published in the folderColorPalette field of the About resource. | 3652 /// published in the folderColorPalette field of the About resource. |
3628 * If an unsupported color is specified, the closest color in the palette will | 3653 /// If an unsupported color is specified, the closest color in the palette |
3629 * be used instead. | 3654 /// will be used instead. |
3630 */ | |
3631 core.String folderColorRgb; | 3655 core.String folderColorRgb; |
3632 /** | 3656 |
3633 * The full file extension extracted from the name field. May contain multiple | 3657 /// The full file extension extracted from the name field. May contain |
3634 * concatenated extensions, such as "tar.gz". This is only available for files | 3658 /// multiple concatenated extensions, such as "tar.gz". This is only |
3635 * with binary content in Drive. | 3659 /// available for files with binary content in Drive. |
3636 * This is automatically updated when the name field changes, however it is | 3660 /// This is automatically updated when the name field changes, however it is |
3637 * not cleared if the new name does not contain a valid extension. | 3661 /// not cleared if the new name does not contain a valid extension. |
3638 */ | |
3639 core.String fullFileExtension; | 3662 core.String fullFileExtension; |
3640 /** | 3663 |
3641 * Whether any users are granted file access directly on this file. This field | 3664 /// Whether any users are granted file access directly on this file. This |
3642 * is only populated for Team Drive files. | 3665 /// field is only populated for Team Drive files. |
3643 */ | |
3644 core.bool hasAugmentedPermissions; | 3666 core.bool hasAugmentedPermissions; |
3645 /** | 3667 |
3646 * Whether this file has a thumbnail. This does not indicate whether the | 3668 /// Whether this file has a thumbnail. This does not indicate whether the |
3647 * requesting app has access to the thumbnail. To check access, look for the | 3669 /// requesting app has access to the thumbnail. To check access, look for the |
3648 * presence of the thumbnailLink field. | 3670 /// presence of the thumbnailLink field. |
3649 */ | |
3650 core.bool hasThumbnail; | 3671 core.bool hasThumbnail; |
3651 /** | 3672 |
3652 * The ID of the file's head revision. This is currently only available for | 3673 /// The ID of the file's head revision. This is currently only available for |
3653 * files with binary content in Drive. | 3674 /// files with binary content in Drive. |
3654 */ | |
3655 core.String headRevisionId; | 3675 core.String headRevisionId; |
3656 /** A static, unauthenticated link to the file's icon. */ | 3676 |
| 3677 /// A static, unauthenticated link to the file's icon. |
3657 core.String iconLink; | 3678 core.String iconLink; |
3658 /** The ID of the file. */ | 3679 |
| 3680 /// The ID of the file. |
3659 core.String id; | 3681 core.String id; |
3660 /** Additional metadata about image media, if available. */ | 3682 |
| 3683 /// Additional metadata about image media, if available. |
3661 FileImageMediaMetadata imageMediaMetadata; | 3684 FileImageMediaMetadata imageMediaMetadata; |
3662 /** Whether the file was created or opened by the requesting app. */ | 3685 |
| 3686 /// Whether the file was created or opened by the requesting app. |
3663 core.bool isAppAuthorized; | 3687 core.bool isAppAuthorized; |
3664 /** | 3688 |
3665 * Identifies what kind of resource this is. Value: the fixed string | 3689 /// Identifies what kind of resource this is. Value: the fixed string |
3666 * "drive#file". | 3690 /// "drive#file". |
3667 */ | |
3668 core.String kind; | 3691 core.String kind; |
3669 /** The last user to modify the file. */ | 3692 |
| 3693 /// The last user to modify the file. |
3670 User lastModifyingUser; | 3694 User lastModifyingUser; |
3671 /** | 3695 |
3672 * The MD5 checksum for the content of the file. This is only applicable to | 3696 /// The MD5 checksum for the content of the file. This is only applicable to |
3673 * files with binary content in Drive. | 3697 /// files with binary content in Drive. |
3674 */ | |
3675 core.String md5Checksum; | 3698 core.String md5Checksum; |
3676 /** | 3699 |
3677 * The MIME type of the file. | 3700 /// The MIME type of the file. |
3678 * Drive will attempt to automatically detect an appropriate value from | 3701 /// Drive will attempt to automatically detect an appropriate value from |
3679 * uploaded content if no value is provided. The value cannot be changed | 3702 /// uploaded content if no value is provided. The value cannot be changed |
3680 * unless a new revision is uploaded. | 3703 /// unless a new revision is uploaded. |
3681 * If a file is created with a Google Doc MIME type, the uploaded content will | 3704 /// If a file is created with a Google Doc MIME type, the uploaded content |
3682 * be imported if possible. The supported import formats are published in the | 3705 /// will be imported if possible. The supported import formats are published |
3683 * About resource. | 3706 /// in the About resource. |
3684 */ | |
3685 core.String mimeType; | 3707 core.String mimeType; |
3686 /** Whether the file has been modified by this user. */ | 3708 |
| 3709 /// Whether the file has been modified by this user. |
3687 core.bool modifiedByMe; | 3710 core.bool modifiedByMe; |
3688 /** The last time the file was modified by the user (RFC 3339 date-time). */ | 3711 |
| 3712 /// The last time the file was modified by the user (RFC 3339 date-time). |
3689 core.DateTime modifiedByMeTime; | 3713 core.DateTime modifiedByMeTime; |
3690 /** | 3714 |
3691 * The last time the file was modified by anyone (RFC 3339 date-time). | 3715 /// The last time the file was modified by anyone (RFC 3339 date-time). |
3692 * Note that setting modifiedTime will also update modifiedByMeTime for the | 3716 /// Note that setting modifiedTime will also update modifiedByMeTime for the |
3693 * user. | 3717 /// user. |
3694 */ | |
3695 core.DateTime modifiedTime; | 3718 core.DateTime modifiedTime; |
3696 /** | 3719 |
3697 * The name of the file. This is not necessarily unique within a folder. Note | 3720 /// The name of the file. This is not necessarily unique within a folder. |
3698 * that for immutable items such as the top level folders of Team Drives, My | 3721 /// Note that for immutable items such as the top level folders of Team |
3699 * Drive root folder, and Application Data folder the name is constant. | 3722 /// Drives, My Drive root folder, and Application Data folder the name is |
3700 */ | 3723 /// constant. |
3701 core.String name; | 3724 core.String name; |
3702 /** | 3725 |
3703 * The original filename of the uploaded content if available, or else the | 3726 /// The original filename of the uploaded content if available, or else the |
3704 * original value of the name field. This is only available for files with | 3727 /// original value of the name field. This is only available for files with |
3705 * binary content in Drive. | 3728 /// binary content in Drive. |
3706 */ | |
3707 core.String originalFilename; | 3729 core.String originalFilename; |
3708 /** Whether the user owns the file. Not populated for Team Drive files. */ | 3730 |
| 3731 /// Whether the user owns the file. Not populated for Team Drive files. |
3709 core.bool ownedByMe; | 3732 core.bool ownedByMe; |
3710 /** | 3733 |
3711 * The owners of the file. Currently, only certain legacy files may have more | 3734 /// The owners of the file. Currently, only certain legacy files may have |
3712 * than one owner. Not populated for Team Drive files. | 3735 /// more than one owner. Not populated for Team Drive files. |
3713 */ | |
3714 core.List<User> owners; | 3736 core.List<User> owners; |
3715 /** | 3737 |
3716 * The IDs of the parent folders which contain the file. | 3738 /// The IDs of the parent folders which contain the file. |
3717 * If not specified as part of a create request, the file will be placed | 3739 /// If not specified as part of a create request, the file will be placed |
3718 * directly in the My Drive folder. Update requests must use the addParents | 3740 /// directly in the My Drive folder. Update requests must use the addParents |
3719 * and removeParents parameters to modify the values. | 3741 /// and removeParents parameters to modify the values. |
3720 */ | |
3721 core.List<core.String> parents; | 3742 core.List<core.String> parents; |
3722 /** | 3743 |
3723 * The full list of permissions for the file. This is only available if the | 3744 /// List of permission IDs for users with access to this file. |
3724 * requesting user can share the file. Not populated for Team Drive files. | 3745 core.List<core.String> permissionIds; |
3725 */ | 3746 |
| 3747 /// The full list of permissions for the file. This is only available if the |
| 3748 /// requesting user can share the file. Not populated for Team Drive files. |
3726 core.List<Permission> permissions; | 3749 core.List<Permission> permissions; |
3727 /** | 3750 |
3728 * A collection of arbitrary key-value pairs which are visible to all apps. | 3751 /// A collection of arbitrary key-value pairs which are visible to all apps. |
3729 * Entries with null values are cleared in update and copy requests. | 3752 /// Entries with null values are cleared in update and copy requests. |
3730 */ | |
3731 core.Map<core.String, core.String> properties; | 3753 core.Map<core.String, core.String> properties; |
3732 /** | 3754 |
3733 * The number of storage quota bytes used by the file. This includes the head | 3755 /// The number of storage quota bytes used by the file. This includes the |
3734 * revision as well as previous revisions with keepForever enabled. | 3756 /// head revision as well as previous revisions with keepForever enabled. |
3735 */ | |
3736 core.String quotaBytesUsed; | 3757 core.String quotaBytesUsed; |
3737 /** Whether the file has been shared. Not populated for Team Drive files. */ | 3758 |
| 3759 /// Whether the file has been shared. Not populated for Team Drive files. |
3738 core.bool shared; | 3760 core.bool shared; |
3739 /** | 3761 |
3740 * The time at which the file was shared with the user, if applicable (RFC | 3762 /// The time at which the file was shared with the user, if applicable (RFC |
3741 * 3339 date-time). | 3763 /// 3339 date-time). |
3742 */ | |
3743 core.DateTime sharedWithMeTime; | 3764 core.DateTime sharedWithMeTime; |
3744 /** The user who shared the file with the requesting user, if applicable. */ | 3765 |
| 3766 /// The user who shared the file with the requesting user, if applicable. |
3745 User sharingUser; | 3767 User sharingUser; |
3746 /** | 3768 |
3747 * The size of the file's content in bytes. This is only applicable to files | 3769 /// The size of the file's content in bytes. This is only applicable to files |
3748 * with binary content in Drive. | 3770 /// with binary content in Drive. |
3749 */ | |
3750 core.String size; | 3771 core.String size; |
3751 /** | 3772 |
3752 * The list of spaces which contain the file. The currently supported values | 3773 /// The list of spaces which contain the file. The currently supported values |
3753 * are 'drive', 'appDataFolder' and 'photos'. | 3774 /// are 'drive', 'appDataFolder' and 'photos'. |
3754 */ | |
3755 core.List<core.String> spaces; | 3775 core.List<core.String> spaces; |
3756 /** Whether the user has starred the file. */ | 3776 |
| 3777 /// Whether the user has starred the file. |
3757 core.bool starred; | 3778 core.bool starred; |
3758 /** ID of the Team Drive the file resides in. */ | 3779 |
| 3780 /// ID of the Team Drive the file resides in. |
3759 core.String teamDriveId; | 3781 core.String teamDriveId; |
3760 /** | 3782 |
3761 * A short-lived link to the file's thumbnail, if available. Typically lasts | 3783 /// A short-lived link to the file's thumbnail, if available. Typically lasts |
3762 * on the order of hours. Only populated when the requesting app can access | 3784 /// on the order of hours. Only populated when the requesting app can access |
3763 * the file's content. | 3785 /// the file's content. |
3764 */ | |
3765 core.String thumbnailLink; | 3786 core.String thumbnailLink; |
3766 /** The thumbnail version for use in thumbnail cache invalidation. */ | 3787 |
| 3788 /// The thumbnail version for use in thumbnail cache invalidation. |
3767 core.String thumbnailVersion; | 3789 core.String thumbnailVersion; |
3768 /** | 3790 |
3769 * Whether the file has been trashed, either explicitly or from a trashed | 3791 /// Whether the file has been trashed, either explicitly or from a trashed |
3770 * parent folder. Only the owner may trash a file, and other users cannot see | 3792 /// parent folder. Only the owner may trash a file, and other users cannot |
3771 * files in the owner's trash. | 3793 /// see files in the owner's trash. |
3772 */ | |
3773 core.bool trashed; | 3794 core.bool trashed; |
3774 /** | 3795 |
3775 * The time that the item was trashed (RFC 3339 date-time). Only populated for | 3796 /// The time that the item was trashed (RFC 3339 date-time). Only populated |
3776 * Team Drive files. | 3797 /// for Team Drive files. |
3777 */ | |
3778 core.DateTime trashedTime; | 3798 core.DateTime trashedTime; |
3779 /** | 3799 |
3780 * If the file has been explicitly trashed, the user who trashed it. Only | 3800 /// If the file has been explicitly trashed, the user who trashed it. Only |
3781 * populated for Team Drive files. | 3801 /// populated for Team Drive files. |
3782 */ | |
3783 User trashingUser; | 3802 User trashingUser; |
3784 /** | 3803 |
3785 * A monotonically increasing version number for the file. This reflects every | 3804 /// A monotonically increasing version number for the file. This reflects |
3786 * change made to the file on the server, even those not visible to the user. | 3805 /// every change made to the file on the server, even those not visible to |
3787 */ | 3806 /// the user. |
3788 core.String version; | 3807 core.String version; |
3789 /** | 3808 |
3790 * Additional metadata about video media. This may not be available | 3809 /// Additional metadata about video media. This may not be available |
3791 * immediately upon upload. | 3810 /// immediately upon upload. |
3792 */ | |
3793 FileVideoMediaMetadata videoMediaMetadata; | 3811 FileVideoMediaMetadata videoMediaMetadata; |
3794 /** Whether the file has been viewed by this user. */ | 3812 |
| 3813 /// Whether the file has been viewed by this user. |
3795 core.bool viewedByMe; | 3814 core.bool viewedByMe; |
3796 /** The last time the file was viewed by the user (RFC 3339 date-time). */ | 3815 |
| 3816 /// The last time the file was viewed by the user (RFC 3339 date-time). |
3797 core.DateTime viewedByMeTime; | 3817 core.DateTime viewedByMeTime; |
3798 /** | 3818 |
3799 * Whether users with only reader or commenter permission can copy the file's | 3819 /// Whether users with only reader or commenter permission can copy the |
3800 * content. This affects copy, download, and print operations. | 3820 /// file's content. This affects copy, download, and print operations. |
3801 */ | |
3802 core.bool viewersCanCopyContent; | 3821 core.bool viewersCanCopyContent; |
3803 /** | 3822 |
3804 * A link for downloading the content of the file in a browser. This is only | 3823 /// A link for downloading the content of the file in a browser. This is only |
3805 * available for files with binary content in Drive. | 3824 /// available for files with binary content in Drive. |
3806 */ | |
3807 core.String webContentLink; | 3825 core.String webContentLink; |
3808 /** | 3826 |
3809 * A link for opening the file in a relevant Google editor or viewer in a | 3827 /// A link for opening the file in a relevant Google editor or viewer in a |
3810 * browser. | 3828 /// browser. |
3811 */ | |
3812 core.String webViewLink; | 3829 core.String webViewLink; |
3813 /** | 3830 |
3814 * Whether users with only writer permission can modify the file's | 3831 /// Whether users with only writer permission can modify the file's |
3815 * permissions. Not populated for Team Drive files. | 3832 /// permissions. Not populated for Team Drive files. |
3816 */ | |
3817 core.bool writersCanShare; | 3833 core.bool writersCanShare; |
3818 | 3834 |
3819 File(); | 3835 File(); |
3820 | 3836 |
3821 File.fromJson(core.Map _json) { | 3837 File.fromJson(core.Map _json) { |
3822 if (_json.containsKey("appProperties")) { | 3838 if (_json.containsKey("appProperties")) { |
3823 appProperties = _json["appProperties"]; | 3839 appProperties = _json["appProperties"]; |
3824 } | 3840 } |
3825 if (_json.containsKey("capabilities")) { | 3841 if (_json.containsKey("capabilities")) { |
3826 capabilities = new FileCapabilities.fromJson(_json["capabilities"]); | 3842 capabilities = new FileCapabilities.fromJson(_json["capabilities"]); |
(...skipping 28 matching lines...) Expand all Loading... |
3855 if (_json.containsKey("headRevisionId")) { | 3871 if (_json.containsKey("headRevisionId")) { |
3856 headRevisionId = _json["headRevisionId"]; | 3872 headRevisionId = _json["headRevisionId"]; |
3857 } | 3873 } |
3858 if (_json.containsKey("iconLink")) { | 3874 if (_json.containsKey("iconLink")) { |
3859 iconLink = _json["iconLink"]; | 3875 iconLink = _json["iconLink"]; |
3860 } | 3876 } |
3861 if (_json.containsKey("id")) { | 3877 if (_json.containsKey("id")) { |
3862 id = _json["id"]; | 3878 id = _json["id"]; |
3863 } | 3879 } |
3864 if (_json.containsKey("imageMediaMetadata")) { | 3880 if (_json.containsKey("imageMediaMetadata")) { |
3865 imageMediaMetadata = new FileImageMediaMetadata.fromJson(_json["imageMedia
Metadata"]); | 3881 imageMediaMetadata = |
| 3882 new FileImageMediaMetadata.fromJson(_json["imageMediaMetadata"]); |
3866 } | 3883 } |
3867 if (_json.containsKey("isAppAuthorized")) { | 3884 if (_json.containsKey("isAppAuthorized")) { |
3868 isAppAuthorized = _json["isAppAuthorized"]; | 3885 isAppAuthorized = _json["isAppAuthorized"]; |
3869 } | 3886 } |
3870 if (_json.containsKey("kind")) { | 3887 if (_json.containsKey("kind")) { |
3871 kind = _json["kind"]; | 3888 kind = _json["kind"]; |
3872 } | 3889 } |
3873 if (_json.containsKey("lastModifyingUser")) { | 3890 if (_json.containsKey("lastModifyingUser")) { |
3874 lastModifyingUser = new User.fromJson(_json["lastModifyingUser"]); | 3891 lastModifyingUser = new User.fromJson(_json["lastModifyingUser"]); |
3875 } | 3892 } |
(...skipping 15 matching lines...) Expand all Loading... |
3891 if (_json.containsKey("name")) { | 3908 if (_json.containsKey("name")) { |
3892 name = _json["name"]; | 3909 name = _json["name"]; |
3893 } | 3910 } |
3894 if (_json.containsKey("originalFilename")) { | 3911 if (_json.containsKey("originalFilename")) { |
3895 originalFilename = _json["originalFilename"]; | 3912 originalFilename = _json["originalFilename"]; |
3896 } | 3913 } |
3897 if (_json.containsKey("ownedByMe")) { | 3914 if (_json.containsKey("ownedByMe")) { |
3898 ownedByMe = _json["ownedByMe"]; | 3915 ownedByMe = _json["ownedByMe"]; |
3899 } | 3916 } |
3900 if (_json.containsKey("owners")) { | 3917 if (_json.containsKey("owners")) { |
3901 owners = _json["owners"].map((value) => new User.fromJson(value)).toList()
; | 3918 owners = |
| 3919 _json["owners"].map((value) => new User.fromJson(value)).toList(); |
3902 } | 3920 } |
3903 if (_json.containsKey("parents")) { | 3921 if (_json.containsKey("parents")) { |
3904 parents = _json["parents"]; | 3922 parents = _json["parents"]; |
3905 } | 3923 } |
| 3924 if (_json.containsKey("permissionIds")) { |
| 3925 permissionIds = _json["permissionIds"]; |
| 3926 } |
3906 if (_json.containsKey("permissions")) { | 3927 if (_json.containsKey("permissions")) { |
3907 permissions = _json["permissions"].map((value) => new Permission.fromJson(
value)).toList(); | 3928 permissions = _json["permissions"] |
| 3929 .map((value) => new Permission.fromJson(value)) |
| 3930 .toList(); |
3908 } | 3931 } |
3909 if (_json.containsKey("properties")) { | 3932 if (_json.containsKey("properties")) { |
3910 properties = _json["properties"]; | 3933 properties = _json["properties"]; |
3911 } | 3934 } |
3912 if (_json.containsKey("quotaBytesUsed")) { | 3935 if (_json.containsKey("quotaBytesUsed")) { |
3913 quotaBytesUsed = _json["quotaBytesUsed"]; | 3936 quotaBytesUsed = _json["quotaBytesUsed"]; |
3914 } | 3937 } |
3915 if (_json.containsKey("shared")) { | 3938 if (_json.containsKey("shared")) { |
3916 shared = _json["shared"]; | 3939 shared = _json["shared"]; |
3917 } | 3940 } |
(...skipping 27 matching lines...) Expand all Loading... |
3945 if (_json.containsKey("trashedTime")) { | 3968 if (_json.containsKey("trashedTime")) { |
3946 trashedTime = core.DateTime.parse(_json["trashedTime"]); | 3969 trashedTime = core.DateTime.parse(_json["trashedTime"]); |
3947 } | 3970 } |
3948 if (_json.containsKey("trashingUser")) { | 3971 if (_json.containsKey("trashingUser")) { |
3949 trashingUser = new User.fromJson(_json["trashingUser"]); | 3972 trashingUser = new User.fromJson(_json["trashingUser"]); |
3950 } | 3973 } |
3951 if (_json.containsKey("version")) { | 3974 if (_json.containsKey("version")) { |
3952 version = _json["version"]; | 3975 version = _json["version"]; |
3953 } | 3976 } |
3954 if (_json.containsKey("videoMediaMetadata")) { | 3977 if (_json.containsKey("videoMediaMetadata")) { |
3955 videoMediaMetadata = new FileVideoMediaMetadata.fromJson(_json["videoMedia
Metadata"]); | 3978 videoMediaMetadata = |
| 3979 new FileVideoMediaMetadata.fromJson(_json["videoMediaMetadata"]); |
3956 } | 3980 } |
3957 if (_json.containsKey("viewedByMe")) { | 3981 if (_json.containsKey("viewedByMe")) { |
3958 viewedByMe = _json["viewedByMe"]; | 3982 viewedByMe = _json["viewedByMe"]; |
3959 } | 3983 } |
3960 if (_json.containsKey("viewedByMeTime")) { | 3984 if (_json.containsKey("viewedByMeTime")) { |
3961 viewedByMeTime = core.DateTime.parse(_json["viewedByMeTime"]); | 3985 viewedByMeTime = core.DateTime.parse(_json["viewedByMeTime"]); |
3962 } | 3986 } |
3963 if (_json.containsKey("viewersCanCopyContent")) { | 3987 if (_json.containsKey("viewersCanCopyContent")) { |
3964 viewersCanCopyContent = _json["viewersCanCopyContent"]; | 3988 viewersCanCopyContent = _json["viewersCanCopyContent"]; |
3965 } | 3989 } |
3966 if (_json.containsKey("webContentLink")) { | 3990 if (_json.containsKey("webContentLink")) { |
3967 webContentLink = _json["webContentLink"]; | 3991 webContentLink = _json["webContentLink"]; |
3968 } | 3992 } |
3969 if (_json.containsKey("webViewLink")) { | 3993 if (_json.containsKey("webViewLink")) { |
3970 webViewLink = _json["webViewLink"]; | 3994 webViewLink = _json["webViewLink"]; |
3971 } | 3995 } |
3972 if (_json.containsKey("writersCanShare")) { | 3996 if (_json.containsKey("writersCanShare")) { |
3973 writersCanShare = _json["writersCanShare"]; | 3997 writersCanShare = _json["writersCanShare"]; |
3974 } | 3998 } |
3975 } | 3999 } |
3976 | 4000 |
3977 core.Map<core.String, core.Object> toJson() { | 4001 core.Map<core.String, core.Object> toJson() { |
3978 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4002 final core.Map<core.String, core.Object> _json = |
| 4003 new core.Map<core.String, core.Object>(); |
3979 if (appProperties != null) { | 4004 if (appProperties != null) { |
3980 _json["appProperties"] = appProperties; | 4005 _json["appProperties"] = appProperties; |
3981 } | 4006 } |
3982 if (capabilities != null) { | 4007 if (capabilities != null) { |
3983 _json["capabilities"] = (capabilities).toJson(); | 4008 _json["capabilities"] = (capabilities).toJson(); |
3984 } | 4009 } |
3985 if (contentHints != null) { | 4010 if (contentHints != null) { |
3986 _json["contentHints"] = (contentHints).toJson(); | 4011 _json["contentHints"] = (contentHints).toJson(); |
3987 } | 4012 } |
3988 if (createdTime != null) { | 4013 if (createdTime != null) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4053 } | 4078 } |
4054 if (ownedByMe != null) { | 4079 if (ownedByMe != null) { |
4055 _json["ownedByMe"] = ownedByMe; | 4080 _json["ownedByMe"] = ownedByMe; |
4056 } | 4081 } |
4057 if (owners != null) { | 4082 if (owners != null) { |
4058 _json["owners"] = owners.map((value) => (value).toJson()).toList(); | 4083 _json["owners"] = owners.map((value) => (value).toJson()).toList(); |
4059 } | 4084 } |
4060 if (parents != null) { | 4085 if (parents != null) { |
4061 _json["parents"] = parents; | 4086 _json["parents"] = parents; |
4062 } | 4087 } |
| 4088 if (permissionIds != null) { |
| 4089 _json["permissionIds"] = permissionIds; |
| 4090 } |
4063 if (permissions != null) { | 4091 if (permissions != null) { |
4064 _json["permissions"] = permissions.map((value) => (value).toJson()).toList
(); | 4092 _json["permissions"] = |
| 4093 permissions.map((value) => (value).toJson()).toList(); |
4065 } | 4094 } |
4066 if (properties != null) { | 4095 if (properties != null) { |
4067 _json["properties"] = properties; | 4096 _json["properties"] = properties; |
4068 } | 4097 } |
4069 if (quotaBytesUsed != null) { | 4098 if (quotaBytesUsed != null) { |
4070 _json["quotaBytesUsed"] = quotaBytesUsed; | 4099 _json["quotaBytesUsed"] = quotaBytesUsed; |
4071 } | 4100 } |
4072 if (shared != null) { | 4101 if (shared != null) { |
4073 _json["shared"] = shared; | 4102 _json["shared"] = shared; |
4074 } | 4103 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4126 if (webViewLink != null) { | 4155 if (webViewLink != null) { |
4127 _json["webViewLink"] = webViewLink; | 4156 _json["webViewLink"] = webViewLink; |
4128 } | 4157 } |
4129 if (writersCanShare != null) { | 4158 if (writersCanShare != null) { |
4130 _json["writersCanShare"] = writersCanShare; | 4159 _json["writersCanShare"] = writersCanShare; |
4131 } | 4160 } |
4132 return _json; | 4161 return _json; |
4133 } | 4162 } |
4134 } | 4163 } |
4135 | 4164 |
4136 /** A list of files. */ | 4165 /// A list of files. |
4137 class FileList { | 4166 class FileList { |
4138 /** | 4167 /// The list of files. If nextPageToken is populated, then this list may be |
4139 * The list of files. If nextPageToken is populated, then this list may be | 4168 /// incomplete and an additional page of results should be fetched. |
4140 * incomplete and an additional page of results should be fetched. | |
4141 */ | |
4142 core.List<File> files; | 4169 core.List<File> files; |
4143 /** | 4170 |
4144 * Whether the search process was incomplete. If true, then some search | 4171 /// Whether the search process was incomplete. If true, then some search |
4145 * results may be missing, since all documents were not searched. This may | 4172 /// results may be missing, since all documents were not searched. This may |
4146 * occur when searching multiple Team Drives with the "user,allTeamDrives" | 4173 /// occur when searching multiple Team Drives with the "user,allTeamDrives" |
4147 * corpora, but all corpora could not be searched. When this happens, it is | 4174 /// corpora, but all corpora could not be searched. When this happens, it is |
4148 * suggested that clients narrow their query by choosing a different corpus | 4175 /// suggested that clients narrow their query by choosing a different corpus |
4149 * such as "user" or "teamDrive". | 4176 /// such as "user" or "teamDrive". |
4150 */ | |
4151 core.bool incompleteSearch; | 4177 core.bool incompleteSearch; |
4152 /** | 4178 |
4153 * Identifies what kind of resource this is. Value: the fixed string | 4179 /// Identifies what kind of resource this is. Value: the fixed string |
4154 * "drive#fileList". | 4180 /// "drive#fileList". |
4155 */ | |
4156 core.String kind; | 4181 core.String kind; |
4157 /** | 4182 |
4158 * The page token for the next page of files. This will be absent if the end | 4183 /// The page token for the next page of files. This will be absent if the end |
4159 * of the files list has been reached. If the token is rejected for any | 4184 /// of the files list has been reached. If the token is rejected for any |
4160 * reason, it should be discarded, and pagination should be restarted from the | 4185 /// reason, it should be discarded, and pagination should be restarted from |
4161 * first page of results. | 4186 /// the first page of results. |
4162 */ | |
4163 core.String nextPageToken; | 4187 core.String nextPageToken; |
4164 | 4188 |
4165 FileList(); | 4189 FileList(); |
4166 | 4190 |
4167 FileList.fromJson(core.Map _json) { | 4191 FileList.fromJson(core.Map _json) { |
4168 if (_json.containsKey("files")) { | 4192 if (_json.containsKey("files")) { |
4169 files = _json["files"].map((value) => new File.fromJson(value)).toList(); | 4193 files = _json["files"].map((value) => new File.fromJson(value)).toList(); |
4170 } | 4194 } |
4171 if (_json.containsKey("incompleteSearch")) { | 4195 if (_json.containsKey("incompleteSearch")) { |
4172 incompleteSearch = _json["incompleteSearch"]; | 4196 incompleteSearch = _json["incompleteSearch"]; |
4173 } | 4197 } |
4174 if (_json.containsKey("kind")) { | 4198 if (_json.containsKey("kind")) { |
4175 kind = _json["kind"]; | 4199 kind = _json["kind"]; |
4176 } | 4200 } |
4177 if (_json.containsKey("nextPageToken")) { | 4201 if (_json.containsKey("nextPageToken")) { |
4178 nextPageToken = _json["nextPageToken"]; | 4202 nextPageToken = _json["nextPageToken"]; |
4179 } | 4203 } |
4180 } | 4204 } |
4181 | 4205 |
4182 core.Map<core.String, core.Object> toJson() { | 4206 core.Map<core.String, core.Object> toJson() { |
4183 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4207 final core.Map<core.String, core.Object> _json = |
| 4208 new core.Map<core.String, core.Object>(); |
4184 if (files != null) { | 4209 if (files != null) { |
4185 _json["files"] = files.map((value) => (value).toJson()).toList(); | 4210 _json["files"] = files.map((value) => (value).toJson()).toList(); |
4186 } | 4211 } |
4187 if (incompleteSearch != null) { | 4212 if (incompleteSearch != null) { |
4188 _json["incompleteSearch"] = incompleteSearch; | 4213 _json["incompleteSearch"] = incompleteSearch; |
4189 } | 4214 } |
4190 if (kind != null) { | 4215 if (kind != null) { |
4191 _json["kind"] = kind; | 4216 _json["kind"] = kind; |
4192 } | 4217 } |
4193 if (nextPageToken != null) { | 4218 if (nextPageToken != null) { |
4194 _json["nextPageToken"] = nextPageToken; | 4219 _json["nextPageToken"] = nextPageToken; |
4195 } | 4220 } |
4196 return _json; | 4221 return _json; |
4197 } | 4222 } |
4198 } | 4223 } |
4199 | 4224 |
4200 /** A list of generated file IDs which can be provided in create requests. */ | 4225 /// A list of generated file IDs which can be provided in create requests. |
4201 class GeneratedIds { | 4226 class GeneratedIds { |
4202 /** The IDs generated for the requesting user in the specified space. */ | 4227 /// The IDs generated for the requesting user in the specified space. |
4203 core.List<core.String> ids; | 4228 core.List<core.String> ids; |
4204 /** | 4229 |
4205 * Identifies what kind of resource this is. Value: the fixed string | 4230 /// Identifies what kind of resource this is. Value: the fixed string |
4206 * "drive#generatedIds". | 4231 /// "drive#generatedIds". |
4207 */ | |
4208 core.String kind; | 4232 core.String kind; |
4209 /** The type of file that can be created with these IDs. */ | 4233 |
| 4234 /// The type of file that can be created with these IDs. |
4210 core.String space; | 4235 core.String space; |
4211 | 4236 |
4212 GeneratedIds(); | 4237 GeneratedIds(); |
4213 | 4238 |
4214 GeneratedIds.fromJson(core.Map _json) { | 4239 GeneratedIds.fromJson(core.Map _json) { |
4215 if (_json.containsKey("ids")) { | 4240 if (_json.containsKey("ids")) { |
4216 ids = _json["ids"]; | 4241 ids = _json["ids"]; |
4217 } | 4242 } |
4218 if (_json.containsKey("kind")) { | 4243 if (_json.containsKey("kind")) { |
4219 kind = _json["kind"]; | 4244 kind = _json["kind"]; |
4220 } | 4245 } |
4221 if (_json.containsKey("space")) { | 4246 if (_json.containsKey("space")) { |
4222 space = _json["space"]; | 4247 space = _json["space"]; |
4223 } | 4248 } |
4224 } | 4249 } |
4225 | 4250 |
4226 core.Map<core.String, core.Object> toJson() { | 4251 core.Map<core.String, core.Object> toJson() { |
4227 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4252 final core.Map<core.String, core.Object> _json = |
| 4253 new core.Map<core.String, core.Object>(); |
4228 if (ids != null) { | 4254 if (ids != null) { |
4229 _json["ids"] = ids; | 4255 _json["ids"] = ids; |
4230 } | 4256 } |
4231 if (kind != null) { | 4257 if (kind != null) { |
4232 _json["kind"] = kind; | 4258 _json["kind"] = kind; |
4233 } | 4259 } |
4234 if (space != null) { | 4260 if (space != null) { |
4235 _json["space"] = space; | 4261 _json["space"] = space; |
4236 } | 4262 } |
4237 return _json; | 4263 return _json; |
4238 } | 4264 } |
4239 } | 4265 } |
4240 | 4266 |
4241 class PermissionTeamDrivePermissionDetails { | 4267 class PermissionTeamDrivePermissionDetails { |
4242 /** | 4268 /// Whether this permission is inherited. This field is always populated. |
4243 * Whether this permission is inherited. This field is always populated. This | 4269 /// This is an output-only field. |
4244 * is an output-only field. | |
4245 */ | |
4246 core.bool inherited; | 4270 core.bool inherited; |
4247 /** | 4271 |
4248 * The ID of the item from which this permission is inherited. This is an | 4272 /// The ID of the item from which this permission is inherited. This is an |
4249 * output-only field and is only populated for members of the Team Drive. | 4273 /// output-only field and is only populated for members of the Team Drive. |
4250 */ | |
4251 core.String inheritedFrom; | 4274 core.String inheritedFrom; |
4252 /** | 4275 |
4253 * The primary role for this user. While new values may be added in the | 4276 /// The primary role for this user. While new values may be added in the |
4254 * future, the following are currently possible: | 4277 /// future, the following are currently possible: |
4255 * - organizer | 4278 /// - organizer |
4256 * - writer | 4279 /// - writer |
4257 * - commenter | 4280 /// - commenter |
4258 * - reader | 4281 /// - reader |
4259 */ | |
4260 core.String role; | 4282 core.String role; |
4261 /** | 4283 |
4262 * The Team Drive permission type for this user. While new values may be added | 4284 /// The Team Drive permission type for this user. While new values may be |
4263 * in future, the following are currently possible: | 4285 /// added in future, the following are currently possible: |
4264 * - file | 4286 /// - file |
4265 * - member | 4287 /// - member |
4266 */ | |
4267 core.String teamDrivePermissionType; | 4288 core.String teamDrivePermissionType; |
4268 | 4289 |
4269 PermissionTeamDrivePermissionDetails(); | 4290 PermissionTeamDrivePermissionDetails(); |
4270 | 4291 |
4271 PermissionTeamDrivePermissionDetails.fromJson(core.Map _json) { | 4292 PermissionTeamDrivePermissionDetails.fromJson(core.Map _json) { |
4272 if (_json.containsKey("inherited")) { | 4293 if (_json.containsKey("inherited")) { |
4273 inherited = _json["inherited"]; | 4294 inherited = _json["inherited"]; |
4274 } | 4295 } |
4275 if (_json.containsKey("inheritedFrom")) { | 4296 if (_json.containsKey("inheritedFrom")) { |
4276 inheritedFrom = _json["inheritedFrom"]; | 4297 inheritedFrom = _json["inheritedFrom"]; |
4277 } | 4298 } |
4278 if (_json.containsKey("role")) { | 4299 if (_json.containsKey("role")) { |
4279 role = _json["role"]; | 4300 role = _json["role"]; |
4280 } | 4301 } |
4281 if (_json.containsKey("teamDrivePermissionType")) { | 4302 if (_json.containsKey("teamDrivePermissionType")) { |
4282 teamDrivePermissionType = _json["teamDrivePermissionType"]; | 4303 teamDrivePermissionType = _json["teamDrivePermissionType"]; |
4283 } | 4304 } |
4284 } | 4305 } |
4285 | 4306 |
4286 core.Map<core.String, core.Object> toJson() { | 4307 core.Map<core.String, core.Object> toJson() { |
4287 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4308 final core.Map<core.String, core.Object> _json = |
| 4309 new core.Map<core.String, core.Object>(); |
4288 if (inherited != null) { | 4310 if (inherited != null) { |
4289 _json["inherited"] = inherited; | 4311 _json["inherited"] = inherited; |
4290 } | 4312 } |
4291 if (inheritedFrom != null) { | 4313 if (inheritedFrom != null) { |
4292 _json["inheritedFrom"] = inheritedFrom; | 4314 _json["inheritedFrom"] = inheritedFrom; |
4293 } | 4315 } |
4294 if (role != null) { | 4316 if (role != null) { |
4295 _json["role"] = role; | 4317 _json["role"] = role; |
4296 } | 4318 } |
4297 if (teamDrivePermissionType != null) { | 4319 if (teamDrivePermissionType != null) { |
4298 _json["teamDrivePermissionType"] = teamDrivePermissionType; | 4320 _json["teamDrivePermissionType"] = teamDrivePermissionType; |
4299 } | 4321 } |
4300 return _json; | 4322 return _json; |
4301 } | 4323 } |
4302 } | 4324 } |
4303 | 4325 |
4304 /** | 4326 /// A permission for a file. A permission grants a user, group, domain or the |
4305 * A permission for a file. A permission grants a user, group, domain or the | 4327 /// world access to a file or a folder hierarchy. |
4306 * world access to a file or a folder hierarchy. | |
4307 */ | |
4308 class Permission { | 4328 class Permission { |
4309 /** | 4329 /// Whether the permission allows the file to be discovered through search. |
4310 * Whether the permission allows the file to be discovered through search. | 4330 /// This is only applicable for permissions of type domain or anyone. |
4311 * This is only applicable for permissions of type domain or anyone. | |
4312 */ | |
4313 core.bool allowFileDiscovery; | 4331 core.bool allowFileDiscovery; |
4314 /** | 4332 |
4315 * Whether the account associated with this permission has been deleted. This | 4333 /// Whether the account associated with this permission has been deleted. |
4316 * field only pertains to user and group permissions. | 4334 /// This field only pertains to user and group permissions. |
4317 */ | |
4318 core.bool deleted; | 4335 core.bool deleted; |
4319 /** A displayable name for users, groups or domains. */ | 4336 |
| 4337 /// A displayable name for users, groups or domains. |
4320 core.String displayName; | 4338 core.String displayName; |
4321 /** The domain to which this permission refers. */ | 4339 |
| 4340 /// The domain to which this permission refers. |
4322 core.String domain; | 4341 core.String domain; |
4323 /** | 4342 |
4324 * The email address of the user or group to which this permission refers. | 4343 /// The email address of the user or group to which this permission refers. |
4325 */ | |
4326 core.String emailAddress; | 4344 core.String emailAddress; |
4327 /** | 4345 |
4328 * The time at which this permission will expire (RFC 3339 date-time). | 4346 /// The time at which this permission will expire (RFC 3339 date-time). |
4329 * Expiration times have the following restrictions: | 4347 /// Expiration times have the following restrictions: |
4330 * - They can only be set on user and group permissions | 4348 /// - They can only be set on user and group permissions |
4331 * - The time must be in the future | 4349 /// - The time must be in the future |
4332 * - The time cannot be more than a year in the future | 4350 /// - The time cannot be more than a year in the future |
4333 */ | |
4334 core.DateTime expirationTime; | 4351 core.DateTime expirationTime; |
4335 /** | 4352 |
4336 * The ID of this permission. This is a unique identifier for the grantee, and | 4353 /// The ID of this permission. This is a unique identifier for the grantee, |
4337 * is published in User resources as permissionId. | 4354 /// and is published in User resources as permissionId. |
4338 */ | |
4339 core.String id; | 4355 core.String id; |
4340 /** | 4356 |
4341 * Identifies what kind of resource this is. Value: the fixed string | 4357 /// Identifies what kind of resource this is. Value: the fixed string |
4342 * "drive#permission". | 4358 /// "drive#permission". |
4343 */ | |
4344 core.String kind; | 4359 core.String kind; |
4345 /** A link to the user's profile photo, if available. */ | 4360 |
| 4361 /// A link to the user's profile photo, if available. |
4346 core.String photoLink; | 4362 core.String photoLink; |
4347 /** | 4363 |
4348 * The role granted by this permission. While new values may be supported in | 4364 /// The role granted by this permission. While new values may be supported in |
4349 * the future, the following are currently allowed: | 4365 /// the future, the following are currently allowed: |
4350 * - organizer | 4366 /// - organizer |
4351 * - owner | 4367 /// - owner |
4352 * - writer | 4368 /// - writer |
4353 * - commenter | 4369 /// - commenter |
4354 * - reader | 4370 /// - reader |
4355 */ | |
4356 core.String role; | 4371 core.String role; |
4357 /** | 4372 |
4358 * Details of whether the permissions on this Team Drive item are inherited or | 4373 /// Details of whether the permissions on this Team Drive item are inherited |
4359 * directly on this item. This is an output-only field which is present only | 4374 /// or directly on this item. This is an output-only field which is present |
4360 * for Team Drive items. | 4375 /// only for Team Drive items. |
4361 */ | |
4362 core.List<PermissionTeamDrivePermissionDetails> teamDrivePermissionDetails; | 4376 core.List<PermissionTeamDrivePermissionDetails> teamDrivePermissionDetails; |
4363 /** | 4377 |
4364 * The type of the grantee. Valid values are: | 4378 /// The type of the grantee. Valid values are: |
4365 * - user | 4379 /// - user |
4366 * - group | 4380 /// - group |
4367 * - domain | 4381 /// - domain |
4368 * - anyone | 4382 /// - anyone |
4369 */ | |
4370 core.String type; | 4383 core.String type; |
4371 | 4384 |
4372 Permission(); | 4385 Permission(); |
4373 | 4386 |
4374 Permission.fromJson(core.Map _json) { | 4387 Permission.fromJson(core.Map _json) { |
4375 if (_json.containsKey("allowFileDiscovery")) { | 4388 if (_json.containsKey("allowFileDiscovery")) { |
4376 allowFileDiscovery = _json["allowFileDiscovery"]; | 4389 allowFileDiscovery = _json["allowFileDiscovery"]; |
4377 } | 4390 } |
4378 if (_json.containsKey("deleted")) { | 4391 if (_json.containsKey("deleted")) { |
4379 deleted = _json["deleted"]; | 4392 deleted = _json["deleted"]; |
(...skipping 16 matching lines...) Expand all Loading... |
4396 if (_json.containsKey("kind")) { | 4409 if (_json.containsKey("kind")) { |
4397 kind = _json["kind"]; | 4410 kind = _json["kind"]; |
4398 } | 4411 } |
4399 if (_json.containsKey("photoLink")) { | 4412 if (_json.containsKey("photoLink")) { |
4400 photoLink = _json["photoLink"]; | 4413 photoLink = _json["photoLink"]; |
4401 } | 4414 } |
4402 if (_json.containsKey("role")) { | 4415 if (_json.containsKey("role")) { |
4403 role = _json["role"]; | 4416 role = _json["role"]; |
4404 } | 4417 } |
4405 if (_json.containsKey("teamDrivePermissionDetails")) { | 4418 if (_json.containsKey("teamDrivePermissionDetails")) { |
4406 teamDrivePermissionDetails = _json["teamDrivePermissionDetails"].map((valu
e) => new PermissionTeamDrivePermissionDetails.fromJson(value)).toList(); | 4419 teamDrivePermissionDetails = _json["teamDrivePermissionDetails"] |
| 4420 .map((value) => |
| 4421 new PermissionTeamDrivePermissionDetails.fromJson(value)) |
| 4422 .toList(); |
4407 } | 4423 } |
4408 if (_json.containsKey("type")) { | 4424 if (_json.containsKey("type")) { |
4409 type = _json["type"]; | 4425 type = _json["type"]; |
4410 } | 4426 } |
4411 } | 4427 } |
4412 | 4428 |
4413 core.Map<core.String, core.Object> toJson() { | 4429 core.Map<core.String, core.Object> toJson() { |
4414 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4430 final core.Map<core.String, core.Object> _json = |
| 4431 new core.Map<core.String, core.Object>(); |
4415 if (allowFileDiscovery != null) { | 4432 if (allowFileDiscovery != null) { |
4416 _json["allowFileDiscovery"] = allowFileDiscovery; | 4433 _json["allowFileDiscovery"] = allowFileDiscovery; |
4417 } | 4434 } |
4418 if (deleted != null) { | 4435 if (deleted != null) { |
4419 _json["deleted"] = deleted; | 4436 _json["deleted"] = deleted; |
4420 } | 4437 } |
4421 if (displayName != null) { | 4438 if (displayName != null) { |
4422 _json["displayName"] = displayName; | 4439 _json["displayName"] = displayName; |
4423 } | 4440 } |
4424 if (domain != null) { | 4441 if (domain != null) { |
(...skipping 11 matching lines...) Expand all Loading... |
4436 if (kind != null) { | 4453 if (kind != null) { |
4437 _json["kind"] = kind; | 4454 _json["kind"] = kind; |
4438 } | 4455 } |
4439 if (photoLink != null) { | 4456 if (photoLink != null) { |
4440 _json["photoLink"] = photoLink; | 4457 _json["photoLink"] = photoLink; |
4441 } | 4458 } |
4442 if (role != null) { | 4459 if (role != null) { |
4443 _json["role"] = role; | 4460 _json["role"] = role; |
4444 } | 4461 } |
4445 if (teamDrivePermissionDetails != null) { | 4462 if (teamDrivePermissionDetails != null) { |
4446 _json["teamDrivePermissionDetails"] = teamDrivePermissionDetails.map((valu
e) => (value).toJson()).toList(); | 4463 _json["teamDrivePermissionDetails"] = |
| 4464 teamDrivePermissionDetails.map((value) => (value).toJson()).toList(); |
4447 } | 4465 } |
4448 if (type != null) { | 4466 if (type != null) { |
4449 _json["type"] = type; | 4467 _json["type"] = type; |
4450 } | 4468 } |
4451 return _json; | 4469 return _json; |
4452 } | 4470 } |
4453 } | 4471 } |
4454 | 4472 |
4455 /** A list of permissions for a file. */ | 4473 /// A list of permissions for a file. |
4456 class PermissionList { | 4474 class PermissionList { |
4457 /** | 4475 /// Identifies what kind of resource this is. Value: the fixed string |
4458 * Identifies what kind of resource this is. Value: the fixed string | 4476 /// "drive#permissionList". |
4459 * "drive#permissionList". | |
4460 */ | |
4461 core.String kind; | 4477 core.String kind; |
4462 /** | 4478 |
4463 * The page token for the next page of permissions. This field will be absent | 4479 /// The page token for the next page of permissions. This field will be |
4464 * if the end of the permissions list has been reached. If the token is | 4480 /// absent if the end of the permissions list has been reached. If the token |
4465 * rejected for any reason, it should be discarded, and pagination should be | 4481 /// is rejected for any reason, it should be discarded, and pagination should |
4466 * restarted from the first page of results. | 4482 /// be restarted from the first page of results. |
4467 */ | |
4468 core.String nextPageToken; | 4483 core.String nextPageToken; |
4469 /** | 4484 |
4470 * The list of permissions. If nextPageToken is populated, then this list may | 4485 /// The list of permissions. If nextPageToken is populated, then this list |
4471 * be incomplete and an additional page of results should be fetched. | 4486 /// may be incomplete and an additional page of results should be fetched. |
4472 */ | |
4473 core.List<Permission> permissions; | 4487 core.List<Permission> permissions; |
4474 | 4488 |
4475 PermissionList(); | 4489 PermissionList(); |
4476 | 4490 |
4477 PermissionList.fromJson(core.Map _json) { | 4491 PermissionList.fromJson(core.Map _json) { |
4478 if (_json.containsKey("kind")) { | 4492 if (_json.containsKey("kind")) { |
4479 kind = _json["kind"]; | 4493 kind = _json["kind"]; |
4480 } | 4494 } |
4481 if (_json.containsKey("nextPageToken")) { | 4495 if (_json.containsKey("nextPageToken")) { |
4482 nextPageToken = _json["nextPageToken"]; | 4496 nextPageToken = _json["nextPageToken"]; |
4483 } | 4497 } |
4484 if (_json.containsKey("permissions")) { | 4498 if (_json.containsKey("permissions")) { |
4485 permissions = _json["permissions"].map((value) => new Permission.fromJson(
value)).toList(); | 4499 permissions = _json["permissions"] |
| 4500 .map((value) => new Permission.fromJson(value)) |
| 4501 .toList(); |
4486 } | 4502 } |
4487 } | 4503 } |
4488 | 4504 |
4489 core.Map<core.String, core.Object> toJson() { | 4505 core.Map<core.String, core.Object> toJson() { |
4490 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4506 final core.Map<core.String, core.Object> _json = |
| 4507 new core.Map<core.String, core.Object>(); |
4491 if (kind != null) { | 4508 if (kind != null) { |
4492 _json["kind"] = kind; | 4509 _json["kind"] = kind; |
4493 } | 4510 } |
4494 if (nextPageToken != null) { | 4511 if (nextPageToken != null) { |
4495 _json["nextPageToken"] = nextPageToken; | 4512 _json["nextPageToken"] = nextPageToken; |
4496 } | 4513 } |
4497 if (permissions != null) { | 4514 if (permissions != null) { |
4498 _json["permissions"] = permissions.map((value) => (value).toJson()).toList
(); | 4515 _json["permissions"] = |
| 4516 permissions.map((value) => (value).toJson()).toList(); |
4499 } | 4517 } |
4500 return _json; | 4518 return _json; |
4501 } | 4519 } |
4502 } | 4520 } |
4503 | 4521 |
4504 /** A reply to a comment on a file. */ | 4522 /// A reply to a comment on a file. |
4505 class Reply { | 4523 class Reply { |
4506 /** | 4524 /// The action the reply performed to the parent comment. Valid values are: |
4507 * The action the reply performed to the parent comment. Valid values are: | 4525 /// - resolve |
4508 * - resolve | 4526 /// - reopen |
4509 * - reopen | |
4510 */ | |
4511 core.String action; | 4527 core.String action; |
4512 /** The user who created the reply. */ | 4528 |
| 4529 /// The user who created the reply. |
4513 User author; | 4530 User author; |
4514 /** | 4531 |
4515 * The plain text content of the reply. This field is used for setting the | 4532 /// The plain text content of the reply. This field is used for setting the |
4516 * content, while htmlContent should be displayed. This is required on creates | 4533 /// content, while htmlContent should be displayed. This is required on |
4517 * if no action is specified. | 4534 /// creates if no action is specified. |
4518 */ | |
4519 core.String content; | 4535 core.String content; |
4520 /** The time at which the reply was created (RFC 3339 date-time). */ | 4536 |
| 4537 /// The time at which the reply was created (RFC 3339 date-time). |
4521 core.DateTime createdTime; | 4538 core.DateTime createdTime; |
4522 /** Whether the reply has been deleted. A deleted reply has no content. */ | 4539 |
| 4540 /// Whether the reply has been deleted. A deleted reply has no content. |
4523 core.bool deleted; | 4541 core.bool deleted; |
4524 /** The content of the reply with HTML formatting. */ | 4542 |
| 4543 /// The content of the reply with HTML formatting. |
4525 core.String htmlContent; | 4544 core.String htmlContent; |
4526 /** The ID of the reply. */ | 4545 |
| 4546 /// The ID of the reply. |
4527 core.String id; | 4547 core.String id; |
4528 /** | 4548 |
4529 * Identifies what kind of resource this is. Value: the fixed string | 4549 /// Identifies what kind of resource this is. Value: the fixed string |
4530 * "drive#reply". | 4550 /// "drive#reply". |
4531 */ | |
4532 core.String kind; | 4551 core.String kind; |
4533 /** The last time the reply was modified (RFC 3339 date-time). */ | 4552 |
| 4553 /// The last time the reply was modified (RFC 3339 date-time). |
4534 core.DateTime modifiedTime; | 4554 core.DateTime modifiedTime; |
4535 | 4555 |
4536 Reply(); | 4556 Reply(); |
4537 | 4557 |
4538 Reply.fromJson(core.Map _json) { | 4558 Reply.fromJson(core.Map _json) { |
4539 if (_json.containsKey("action")) { | 4559 if (_json.containsKey("action")) { |
4540 action = _json["action"]; | 4560 action = _json["action"]; |
4541 } | 4561 } |
4542 if (_json.containsKey("author")) { | 4562 if (_json.containsKey("author")) { |
4543 author = new User.fromJson(_json["author"]); | 4563 author = new User.fromJson(_json["author"]); |
(...skipping 15 matching lines...) Expand all Loading... |
4559 } | 4579 } |
4560 if (_json.containsKey("kind")) { | 4580 if (_json.containsKey("kind")) { |
4561 kind = _json["kind"]; | 4581 kind = _json["kind"]; |
4562 } | 4582 } |
4563 if (_json.containsKey("modifiedTime")) { | 4583 if (_json.containsKey("modifiedTime")) { |
4564 modifiedTime = core.DateTime.parse(_json["modifiedTime"]); | 4584 modifiedTime = core.DateTime.parse(_json["modifiedTime"]); |
4565 } | 4585 } |
4566 } | 4586 } |
4567 | 4587 |
4568 core.Map<core.String, core.Object> toJson() { | 4588 core.Map<core.String, core.Object> toJson() { |
4569 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4589 final core.Map<core.String, core.Object> _json = |
| 4590 new core.Map<core.String, core.Object>(); |
4570 if (action != null) { | 4591 if (action != null) { |
4571 _json["action"] = action; | 4592 _json["action"] = action; |
4572 } | 4593 } |
4573 if (author != null) { | 4594 if (author != null) { |
4574 _json["author"] = (author).toJson(); | 4595 _json["author"] = (author).toJson(); |
4575 } | 4596 } |
4576 if (content != null) { | 4597 if (content != null) { |
4577 _json["content"] = content; | 4598 _json["content"] = content; |
4578 } | 4599 } |
4579 if (createdTime != null) { | 4600 if (createdTime != null) { |
(...skipping 11 matching lines...) Expand all Loading... |
4591 if (kind != null) { | 4612 if (kind != null) { |
4592 _json["kind"] = kind; | 4613 _json["kind"] = kind; |
4593 } | 4614 } |
4594 if (modifiedTime != null) { | 4615 if (modifiedTime != null) { |
4595 _json["modifiedTime"] = (modifiedTime).toIso8601String(); | 4616 _json["modifiedTime"] = (modifiedTime).toIso8601String(); |
4596 } | 4617 } |
4597 return _json; | 4618 return _json; |
4598 } | 4619 } |
4599 } | 4620 } |
4600 | 4621 |
4601 /** A list of replies to a comment on a file. */ | 4622 /// A list of replies to a comment on a file. |
4602 class ReplyList { | 4623 class ReplyList { |
4603 /** | 4624 /// Identifies what kind of resource this is. Value: the fixed string |
4604 * Identifies what kind of resource this is. Value: the fixed string | 4625 /// "drive#replyList". |
4605 * "drive#replyList". | |
4606 */ | |
4607 core.String kind; | 4626 core.String kind; |
4608 /** | 4627 |
4609 * The page token for the next page of replies. This will be absent if the end | 4628 /// The page token for the next page of replies. This will be absent if the |
4610 * of the replies list has been reached. If the token is rejected for any | 4629 /// end of the replies list has been reached. If the token is rejected for |
4611 * reason, it should be discarded, and pagination should be restarted from the | 4630 /// any reason, it should be discarded, and pagination should be restarted |
4612 * first page of results. | 4631 /// from the first page of results. |
4613 */ | |
4614 core.String nextPageToken; | 4632 core.String nextPageToken; |
4615 /** | 4633 |
4616 * The list of replies. If nextPageToken is populated, then this list may be | 4634 /// The list of replies. If nextPageToken is populated, then this list may be |
4617 * incomplete and an additional page of results should be fetched. | 4635 /// incomplete and an additional page of results should be fetched. |
4618 */ | |
4619 core.List<Reply> replies; | 4636 core.List<Reply> replies; |
4620 | 4637 |
4621 ReplyList(); | 4638 ReplyList(); |
4622 | 4639 |
4623 ReplyList.fromJson(core.Map _json) { | 4640 ReplyList.fromJson(core.Map _json) { |
4624 if (_json.containsKey("kind")) { | 4641 if (_json.containsKey("kind")) { |
4625 kind = _json["kind"]; | 4642 kind = _json["kind"]; |
4626 } | 4643 } |
4627 if (_json.containsKey("nextPageToken")) { | 4644 if (_json.containsKey("nextPageToken")) { |
4628 nextPageToken = _json["nextPageToken"]; | 4645 nextPageToken = _json["nextPageToken"]; |
4629 } | 4646 } |
4630 if (_json.containsKey("replies")) { | 4647 if (_json.containsKey("replies")) { |
4631 replies = _json["replies"].map((value) => new Reply.fromJson(value)).toLis
t(); | 4648 replies = |
| 4649 _json["replies"].map((value) => new Reply.fromJson(value)).toList(); |
4632 } | 4650 } |
4633 } | 4651 } |
4634 | 4652 |
4635 core.Map<core.String, core.Object> toJson() { | 4653 core.Map<core.String, core.Object> toJson() { |
4636 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4654 final core.Map<core.String, core.Object> _json = |
| 4655 new core.Map<core.String, core.Object>(); |
4637 if (kind != null) { | 4656 if (kind != null) { |
4638 _json["kind"] = kind; | 4657 _json["kind"] = kind; |
4639 } | 4658 } |
4640 if (nextPageToken != null) { | 4659 if (nextPageToken != null) { |
4641 _json["nextPageToken"] = nextPageToken; | 4660 _json["nextPageToken"] = nextPageToken; |
4642 } | 4661 } |
4643 if (replies != null) { | 4662 if (replies != null) { |
4644 _json["replies"] = replies.map((value) => (value).toJson()).toList(); | 4663 _json["replies"] = replies.map((value) => (value).toJson()).toList(); |
4645 } | 4664 } |
4646 return _json; | 4665 return _json; |
4647 } | 4666 } |
4648 } | 4667 } |
4649 | 4668 |
4650 /** The metadata for a revision to a file. */ | 4669 /// The metadata for a revision to a file. |
4651 class Revision { | 4670 class Revision { |
4652 /** The ID of the revision. */ | 4671 /// The ID of the revision. |
4653 core.String id; | 4672 core.String id; |
4654 /** | 4673 |
4655 * Whether to keep this revision forever, even if it is no longer the head | 4674 /// Whether to keep this revision forever, even if it is no longer the head |
4656 * revision. If not set, the revision will be automatically purged 30 days | 4675 /// revision. If not set, the revision will be automatically purged 30 days |
4657 * after newer content is uploaded. This can be set on a maximum of 200 | 4676 /// after newer content is uploaded. This can be set on a maximum of 200 |
4658 * revisions for a file. | 4677 /// revisions for a file. |
4659 * This field is only applicable to files with binary content in Drive. | 4678 /// This field is only applicable to files with binary content in Drive. |
4660 */ | |
4661 core.bool keepForever; | 4679 core.bool keepForever; |
4662 /** | 4680 |
4663 * Identifies what kind of resource this is. Value: the fixed string | 4681 /// Identifies what kind of resource this is. Value: the fixed string |
4664 * "drive#revision". | 4682 /// "drive#revision". |
4665 */ | |
4666 core.String kind; | 4683 core.String kind; |
4667 /** The last user to modify this revision. */ | 4684 |
| 4685 /// The last user to modify this revision. |
4668 User lastModifyingUser; | 4686 User lastModifyingUser; |
4669 /** | 4687 |
4670 * The MD5 checksum of the revision's content. This is only applicable to | 4688 /// The MD5 checksum of the revision's content. This is only applicable to |
4671 * files with binary content in Drive. | 4689 /// files with binary content in Drive. |
4672 */ | |
4673 core.String md5Checksum; | 4690 core.String md5Checksum; |
4674 /** The MIME type of the revision. */ | 4691 |
| 4692 /// The MIME type of the revision. |
4675 core.String mimeType; | 4693 core.String mimeType; |
4676 /** The last time the revision was modified (RFC 3339 date-time). */ | 4694 |
| 4695 /// The last time the revision was modified (RFC 3339 date-time). |
4677 core.DateTime modifiedTime; | 4696 core.DateTime modifiedTime; |
4678 /** | 4697 |
4679 * The original filename used to create this revision. This is only applicable | 4698 /// The original filename used to create this revision. This is only |
4680 * to files with binary content in Drive. | 4699 /// applicable to files with binary content in Drive. |
4681 */ | |
4682 core.String originalFilename; | 4700 core.String originalFilename; |
4683 /** | 4701 |
4684 * Whether subsequent revisions will be automatically republished. This is | 4702 /// Whether subsequent revisions will be automatically republished. This is |
4685 * only applicable to Google Docs. | 4703 /// only applicable to Google Docs. |
4686 */ | |
4687 core.bool publishAuto; | 4704 core.bool publishAuto; |
4688 /** | 4705 |
4689 * Whether this revision is published. This is only applicable to Google Docs. | 4706 /// Whether this revision is published. This is only applicable to Google |
4690 */ | 4707 /// Docs. |
4691 core.bool published; | 4708 core.bool published; |
4692 /** | 4709 |
4693 * Whether this revision is published outside the domain. This is only | 4710 /// Whether this revision is published outside the domain. This is only |
4694 * applicable to Google Docs. | 4711 /// applicable to Google Docs. |
4695 */ | |
4696 core.bool publishedOutsideDomain; | 4712 core.bool publishedOutsideDomain; |
4697 /** | 4713 |
4698 * The size of the revision's content in bytes. This is only applicable to | 4714 /// The size of the revision's content in bytes. This is only applicable to |
4699 * files with binary content in Drive. | 4715 /// files with binary content in Drive. |
4700 */ | |
4701 core.String size; | 4716 core.String size; |
4702 | 4717 |
4703 Revision(); | 4718 Revision(); |
4704 | 4719 |
4705 Revision.fromJson(core.Map _json) { | 4720 Revision.fromJson(core.Map _json) { |
4706 if (_json.containsKey("id")) { | 4721 if (_json.containsKey("id")) { |
4707 id = _json["id"]; | 4722 id = _json["id"]; |
4708 } | 4723 } |
4709 if (_json.containsKey("keepForever")) { | 4724 if (_json.containsKey("keepForever")) { |
4710 keepForever = _json["keepForever"]; | 4725 keepForever = _json["keepForever"]; |
(...skipping 24 matching lines...) Expand all Loading... |
4735 } | 4750 } |
4736 if (_json.containsKey("publishedOutsideDomain")) { | 4751 if (_json.containsKey("publishedOutsideDomain")) { |
4737 publishedOutsideDomain = _json["publishedOutsideDomain"]; | 4752 publishedOutsideDomain = _json["publishedOutsideDomain"]; |
4738 } | 4753 } |
4739 if (_json.containsKey("size")) { | 4754 if (_json.containsKey("size")) { |
4740 size = _json["size"]; | 4755 size = _json["size"]; |
4741 } | 4756 } |
4742 } | 4757 } |
4743 | 4758 |
4744 core.Map<core.String, core.Object> toJson() { | 4759 core.Map<core.String, core.Object> toJson() { |
4745 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4760 final core.Map<core.String, core.Object> _json = |
| 4761 new core.Map<core.String, core.Object>(); |
4746 if (id != null) { | 4762 if (id != null) { |
4747 _json["id"] = id; | 4763 _json["id"] = id; |
4748 } | 4764 } |
4749 if (keepForever != null) { | 4765 if (keepForever != null) { |
4750 _json["keepForever"] = keepForever; | 4766 _json["keepForever"] = keepForever; |
4751 } | 4767 } |
4752 if (kind != null) { | 4768 if (kind != null) { |
4753 _json["kind"] = kind; | 4769 _json["kind"] = kind; |
4754 } | 4770 } |
4755 if (lastModifyingUser != null) { | 4771 if (lastModifyingUser != null) { |
(...skipping 20 matching lines...) Expand all Loading... |
4776 if (publishedOutsideDomain != null) { | 4792 if (publishedOutsideDomain != null) { |
4777 _json["publishedOutsideDomain"] = publishedOutsideDomain; | 4793 _json["publishedOutsideDomain"] = publishedOutsideDomain; |
4778 } | 4794 } |
4779 if (size != null) { | 4795 if (size != null) { |
4780 _json["size"] = size; | 4796 _json["size"] = size; |
4781 } | 4797 } |
4782 return _json; | 4798 return _json; |
4783 } | 4799 } |
4784 } | 4800 } |
4785 | 4801 |
4786 /** A list of revisions of a file. */ | 4802 /// A list of revisions of a file. |
4787 class RevisionList { | 4803 class RevisionList { |
4788 /** | 4804 /// Identifies what kind of resource this is. Value: the fixed string |
4789 * Identifies what kind of resource this is. Value: the fixed string | 4805 /// "drive#revisionList". |
4790 * "drive#revisionList". | |
4791 */ | |
4792 core.String kind; | 4806 core.String kind; |
4793 /** | 4807 |
4794 * The page token for the next page of revisions. This will be absent if the | 4808 /// The page token for the next page of revisions. This will be absent if the |
4795 * end of the revisions list has been reached. If the token is rejected for | 4809 /// end of the revisions list has been reached. If the token is rejected for |
4796 * any reason, it should be discarded, and pagination should be restarted from | 4810 /// any reason, it should be discarded, and pagination should be restarted |
4797 * the first page of results. | 4811 /// from the first page of results. |
4798 */ | |
4799 core.String nextPageToken; | 4812 core.String nextPageToken; |
4800 /** | 4813 |
4801 * The list of revisions. If nextPageToken is populated, then this list may be | 4814 /// The list of revisions. If nextPageToken is populated, then this list may |
4802 * incomplete and an additional page of results should be fetched. | 4815 /// be incomplete and an additional page of results should be fetched. |
4803 */ | |
4804 core.List<Revision> revisions; | 4816 core.List<Revision> revisions; |
4805 | 4817 |
4806 RevisionList(); | 4818 RevisionList(); |
4807 | 4819 |
4808 RevisionList.fromJson(core.Map _json) { | 4820 RevisionList.fromJson(core.Map _json) { |
4809 if (_json.containsKey("kind")) { | 4821 if (_json.containsKey("kind")) { |
4810 kind = _json["kind"]; | 4822 kind = _json["kind"]; |
4811 } | 4823 } |
4812 if (_json.containsKey("nextPageToken")) { | 4824 if (_json.containsKey("nextPageToken")) { |
4813 nextPageToken = _json["nextPageToken"]; | 4825 nextPageToken = _json["nextPageToken"]; |
4814 } | 4826 } |
4815 if (_json.containsKey("revisions")) { | 4827 if (_json.containsKey("revisions")) { |
4816 revisions = _json["revisions"].map((value) => new Revision.fromJson(value)
).toList(); | 4828 revisions = _json["revisions"] |
| 4829 .map((value) => new Revision.fromJson(value)) |
| 4830 .toList(); |
4817 } | 4831 } |
4818 } | 4832 } |
4819 | 4833 |
4820 core.Map<core.String, core.Object> toJson() { | 4834 core.Map<core.String, core.Object> toJson() { |
4821 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4835 final core.Map<core.String, core.Object> _json = |
| 4836 new core.Map<core.String, core.Object>(); |
4822 if (kind != null) { | 4837 if (kind != null) { |
4823 _json["kind"] = kind; | 4838 _json["kind"] = kind; |
4824 } | 4839 } |
4825 if (nextPageToken != null) { | 4840 if (nextPageToken != null) { |
4826 _json["nextPageToken"] = nextPageToken; | 4841 _json["nextPageToken"] = nextPageToken; |
4827 } | 4842 } |
4828 if (revisions != null) { | 4843 if (revisions != null) { |
4829 _json["revisions"] = revisions.map((value) => (value).toJson()).toList(); | 4844 _json["revisions"] = revisions.map((value) => (value).toJson()).toList(); |
4830 } | 4845 } |
4831 return _json; | 4846 return _json; |
4832 } | 4847 } |
4833 } | 4848 } |
4834 | 4849 |
4835 class StartPageToken { | 4850 class StartPageToken { |
4836 /** | 4851 /// Identifies what kind of resource this is. Value: the fixed string |
4837 * Identifies what kind of resource this is. Value: the fixed string | 4852 /// "drive#startPageToken". |
4838 * "drive#startPageToken". | |
4839 */ | |
4840 core.String kind; | 4853 core.String kind; |
4841 /** The starting page token for listing changes. */ | 4854 |
| 4855 /// The starting page token for listing changes. |
4842 core.String startPageToken; | 4856 core.String startPageToken; |
4843 | 4857 |
4844 StartPageToken(); | 4858 StartPageToken(); |
4845 | 4859 |
4846 StartPageToken.fromJson(core.Map _json) { | 4860 StartPageToken.fromJson(core.Map _json) { |
4847 if (_json.containsKey("kind")) { | 4861 if (_json.containsKey("kind")) { |
4848 kind = _json["kind"]; | 4862 kind = _json["kind"]; |
4849 } | 4863 } |
4850 if (_json.containsKey("startPageToken")) { | 4864 if (_json.containsKey("startPageToken")) { |
4851 startPageToken = _json["startPageToken"]; | 4865 startPageToken = _json["startPageToken"]; |
4852 } | 4866 } |
4853 } | 4867 } |
4854 | 4868 |
4855 core.Map<core.String, core.Object> toJson() { | 4869 core.Map<core.String, core.Object> toJson() { |
4856 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4870 final core.Map<core.String, core.Object> _json = |
| 4871 new core.Map<core.String, core.Object>(); |
4857 if (kind != null) { | 4872 if (kind != null) { |
4858 _json["kind"] = kind; | 4873 _json["kind"] = kind; |
4859 } | 4874 } |
4860 if (startPageToken != null) { | 4875 if (startPageToken != null) { |
4861 _json["startPageToken"] = startPageToken; | 4876 _json["startPageToken"] = startPageToken; |
4862 } | 4877 } |
4863 return _json; | 4878 return _json; |
4864 } | 4879 } |
4865 } | 4880 } |
4866 | 4881 |
4867 /** | 4882 /// An image file and cropping parameters from which a background image for |
4868 * An image file and cropping parameters from which a background image for this | 4883 /// this Team Drive is set. This is a write only field; it can only be set on |
4869 * Team Drive is set. This is a write only field; it can only be set on | 4884 /// drive.teamdrives.update requests that don't set themeId. When specified, |
4870 * drive.teamdrives.update requests that don't set themeId. When specified, all | 4885 /// all fields of the backgroundImageFile must be set. |
4871 * fields of the backgroundImageFile must be set. | |
4872 */ | |
4873 class TeamDriveBackgroundImageFile { | 4886 class TeamDriveBackgroundImageFile { |
4874 /** The ID of an image file in Drive to use for the background image. */ | 4887 /// The ID of an image file in Drive to use for the background image. |
4875 core.String id; | 4888 core.String id; |
4876 /** | 4889 |
4877 * The width of the cropped image in the closed range of 0 to 1. This value | 4890 /// The width of the cropped image in the closed range of 0 to 1. This value |
4878 * represents the width of the cropped image divided by the width of the | 4891 /// represents the width of the cropped image divided by the width of the |
4879 * entire image. The height is computed by applying a width to height aspect | 4892 /// entire image. The height is computed by applying a width to height aspect |
4880 * ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and | 4893 /// ratio of 80 to 9. The resulting image must be at least 1280 pixels wide |
4881 * 144 pixels high. | 4894 /// and 144 pixels high. |
4882 */ | |
4883 core.double width; | 4895 core.double width; |
4884 /** | 4896 |
4885 * The X coordinate of the upper left corner of the cropping area in the | 4897 /// The X coordinate of the upper left corner of the cropping area in the |
4886 * background image. This is a value in the closed range of 0 to 1. This value | 4898 /// background image. This is a value in the closed range of 0 to 1. This |
4887 * represents the horizontal distance from the left side of the entire image | 4899 /// value represents the horizontal distance from the left side of the entire |
4888 * to the left side of the cropping area divided by the width of the entire | 4900 /// image to the left side of the cropping area divided by the width of the |
4889 * image. | 4901 /// entire image. |
4890 */ | |
4891 core.double xCoordinate; | 4902 core.double xCoordinate; |
4892 /** | 4903 |
4893 * The Y coordinate of the upper left corner of the cropping area in the | 4904 /// The Y coordinate of the upper left corner of the cropping area in the |
4894 * background image. This is a value in the closed range of 0 to 1. This value | 4905 /// background image. This is a value in the closed range of 0 to 1. This |
4895 * represents the vertical distance from the top side of the entire image to | 4906 /// value represents the vertical distance from the top side of the entire |
4896 * the top side of the cropping area divided by the height of the entire | 4907 /// image to the top side of the cropping area divided by the height of the |
4897 * image. | 4908 /// entire image. |
4898 */ | |
4899 core.double yCoordinate; | 4909 core.double yCoordinate; |
4900 | 4910 |
4901 TeamDriveBackgroundImageFile(); | 4911 TeamDriveBackgroundImageFile(); |
4902 | 4912 |
4903 TeamDriveBackgroundImageFile.fromJson(core.Map _json) { | 4913 TeamDriveBackgroundImageFile.fromJson(core.Map _json) { |
4904 if (_json.containsKey("id")) { | 4914 if (_json.containsKey("id")) { |
4905 id = _json["id"]; | 4915 id = _json["id"]; |
4906 } | 4916 } |
4907 if (_json.containsKey("width")) { | 4917 if (_json.containsKey("width")) { |
4908 width = _json["width"]; | 4918 width = _json["width"]; |
4909 } | 4919 } |
4910 if (_json.containsKey("xCoordinate")) { | 4920 if (_json.containsKey("xCoordinate")) { |
4911 xCoordinate = _json["xCoordinate"]; | 4921 xCoordinate = _json["xCoordinate"]; |
4912 } | 4922 } |
4913 if (_json.containsKey("yCoordinate")) { | 4923 if (_json.containsKey("yCoordinate")) { |
4914 yCoordinate = _json["yCoordinate"]; | 4924 yCoordinate = _json["yCoordinate"]; |
4915 } | 4925 } |
4916 } | 4926 } |
4917 | 4927 |
4918 core.Map<core.String, core.Object> toJson() { | 4928 core.Map<core.String, core.Object> toJson() { |
4919 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4929 final core.Map<core.String, core.Object> _json = |
| 4930 new core.Map<core.String, core.Object>(); |
4920 if (id != null) { | 4931 if (id != null) { |
4921 _json["id"] = id; | 4932 _json["id"] = id; |
4922 } | 4933 } |
4923 if (width != null) { | 4934 if (width != null) { |
4924 _json["width"] = width; | 4935 _json["width"] = width; |
4925 } | 4936 } |
4926 if (xCoordinate != null) { | 4937 if (xCoordinate != null) { |
4927 _json["xCoordinate"] = xCoordinate; | 4938 _json["xCoordinate"] = xCoordinate; |
4928 } | 4939 } |
4929 if (yCoordinate != null) { | 4940 if (yCoordinate != null) { |
4930 _json["yCoordinate"] = yCoordinate; | 4941 _json["yCoordinate"] = yCoordinate; |
4931 } | 4942 } |
4932 return _json; | 4943 return _json; |
4933 } | 4944 } |
4934 } | 4945 } |
4935 | 4946 |
4936 /** Capabilities the current user has on this Team Drive. */ | 4947 /// Capabilities the current user has on this Team Drive. |
4937 class TeamDriveCapabilities { | 4948 class TeamDriveCapabilities { |
4938 /** | 4949 /// Whether the current user can add children to folders in this Team Drive. |
4939 * Whether the current user can add children to folders in this Team Drive. | |
4940 */ | |
4941 core.bool canAddChildren; | 4950 core.bool canAddChildren; |
4942 /** Whether the current user can change the background of this Team Drive. */ | 4951 |
| 4952 /// Whether the current user can change the background of this Team Drive. |
4943 core.bool canChangeTeamDriveBackground; | 4953 core.bool canChangeTeamDriveBackground; |
4944 /** Whether the current user can comment on files in this Team Drive. */ | 4954 |
| 4955 /// Whether the current user can comment on files in this Team Drive. |
4945 core.bool canComment; | 4956 core.bool canComment; |
4946 /** Whether the current user can copy files in this Team Drive. */ | 4957 |
| 4958 /// Whether the current user can copy files in this Team Drive. |
4947 core.bool canCopy; | 4959 core.bool canCopy; |
4948 /** | 4960 |
4949 * Whether the current user can delete this Team Drive. Attempting to delete | 4961 /// Whether the current user can delete this Team Drive. Attempting to delete |
4950 * the Team Drive may still fail if there are untrashed items inside the Team | 4962 /// the Team Drive may still fail if there are untrashed items inside the |
4951 * Drive. | 4963 /// Team Drive. |
4952 */ | |
4953 core.bool canDeleteTeamDrive; | 4964 core.bool canDeleteTeamDrive; |
4954 /** Whether the current user can download files in this Team Drive. */ | 4965 |
| 4966 /// Whether the current user can download files in this Team Drive. |
4955 core.bool canDownload; | 4967 core.bool canDownload; |
4956 /** Whether the current user can edit files in this Team Drive */ | 4968 |
| 4969 /// Whether the current user can edit files in this Team Drive |
4957 core.bool canEdit; | 4970 core.bool canEdit; |
4958 /** | 4971 |
4959 * Whether the current user can list the children of folders in this Team | 4972 /// Whether the current user can list the children of folders in this Team |
4960 * Drive. | 4973 /// Drive. |
4961 */ | |
4962 core.bool canListChildren; | 4974 core.bool canListChildren; |
4963 /** | 4975 |
4964 * Whether the current user can add members to this Team Drive or remove them | 4976 /// Whether the current user can add members to this Team Drive or remove |
4965 * or change their role. | 4977 /// them or change their role. |
4966 */ | |
4967 core.bool canManageMembers; | 4978 core.bool canManageMembers; |
4968 /** | 4979 |
4969 * Whether the current user can read the revisions resource of files in this | 4980 /// Whether the current user can read the revisions resource of files in this |
4970 * Team Drive. | 4981 /// Team Drive. |
4971 */ | |
4972 core.bool canReadRevisions; | 4982 core.bool canReadRevisions; |
4973 /** | 4983 |
4974 * Whether the current user can remove children from folders in this Team | 4984 /// Whether the current user can remove children from folders in this Team |
4975 * Drive. | 4985 /// Drive. |
4976 */ | |
4977 core.bool canRemoveChildren; | 4986 core.bool canRemoveChildren; |
4978 /** | 4987 |
4979 * Whether the current user can rename files or folders in this Team Drive. | 4988 /// Whether the current user can rename files or folders in this Team Drive. |
4980 */ | |
4981 core.bool canRename; | 4989 core.bool canRename; |
4982 /** Whether the current user can rename this Team Drive. */ | 4990 |
| 4991 /// Whether the current user can rename this Team Drive. |
4983 core.bool canRenameTeamDrive; | 4992 core.bool canRenameTeamDrive; |
4984 /** | 4993 |
4985 * Whether the current user can share files or folders in this Team Drive. | 4994 /// Whether the current user can share files or folders in this Team Drive. |
4986 */ | |
4987 core.bool canShare; | 4995 core.bool canShare; |
4988 | 4996 |
4989 TeamDriveCapabilities(); | 4997 TeamDriveCapabilities(); |
4990 | 4998 |
4991 TeamDriveCapabilities.fromJson(core.Map _json) { | 4999 TeamDriveCapabilities.fromJson(core.Map _json) { |
4992 if (_json.containsKey("canAddChildren")) { | 5000 if (_json.containsKey("canAddChildren")) { |
4993 canAddChildren = _json["canAddChildren"]; | 5001 canAddChildren = _json["canAddChildren"]; |
4994 } | 5002 } |
4995 if (_json.containsKey("canChangeTeamDriveBackground")) { | 5003 if (_json.containsKey("canChangeTeamDriveBackground")) { |
4996 canChangeTeamDriveBackground = _json["canChangeTeamDriveBackground"]; | 5004 canChangeTeamDriveBackground = _json["canChangeTeamDriveBackground"]; |
(...skipping 30 matching lines...) Expand all Loading... |
5027 } | 5035 } |
5028 if (_json.containsKey("canRenameTeamDrive")) { | 5036 if (_json.containsKey("canRenameTeamDrive")) { |
5029 canRenameTeamDrive = _json["canRenameTeamDrive"]; | 5037 canRenameTeamDrive = _json["canRenameTeamDrive"]; |
5030 } | 5038 } |
5031 if (_json.containsKey("canShare")) { | 5039 if (_json.containsKey("canShare")) { |
5032 canShare = _json["canShare"]; | 5040 canShare = _json["canShare"]; |
5033 } | 5041 } |
5034 } | 5042 } |
5035 | 5043 |
5036 core.Map<core.String, core.Object> toJson() { | 5044 core.Map<core.String, core.Object> toJson() { |
5037 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5045 final core.Map<core.String, core.Object> _json = |
| 5046 new core.Map<core.String, core.Object>(); |
5038 if (canAddChildren != null) { | 5047 if (canAddChildren != null) { |
5039 _json["canAddChildren"] = canAddChildren; | 5048 _json["canAddChildren"] = canAddChildren; |
5040 } | 5049 } |
5041 if (canChangeTeamDriveBackground != null) { | 5050 if (canChangeTeamDriveBackground != null) { |
5042 _json["canChangeTeamDriveBackground"] = canChangeTeamDriveBackground; | 5051 _json["canChangeTeamDriveBackground"] = canChangeTeamDriveBackground; |
5043 } | 5052 } |
5044 if (canComment != null) { | 5053 if (canComment != null) { |
5045 _json["canComment"] = canComment; | 5054 _json["canComment"] = canComment; |
5046 } | 5055 } |
5047 if (canCopy != null) { | 5056 if (canCopy != null) { |
(...skipping 26 matching lines...) Expand all Loading... |
5074 if (canRenameTeamDrive != null) { | 5083 if (canRenameTeamDrive != null) { |
5075 _json["canRenameTeamDrive"] = canRenameTeamDrive; | 5084 _json["canRenameTeamDrive"] = canRenameTeamDrive; |
5076 } | 5085 } |
5077 if (canShare != null) { | 5086 if (canShare != null) { |
5078 _json["canShare"] = canShare; | 5087 _json["canShare"] = canShare; |
5079 } | 5088 } |
5080 return _json; | 5089 return _json; |
5081 } | 5090 } |
5082 } | 5091 } |
5083 | 5092 |
5084 /** Representation of a Team Drive. */ | 5093 /// Representation of a Team Drive. |
5085 class TeamDrive { | 5094 class TeamDrive { |
5086 /** | 5095 /// An image file and cropping parameters from which a background image for |
5087 * An image file and cropping parameters from which a background image for | 5096 /// this Team Drive is set. This is a write only field; it can only be set on |
5088 * this Team Drive is set. This is a write only field; it can only be set on | 5097 /// drive.teamdrives.update requests that don't set themeId. When specified, |
5089 * drive.teamdrives.update requests that don't set themeId. When specified, | 5098 /// all fields of the backgroundImageFile must be set. |
5090 * all fields of the backgroundImageFile must be set. | |
5091 */ | |
5092 TeamDriveBackgroundImageFile backgroundImageFile; | 5099 TeamDriveBackgroundImageFile backgroundImageFile; |
5093 /** A short-lived link to this Team Drive's background image. */ | 5100 |
| 5101 /// A short-lived link to this Team Drive's background image. |
5094 core.String backgroundImageLink; | 5102 core.String backgroundImageLink; |
5095 /** Capabilities the current user has on this Team Drive. */ | 5103 |
| 5104 /// Capabilities the current user has on this Team Drive. |
5096 TeamDriveCapabilities capabilities; | 5105 TeamDriveCapabilities capabilities; |
5097 /** | 5106 |
5098 * The color of this Team Drive as an RGB hex string. It can only be set on a | 5107 /// The color of this Team Drive as an RGB hex string. It can only be set on |
5099 * drive.teamdrives.update request that does not set themeId. | 5108 /// a drive.teamdrives.update request that does not set themeId. |
5100 */ | |
5101 core.String colorRgb; | 5109 core.String colorRgb; |
5102 /** | 5110 |
5103 * The ID of this Team Drive which is also the ID of the top level folder for | 5111 /// The ID of this Team Drive which is also the ID of the top level folder |
5104 * this Team Drive. | 5112 /// for this Team Drive. |
5105 */ | |
5106 core.String id; | 5113 core.String id; |
5107 /** | 5114 |
5108 * Identifies what kind of resource this is. Value: the fixed string | 5115 /// Identifies what kind of resource this is. Value: the fixed string |
5109 * "drive#teamDrive". | 5116 /// "drive#teamDrive". |
5110 */ | |
5111 core.String kind; | 5117 core.String kind; |
5112 /** The name of this Team Drive. */ | 5118 |
| 5119 /// The name of this Team Drive. |
5113 core.String name; | 5120 core.String name; |
5114 /** | 5121 |
5115 * The ID of the theme from which the background image and color will be set. | 5122 /// The ID of the theme from which the background image and color will be |
5116 * The set of possible teamDriveThemes can be retrieved from a drive.about.get | 5123 /// set. The set of possible teamDriveThemes can be retrieved from a |
5117 * response. When not specified on a drive.teamdrives.create request, a random | 5124 /// drive.about.get response. When not specified on a drive.teamdrives.create |
5118 * theme is chosen from which the background image and color are set. This is | 5125 /// request, a random theme is chosen from which the background image and |
5119 * a write-only field; it can only be set on requests that don't set colorRgb | 5126 /// color are set. This is a write-only field; it can only be set on requests |
5120 * or backgroundImageFile. | 5127 /// that don't set colorRgb or backgroundImageFile. |
5121 */ | |
5122 core.String themeId; | 5128 core.String themeId; |
5123 | 5129 |
5124 TeamDrive(); | 5130 TeamDrive(); |
5125 | 5131 |
5126 TeamDrive.fromJson(core.Map _json) { | 5132 TeamDrive.fromJson(core.Map _json) { |
5127 if (_json.containsKey("backgroundImageFile")) { | 5133 if (_json.containsKey("backgroundImageFile")) { |
5128 backgroundImageFile = new TeamDriveBackgroundImageFile.fromJson(_json["bac
kgroundImageFile"]); | 5134 backgroundImageFile = new TeamDriveBackgroundImageFile.fromJson( |
| 5135 _json["backgroundImageFile"]); |
5129 } | 5136 } |
5130 if (_json.containsKey("backgroundImageLink")) { | 5137 if (_json.containsKey("backgroundImageLink")) { |
5131 backgroundImageLink = _json["backgroundImageLink"]; | 5138 backgroundImageLink = _json["backgroundImageLink"]; |
5132 } | 5139 } |
5133 if (_json.containsKey("capabilities")) { | 5140 if (_json.containsKey("capabilities")) { |
5134 capabilities = new TeamDriveCapabilities.fromJson(_json["capabilities"]); | 5141 capabilities = new TeamDriveCapabilities.fromJson(_json["capabilities"]); |
5135 } | 5142 } |
5136 if (_json.containsKey("colorRgb")) { | 5143 if (_json.containsKey("colorRgb")) { |
5137 colorRgb = _json["colorRgb"]; | 5144 colorRgb = _json["colorRgb"]; |
5138 } | 5145 } |
5139 if (_json.containsKey("id")) { | 5146 if (_json.containsKey("id")) { |
5140 id = _json["id"]; | 5147 id = _json["id"]; |
5141 } | 5148 } |
5142 if (_json.containsKey("kind")) { | 5149 if (_json.containsKey("kind")) { |
5143 kind = _json["kind"]; | 5150 kind = _json["kind"]; |
5144 } | 5151 } |
5145 if (_json.containsKey("name")) { | 5152 if (_json.containsKey("name")) { |
5146 name = _json["name"]; | 5153 name = _json["name"]; |
5147 } | 5154 } |
5148 if (_json.containsKey("themeId")) { | 5155 if (_json.containsKey("themeId")) { |
5149 themeId = _json["themeId"]; | 5156 themeId = _json["themeId"]; |
5150 } | 5157 } |
5151 } | 5158 } |
5152 | 5159 |
5153 core.Map<core.String, core.Object> toJson() { | 5160 core.Map<core.String, core.Object> toJson() { |
5154 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5161 final core.Map<core.String, core.Object> _json = |
| 5162 new core.Map<core.String, core.Object>(); |
5155 if (backgroundImageFile != null) { | 5163 if (backgroundImageFile != null) { |
5156 _json["backgroundImageFile"] = (backgroundImageFile).toJson(); | 5164 _json["backgroundImageFile"] = (backgroundImageFile).toJson(); |
5157 } | 5165 } |
5158 if (backgroundImageLink != null) { | 5166 if (backgroundImageLink != null) { |
5159 _json["backgroundImageLink"] = backgroundImageLink; | 5167 _json["backgroundImageLink"] = backgroundImageLink; |
5160 } | 5168 } |
5161 if (capabilities != null) { | 5169 if (capabilities != null) { |
5162 _json["capabilities"] = (capabilities).toJson(); | 5170 _json["capabilities"] = (capabilities).toJson(); |
5163 } | 5171 } |
5164 if (colorRgb != null) { | 5172 if (colorRgb != null) { |
5165 _json["colorRgb"] = colorRgb; | 5173 _json["colorRgb"] = colorRgb; |
5166 } | 5174 } |
5167 if (id != null) { | 5175 if (id != null) { |
5168 _json["id"] = id; | 5176 _json["id"] = id; |
5169 } | 5177 } |
5170 if (kind != null) { | 5178 if (kind != null) { |
5171 _json["kind"] = kind; | 5179 _json["kind"] = kind; |
5172 } | 5180 } |
5173 if (name != null) { | 5181 if (name != null) { |
5174 _json["name"] = name; | 5182 _json["name"] = name; |
5175 } | 5183 } |
5176 if (themeId != null) { | 5184 if (themeId != null) { |
5177 _json["themeId"] = themeId; | 5185 _json["themeId"] = themeId; |
5178 } | 5186 } |
5179 return _json; | 5187 return _json; |
5180 } | 5188 } |
5181 } | 5189 } |
5182 | 5190 |
5183 /** A list of Team Drives. */ | 5191 /// A list of Team Drives. |
5184 class TeamDriveList { | 5192 class TeamDriveList { |
5185 /** | 5193 /// Identifies what kind of resource this is. Value: the fixed string |
5186 * Identifies what kind of resource this is. Value: the fixed string | 5194 /// "drive#teamDriveList". |
5187 * "drive#teamDriveList". | |
5188 */ | |
5189 core.String kind; | 5195 core.String kind; |
5190 /** | 5196 |
5191 * The page token for the next page of Team Drives. This will be absent if the | 5197 /// The page token for the next page of Team Drives. This will be absent if |
5192 * end of the Team Drives list has been reached. If the token is rejected for | 5198 /// the end of the Team Drives list has been reached. If the token is |
5193 * any reason, it should be discarded, and pagination should be restarted from | 5199 /// rejected for any reason, it should be discarded, and pagination should be |
5194 * the first page of results. | 5200 /// restarted from the first page of results. |
5195 */ | |
5196 core.String nextPageToken; | 5201 core.String nextPageToken; |
5197 /** | 5202 |
5198 * The list of Team Drives. If nextPageToken is populated, then this list may | 5203 /// The list of Team Drives. If nextPageToken is populated, then this list |
5199 * be incomplete and an additional page of results should be fetched. | 5204 /// may be incomplete and an additional page of results should be fetched. |
5200 */ | |
5201 core.List<TeamDrive> teamDrives; | 5205 core.List<TeamDrive> teamDrives; |
5202 | 5206 |
5203 TeamDriveList(); | 5207 TeamDriveList(); |
5204 | 5208 |
5205 TeamDriveList.fromJson(core.Map _json) { | 5209 TeamDriveList.fromJson(core.Map _json) { |
5206 if (_json.containsKey("kind")) { | 5210 if (_json.containsKey("kind")) { |
5207 kind = _json["kind"]; | 5211 kind = _json["kind"]; |
5208 } | 5212 } |
5209 if (_json.containsKey("nextPageToken")) { | 5213 if (_json.containsKey("nextPageToken")) { |
5210 nextPageToken = _json["nextPageToken"]; | 5214 nextPageToken = _json["nextPageToken"]; |
5211 } | 5215 } |
5212 if (_json.containsKey("teamDrives")) { | 5216 if (_json.containsKey("teamDrives")) { |
5213 teamDrives = _json["teamDrives"].map((value) => new TeamDrive.fromJson(val
ue)).toList(); | 5217 teamDrives = _json["teamDrives"] |
| 5218 .map((value) => new TeamDrive.fromJson(value)) |
| 5219 .toList(); |
5214 } | 5220 } |
5215 } | 5221 } |
5216 | 5222 |
5217 core.Map<core.String, core.Object> toJson() { | 5223 core.Map<core.String, core.Object> toJson() { |
5218 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5224 final core.Map<core.String, core.Object> _json = |
| 5225 new core.Map<core.String, core.Object>(); |
5219 if (kind != null) { | 5226 if (kind != null) { |
5220 _json["kind"] = kind; | 5227 _json["kind"] = kind; |
5221 } | 5228 } |
5222 if (nextPageToken != null) { | 5229 if (nextPageToken != null) { |
5223 _json["nextPageToken"] = nextPageToken; | 5230 _json["nextPageToken"] = nextPageToken; |
5224 } | 5231 } |
5225 if (teamDrives != null) { | 5232 if (teamDrives != null) { |
5226 _json["teamDrives"] = teamDrives.map((value) => (value).toJson()).toList()
; | 5233 _json["teamDrives"] = |
| 5234 teamDrives.map((value) => (value).toJson()).toList(); |
5227 } | 5235 } |
5228 return _json; | 5236 return _json; |
5229 } | 5237 } |
5230 } | 5238 } |
5231 | 5239 |
5232 /** Information about a Drive user. */ | 5240 /// Information about a Drive user. |
5233 class User { | 5241 class User { |
5234 /** A plain text displayable name for this user. */ | 5242 /// A plain text displayable name for this user. |
5235 core.String displayName; | 5243 core.String displayName; |
5236 /** | 5244 |
5237 * The email address of the user. This may not be present in certain contexts | 5245 /// The email address of the user. This may not be present in certain |
5238 * if the user has not made their email address visible to the requester. | 5246 /// contexts if the user has not made their email address visible to the |
5239 */ | 5247 /// requester. |
5240 core.String emailAddress; | 5248 core.String emailAddress; |
5241 /** | 5249 |
5242 * Identifies what kind of resource this is. Value: the fixed string | 5250 /// Identifies what kind of resource this is. Value: the fixed string |
5243 * "drive#user". | 5251 /// "drive#user". |
5244 */ | |
5245 core.String kind; | 5252 core.String kind; |
5246 /** Whether this user is the requesting user. */ | 5253 |
| 5254 /// Whether this user is the requesting user. |
5247 core.bool me; | 5255 core.bool me; |
5248 /** The user's ID as visible in Permission resources. */ | 5256 |
| 5257 /// The user's ID as visible in Permission resources. |
5249 core.String permissionId; | 5258 core.String permissionId; |
5250 /** A link to the user's profile photo, if available. */ | 5259 |
| 5260 /// A link to the user's profile photo, if available. |
5251 core.String photoLink; | 5261 core.String photoLink; |
5252 | 5262 |
5253 User(); | 5263 User(); |
5254 | 5264 |
5255 User.fromJson(core.Map _json) { | 5265 User.fromJson(core.Map _json) { |
5256 if (_json.containsKey("displayName")) { | 5266 if (_json.containsKey("displayName")) { |
5257 displayName = _json["displayName"]; | 5267 displayName = _json["displayName"]; |
5258 } | 5268 } |
5259 if (_json.containsKey("emailAddress")) { | 5269 if (_json.containsKey("emailAddress")) { |
5260 emailAddress = _json["emailAddress"]; | 5270 emailAddress = _json["emailAddress"]; |
5261 } | 5271 } |
5262 if (_json.containsKey("kind")) { | 5272 if (_json.containsKey("kind")) { |
5263 kind = _json["kind"]; | 5273 kind = _json["kind"]; |
5264 } | 5274 } |
5265 if (_json.containsKey("me")) { | 5275 if (_json.containsKey("me")) { |
5266 me = _json["me"]; | 5276 me = _json["me"]; |
5267 } | 5277 } |
5268 if (_json.containsKey("permissionId")) { | 5278 if (_json.containsKey("permissionId")) { |
5269 permissionId = _json["permissionId"]; | 5279 permissionId = _json["permissionId"]; |
5270 } | 5280 } |
5271 if (_json.containsKey("photoLink")) { | 5281 if (_json.containsKey("photoLink")) { |
5272 photoLink = _json["photoLink"]; | 5282 photoLink = _json["photoLink"]; |
5273 } | 5283 } |
5274 } | 5284 } |
5275 | 5285 |
5276 core.Map<core.String, core.Object> toJson() { | 5286 core.Map<core.String, core.Object> toJson() { |
5277 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5287 final core.Map<core.String, core.Object> _json = |
| 5288 new core.Map<core.String, core.Object>(); |
5278 if (displayName != null) { | 5289 if (displayName != null) { |
5279 _json["displayName"] = displayName; | 5290 _json["displayName"] = displayName; |
5280 } | 5291 } |
5281 if (emailAddress != null) { | 5292 if (emailAddress != null) { |
5282 _json["emailAddress"] = emailAddress; | 5293 _json["emailAddress"] = emailAddress; |
5283 } | 5294 } |
5284 if (kind != null) { | 5295 if (kind != null) { |
5285 _json["kind"] = kind; | 5296 _json["kind"] = kind; |
5286 } | 5297 } |
5287 if (me != null) { | 5298 if (me != null) { |
5288 _json["me"] = me; | 5299 _json["me"] = me; |
5289 } | 5300 } |
5290 if (permissionId != null) { | 5301 if (permissionId != null) { |
5291 _json["permissionId"] = permissionId; | 5302 _json["permissionId"] = permissionId; |
5292 } | 5303 } |
5293 if (photoLink != null) { | 5304 if (photoLink != null) { |
5294 _json["photoLink"] = photoLink; | 5305 _json["photoLink"] = photoLink; |
5295 } | 5306 } |
5296 return _json; | 5307 return _json; |
5297 } | 5308 } |
5298 } | 5309 } |
OLD | NEW |