Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1274)

Side by Side Diff: generated/googleapis/lib/drive/v2.dart

Issue 2734843002: Api-roll 46: 2017-03-06 (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.v2; 3 library googleapis.drive.v2;
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_1; 7 import 'dart:convert' as convert_1;
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;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); 60 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester);
61 ChildrenResourceApi get children => new ChildrenResourceApi(_requester); 61 ChildrenResourceApi get children => new ChildrenResourceApi(_requester);
62 CommentsResourceApi get comments => new CommentsResourceApi(_requester); 62 CommentsResourceApi get comments => new CommentsResourceApi(_requester);
63 FilesResourceApi get files => new FilesResourceApi(_requester); 63 FilesResourceApi get files => new FilesResourceApi(_requester);
64 ParentsResourceApi get parents => new ParentsResourceApi(_requester); 64 ParentsResourceApi get parents => new ParentsResourceApi(_requester);
65 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste r); 65 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste r);
66 PropertiesResourceApi get properties => new PropertiesResourceApi(_requester); 66 PropertiesResourceApi get properties => new PropertiesResourceApi(_requester);
67 RealtimeResourceApi get realtime => new RealtimeResourceApi(_requester); 67 RealtimeResourceApi get realtime => new RealtimeResourceApi(_requester);
68 RepliesResourceApi get replies => new RepliesResourceApi(_requester); 68 RepliesResourceApi get replies => new RepliesResourceApi(_requester);
69 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester); 69 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester);
70 TeamdrivesResourceApi get teamdrives => new TeamdrivesResourceApi(_requester);
70 71
71 DriveApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com /", core.String servicePath: "drive/v2/"}) : 72 DriveApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com /", core.String servicePath: "drive/v2/"}) :
72 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 73 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
73 } 74 }
74 75
75 76
76 class AboutResourceApi { 77 class AboutResourceApi {
77 final commons.ApiRequester _requester; 78 final commons.ApiRequester _requester;
78 79
79 AboutResourceApi(commons.ApiRequester client) : 80 AboutResourceApi(commons.ApiRequester client) :
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 ChangesResourceApi(commons.ApiRequester client) : 249 ChangesResourceApi(commons.ApiRequester client) :
249 _requester = client; 250 _requester = client;
250 251
251 /** 252 /**
252 * Gets a specific change. 253 * Gets a specific change.
253 * 254 *
254 * Request parameters: 255 * Request parameters:
255 * 256 *
256 * [changeId] - The ID of the change. 257 * [changeId] - The ID of the change.
257 * 258 *
259 * [supportsTeamDrives] - Whether the requesting application supports Team
260 * Drives.
261 *
262 * [teamDriveId] - The Team Drive from which the change will be returned.
263 *
258 * Completes with a [Change]. 264 * Completes with a [Change].
259 * 265 *
260 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 266 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
261 * error. 267 * error.
262 * 268 *
263 * If the used [http.Client] completes with an error when making a REST call, 269 * If the used [http.Client] completes with an error when making a REST call,
264 * this method will complete with the same error. 270 * this method will complete with the same error.
265 */ 271 */
266 async.Future<Change> get(core.String changeId) { 272 async.Future<Change> get(core.String changeId, {core.bool supportsTeamDrives, core.String teamDriveId}) {
267 var _url = null; 273 var _url = null;
268 var _queryParams = new core.Map(); 274 var _queryParams = new core.Map();
269 var _uploadMedia = null; 275 var _uploadMedia = null;
270 var _uploadOptions = null; 276 var _uploadOptions = null;
271 var _downloadOptions = commons.DownloadOptions.Metadata; 277 var _downloadOptions = commons.DownloadOptions.Metadata;
272 var _body = null; 278 var _body = null;
273 279
274 if (changeId == null) { 280 if (changeId == null) {
275 throw new core.ArgumentError("Parameter changeId is required."); 281 throw new core.ArgumentError("Parameter changeId is required.");
276 } 282 }
283 if (supportsTeamDrives != null) {
284 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
285 }
286 if (teamDriveId != null) {
287 _queryParams["teamDriveId"] = [teamDriveId];
288 }
277 289
278 _url = 'changes/' + commons.Escaper.ecapeVariable('$changeId'); 290 _url = 'changes/' + commons.Escaper.ecapeVariable('$changeId');
279 291
280 var _response = _requester.request(_url, 292 var _response = _requester.request(_url,
281 "GET", 293 "GET",
282 body: _body, 294 body: _body,
283 queryParams: _queryParams, 295 queryParams: _queryParams,
284 uploadOptions: _uploadOptions, 296 uploadOptions: _uploadOptions,
285 uploadMedia: _uploadMedia, 297 uploadMedia: _uploadMedia,
286 downloadOptions: _downloadOptions); 298 downloadOptions: _downloadOptions);
287 return _response.then((data) => new Change.fromJson(data)); 299 return _response.then((data) => new Change.fromJson(data));
288 } 300 }
289 301
290 /** 302 /**
291 * Gets the starting pageToken for listing future changes. 303 * Gets the starting pageToken for listing future changes.
292 * 304 *
293 * Request parameters: 305 * Request parameters:
294 * 306 *
307 * [supportsTeamDrives] - Whether the requesting application supports Team
308 * Drives.
309 *
310 * [teamDriveId] - The ID of the Team Drive for which the starting pageToken
311 * for listing future changes from that Team Drive will be returned.
312 *
295 * Completes with a [StartPageToken]. 313 * Completes with a [StartPageToken].
296 * 314 *
297 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 315 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
298 * error. 316 * error.
299 * 317 *
300 * If the used [http.Client] completes with an error when making a REST call, 318 * If the used [http.Client] completes with an error when making a REST call,
301 * this method will complete with the same error. 319 * this method will complete with the same error.
302 */ 320 */
303 async.Future<StartPageToken> getStartPageToken() { 321 async.Future<StartPageToken> getStartPageToken({core.bool supportsTeamDrives, core.String teamDriveId}) {
304 var _url = null; 322 var _url = null;
305 var _queryParams = new core.Map(); 323 var _queryParams = new core.Map();
306 var _uploadMedia = null; 324 var _uploadMedia = null;
307 var _uploadOptions = null; 325 var _uploadOptions = null;
308 var _downloadOptions = commons.DownloadOptions.Metadata; 326 var _downloadOptions = commons.DownloadOptions.Metadata;
309 var _body = null; 327 var _body = null;
310 328
329 if (supportsTeamDrives != null) {
330 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
331 }
332 if (teamDriveId != null) {
333 _queryParams["teamDriveId"] = [teamDriveId];
334 }
311 335
312 _url = 'changes/startPageToken'; 336 _url = 'changes/startPageToken';
313 337
314 var _response = _requester.request(_url, 338 var _response = _requester.request(_url,
315 "GET", 339 "GET",
316 body: _body, 340 body: _body,
317 queryParams: _queryParams, 341 queryParams: _queryParams,
318 uploadOptions: _uploadOptions, 342 uploadOptions: _uploadOptions,
319 uploadMedia: _uploadMedia, 343 uploadMedia: _uploadMedia,
320 downloadOptions: _downloadOptions); 344 downloadOptions: _downloadOptions);
321 return _response.then((data) => new StartPageToken.fromJson(data)); 345 return _response.then((data) => new StartPageToken.fromJson(data));
322 } 346 }
323 347
324 /** 348 /**
325 * Lists the changes for a user. 349 * Lists the changes for a user or Team Drive.
326 * 350 *
327 * Request parameters: 351 * Request parameters:
328 * 352 *
329 * [includeDeleted] - Whether to include deleted items. 353 * [includeCorpusRemovals] - Whether changes should include the file resource
354 * if the file is still accessible by the user at the time of the request,
355 * even when a file was removed from the list of changes and there will be no
356 * further change entries for this file.
357 *
358 * [includeDeleted] - Whether to include changes indicating that items have
359 * been removed from the list of changes, for example by deletion or loss of
360 * access.
330 * 361 *
331 * [includeSubscribed] - Whether to include public files the user has opened 362 * [includeSubscribed] - Whether to include public files the user has opened
332 * and shared files. When set to false, the list only includes owned files 363 * and shared files. When set to false, the list only includes owned files
333 * plus any shared or public files the user has explicitly added to a folder 364 * plus any shared or public files the user has explicitly added to a folder
334 * they own. 365 * they own.
335 * 366 *
367 * [includeTeamDriveItems] - Whether Team Drive files or changes should be
368 * included in results.
369 *
336 * [maxResults] - Maximum number of changes to return. 370 * [maxResults] - Maximum number of changes to return.
337 * 371 *
338 * [pageToken] - The token for continuing a previous list request on the next 372 * [pageToken] - The token for continuing a previous list request on the next
339 * page. This should be set to the value of 'nextPageToken' from the previous 373 * page. This should be set to the value of 'nextPageToken' from the previous
340 * response or to the response from the getStartPageToken method. 374 * response or to the response from the getStartPageToken method.
341 * 375 *
342 * [spaces] - A comma-separated list of spaces to query. Supported values are 376 * [spaces] - A comma-separated list of spaces to query. Supported values are
343 * 'drive', 'appDataFolder' and 'photos'. 377 * 'drive', 'appDataFolder' and 'photos'.
344 * 378 *
345 * [startChangeId] - Change ID to start listing changes from. 379 * [startChangeId] - Change ID to start listing changes from.
346 * 380 *
381 * [supportsTeamDrives] - Whether the requesting application supports Team
382 * Drives.
383 *
384 * [teamDriveId] - The Team Drive from which changes will be returned. If
385 * specified the change IDs will be reflective of the Team Drive; use the
386 * combined Team Drive ID and change ID as an identifier.
387 *
347 * Completes with a [ChangeList]. 388 * Completes with a [ChangeList].
348 * 389 *
349 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 390 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
350 * error. 391 * error.
351 * 392 *
352 * If the used [http.Client] completes with an error when making a REST call, 393 * If the used [http.Client] completes with an error when making a REST call,
353 * this method will complete with the same error. 394 * this method will complete with the same error.
354 */ 395 */
355 async.Future<ChangeList> list({core.bool includeDeleted, core.bool includeSubs cribed, core.int maxResults, core.String pageToken, core.String spaces, core.Str ing startChangeId}) { 396 async.Future<ChangeList> list({core.bool includeCorpusRemovals, core.bool incl udeDeleted, core.bool includeSubscribed, core.bool includeTeamDriveItems, core.i nt maxResults, core.String pageToken, core.String spaces, core.String startChang eId, core.bool supportsTeamDrives, core.String teamDriveId}) {
356 var _url = null; 397 var _url = null;
357 var _queryParams = new core.Map(); 398 var _queryParams = new core.Map();
358 var _uploadMedia = null; 399 var _uploadMedia = null;
359 var _uploadOptions = null; 400 var _uploadOptions = null;
360 var _downloadOptions = commons.DownloadOptions.Metadata; 401 var _downloadOptions = commons.DownloadOptions.Metadata;
361 var _body = null; 402 var _body = null;
362 403
404 if (includeCorpusRemovals != null) {
405 _queryParams["includeCorpusRemovals"] = ["${includeCorpusRemovals}"];
406 }
363 if (includeDeleted != null) { 407 if (includeDeleted != null) {
364 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 408 _queryParams["includeDeleted"] = ["${includeDeleted}"];
365 } 409 }
366 if (includeSubscribed != null) { 410 if (includeSubscribed != null) {
367 _queryParams["includeSubscribed"] = ["${includeSubscribed}"]; 411 _queryParams["includeSubscribed"] = ["${includeSubscribed}"];
368 } 412 }
413 if (includeTeamDriveItems != null) {
414 _queryParams["includeTeamDriveItems"] = ["${includeTeamDriveItems}"];
415 }
369 if (maxResults != null) { 416 if (maxResults != null) {
370 _queryParams["maxResults"] = ["${maxResults}"]; 417 _queryParams["maxResults"] = ["${maxResults}"];
371 } 418 }
372 if (pageToken != null) { 419 if (pageToken != null) {
373 _queryParams["pageToken"] = [pageToken]; 420 _queryParams["pageToken"] = [pageToken];
374 } 421 }
375 if (spaces != null) { 422 if (spaces != null) {
376 _queryParams["spaces"] = [spaces]; 423 _queryParams["spaces"] = [spaces];
377 } 424 }
378 if (startChangeId != null) { 425 if (startChangeId != null) {
379 _queryParams["startChangeId"] = [startChangeId]; 426 _queryParams["startChangeId"] = [startChangeId];
380 } 427 }
428 if (supportsTeamDrives != null) {
429 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
430 }
431 if (teamDriveId != null) {
432 _queryParams["teamDriveId"] = [teamDriveId];
433 }
381 434
382 _url = 'changes'; 435 _url = 'changes';
383 436
384 var _response = _requester.request(_url, 437 var _response = _requester.request(_url,
385 "GET", 438 "GET",
386 body: _body, 439 body: _body,
387 queryParams: _queryParams, 440 queryParams: _queryParams,
388 uploadOptions: _uploadOptions, 441 uploadOptions: _uploadOptions,
389 uploadMedia: _uploadMedia, 442 uploadMedia: _uploadMedia,
390 downloadOptions: _downloadOptions); 443 downloadOptions: _downloadOptions);
391 return _response.then((data) => new ChangeList.fromJson(data)); 444 return _response.then((data) => new ChangeList.fromJson(data));
392 } 445 }
393 446
394 /** 447 /**
395 * Subscribe to changes for a user. 448 * Subscribe to changes for a user.
396 * 449 *
397 * [request] - The metadata request object. 450 * [request] - The metadata request object.
398 * 451 *
399 * Request parameters: 452 * Request parameters:
400 * 453 *
401 * [includeDeleted] - Whether to include deleted items. 454 * [includeCorpusRemovals] - Whether changes should include the file resource
455 * if the file is still accessible by the user at the time of the request,
456 * even when a file was removed from the list of changes and there will be no
457 * further change entries for this file.
458 *
459 * [includeDeleted] - Whether to include changes indicating that items have
460 * been removed from the list of changes, for example by deletion or loss of
461 * access.
402 * 462 *
403 * [includeSubscribed] - Whether to include public files the user has opened 463 * [includeSubscribed] - Whether to include public files the user has opened
404 * and shared files. When set to false, the list only includes owned files 464 * and shared files. When set to false, the list only includes owned files
405 * plus any shared or public files the user has explicitly added to a folder 465 * plus any shared or public files the user has explicitly added to a folder
406 * they own. 466 * they own.
407 * 467 *
468 * [includeTeamDriveItems] - Whether Team Drive files or changes should be
469 * included in results.
470 *
408 * [maxResults] - Maximum number of changes to return. 471 * [maxResults] - Maximum number of changes to return.
409 * 472 *
410 * [pageToken] - The token for continuing a previous list request on the next 473 * [pageToken] - The token for continuing a previous list request on the next
411 * page. This should be set to the value of 'nextPageToken' from the previous 474 * page. This should be set to the value of 'nextPageToken' from the previous
412 * response or to the response from the getStartPageToken method. 475 * response or to the response from the getStartPageToken method.
413 * 476 *
414 * [spaces] - A comma-separated list of spaces to query. Supported values are 477 * [spaces] - A comma-separated list of spaces to query. Supported values are
415 * 'drive', 'appDataFolder' and 'photos'. 478 * 'drive', 'appDataFolder' and 'photos'.
416 * 479 *
417 * [startChangeId] - Change ID to start listing changes from. 480 * [startChangeId] - Change ID to start listing changes from.
418 * 481 *
482 * [supportsTeamDrives] - Whether the requesting application supports Team
483 * Drives.
484 *
485 * [teamDriveId] - The Team Drive from which changes will be returned. If
486 * specified the change IDs will be reflective of the Team Drive; use the
487 * combined Team Drive ID and change ID as an identifier.
488 *
419 * Completes with a [Channel]. 489 * Completes with a [Channel].
420 * 490 *
421 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 491 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
422 * error. 492 * error.
423 * 493 *
424 * If the used [http.Client] completes with an error when making a REST call, 494 * If the used [http.Client] completes with an error when making a REST call,
425 * this method will complete with the same error. 495 * this method will complete with the same error.
426 */ 496 */
427 async.Future<Channel> watch(Channel request, {core.bool includeDeleted, core.b ool includeSubscribed, core.int maxResults, core.String pageToken, core.String s paces, core.String startChangeId}) { 497 async.Future<Channel> watch(Channel request, {core.bool includeCorpusRemovals, core.bool includeDeleted, core.bool includeSubscribed, core.bool includeTeamDri veItems, core.int maxResults, core.String pageToken, core.String spaces, core.St ring startChangeId, core.bool supportsTeamDrives, core.String teamDriveId}) {
428 var _url = null; 498 var _url = null;
429 var _queryParams = new core.Map(); 499 var _queryParams = new core.Map();
430 var _uploadMedia = null; 500 var _uploadMedia = null;
431 var _uploadOptions = null; 501 var _uploadOptions = null;
432 var _downloadOptions = commons.DownloadOptions.Metadata; 502 var _downloadOptions = commons.DownloadOptions.Metadata;
433 var _body = null; 503 var _body = null;
434 504
435 if (request != null) { 505 if (request != null) {
436 _body = convert_1.JSON.encode((request).toJson()); 506 _body = convert_1.JSON.encode((request).toJson());
437 } 507 }
508 if (includeCorpusRemovals != null) {
509 _queryParams["includeCorpusRemovals"] = ["${includeCorpusRemovals}"];
510 }
438 if (includeDeleted != null) { 511 if (includeDeleted != null) {
439 _queryParams["includeDeleted"] = ["${includeDeleted}"]; 512 _queryParams["includeDeleted"] = ["${includeDeleted}"];
440 } 513 }
441 if (includeSubscribed != null) { 514 if (includeSubscribed != null) {
442 _queryParams["includeSubscribed"] = ["${includeSubscribed}"]; 515 _queryParams["includeSubscribed"] = ["${includeSubscribed}"];
443 } 516 }
517 if (includeTeamDriveItems != null) {
518 _queryParams["includeTeamDriveItems"] = ["${includeTeamDriveItems}"];
519 }
444 if (maxResults != null) { 520 if (maxResults != null) {
445 _queryParams["maxResults"] = ["${maxResults}"]; 521 _queryParams["maxResults"] = ["${maxResults}"];
446 } 522 }
447 if (pageToken != null) { 523 if (pageToken != null) {
448 _queryParams["pageToken"] = [pageToken]; 524 _queryParams["pageToken"] = [pageToken];
449 } 525 }
450 if (spaces != null) { 526 if (spaces != null) {
451 _queryParams["spaces"] = [spaces]; 527 _queryParams["spaces"] = [spaces];
452 } 528 }
453 if (startChangeId != null) { 529 if (startChangeId != null) {
454 _queryParams["startChangeId"] = [startChangeId]; 530 _queryParams["startChangeId"] = [startChangeId];
455 } 531 }
532 if (supportsTeamDrives != null) {
533 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
534 }
535 if (teamDriveId != null) {
536 _queryParams["teamDriveId"] = [teamDriveId];
537 }
456 538
457 _url = 'changes/watch'; 539 _url = 'changes/watch';
458 540
459 var _response = _requester.request(_url, 541 var _response = _requester.request(_url,
460 "POST", 542 "POST",
461 body: _body, 543 body: _body,
462 queryParams: _queryParams, 544 queryParams: _queryParams,
463 uploadOptions: _uploadOptions, 545 uploadOptions: _uploadOptions,
464 uploadMedia: _uploadMedia, 546 uploadMedia: _uploadMedia,
465 downloadOptions: _downloadOptions); 547 downloadOptions: _downloadOptions);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 695
614 /** 696 /**
615 * Inserts a file into a folder. 697 * Inserts a file into a folder.
616 * 698 *
617 * [request] - The metadata request object. 699 * [request] - The metadata request object.
618 * 700 *
619 * Request parameters: 701 * Request parameters:
620 * 702 *
621 * [folderId] - The ID of the folder. 703 * [folderId] - The ID of the folder.
622 * 704 *
705 * [supportsTeamDrives] - Whether the requesting application supports Team
706 * Drives.
707 *
623 * Completes with a [ChildReference]. 708 * Completes with a [ChildReference].
624 * 709 *
625 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 710 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
626 * error. 711 * error.
627 * 712 *
628 * If the used [http.Client] completes with an error when making a REST call, 713 * If the used [http.Client] completes with an error when making a REST call,
629 * this method will complete with the same error. 714 * this method will complete with the same error.
630 */ 715 */
631 async.Future<ChildReference> insert(ChildReference request, core.String folder Id) { 716 async.Future<ChildReference> insert(ChildReference request, core.String folder Id, {core.bool supportsTeamDrives}) {
632 var _url = null; 717 var _url = null;
633 var _queryParams = new core.Map(); 718 var _queryParams = new core.Map();
634 var _uploadMedia = null; 719 var _uploadMedia = null;
635 var _uploadOptions = null; 720 var _uploadOptions = null;
636 var _downloadOptions = commons.DownloadOptions.Metadata; 721 var _downloadOptions = commons.DownloadOptions.Metadata;
637 var _body = null; 722 var _body = null;
638 723
639 if (request != null) { 724 if (request != null) {
640 _body = convert_1.JSON.encode((request).toJson()); 725 _body = convert_1.JSON.encode((request).toJson());
641 } 726 }
642 if (folderId == null) { 727 if (folderId == null) {
643 throw new core.ArgumentError("Parameter folderId is required."); 728 throw new core.ArgumentError("Parameter folderId is required.");
644 } 729 }
730 if (supportsTeamDrives != null) {
731 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
732 }
645 733
646 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children'; 734 _url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children';
647 735
648 var _response = _requester.request(_url, 736 var _response = _requester.request(_url,
649 "POST", 737 "POST",
650 body: _body, 738 body: _body,
651 queryParams: _queryParams, 739 queryParams: _queryParams,
652 uploadOptions: _uploadOptions, 740 uploadOptions: _uploadOptions,
653 uploadMedia: _uploadMedia, 741 uploadMedia: _uploadMedia,
654 downloadOptions: _downloadOptions); 742 downloadOptions: _downloadOptions);
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 * format. 1141 * format.
1054 * 1142 *
1055 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. 1143 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1056 * 1144 *
1057 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values 1145 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values
1058 * are BCP 47 codes. 1146 * are BCP 47 codes.
1059 * 1147 *
1060 * [pinned] - Whether to pin the head revision of the new copy. A file can 1148 * [pinned] - Whether to pin the head revision of the new copy. A file can
1061 * have a maximum of 200 pinned revisions. 1149 * have a maximum of 200 pinned revisions.
1062 * 1150 *
1151 * [supportsTeamDrives] - Whether the requesting application supports Team
1152 * Drives.
1153 *
1063 * [timedTextLanguage] - The language of the timed text. 1154 * [timedTextLanguage] - The language of the timed text.
1064 * 1155 *
1065 * [timedTextTrackName] - The timed text track name. 1156 * [timedTextTrackName] - The timed text track name.
1066 * 1157 *
1067 * [visibility] - The visibility of the new file. This parameter is only 1158 * [visibility] - The visibility of the new file. This parameter is only
1068 * relevant when the source is not a native Google Doc and convert=false. 1159 * relevant when the source is not a native Google Doc and convert=false.
1069 * Possible string values are: 1160 * Possible string values are:
1070 * - "DEFAULT" : The visibility of the new file is determined by the user's 1161 * - "DEFAULT" : The visibility of the new file is determined by the user's
1071 * default visibility/sharing policies. 1162 * default visibility/sharing policies.
1072 * - "PRIVATE" : The new file will be visible to only the owner. 1163 * - "PRIVATE" : The new file will be visible to only the owner.
1073 * 1164 *
1074 * Completes with a [File]. 1165 * Completes with a [File].
1075 * 1166 *
1076 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1167 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1077 * error. 1168 * error.
1078 * 1169 *
1079 * If the used [http.Client] completes with an error when making a REST call, 1170 * If the used [http.Client] completes with an error when making a REST call,
1080 * this method will complete with the same error. 1171 * this method will complete with the same error.
1081 */ 1172 */
1082 async.Future<File> copy(File request, core.String fileId, {core.bool convert, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String timedTextL anguage, core.String timedTextTrackName, core.String visibility}) { 1173 async.Future<File> copy(File request, core.String fileId, {core.bool convert, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.bool supportsTeam Drives, core.String timedTextLanguage, core.String timedTextTrackName, core.Stri ng visibility}) {
1083 var _url = null; 1174 var _url = null;
1084 var _queryParams = new core.Map(); 1175 var _queryParams = new core.Map();
1085 var _uploadMedia = null; 1176 var _uploadMedia = null;
1086 var _uploadOptions = null; 1177 var _uploadOptions = null;
1087 var _downloadOptions = commons.DownloadOptions.Metadata; 1178 var _downloadOptions = commons.DownloadOptions.Metadata;
1088 var _body = null; 1179 var _body = null;
1089 1180
1090 if (request != null) { 1181 if (request != null) {
1091 _body = convert_1.JSON.encode((request).toJson()); 1182 _body = convert_1.JSON.encode((request).toJson());
1092 } 1183 }
1093 if (fileId == null) { 1184 if (fileId == null) {
1094 throw new core.ArgumentError("Parameter fileId is required."); 1185 throw new core.ArgumentError("Parameter fileId is required.");
1095 } 1186 }
1096 if (convert != null) { 1187 if (convert != null) {
1097 _queryParams["convert"] = ["${convert}"]; 1188 _queryParams["convert"] = ["${convert}"];
1098 } 1189 }
1099 if (ocr != null) { 1190 if (ocr != null) {
1100 _queryParams["ocr"] = ["${ocr}"]; 1191 _queryParams["ocr"] = ["${ocr}"];
1101 } 1192 }
1102 if (ocrLanguage != null) { 1193 if (ocrLanguage != null) {
1103 _queryParams["ocrLanguage"] = [ocrLanguage]; 1194 _queryParams["ocrLanguage"] = [ocrLanguage];
1104 } 1195 }
1105 if (pinned != null) { 1196 if (pinned != null) {
1106 _queryParams["pinned"] = ["${pinned}"]; 1197 _queryParams["pinned"] = ["${pinned}"];
1107 } 1198 }
1199 if (supportsTeamDrives != null) {
1200 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1201 }
1108 if (timedTextLanguage != null) { 1202 if (timedTextLanguage != null) {
1109 _queryParams["timedTextLanguage"] = [timedTextLanguage]; 1203 _queryParams["timedTextLanguage"] = [timedTextLanguage];
1110 } 1204 }
1111 if (timedTextTrackName != null) { 1205 if (timedTextTrackName != null) {
1112 _queryParams["timedTextTrackName"] = [timedTextTrackName]; 1206 _queryParams["timedTextTrackName"] = [timedTextTrackName];
1113 } 1207 }
1114 if (visibility != null) { 1208 if (visibility != null) {
1115 _queryParams["visibility"] = [visibility]; 1209 _queryParams["visibility"] = [visibility];
1116 } 1210 }
1117 1211
1118 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/copy'; 1212 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/copy';
1119 1213
1120 var _response = _requester.request(_url, 1214 var _response = _requester.request(_url,
1121 "POST", 1215 "POST",
1122 body: _body, 1216 body: _body,
1123 queryParams: _queryParams, 1217 queryParams: _queryParams,
1124 uploadOptions: _uploadOptions, 1218 uploadOptions: _uploadOptions,
1125 uploadMedia: _uploadMedia, 1219 uploadMedia: _uploadMedia,
1126 downloadOptions: _downloadOptions); 1220 downloadOptions: _downloadOptions);
1127 return _response.then((data) => new File.fromJson(data)); 1221 return _response.then((data) => new File.fromJson(data));
1128 } 1222 }
1129 1223
1130 /** 1224 /**
1131 * Permanently deletes a file by ID. Skips the trash. The currently 1225 * Permanently deletes a file by ID. Skips the trash. The currently
1132 * authenticated user must own the file. 1226 * authenticated user must own the file or be an organizer on the parent for
1227 * Team Drive files.
1133 * 1228 *
1134 * Request parameters: 1229 * Request parameters:
1135 * 1230 *
1136 * [fileId] - The ID of the file to delete. 1231 * [fileId] - The ID of the file to delete.
1137 * 1232 *
1233 * [supportsTeamDrives] - Whether the requesting application supports Team
1234 * Drives.
1235 *
1138 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1236 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1139 * error. 1237 * error.
1140 * 1238 *
1141 * If the used [http.Client] completes with an error when making a REST call, 1239 * If the used [http.Client] completes with an error when making a REST call,
1142 * this method will complete with the same error. 1240 * this method will complete with the same error.
1143 */ 1241 */
1144 async.Future delete(core.String fileId) { 1242 async.Future delete(core.String fileId, {core.bool supportsTeamDrives}) {
1145 var _url = null; 1243 var _url = null;
1146 var _queryParams = new core.Map(); 1244 var _queryParams = new core.Map();
1147 var _uploadMedia = null; 1245 var _uploadMedia = null;
1148 var _uploadOptions = null; 1246 var _uploadOptions = null;
1149 var _downloadOptions = commons.DownloadOptions.Metadata; 1247 var _downloadOptions = commons.DownloadOptions.Metadata;
1150 var _body = null; 1248 var _body = null;
1151 1249
1152 if (fileId == null) { 1250 if (fileId == null) {
1153 throw new core.ArgumentError("Parameter fileId is required."); 1251 throw new core.ArgumentError("Parameter fileId is required.");
1154 } 1252 }
1253 if (supportsTeamDrives != null) {
1254 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1255 }
1155 1256
1156 _downloadOptions = null; 1257 _downloadOptions = null;
1157 1258
1158 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); 1259 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId');
1159 1260
1160 var _response = _requester.request(_url, 1261 var _response = _requester.request(_url,
1161 "DELETE", 1262 "DELETE",
1162 body: _body, 1263 body: _body,
1163 queryParams: _queryParams, 1264 queryParams: _queryParams,
1164 uploadOptions: _uploadOptions, 1265 uploadOptions: _uploadOptions,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 * downloading known malware or other abusive files. 1414 * downloading known malware or other abusive files.
1314 * 1415 *
1315 * [projection] - This parameter is deprecated and has no function. 1416 * [projection] - This parameter is deprecated and has no function.
1316 * Possible string values are: 1417 * Possible string values are:
1317 * - "BASIC" : Deprecated 1418 * - "BASIC" : Deprecated
1318 * - "FULL" : Deprecated 1419 * - "FULL" : Deprecated
1319 * 1420 *
1320 * [revisionId] - Specifies the Revision ID that should be downloaded. Ignored 1421 * [revisionId] - Specifies the Revision ID that should be downloaded. Ignored
1321 * unless alt=media is specified. 1422 * unless alt=media is specified.
1322 * 1423 *
1424 * [supportsTeamDrives] - Whether the requesting application supports Team
1425 * Drives.
1426 *
1323 * [updateViewedDate] - Deprecated: Use files.update with 1427 * [updateViewedDate] - Deprecated: Use files.update with
1324 * modifiedDateBehavior=noChange, updateViewedDate=true and an empty request 1428 * modifiedDateBehavior=noChange, updateViewedDate=true and an empty request
1325 * body. 1429 * body.
1326 * 1430 *
1327 * [downloadOptions] - Options for downloading. A download can be either a 1431 * [downloadOptions] - Options for downloading. A download can be either a
1328 * Metadata (default) or Media download. Partial Media downloads are possible 1432 * Metadata (default) or Media download. Partial Media downloads are possible
1329 * as well. 1433 * as well.
1330 * 1434 *
1331 * Completes with a 1435 * Completes with a
1332 * 1436 *
1333 * - [File] for Metadata downloads (see [downloadOptions]). 1437 * - [File] for Metadata downloads (see [downloadOptions]).
1334 * 1438 *
1335 * - [commons.Media] for Media downloads (see [downloadOptions]). 1439 * - [commons.Media] for Media downloads (see [downloadOptions]).
1336 * 1440 *
1337 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1441 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1338 * error. 1442 * error.
1339 * 1443 *
1340 * If the used [http.Client] completes with an error when making a REST call, 1444 * If the used [http.Client] completes with an error when making a REST call,
1341 * this method will complete with the same error. 1445 * this method will complete with the same error.
1342 */ 1446 */
1343 async.Future get(core.String fileId, {core.bool acknowledgeAbuse, core.String projection, core.String revisionId, core.bool updateViewedDate, commons.Download Options downloadOptions: commons.DownloadOptions.Metadata}) { 1447 async.Future get(core.String fileId, {core.bool acknowledgeAbuse, core.String projection, core.String revisionId, core.bool supportsTeamDrives, core.bool upda teViewedDate, commons.DownloadOptions downloadOptions: commons.DownloadOptions.M etadata}) {
1344 var _url = null; 1448 var _url = null;
1345 var _queryParams = new core.Map(); 1449 var _queryParams = new core.Map();
1346 var _uploadMedia = null; 1450 var _uploadMedia = null;
1347 var _uploadOptions = null; 1451 var _uploadOptions = null;
1348 var _downloadOptions = commons.DownloadOptions.Metadata; 1452 var _downloadOptions = commons.DownloadOptions.Metadata;
1349 var _body = null; 1453 var _body = null;
1350 1454
1351 if (fileId == null) { 1455 if (fileId == null) {
1352 throw new core.ArgumentError("Parameter fileId is required."); 1456 throw new core.ArgumentError("Parameter fileId is required.");
1353 } 1457 }
1354 if (acknowledgeAbuse != null) { 1458 if (acknowledgeAbuse != null) {
1355 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"]; 1459 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"];
1356 } 1460 }
1357 if (projection != null) { 1461 if (projection != null) {
1358 _queryParams["projection"] = [projection]; 1462 _queryParams["projection"] = [projection];
1359 } 1463 }
1360 if (revisionId != null) { 1464 if (revisionId != null) {
1361 _queryParams["revisionId"] = [revisionId]; 1465 _queryParams["revisionId"] = [revisionId];
1362 } 1466 }
1467 if (supportsTeamDrives != null) {
1468 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1469 }
1363 if (updateViewedDate != null) { 1470 if (updateViewedDate != null) {
1364 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 1471 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
1365 } 1472 }
1366 1473
1367 _downloadOptions = downloadOptions; 1474 _downloadOptions = downloadOptions;
1368 1475
1369 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId'); 1476 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId');
1370 1477
1371 var _response = _requester.request(_url, 1478 var _response = _requester.request(_url,
1372 "GET", 1479 "GET",
(...skipping 21 matching lines...) Expand all
1394 * format. 1501 * format.
1395 * 1502 *
1396 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. 1503 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1397 * 1504 *
1398 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values 1505 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values
1399 * are BCP 47 codes. 1506 * are BCP 47 codes.
1400 * 1507 *
1401 * [pinned] - Whether to pin the head revision of the uploaded file. A file 1508 * [pinned] - Whether to pin the head revision of the uploaded file. A file
1402 * can have a maximum of 200 pinned revisions. 1509 * can have a maximum of 200 pinned revisions.
1403 * 1510 *
1511 * [supportsTeamDrives] - Whether the requesting application supports Team
1512 * Drives.
1513 *
1404 * [timedTextLanguage] - The language of the timed text. 1514 * [timedTextLanguage] - The language of the timed text.
1405 * 1515 *
1406 * [timedTextTrackName] - The timed text track name. 1516 * [timedTextTrackName] - The timed text track name.
1407 * 1517 *
1408 * [useContentAsIndexableText] - Whether to use the content as indexable text. 1518 * [useContentAsIndexableText] - Whether to use the content as indexable text.
1409 * 1519 *
1410 * [visibility] - The visibility of the new file. This parameter is only 1520 * [visibility] - The visibility of the new file. This parameter is only
1411 * relevant when convert=false. 1521 * relevant when convert=false.
1412 * Possible string values are: 1522 * Possible string values are:
1413 * - "DEFAULT" : The visibility of the new file is determined by the user's 1523 * - "DEFAULT" : The visibility of the new file is determined by the user's
1414 * default visibility/sharing policies. 1524 * default visibility/sharing policies.
1415 * - "PRIVATE" : The new file will be visible to only the owner. 1525 * - "PRIVATE" : The new file will be visible to only the owner.
1416 * 1526 *
1417 * [uploadMedia] - The media to upload. 1527 * [uploadMedia] - The media to upload.
1418 * 1528 *
1419 * [uploadOptions] - Options for the media upload. Streaming Media without the 1529 * [uploadOptions] - Options for the media upload. Streaming Media without the
1420 * length being known ahead of time is only supported via resumable uploads. 1530 * length being known ahead of time is only supported via resumable uploads.
1421 * 1531 *
1422 * Completes with a [File]. 1532 * Completes with a [File].
1423 * 1533 *
1424 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1534 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1425 * error. 1535 * error.
1426 * 1536 *
1427 * If the used [http.Client] completes with an error when making a REST call, 1537 * If the used [http.Client] completes with an error when making a REST call,
1428 * this method will complete with the same error. 1538 * this method will complete with the same error.
1429 */ 1539 */
1430 async.Future<File> insert(File request, {core.bool convert, core.bool ocr, cor e.String ocrLanguage, core.bool pinned, core.String timedTextLanguage, core.Stri ng timedTextTrackName, core.bool useContentAsIndexableText, core.String visibili ty, commons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons .Media uploadMedia}) { 1540 async.Future<File> insert(File request, {core.bool convert, core.bool ocr, cor e.String ocrLanguage, core.bool pinned, core.bool supportsTeamDrives, core.Strin g timedTextLanguage, core.String timedTextTrackName, core.bool useContentAsIndex ableText, core.String visibility, commons.UploadOptions uploadOptions : commons. UploadOptions.Default, commons.Media uploadMedia}) {
1431 var _url = null; 1541 var _url = null;
1432 var _queryParams = new core.Map(); 1542 var _queryParams = new core.Map();
1433 var _uploadMedia = null; 1543 var _uploadMedia = null;
1434 var _uploadOptions = null; 1544 var _uploadOptions = null;
1435 var _downloadOptions = commons.DownloadOptions.Metadata; 1545 var _downloadOptions = commons.DownloadOptions.Metadata;
1436 var _body = null; 1546 var _body = null;
1437 1547
1438 if (request != null) { 1548 if (request != null) {
1439 _body = convert_1.JSON.encode((request).toJson()); 1549 _body = convert_1.JSON.encode((request).toJson());
1440 } 1550 }
1441 if (convert != null) { 1551 if (convert != null) {
1442 _queryParams["convert"] = ["${convert}"]; 1552 _queryParams["convert"] = ["${convert}"];
1443 } 1553 }
1444 if (ocr != null) { 1554 if (ocr != null) {
1445 _queryParams["ocr"] = ["${ocr}"]; 1555 _queryParams["ocr"] = ["${ocr}"];
1446 } 1556 }
1447 if (ocrLanguage != null) { 1557 if (ocrLanguage != null) {
1448 _queryParams["ocrLanguage"] = [ocrLanguage]; 1558 _queryParams["ocrLanguage"] = [ocrLanguage];
1449 } 1559 }
1450 if (pinned != null) { 1560 if (pinned != null) {
1451 _queryParams["pinned"] = ["${pinned}"]; 1561 _queryParams["pinned"] = ["${pinned}"];
1452 } 1562 }
1563 if (supportsTeamDrives != null) {
1564 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1565 }
1453 if (timedTextLanguage != null) { 1566 if (timedTextLanguage != null) {
1454 _queryParams["timedTextLanguage"] = [timedTextLanguage]; 1567 _queryParams["timedTextLanguage"] = [timedTextLanguage];
1455 } 1568 }
1456 if (timedTextTrackName != null) { 1569 if (timedTextTrackName != null) {
1457 _queryParams["timedTextTrackName"] = [timedTextTrackName]; 1570 _queryParams["timedTextTrackName"] = [timedTextTrackName];
1458 } 1571 }
1459 if (useContentAsIndexableText != null) { 1572 if (useContentAsIndexableText != null) {
1460 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText} "]; 1573 _queryParams["useContentAsIndexableText"] = ["${useContentAsIndexableText} "];
1461 } 1574 }
1462 if (visibility != null) { 1575 if (visibility != null) {
(...skipping 20 matching lines...) Expand all
1483 uploadMedia: _uploadMedia, 1596 uploadMedia: _uploadMedia,
1484 downloadOptions: _downloadOptions); 1597 downloadOptions: _downloadOptions);
1485 return _response.then((data) => new File.fromJson(data)); 1598 return _response.then((data) => new File.fromJson(data));
1486 } 1599 }
1487 1600
1488 /** 1601 /**
1489 * Lists the user's files. 1602 * Lists the user's files.
1490 * 1603 *
1491 * Request parameters: 1604 * Request parameters:
1492 * 1605 *
1606 * [corpora] - Comma-separated list of bodies of items (files/documents) to
1607 * which the query applies. Supported bodies are 'default', 'domain',
1608 * 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with
1609 * 'default'; all other values must be used in isolation. Prefer 'default' or
1610 * 'teamDrive' to 'allTeamDrives' for efficiency.
1611 *
1493 * [corpus] - The body of items (files/documents) to which the query applies. 1612 * [corpus] - The body of items (files/documents) to which the query applies.
1613 * Deprecated: use 'corpora' instead.
1494 * Possible string values are: 1614 * Possible string values are:
1495 * - "DEFAULT" : The items that the user has accessed. 1615 * - "DEFAULT" : The items that the user has accessed.
1496 * - "DOMAIN" : Items shared to the user's domain. 1616 * - "DOMAIN" : Items shared to the user's domain.
1497 * 1617 *
1618 * [includeTeamDriveItems] - Whether Team Drive items should be included in
1619 * results.
1620 *
1498 * [maxResults] - Maximum number of files to return. 1621 * [maxResults] - Maximum number of files to return.
1499 * 1622 *
1500 * [orderBy] - A comma-separated list of sort keys. Valid keys are 1623 * [orderBy] - A comma-separated list of sort keys. Valid keys are
1501 * 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 1624 * 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate',
1502 * 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 1625 * 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred',
1503 * and 'title'. Each key sorts ascending by default, but may be reversed with 1626 * and 'title'. Each key sorts ascending by default, but may be reversed with
1504 * the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate 1627 * the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate
1505 * desc,title. Please note that there is a current limitation for users with 1628 * desc,title. Please note that there is a current limitation for users with
1506 * approximately one million files in which the requested sort order is 1629 * approximately one million files in which the requested sort order is
1507 * ignored. 1630 * ignored.
1508 * 1631 *
1509 * [pageToken] - Page token for files. 1632 * [pageToken] - Page token for files.
1510 * 1633 *
1511 * [projection] - This parameter is deprecated and has no function. 1634 * [projection] - This parameter is deprecated and has no function.
1512 * Possible string values are: 1635 * Possible string values are:
1513 * - "BASIC" : Deprecated 1636 * - "BASIC" : Deprecated
1514 * - "FULL" : Deprecated 1637 * - "FULL" : Deprecated
1515 * 1638 *
1516 * [q] - Query string for searching files. 1639 * [q] - Query string for searching files.
1517 * 1640 *
1518 * [spaces] - A comma-separated list of spaces to query. Supported values are 1641 * [spaces] - A comma-separated list of spaces to query. Supported values are
1519 * 'drive', 'appDataFolder' and 'photos'. 1642 * 'drive', 'appDataFolder' and 'photos'.
1520 * 1643 *
1644 * [supportsTeamDrives] - Whether the requesting application supports Team
1645 * Drives.
1646 *
1647 * [teamDriveId] - ID of Team Drive to search.
1648 *
1521 * Completes with a [FileList]. 1649 * Completes with a [FileList].
1522 * 1650 *
1523 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1651 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1524 * error. 1652 * error.
1525 * 1653 *
1526 * If the used [http.Client] completes with an error when making a REST call, 1654 * If the used [http.Client] completes with an error when making a REST call,
1527 * this method will complete with the same error. 1655 * this method will complete with the same error.
1528 */ 1656 */
1529 async.Future<FileList> list({core.String corpus, core.int maxResults, core.Str ing orderBy, core.String pageToken, core.String projection, core.String q, core. String spaces}) { 1657 async.Future<FileList> list({core.String corpora, core.String corpus, core.boo l includeTeamDriveItems, core.int maxResults, core.String orderBy, core.String p ageToken, core.String projection, core.String q, core.String spaces, core.bool s upportsTeamDrives, core.String teamDriveId}) {
1530 var _url = null; 1658 var _url = null;
1531 var _queryParams = new core.Map(); 1659 var _queryParams = new core.Map();
1532 var _uploadMedia = null; 1660 var _uploadMedia = null;
1533 var _uploadOptions = null; 1661 var _uploadOptions = null;
1534 var _downloadOptions = commons.DownloadOptions.Metadata; 1662 var _downloadOptions = commons.DownloadOptions.Metadata;
1535 var _body = null; 1663 var _body = null;
1536 1664
1665 if (corpora != null) {
1666 _queryParams["corpora"] = [corpora];
1667 }
1537 if (corpus != null) { 1668 if (corpus != null) {
1538 _queryParams["corpus"] = [corpus]; 1669 _queryParams["corpus"] = [corpus];
1539 } 1670 }
1671 if (includeTeamDriveItems != null) {
1672 _queryParams["includeTeamDriveItems"] = ["${includeTeamDriveItems}"];
1673 }
1540 if (maxResults != null) { 1674 if (maxResults != null) {
1541 _queryParams["maxResults"] = ["${maxResults}"]; 1675 _queryParams["maxResults"] = ["${maxResults}"];
1542 } 1676 }
1543 if (orderBy != null) { 1677 if (orderBy != null) {
1544 _queryParams["orderBy"] = [orderBy]; 1678 _queryParams["orderBy"] = [orderBy];
1545 } 1679 }
1546 if (pageToken != null) { 1680 if (pageToken != null) {
1547 _queryParams["pageToken"] = [pageToken]; 1681 _queryParams["pageToken"] = [pageToken];
1548 } 1682 }
1549 if (projection != null) { 1683 if (projection != null) {
1550 _queryParams["projection"] = [projection]; 1684 _queryParams["projection"] = [projection];
1551 } 1685 }
1552 if (q != null) { 1686 if (q != null) {
1553 _queryParams["q"] = [q]; 1687 _queryParams["q"] = [q];
1554 } 1688 }
1555 if (spaces != null) { 1689 if (spaces != null) {
1556 _queryParams["spaces"] = [spaces]; 1690 _queryParams["spaces"] = [spaces];
1557 } 1691 }
1692 if (supportsTeamDrives != null) {
1693 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1694 }
1695 if (teamDriveId != null) {
1696 _queryParams["teamDriveId"] = [teamDriveId];
1697 }
1558 1698
1559 _url = 'files'; 1699 _url = 'files';
1560 1700
1561 var _response = _requester.request(_url, 1701 var _response = _requester.request(_url,
1562 "GET", 1702 "GET",
1563 body: _body, 1703 body: _body,
1564 queryParams: _queryParams, 1704 queryParams: _queryParams,
1565 uploadOptions: _uploadOptions, 1705 uploadOptions: _uploadOptions,
1566 uploadMedia: _uploadMedia, 1706 uploadMedia: _uploadMedia,
1567 downloadOptions: _downloadOptions); 1707 downloadOptions: _downloadOptions);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 * are BCP 47 codes. 1749 * are BCP 47 codes.
1610 * 1750 *
1611 * [pinned] - Whether to pin the new revision. A file can have a maximum of 1751 * [pinned] - Whether to pin the new revision. A file can have a maximum of
1612 * 200 pinned revisions. 1752 * 200 pinned revisions.
1613 * 1753 *
1614 * [removeParents] - Comma-separated list of parent IDs to remove. 1754 * [removeParents] - Comma-separated list of parent IDs to remove.
1615 * 1755 *
1616 * [setModifiedDate] - Whether to set the modified date with the supplied 1756 * [setModifiedDate] - Whether to set the modified date with the supplied
1617 * modified date. 1757 * modified date.
1618 * 1758 *
1759 * [supportsTeamDrives] - Whether the requesting application supports Team
1760 * Drives.
1761 *
1619 * [timedTextLanguage] - The language of the timed text. 1762 * [timedTextLanguage] - The language of the timed text.
1620 * 1763 *
1621 * [timedTextTrackName] - The timed text track name. 1764 * [timedTextTrackName] - The timed text track name.
1622 * 1765 *
1623 * [updateViewedDate] - Whether to update the view date after successfully 1766 * [updateViewedDate] - Whether to update the view date after successfully
1624 * updating the file. 1767 * updating the file.
1625 * 1768 *
1626 * [useContentAsIndexableText] - Whether to use the content as indexable text. 1769 * [useContentAsIndexableText] - Whether to use the content as indexable text.
1627 * 1770 *
1628 * Completes with a [File]. 1771 * Completes with a [File].
1629 * 1772 *
1630 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1773 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1631 * error. 1774 * error.
1632 * 1775 *
1633 * If the used [http.Client] completes with an error when making a REST call, 1776 * If the used [http.Client] completes with an error when making a REST call,
1634 * this method will complete with the same error. 1777 * this method will complete with the same error.
1635 */ 1778 */
1636 async.Future<File> patch(File request, core.String fileId, {core.String addPar ents, core.bool convert, core.String modifiedDateBehavior, core.bool newRevision , core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String removePa rents, core.bool setModifiedDate, core.String timedTextLanguage, core.String tim edTextTrackName, core.bool updateViewedDate, core.bool useContentAsIndexableText }) { 1779 async.Future<File> patch(File request, core.String fileId, {core.String addPar ents, core.bool convert, core.String modifiedDateBehavior, core.bool newRevision , core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String removePa rents, core.bool setModifiedDate, core.bool supportsTeamDrives, core.String time dTextLanguage, core.String timedTextTrackName, core.bool updateViewedDate, core. bool useContentAsIndexableText}) {
1637 var _url = null; 1780 var _url = null;
1638 var _queryParams = new core.Map(); 1781 var _queryParams = new core.Map();
1639 var _uploadMedia = null; 1782 var _uploadMedia = null;
1640 var _uploadOptions = null; 1783 var _uploadOptions = null;
1641 var _downloadOptions = commons.DownloadOptions.Metadata; 1784 var _downloadOptions = commons.DownloadOptions.Metadata;
1642 var _body = null; 1785 var _body = null;
1643 1786
1644 if (request != null) { 1787 if (request != null) {
1645 _body = convert_1.JSON.encode((request).toJson()); 1788 _body = convert_1.JSON.encode((request).toJson());
1646 } 1789 }
(...skipping 20 matching lines...) Expand all
1667 } 1810 }
1668 if (pinned != null) { 1811 if (pinned != null) {
1669 _queryParams["pinned"] = ["${pinned}"]; 1812 _queryParams["pinned"] = ["${pinned}"];
1670 } 1813 }
1671 if (removeParents != null) { 1814 if (removeParents != null) {
1672 _queryParams["removeParents"] = [removeParents]; 1815 _queryParams["removeParents"] = [removeParents];
1673 } 1816 }
1674 if (setModifiedDate != null) { 1817 if (setModifiedDate != null) {
1675 _queryParams["setModifiedDate"] = ["${setModifiedDate}"]; 1818 _queryParams["setModifiedDate"] = ["${setModifiedDate}"];
1676 } 1819 }
1820 if (supportsTeamDrives != null) {
1821 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1822 }
1677 if (timedTextLanguage != null) { 1823 if (timedTextLanguage != null) {
1678 _queryParams["timedTextLanguage"] = [timedTextLanguage]; 1824 _queryParams["timedTextLanguage"] = [timedTextLanguage];
1679 } 1825 }
1680 if (timedTextTrackName != null) { 1826 if (timedTextTrackName != null) {
1681 _queryParams["timedTextTrackName"] = [timedTextTrackName]; 1827 _queryParams["timedTextTrackName"] = [timedTextTrackName];
1682 } 1828 }
1683 if (updateViewedDate != null) { 1829 if (updateViewedDate != null) {
1684 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 1830 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
1685 } 1831 }
1686 if (useContentAsIndexableText != null) { 1832 if (useContentAsIndexableText != null) {
(...skipping 12 matching lines...) Expand all
1699 return _response.then((data) => new File.fromJson(data)); 1845 return _response.then((data) => new File.fromJson(data));
1700 } 1846 }
1701 1847
1702 /** 1848 /**
1703 * Set the file's updated time to the current server time. 1849 * Set the file's updated time to the current server time.
1704 * 1850 *
1705 * Request parameters: 1851 * Request parameters:
1706 * 1852 *
1707 * [fileId] - The ID of the file to update. 1853 * [fileId] - The ID of the file to update.
1708 * 1854 *
1855 * [supportsTeamDrives] - Whether the requesting application supports Team
1856 * Drives.
1857 *
1709 * Completes with a [File]. 1858 * Completes with a [File].
1710 * 1859 *
1711 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1860 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1712 * error. 1861 * error.
1713 * 1862 *
1714 * If the used [http.Client] completes with an error when making a REST call, 1863 * If the used [http.Client] completes with an error when making a REST call,
1715 * this method will complete with the same error. 1864 * this method will complete with the same error.
1716 */ 1865 */
1717 async.Future<File> touch(core.String fileId) { 1866 async.Future<File> touch(core.String fileId, {core.bool supportsTeamDrives}) {
1718 var _url = null; 1867 var _url = null;
1719 var _queryParams = new core.Map(); 1868 var _queryParams = new core.Map();
1720 var _uploadMedia = null; 1869 var _uploadMedia = null;
1721 var _uploadOptions = null; 1870 var _uploadOptions = null;
1722 var _downloadOptions = commons.DownloadOptions.Metadata; 1871 var _downloadOptions = commons.DownloadOptions.Metadata;
1723 var _body = null; 1872 var _body = null;
1724 1873
1725 if (fileId == null) { 1874 if (fileId == null) {
1726 throw new core.ArgumentError("Parameter fileId is required."); 1875 throw new core.ArgumentError("Parameter fileId is required.");
1727 } 1876 }
1877 if (supportsTeamDrives != null) {
1878 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1879 }
1728 1880
1729 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/touch'; 1881 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/touch';
1730 1882
1731 var _response = _requester.request(_url, 1883 var _response = _requester.request(_url,
1732 "POST", 1884 "POST",
1733 body: _body, 1885 body: _body,
1734 queryParams: _queryParams, 1886 queryParams: _queryParams,
1735 uploadOptions: _uploadOptions, 1887 uploadOptions: _uploadOptions,
1736 uploadMedia: _uploadMedia, 1888 uploadMedia: _uploadMedia,
1737 downloadOptions: _downloadOptions); 1889 downloadOptions: _downloadOptions);
1738 return _response.then((data) => new File.fromJson(data)); 1890 return _response.then((data) => new File.fromJson(data));
1739 } 1891 }
1740 1892
1741 /** 1893 /**
1742 * Moves a file to the trash. The currently authenticated user must own the 1894 * Moves a file to the trash. The currently authenticated user must own the
1743 * file. 1895 * file or be an organizer on the parent for Team Drive files.
1744 * 1896 *
1745 * Request parameters: 1897 * Request parameters:
1746 * 1898 *
1747 * [fileId] - The ID of the file to trash. 1899 * [fileId] - The ID of the file to trash.
1748 * 1900 *
1901 * [supportsTeamDrives] - Whether the requesting application supports Team
1902 * Drives.
1903 *
1749 * Completes with a [File]. 1904 * Completes with a [File].
1750 * 1905 *
1751 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1906 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1752 * error. 1907 * error.
1753 * 1908 *
1754 * If the used [http.Client] completes with an error when making a REST call, 1909 * If the used [http.Client] completes with an error when making a REST call,
1755 * this method will complete with the same error. 1910 * this method will complete with the same error.
1756 */ 1911 */
1757 async.Future<File> trash(core.String fileId) { 1912 async.Future<File> trash(core.String fileId, {core.bool supportsTeamDrives}) {
1758 var _url = null; 1913 var _url = null;
1759 var _queryParams = new core.Map(); 1914 var _queryParams = new core.Map();
1760 var _uploadMedia = null; 1915 var _uploadMedia = null;
1761 var _uploadOptions = null; 1916 var _uploadOptions = null;
1762 var _downloadOptions = commons.DownloadOptions.Metadata; 1917 var _downloadOptions = commons.DownloadOptions.Metadata;
1763 var _body = null; 1918 var _body = null;
1764 1919
1765 if (fileId == null) { 1920 if (fileId == null) {
1766 throw new core.ArgumentError("Parameter fileId is required."); 1921 throw new core.ArgumentError("Parameter fileId is required.");
1767 } 1922 }
1923 if (supportsTeamDrives != null) {
1924 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1925 }
1768 1926
1769 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/trash'; 1927 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/trash';
1770 1928
1771 var _response = _requester.request(_url, 1929 var _response = _requester.request(_url,
1772 "POST", 1930 "POST",
1773 body: _body, 1931 body: _body,
1774 queryParams: _queryParams, 1932 queryParams: _queryParams,
1775 uploadOptions: _uploadOptions, 1933 uploadOptions: _uploadOptions,
1776 uploadMedia: _uploadMedia, 1934 uploadMedia: _uploadMedia,
1777 downloadOptions: _downloadOptions); 1935 downloadOptions: _downloadOptions);
1778 return _response.then((data) => new File.fromJson(data)); 1936 return _response.then((data) => new File.fromJson(data));
1779 } 1937 }
1780 1938
1781 /** 1939 /**
1782 * Restores a file from the trash. 1940 * Restores a file from the trash.
1783 * 1941 *
1784 * Request parameters: 1942 * Request parameters:
1785 * 1943 *
1786 * [fileId] - The ID of the file to untrash. 1944 * [fileId] - The ID of the file to untrash.
1787 * 1945 *
1946 * [supportsTeamDrives] - Whether the requesting application supports Team
1947 * Drives.
1948 *
1788 * Completes with a [File]. 1949 * Completes with a [File].
1789 * 1950 *
1790 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1951 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1791 * error. 1952 * error.
1792 * 1953 *
1793 * If the used [http.Client] completes with an error when making a REST call, 1954 * If the used [http.Client] completes with an error when making a REST call,
1794 * this method will complete with the same error. 1955 * this method will complete with the same error.
1795 */ 1956 */
1796 async.Future<File> untrash(core.String fileId) { 1957 async.Future<File> untrash(core.String fileId, {core.bool supportsTeamDrives}) {
1797 var _url = null; 1958 var _url = null;
1798 var _queryParams = new core.Map(); 1959 var _queryParams = new core.Map();
1799 var _uploadMedia = null; 1960 var _uploadMedia = null;
1800 var _uploadOptions = null; 1961 var _uploadOptions = null;
1801 var _downloadOptions = commons.DownloadOptions.Metadata; 1962 var _downloadOptions = commons.DownloadOptions.Metadata;
1802 var _body = null; 1963 var _body = null;
1803 1964
1804 if (fileId == null) { 1965 if (fileId == null) {
1805 throw new core.ArgumentError("Parameter fileId is required."); 1966 throw new core.ArgumentError("Parameter fileId is required.");
1806 } 1967 }
1968 if (supportsTeamDrives != null) {
1969 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
1970 }
1807 1971
1808 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/untrash'; 1972 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/untrash';
1809 1973
1810 var _response = _requester.request(_url, 1974 var _response = _requester.request(_url,
1811 "POST", 1975 "POST",
1812 body: _body, 1976 body: _body,
1813 queryParams: _queryParams, 1977 queryParams: _queryParams,
1814 uploadOptions: _uploadOptions, 1978 uploadOptions: _uploadOptions,
1815 uploadMedia: _uploadMedia, 1979 uploadMedia: _uploadMedia,
1816 downloadOptions: _downloadOptions); 1980 downloadOptions: _downloadOptions);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 * are BCP 47 codes. 2022 * are BCP 47 codes.
1859 * 2023 *
1860 * [pinned] - Whether to pin the new revision. A file can have a maximum of 2024 * [pinned] - Whether to pin the new revision. A file can have a maximum of
1861 * 200 pinned revisions. 2025 * 200 pinned revisions.
1862 * 2026 *
1863 * [removeParents] - Comma-separated list of parent IDs to remove. 2027 * [removeParents] - Comma-separated list of parent IDs to remove.
1864 * 2028 *
1865 * [setModifiedDate] - Whether to set the modified date with the supplied 2029 * [setModifiedDate] - Whether to set the modified date with the supplied
1866 * modified date. 2030 * modified date.
1867 * 2031 *
2032 * [supportsTeamDrives] - Whether the requesting application supports Team
2033 * Drives.
2034 *
1868 * [timedTextLanguage] - The language of the timed text. 2035 * [timedTextLanguage] - The language of the timed text.
1869 * 2036 *
1870 * [timedTextTrackName] - The timed text track name. 2037 * [timedTextTrackName] - The timed text track name.
1871 * 2038 *
1872 * [updateViewedDate] - Whether to update the view date after successfully 2039 * [updateViewedDate] - Whether to update the view date after successfully
1873 * updating the file. 2040 * updating the file.
1874 * 2041 *
1875 * [useContentAsIndexableText] - Whether to use the content as indexable text. 2042 * [useContentAsIndexableText] - Whether to use the content as indexable text.
1876 * 2043 *
1877 * [uploadMedia] - The media to upload. 2044 * [uploadMedia] - The media to upload.
1878 * 2045 *
1879 * [uploadOptions] - Options for the media upload. Streaming Media without the 2046 * [uploadOptions] - Options for the media upload. Streaming Media without the
1880 * length being known ahead of time is only supported via resumable uploads. 2047 * length being known ahead of time is only supported via resumable uploads.
1881 * 2048 *
1882 * Completes with a [File]. 2049 * Completes with a [File].
1883 * 2050 *
1884 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2051 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1885 * error. 2052 * error.
1886 * 2053 *
1887 * If the used [http.Client] completes with an error when making a REST call, 2054 * If the used [http.Client] completes with an error when making a REST call,
1888 * this method will complete with the same error. 2055 * this method will complete with the same error.
1889 */ 2056 */
1890 async.Future<File> update(File request, core.String fileId, {core.String addPa rents, core.bool convert, core.String modifiedDateBehavior, core.bool newRevisio n, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String removeP arents, core.bool setModifiedDate, core.String timedTextLanguage, core.String ti medTextTrackName, core.bool updateViewedDate, core.bool useContentAsIndexableTex t, commons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons. Media uploadMedia}) { 2057 async.Future<File> update(File request, core.String fileId, {core.String addPa rents, core.bool convert, core.String modifiedDateBehavior, core.bool newRevisio n, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String removeP arents, core.bool setModifiedDate, core.bool supportsTeamDrives, core.String tim edTextLanguage, core.String timedTextTrackName, core.bool updateViewedDate, core .bool useContentAsIndexableText, commons.UploadOptions uploadOptions : commons.U ploadOptions.Default, commons.Media uploadMedia}) {
1891 var _url = null; 2058 var _url = null;
1892 var _queryParams = new core.Map(); 2059 var _queryParams = new core.Map();
1893 var _uploadMedia = null; 2060 var _uploadMedia = null;
1894 var _uploadOptions = null; 2061 var _uploadOptions = null;
1895 var _downloadOptions = commons.DownloadOptions.Metadata; 2062 var _downloadOptions = commons.DownloadOptions.Metadata;
1896 var _body = null; 2063 var _body = null;
1897 2064
1898 if (request != null) { 2065 if (request != null) {
1899 _body = convert_1.JSON.encode((request).toJson()); 2066 _body = convert_1.JSON.encode((request).toJson());
1900 } 2067 }
(...skipping 20 matching lines...) Expand all
1921 } 2088 }
1922 if (pinned != null) { 2089 if (pinned != null) {
1923 _queryParams["pinned"] = ["${pinned}"]; 2090 _queryParams["pinned"] = ["${pinned}"];
1924 } 2091 }
1925 if (removeParents != null) { 2092 if (removeParents != null) {
1926 _queryParams["removeParents"] = [removeParents]; 2093 _queryParams["removeParents"] = [removeParents];
1927 } 2094 }
1928 if (setModifiedDate != null) { 2095 if (setModifiedDate != null) {
1929 _queryParams["setModifiedDate"] = ["${setModifiedDate}"]; 2096 _queryParams["setModifiedDate"] = ["${setModifiedDate}"];
1930 } 2097 }
2098 if (supportsTeamDrives != null) {
2099 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2100 }
1931 if (timedTextLanguage != null) { 2101 if (timedTextLanguage != null) {
1932 _queryParams["timedTextLanguage"] = [timedTextLanguage]; 2102 _queryParams["timedTextLanguage"] = [timedTextLanguage];
1933 } 2103 }
1934 if (timedTextTrackName != null) { 2104 if (timedTextTrackName != null) {
1935 _queryParams["timedTextTrackName"] = [timedTextTrackName]; 2105 _queryParams["timedTextTrackName"] = [timedTextTrackName];
1936 } 2106 }
1937 if (updateViewedDate != null) { 2107 if (updateViewedDate != null) {
1938 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 2108 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
1939 } 2109 }
1940 if (useContentAsIndexableText != null) { 2110 if (useContentAsIndexableText != null) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 * downloading known malware or other abusive files. 2146 * downloading known malware or other abusive files.
1977 * 2147 *
1978 * [projection] - This parameter is deprecated and has no function. 2148 * [projection] - This parameter is deprecated and has no function.
1979 * Possible string values are: 2149 * Possible string values are:
1980 * - "BASIC" : Deprecated 2150 * - "BASIC" : Deprecated
1981 * - "FULL" : Deprecated 2151 * - "FULL" : Deprecated
1982 * 2152 *
1983 * [revisionId] - Specifies the Revision ID that should be downloaded. Ignored 2153 * [revisionId] - Specifies the Revision ID that should be downloaded. Ignored
1984 * unless alt=media is specified. 2154 * unless alt=media is specified.
1985 * 2155 *
2156 * [supportsTeamDrives] - Whether the requesting application supports Team
2157 * Drives.
2158 *
1986 * [updateViewedDate] - Deprecated: Use files.update with 2159 * [updateViewedDate] - Deprecated: Use files.update with
1987 * modifiedDateBehavior=noChange, updateViewedDate=true and an empty request 2160 * modifiedDateBehavior=noChange, updateViewedDate=true and an empty request
1988 * body. 2161 * body.
1989 * 2162 *
1990 * [downloadOptions] - Options for downloading. A download can be either a 2163 * [downloadOptions] - Options for downloading. A download can be either a
1991 * Metadata (default) or Media download. Partial Media downloads are possible 2164 * Metadata (default) or Media download. Partial Media downloads are possible
1992 * as well. 2165 * as well.
1993 * 2166 *
1994 * Completes with a 2167 * Completes with a
1995 * 2168 *
1996 * - [Channel] for Metadata downloads (see [downloadOptions]). 2169 * - [Channel] for Metadata downloads (see [downloadOptions]).
1997 * 2170 *
1998 * - [commons.Media] for Media downloads (see [downloadOptions]). 2171 * - [commons.Media] for Media downloads (see [downloadOptions]).
1999 * 2172 *
2000 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2173 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2001 * error. 2174 * error.
2002 * 2175 *
2003 * If the used [http.Client] completes with an error when making a REST call, 2176 * If the used [http.Client] completes with an error when making a REST call,
2004 * this method will complete with the same error. 2177 * this method will complete with the same error.
2005 */ 2178 */
2006 async.Future watch(Channel request, core.String fileId, {core.bool acknowledge Abuse, core.String projection, core.String revisionId, core.bool updateViewedDat e, commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { 2179 async.Future watch(Channel request, core.String fileId, {core.bool acknowledge Abuse, core.String projection, core.String revisionId, core.bool supportsTeamDri ves, core.bool updateViewedDate, commons.DownloadOptions downloadOptions: common s.DownloadOptions.Metadata}) {
2007 var _url = null; 2180 var _url = null;
2008 var _queryParams = new core.Map(); 2181 var _queryParams = new core.Map();
2009 var _uploadMedia = null; 2182 var _uploadMedia = null;
2010 var _uploadOptions = null; 2183 var _uploadOptions = null;
2011 var _downloadOptions = commons.DownloadOptions.Metadata; 2184 var _downloadOptions = commons.DownloadOptions.Metadata;
2012 var _body = null; 2185 var _body = null;
2013 2186
2014 if (request != null) { 2187 if (request != null) {
2015 _body = convert_1.JSON.encode((request).toJson()); 2188 _body = convert_1.JSON.encode((request).toJson());
2016 } 2189 }
2017 if (fileId == null) { 2190 if (fileId == null) {
2018 throw new core.ArgumentError("Parameter fileId is required."); 2191 throw new core.ArgumentError("Parameter fileId is required.");
2019 } 2192 }
2020 if (acknowledgeAbuse != null) { 2193 if (acknowledgeAbuse != null) {
2021 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"]; 2194 _queryParams["acknowledgeAbuse"] = ["${acknowledgeAbuse}"];
2022 } 2195 }
2023 if (projection != null) { 2196 if (projection != null) {
2024 _queryParams["projection"] = [projection]; 2197 _queryParams["projection"] = [projection];
2025 } 2198 }
2026 if (revisionId != null) { 2199 if (revisionId != null) {
2027 _queryParams["revisionId"] = [revisionId]; 2200 _queryParams["revisionId"] = [revisionId];
2028 } 2201 }
2202 if (supportsTeamDrives != null) {
2203 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2204 }
2029 if (updateViewedDate != null) { 2205 if (updateViewedDate != null) {
2030 _queryParams["updateViewedDate"] = ["${updateViewedDate}"]; 2206 _queryParams["updateViewedDate"] = ["${updateViewedDate}"];
2031 } 2207 }
2032 2208
2033 _downloadOptions = downloadOptions; 2209 _downloadOptions = downloadOptions;
2034 2210
2035 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/watch'; 2211 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/watch';
2036 2212
2037 var _response = _requester.request(_url, 2213 var _response = _requester.request(_url,
2038 "POST", 2214 "POST",
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2148 2324
2149 /** 2325 /**
2150 * Adds a parent folder for a file. 2326 * Adds a parent folder for a file.
2151 * 2327 *
2152 * [request] - The metadata request object. 2328 * [request] - The metadata request object.
2153 * 2329 *
2154 * Request parameters: 2330 * Request parameters:
2155 * 2331 *
2156 * [fileId] - The ID of the file. 2332 * [fileId] - The ID of the file.
2157 * 2333 *
2334 * [supportsTeamDrives] - Whether the requesting application supports Team
2335 * Drives.
2336 *
2158 * Completes with a [ParentReference]. 2337 * Completes with a [ParentReference].
2159 * 2338 *
2160 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2339 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2161 * error. 2340 * error.
2162 * 2341 *
2163 * If the used [http.Client] completes with an error when making a REST call, 2342 * If the used [http.Client] completes with an error when making a REST call,
2164 * this method will complete with the same error. 2343 * this method will complete with the same error.
2165 */ 2344 */
2166 async.Future<ParentReference> insert(ParentReference request, core.String file Id) { 2345 async.Future<ParentReference> insert(ParentReference request, core.String file Id, {core.bool supportsTeamDrives}) {
2167 var _url = null; 2346 var _url = null;
2168 var _queryParams = new core.Map(); 2347 var _queryParams = new core.Map();
2169 var _uploadMedia = null; 2348 var _uploadMedia = null;
2170 var _uploadOptions = null; 2349 var _uploadOptions = null;
2171 var _downloadOptions = commons.DownloadOptions.Metadata; 2350 var _downloadOptions = commons.DownloadOptions.Metadata;
2172 var _body = null; 2351 var _body = null;
2173 2352
2174 if (request != null) { 2353 if (request != null) {
2175 _body = convert_1.JSON.encode((request).toJson()); 2354 _body = convert_1.JSON.encode((request).toJson());
2176 } 2355 }
2177 if (fileId == null) { 2356 if (fileId == null) {
2178 throw new core.ArgumentError("Parameter fileId is required."); 2357 throw new core.ArgumentError("Parameter fileId is required.");
2179 } 2358 }
2359 if (supportsTeamDrives != null) {
2360 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2361 }
2180 2362
2181 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents'; 2363 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents';
2182 2364
2183 var _response = _requester.request(_url, 2365 var _response = _requester.request(_url,
2184 "POST", 2366 "POST",
2185 body: _body, 2367 body: _body,
2186 queryParams: _queryParams, 2368 queryParams: _queryParams,
2187 uploadOptions: _uploadOptions, 2369 uploadOptions: _uploadOptions,
2188 uploadMedia: _uploadMedia, 2370 uploadMedia: _uploadMedia,
2189 downloadOptions: _downloadOptions); 2371 downloadOptions: _downloadOptions);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 } 2414 }
2233 2415
2234 2416
2235 class PermissionsResourceApi { 2417 class PermissionsResourceApi {
2236 final commons.ApiRequester _requester; 2418 final commons.ApiRequester _requester;
2237 2419
2238 PermissionsResourceApi(commons.ApiRequester client) : 2420 PermissionsResourceApi(commons.ApiRequester client) :
2239 _requester = client; 2421 _requester = client;
2240 2422
2241 /** 2423 /**
2242 * Deletes a permission from a file. 2424 * Deletes a permission from a file or Team Drive.
2243 * 2425 *
2244 * Request parameters: 2426 * Request parameters:
2245 * 2427 *
2246 * [fileId] - The ID for the file. 2428 * [fileId] - The ID for the file or Team Drive.
2247 * 2429 *
2248 * [permissionId] - The ID for the permission. 2430 * [permissionId] - The ID for the permission.
2249 * 2431 *
2432 * [supportsTeamDrives] - Whether the requesting application supports Team
2433 * Drives.
2434 *
2250 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2435 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2251 * error. 2436 * error.
2252 * 2437 *
2253 * If the used [http.Client] completes with an error when making a REST call, 2438 * If the used [http.Client] completes with an error when making a REST call,
2254 * this method will complete with the same error. 2439 * this method will complete with the same error.
2255 */ 2440 */
2256 async.Future delete(core.String fileId, core.String permissionId) { 2441 async.Future delete(core.String fileId, core.String permissionId, {core.bool s upportsTeamDrives}) {
2257 var _url = null; 2442 var _url = null;
2258 var _queryParams = new core.Map(); 2443 var _queryParams = new core.Map();
2259 var _uploadMedia = null; 2444 var _uploadMedia = null;
2260 var _uploadOptions = null; 2445 var _uploadOptions = null;
2261 var _downloadOptions = commons.DownloadOptions.Metadata; 2446 var _downloadOptions = commons.DownloadOptions.Metadata;
2262 var _body = null; 2447 var _body = null;
2263 2448
2264 if (fileId == null) { 2449 if (fileId == null) {
2265 throw new core.ArgumentError("Parameter fileId is required."); 2450 throw new core.ArgumentError("Parameter fileId is required.");
2266 } 2451 }
2267 if (permissionId == null) { 2452 if (permissionId == null) {
2268 throw new core.ArgumentError("Parameter permissionId is required."); 2453 throw new core.ArgumentError("Parameter permissionId is required.");
2269 } 2454 }
2455 if (supportsTeamDrives != null) {
2456 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2457 }
2270 2458
2271 _downloadOptions = null; 2459 _downloadOptions = null;
2272 2460
2273 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId'); 2461 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId');
2274 2462
2275 var _response = _requester.request(_url, 2463 var _response = _requester.request(_url,
2276 "DELETE", 2464 "DELETE",
2277 body: _body, 2465 body: _body,
2278 queryParams: _queryParams, 2466 queryParams: _queryParams,
2279 uploadOptions: _uploadOptions, 2467 uploadOptions: _uploadOptions,
2280 uploadMedia: _uploadMedia, 2468 uploadMedia: _uploadMedia,
2281 downloadOptions: _downloadOptions); 2469 downloadOptions: _downloadOptions);
2282 return _response.then((data) => null); 2470 return _response.then((data) => null);
2283 } 2471 }
2284 2472
2285 /** 2473 /**
2286 * Gets a permission by ID. 2474 * Gets a permission by ID.
2287 * 2475 *
2288 * Request parameters: 2476 * Request parameters:
2289 * 2477 *
2290 * [fileId] - The ID for the file. 2478 * [fileId] - The ID for the file or Team Drive.
2291 * 2479 *
2292 * [permissionId] - The ID for the permission. 2480 * [permissionId] - The ID for the permission.
2293 * 2481 *
2482 * [supportsTeamDrives] - Whether the requesting application supports Team
2483 * Drives.
2484 *
2294 * Completes with a [Permission]. 2485 * Completes with a [Permission].
2295 * 2486 *
2296 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2487 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2297 * error. 2488 * error.
2298 * 2489 *
2299 * If the used [http.Client] completes with an error when making a REST call, 2490 * If the used [http.Client] completes with an error when making a REST call,
2300 * this method will complete with the same error. 2491 * this method will complete with the same error.
2301 */ 2492 */
2302 async.Future<Permission> get(core.String fileId, core.String permissionId) { 2493 async.Future<Permission> get(core.String fileId, core.String permissionId, {co re.bool supportsTeamDrives}) {
2303 var _url = null; 2494 var _url = null;
2304 var _queryParams = new core.Map(); 2495 var _queryParams = new core.Map();
2305 var _uploadMedia = null; 2496 var _uploadMedia = null;
2306 var _uploadOptions = null; 2497 var _uploadOptions = null;
2307 var _downloadOptions = commons.DownloadOptions.Metadata; 2498 var _downloadOptions = commons.DownloadOptions.Metadata;
2308 var _body = null; 2499 var _body = null;
2309 2500
2310 if (fileId == null) { 2501 if (fileId == null) {
2311 throw new core.ArgumentError("Parameter fileId is required."); 2502 throw new core.ArgumentError("Parameter fileId is required.");
2312 } 2503 }
2313 if (permissionId == null) { 2504 if (permissionId == null) {
2314 throw new core.ArgumentError("Parameter permissionId is required."); 2505 throw new core.ArgumentError("Parameter permissionId is required.");
2315 } 2506 }
2507 if (supportsTeamDrives != null) {
2508 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2509 }
2316 2510
2317 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId'); 2511 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId');
2318 2512
2319 var _response = _requester.request(_url, 2513 var _response = _requester.request(_url,
2320 "GET", 2514 "GET",
2321 body: _body, 2515 body: _body,
2322 queryParams: _queryParams, 2516 queryParams: _queryParams,
2323 uploadOptions: _uploadOptions, 2517 uploadOptions: _uploadOptions,
2324 uploadMedia: _uploadMedia, 2518 uploadMedia: _uploadMedia,
2325 downloadOptions: _downloadOptions); 2519 downloadOptions: _downloadOptions);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 "GET", 2553 "GET",
2360 body: _body, 2554 body: _body,
2361 queryParams: _queryParams, 2555 queryParams: _queryParams,
2362 uploadOptions: _uploadOptions, 2556 uploadOptions: _uploadOptions,
2363 uploadMedia: _uploadMedia, 2557 uploadMedia: _uploadMedia,
2364 downloadOptions: _downloadOptions); 2558 downloadOptions: _downloadOptions);
2365 return _response.then((data) => new PermissionId.fromJson(data)); 2559 return _response.then((data) => new PermissionId.fromJson(data));
2366 } 2560 }
2367 2561
2368 /** 2562 /**
2369 * Inserts a permission for a file. 2563 * Inserts a permission for a file or Team Drive.
2370 * 2564 *
2371 * [request] - The metadata request object. 2565 * [request] - The metadata request object.
2372 * 2566 *
2373 * Request parameters: 2567 * Request parameters:
2374 * 2568 *
2375 * [fileId] - The ID for the file. 2569 * [fileId] - The ID for the file or Team Drive.
2376 * 2570 *
2377 * [emailMessage] - A custom message to include in notification emails. 2571 * [emailMessage] - A custom message to include in notification emails.
2378 * 2572 *
2379 * [sendNotificationEmails] - Whether to send notification emails when sharing 2573 * [sendNotificationEmails] - Whether to send notification emails when sharing
2380 * to users or groups. This parameter is ignored and an email is sent if the 2574 * to users or groups. This parameter is ignored and an email is sent if the
2381 * role is owner. 2575 * role is owner.
2382 * 2576 *
2577 * [supportsTeamDrives] - Whether the requesting application supports Team
2578 * Drives.
2579 *
2383 * Completes with a [Permission]. 2580 * Completes with a [Permission].
2384 * 2581 *
2385 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2582 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2386 * error. 2583 * error.
2387 * 2584 *
2388 * If the used [http.Client] completes with an error when making a REST call, 2585 * If the used [http.Client] completes with an error when making a REST call,
2389 * this method will complete with the same error. 2586 * this method will complete with the same error.
2390 */ 2587 */
2391 async.Future<Permission> insert(Permission request, core.String fileId, {core. String emailMessage, core.bool sendNotificationEmails}) { 2588 async.Future<Permission> insert(Permission request, core.String fileId, {core. String emailMessage, core.bool sendNotificationEmails, core.bool supportsTeamDri ves}) {
2392 var _url = null; 2589 var _url = null;
2393 var _queryParams = new core.Map(); 2590 var _queryParams = new core.Map();
2394 var _uploadMedia = null; 2591 var _uploadMedia = null;
2395 var _uploadOptions = null; 2592 var _uploadOptions = null;
2396 var _downloadOptions = commons.DownloadOptions.Metadata; 2593 var _downloadOptions = commons.DownloadOptions.Metadata;
2397 var _body = null; 2594 var _body = null;
2398 2595
2399 if (request != null) { 2596 if (request != null) {
2400 _body = convert_1.JSON.encode((request).toJson()); 2597 _body = convert_1.JSON.encode((request).toJson());
2401 } 2598 }
2402 if (fileId == null) { 2599 if (fileId == null) {
2403 throw new core.ArgumentError("Parameter fileId is required."); 2600 throw new core.ArgumentError("Parameter fileId is required.");
2404 } 2601 }
2405 if (emailMessage != null) { 2602 if (emailMessage != null) {
2406 _queryParams["emailMessage"] = [emailMessage]; 2603 _queryParams["emailMessage"] = [emailMessage];
2407 } 2604 }
2408 if (sendNotificationEmails != null) { 2605 if (sendNotificationEmails != null) {
2409 _queryParams["sendNotificationEmails"] = ["${sendNotificationEmails}"]; 2606 _queryParams["sendNotificationEmails"] = ["${sendNotificationEmails}"];
2410 } 2607 }
2608 if (supportsTeamDrives != null) {
2609 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2610 }
2411 2611
2412 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions'; 2612 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions';
2413 2613
2414 var _response = _requester.request(_url, 2614 var _response = _requester.request(_url,
2415 "POST", 2615 "POST",
2416 body: _body, 2616 body: _body,
2417 queryParams: _queryParams, 2617 queryParams: _queryParams,
2418 uploadOptions: _uploadOptions, 2618 uploadOptions: _uploadOptions,
2419 uploadMedia: _uploadMedia, 2619 uploadMedia: _uploadMedia,
2420 downloadOptions: _downloadOptions); 2620 downloadOptions: _downloadOptions);
2421 return _response.then((data) => new Permission.fromJson(data)); 2621 return _response.then((data) => new Permission.fromJson(data));
2422 } 2622 }
2423 2623
2424 /** 2624 /**
2425 * Lists a file's permissions. 2625 * Lists a file's or Team Drive's permissions.
2426 * 2626 *
2427 * Request parameters: 2627 * Request parameters:
2428 * 2628 *
2429 * [fileId] - The ID for the file. 2629 * [fileId] - The ID for the file or Team Drive.
2630 *
2631 * [maxResults] - The maximum number of permissions to return per page. When
2632 * not set for files in a Team Drive, at most 100 results will be returned.
2633 * When not set for files that are not in a Team Drive, the entire list will
2634 * be returned.
2635 * Value must be between "1" and "100".
2636 *
2637 * [pageToken] - The token for continuing a previous list request on the next
2638 * page. This should be set to the value of 'nextPageToken' from the previous
2639 * response.
2640 *
2641 * [supportsTeamDrives] - Whether the requesting application supports Team
2642 * Drives.
2430 * 2643 *
2431 * Completes with a [PermissionList]. 2644 * Completes with a [PermissionList].
2432 * 2645 *
2433 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2646 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2434 * error. 2647 * error.
2435 * 2648 *
2436 * If the used [http.Client] completes with an error when making a REST call, 2649 * If the used [http.Client] completes with an error when making a REST call,
2437 * this method will complete with the same error. 2650 * this method will complete with the same error.
2438 */ 2651 */
2439 async.Future<PermissionList> list(core.String fileId) { 2652 async.Future<PermissionList> list(core.String fileId, {core.int maxResults, co re.String pageToken, core.bool supportsTeamDrives}) {
2440 var _url = null; 2653 var _url = null;
2441 var _queryParams = new core.Map(); 2654 var _queryParams = new core.Map();
2442 var _uploadMedia = null; 2655 var _uploadMedia = null;
2443 var _uploadOptions = null; 2656 var _uploadOptions = null;
2444 var _downloadOptions = commons.DownloadOptions.Metadata; 2657 var _downloadOptions = commons.DownloadOptions.Metadata;
2445 var _body = null; 2658 var _body = null;
2446 2659
2447 if (fileId == null) { 2660 if (fileId == null) {
2448 throw new core.ArgumentError("Parameter fileId is required."); 2661 throw new core.ArgumentError("Parameter fileId is required.");
2449 } 2662 }
2663 if (maxResults != null) {
2664 _queryParams["maxResults"] = ["${maxResults}"];
2665 }
2666 if (pageToken != null) {
2667 _queryParams["pageToken"] = [pageToken];
2668 }
2669 if (supportsTeamDrives != null) {
2670 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2671 }
2450 2672
2451 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions'; 2673 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions';
2452 2674
2453 var _response = _requester.request(_url, 2675 var _response = _requester.request(_url,
2454 "GET", 2676 "GET",
2455 body: _body, 2677 body: _body,
2456 queryParams: _queryParams, 2678 queryParams: _queryParams,
2457 uploadOptions: _uploadOptions, 2679 uploadOptions: _uploadOptions,
2458 uploadMedia: _uploadMedia, 2680 uploadMedia: _uploadMedia,
2459 downloadOptions: _downloadOptions); 2681 downloadOptions: _downloadOptions);
2460 return _response.then((data) => new PermissionList.fromJson(data)); 2682 return _response.then((data) => new PermissionList.fromJson(data));
2461 } 2683 }
2462 2684
2463 /** 2685 /**
2464 * Updates a permission using patch semantics. 2686 * Updates a permission using patch semantics.
2465 * 2687 *
2466 * [request] - The metadata request object. 2688 * [request] - The metadata request object.
2467 * 2689 *
2468 * Request parameters: 2690 * Request parameters:
2469 * 2691 *
2470 * [fileId] - The ID for the file. 2692 * [fileId] - The ID for the file or Team Drive.
2471 * 2693 *
2472 * [permissionId] - The ID for the permission. 2694 * [permissionId] - The ID for the permission.
2473 * 2695 *
2474 * [removeExpiration] - Whether to remove the expiration date. 2696 * [removeExpiration] - Whether to remove the expiration date.
2475 * 2697 *
2698 * [supportsTeamDrives] - Whether the requesting application supports Team
2699 * Drives.
2700 *
2476 * [transferOwnership] - Whether changing a role to 'owner' downgrades the 2701 * [transferOwnership] - Whether changing a role to 'owner' downgrades the
2477 * current owners to writers. Does nothing if the specified role is not 2702 * current owners to writers. Does nothing if the specified role is not
2478 * 'owner'. 2703 * 'owner'.
2479 * 2704 *
2480 * Completes with a [Permission]. 2705 * Completes with a [Permission].
2481 * 2706 *
2482 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2483 * error. 2708 * error.
2484 * 2709 *
2485 * If the used [http.Client] completes with an error when making a REST call, 2710 * If the used [http.Client] completes with an error when making a REST call,
2486 * this method will complete with the same error. 2711 * this method will complete with the same error.
2487 */ 2712 */
2488 async.Future<Permission> patch(Permission request, core.String fileId, core.St ring permissionId, {core.bool removeExpiration, core.bool transferOwnership}) { 2713 async.Future<Permission> patch(Permission request, core.String fileId, core.St ring permissionId, {core.bool removeExpiration, core.bool supportsTeamDrives, co re.bool transferOwnership}) {
2489 var _url = null; 2714 var _url = null;
2490 var _queryParams = new core.Map(); 2715 var _queryParams = new core.Map();
2491 var _uploadMedia = null; 2716 var _uploadMedia = null;
2492 var _uploadOptions = null; 2717 var _uploadOptions = null;
2493 var _downloadOptions = commons.DownloadOptions.Metadata; 2718 var _downloadOptions = commons.DownloadOptions.Metadata;
2494 var _body = null; 2719 var _body = null;
2495 2720
2496 if (request != null) { 2721 if (request != null) {
2497 _body = convert_1.JSON.encode((request).toJson()); 2722 _body = convert_1.JSON.encode((request).toJson());
2498 } 2723 }
2499 if (fileId == null) { 2724 if (fileId == null) {
2500 throw new core.ArgumentError("Parameter fileId is required."); 2725 throw new core.ArgumentError("Parameter fileId is required.");
2501 } 2726 }
2502 if (permissionId == null) { 2727 if (permissionId == null) {
2503 throw new core.ArgumentError("Parameter permissionId is required."); 2728 throw new core.ArgumentError("Parameter permissionId is required.");
2504 } 2729 }
2505 if (removeExpiration != null) { 2730 if (removeExpiration != null) {
2506 _queryParams["removeExpiration"] = ["${removeExpiration}"]; 2731 _queryParams["removeExpiration"] = ["${removeExpiration}"];
2507 } 2732 }
2733 if (supportsTeamDrives != null) {
2734 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2735 }
2508 if (transferOwnership != null) { 2736 if (transferOwnership != null) {
2509 _queryParams["transferOwnership"] = ["${transferOwnership}"]; 2737 _queryParams["transferOwnership"] = ["${transferOwnership}"];
2510 } 2738 }
2511 2739
2512 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId'); 2740 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId');
2513 2741
2514 var _response = _requester.request(_url, 2742 var _response = _requester.request(_url,
2515 "PATCH", 2743 "PATCH",
2516 body: _body, 2744 body: _body,
2517 queryParams: _queryParams, 2745 queryParams: _queryParams,
2518 uploadOptions: _uploadOptions, 2746 uploadOptions: _uploadOptions,
2519 uploadMedia: _uploadMedia, 2747 uploadMedia: _uploadMedia,
2520 downloadOptions: _downloadOptions); 2748 downloadOptions: _downloadOptions);
2521 return _response.then((data) => new Permission.fromJson(data)); 2749 return _response.then((data) => new Permission.fromJson(data));
2522 } 2750 }
2523 2751
2524 /** 2752 /**
2525 * Updates a permission. 2753 * Updates a permission.
2526 * 2754 *
2527 * [request] - The metadata request object. 2755 * [request] - The metadata request object.
2528 * 2756 *
2529 * Request parameters: 2757 * Request parameters:
2530 * 2758 *
2531 * [fileId] - The ID for the file. 2759 * [fileId] - The ID for the file or Team Drive.
2532 * 2760 *
2533 * [permissionId] - The ID for the permission. 2761 * [permissionId] - The ID for the permission.
2534 * 2762 *
2535 * [removeExpiration] - Whether to remove the expiration date. 2763 * [removeExpiration] - Whether to remove the expiration date.
2536 * 2764 *
2765 * [supportsTeamDrives] - Whether the requesting application supports Team
2766 * Drives.
2767 *
2537 * [transferOwnership] - Whether changing a role to 'owner' downgrades the 2768 * [transferOwnership] - Whether changing a role to 'owner' downgrades the
2538 * current owners to writers. Does nothing if the specified role is not 2769 * current owners to writers. Does nothing if the specified role is not
2539 * 'owner'. 2770 * 'owner'.
2540 * 2771 *
2541 * Completes with a [Permission]. 2772 * Completes with a [Permission].
2542 * 2773 *
2543 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2774 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2544 * error. 2775 * error.
2545 * 2776 *
2546 * If the used [http.Client] completes with an error when making a REST call, 2777 * If the used [http.Client] completes with an error when making a REST call,
2547 * this method will complete with the same error. 2778 * this method will complete with the same error.
2548 */ 2779 */
2549 async.Future<Permission> update(Permission request, core.String fileId, core.S tring permissionId, {core.bool removeExpiration, core.bool transferOwnership}) { 2780 async.Future<Permission> update(Permission request, core.String fileId, core.S tring permissionId, {core.bool removeExpiration, core.bool supportsTeamDrives, c ore.bool transferOwnership}) {
2550 var _url = null; 2781 var _url = null;
2551 var _queryParams = new core.Map(); 2782 var _queryParams = new core.Map();
2552 var _uploadMedia = null; 2783 var _uploadMedia = null;
2553 var _uploadOptions = null; 2784 var _uploadOptions = null;
2554 var _downloadOptions = commons.DownloadOptions.Metadata; 2785 var _downloadOptions = commons.DownloadOptions.Metadata;
2555 var _body = null; 2786 var _body = null;
2556 2787
2557 if (request != null) { 2788 if (request != null) {
2558 _body = convert_1.JSON.encode((request).toJson()); 2789 _body = convert_1.JSON.encode((request).toJson());
2559 } 2790 }
2560 if (fileId == null) { 2791 if (fileId == null) {
2561 throw new core.ArgumentError("Parameter fileId is required."); 2792 throw new core.ArgumentError("Parameter fileId is required.");
2562 } 2793 }
2563 if (permissionId == null) { 2794 if (permissionId == null) {
2564 throw new core.ArgumentError("Parameter permissionId is required."); 2795 throw new core.ArgumentError("Parameter permissionId is required.");
2565 } 2796 }
2566 if (removeExpiration != null) { 2797 if (removeExpiration != null) {
2567 _queryParams["removeExpiration"] = ["${removeExpiration}"]; 2798 _queryParams["removeExpiration"] = ["${removeExpiration}"];
2568 } 2799 }
2800 if (supportsTeamDrives != null) {
2801 _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"];
2802 }
2569 if (transferOwnership != null) { 2803 if (transferOwnership != null) {
2570 _queryParams["transferOwnership"] = ["${transferOwnership}"]; 2804 _queryParams["transferOwnership"] = ["${transferOwnership}"];
2571 } 2805 }
2572 2806
2573 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId'); 2807 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId');
2574 2808
2575 var _response = _requester.request(_url, 2809 var _response = _requester.request(_url,
2576 "PUT", 2810 "PUT",
2577 body: _body, 2811 body: _body,
2578 queryParams: _queryParams, 2812 queryParams: _queryParams,
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
3590 queryParams: _queryParams, 3824 queryParams: _queryParams,
3591 uploadOptions: _uploadOptions, 3825 uploadOptions: _uploadOptions,
3592 uploadMedia: _uploadMedia, 3826 uploadMedia: _uploadMedia,
3593 downloadOptions: _downloadOptions); 3827 downloadOptions: _downloadOptions);
3594 return _response.then((data) => new Revision.fromJson(data)); 3828 return _response.then((data) => new Revision.fromJson(data));
3595 } 3829 }
3596 3830
3597 } 3831 }
3598 3832
3599 3833
3834 class TeamdrivesResourceApi {
3835 final commons.ApiRequester _requester;
3836
3837 TeamdrivesResourceApi(commons.ApiRequester client) :
3838 _requester = client;
3839
3840 /**
3841 * Permanently deletes a Team Drive for which the user is an organizer. The
3842 * Team Drive cannot contain any untrashed items.
3843 *
3844 * Request parameters:
3845 *
3846 * [teamDriveId] - The ID of the Team Drive
3847 *
3848 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3849 * error.
3850 *
3851 * If the used [http.Client] completes with an error when making a REST call,
3852 * this method will complete with the same error.
3853 */
3854 async.Future delete(core.String teamDriveId) {
3855 var _url = null;
3856 var _queryParams = new core.Map();
3857 var _uploadMedia = null;
3858 var _uploadOptions = null;
3859 var _downloadOptions = commons.DownloadOptions.Metadata;
3860 var _body = null;
3861
3862 if (teamDriveId == null) {
3863 throw new core.ArgumentError("Parameter teamDriveId is required.");
3864 }
3865
3866 _downloadOptions = null;
3867
3868 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId');
3869
3870 var _response = _requester.request(_url,
3871 "DELETE",
3872 body: _body,
3873 queryParams: _queryParams,
3874 uploadOptions: _uploadOptions,
3875 uploadMedia: _uploadMedia,
3876 downloadOptions: _downloadOptions);
3877 return _response.then((data) => null);
3878 }
3879
3880 /**
3881 * Gets a Team Drive's metadata by ID.
3882 *
3883 * Request parameters:
3884 *
3885 * [teamDriveId] - The ID of the Team Drive
3886 *
3887 * Completes with a [TeamDrive].
3888 *
3889 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3890 * error.
3891 *
3892 * If the used [http.Client] completes with an error when making a REST call,
3893 * this method will complete with the same error.
3894 */
3895 async.Future<TeamDrive> get(core.String teamDriveId) {
3896 var _url = null;
3897 var _queryParams = new core.Map();
3898 var _uploadMedia = null;
3899 var _uploadOptions = null;
3900 var _downloadOptions = commons.DownloadOptions.Metadata;
3901 var _body = null;
3902
3903 if (teamDriveId == null) {
3904 throw new core.ArgumentError("Parameter teamDriveId is required.");
3905 }
3906
3907 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId');
3908
3909 var _response = _requester.request(_url,
3910 "GET",
3911 body: _body,
3912 queryParams: _queryParams,
3913 uploadOptions: _uploadOptions,
3914 uploadMedia: _uploadMedia,
3915 downloadOptions: _downloadOptions);
3916 return _response.then((data) => new TeamDrive.fromJson(data));
3917 }
3918
3919 /**
3920 * Creates a new Team Drive.
3921 *
3922 * [request] - The metadata request object.
3923 *
3924 * Request parameters:
3925 *
3926 * [requestId] - An ID, such as a random UUID, which uniquely identifies this
3927 * user's request for idempotent creation of a Team Drive. A repeated request
3928 * by the same user and with the same request ID will avoid creating
3929 * duplicates by attempting to create the same Team Drive. If the Team Drive
3930 * already exists a 409 error will be returned.
3931 *
3932 * Completes with a [TeamDrive].
3933 *
3934 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3935 * error.
3936 *
3937 * If the used [http.Client] completes with an error when making a REST call,
3938 * this method will complete with the same error.
3939 */
3940 async.Future<TeamDrive> insert(TeamDrive request, core.String requestId) {
3941 var _url = null;
3942 var _queryParams = new core.Map();
3943 var _uploadMedia = null;
3944 var _uploadOptions = null;
3945 var _downloadOptions = commons.DownloadOptions.Metadata;
3946 var _body = null;
3947
3948 if (request != null) {
3949 _body = convert_1.JSON.encode((request).toJson());
3950 }
3951 if (requestId == null) {
3952 throw new core.ArgumentError("Parameter requestId is required.");
3953 }
3954 _queryParams["requestId"] = [requestId];
3955
3956 _url = 'teamdrives';
3957
3958 var _response = _requester.request(_url,
3959 "POST",
3960 body: _body,
3961 queryParams: _queryParams,
3962 uploadOptions: _uploadOptions,
3963 uploadMedia: _uploadMedia,
3964 downloadOptions: _downloadOptions);
3965 return _response.then((data) => new TeamDrive.fromJson(data));
3966 }
3967
3968 /**
3969 * Lists the user's Team Drives.
3970 *
3971 * Request parameters:
3972 *
3973 * [maxResults] - Maximum number of Team Drives to return.
3974 * Value must be between "1" and "100".
3975 *
3976 * [pageToken] - Page token for Team Drives.
3977 *
3978 * Completes with a [TeamDriveList].
3979 *
3980 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3981 * error.
3982 *
3983 * If the used [http.Client] completes with an error when making a REST call,
3984 * this method will complete with the same error.
3985 */
3986 async.Future<TeamDriveList> list({core.int maxResults, core.String pageToken}) {
3987 var _url = null;
3988 var _queryParams = new core.Map();
3989 var _uploadMedia = null;
3990 var _uploadOptions = null;
3991 var _downloadOptions = commons.DownloadOptions.Metadata;
3992 var _body = null;
3993
3994 if (maxResults != null) {
3995 _queryParams["maxResults"] = ["${maxResults}"];
3996 }
3997 if (pageToken != null) {
3998 _queryParams["pageToken"] = [pageToken];
3999 }
4000
4001 _url = 'teamdrives';
4002
4003 var _response = _requester.request(_url,
4004 "GET",
4005 body: _body,
4006 queryParams: _queryParams,
4007 uploadOptions: _uploadOptions,
4008 uploadMedia: _uploadMedia,
4009 downloadOptions: _downloadOptions);
4010 return _response.then((data) => new TeamDriveList.fromJson(data));
4011 }
4012
4013 /**
4014 * Updates a Team Drive's metadata
4015 *
4016 * [request] - The metadata request object.
4017 *
4018 * Request parameters:
4019 *
4020 * [teamDriveId] - The ID of the Team Drive
4021 *
4022 * Completes with a [TeamDrive].
4023 *
4024 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4025 * error.
4026 *
4027 * If the used [http.Client] completes with an error when making a REST call,
4028 * this method will complete with the same error.
4029 */
4030 async.Future<TeamDrive> update(TeamDrive request, core.String teamDriveId) {
4031 var _url = null;
4032 var _queryParams = new core.Map();
4033 var _uploadMedia = null;
4034 var _uploadOptions = null;
4035 var _downloadOptions = commons.DownloadOptions.Metadata;
4036 var _body = null;
4037
4038 if (request != null) {
4039 _body = convert_1.JSON.encode((request).toJson());
4040 }
4041 if (teamDriveId == null) {
4042 throw new core.ArgumentError("Parameter teamDriveId is required.");
4043 }
4044
4045 _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId');
4046
4047 var _response = _requester.request(_url,
4048 "PUT",
4049 body: _body,
4050 queryParams: _queryParams,
4051 uploadOptions: _uploadOptions,
4052 uploadMedia: _uploadMedia,
4053 downloadOptions: _downloadOptions);
4054 return _response.then((data) => new TeamDrive.fromJson(data));
4055 }
4056
4057 }
4058
4059
3600 4060
3601 class AboutAdditionalRoleInfoRoleSets { 4061 class AboutAdditionalRoleInfoRoleSets {
3602 /** The supported additional roles with the primary role. */ 4062 /** The supported additional roles with the primary role. */
3603 core.List<core.String> additionalRoles; 4063 core.List<core.String> additionalRoles;
3604 /** A primary permission role. */ 4064 /** A primary permission role. */
3605 core.String primaryRole; 4065 core.String primaryRole;
3606 4066
3607 AboutAdditionalRoleInfoRoleSets(); 4067 AboutAdditionalRoleInfoRoleSets();
3608 4068
3609 AboutAdditionalRoleInfoRoleSets.fromJson(core.Map _json) { 4069 AboutAdditionalRoleInfoRoleSets.fromJson(core.Map _json) {
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
4354 if (kind != null) { 4814 if (kind != null) {
4355 _json["kind"] = kind; 4815 _json["kind"] = kind;
4356 } 4816 }
4357 if (selfLink != null) { 4817 if (selfLink != null) {
4358 _json["selfLink"] = selfLink; 4818 _json["selfLink"] = selfLink;
4359 } 4819 }
4360 return _json; 4820 return _json;
4361 } 4821 }
4362 } 4822 }
4363 4823
4364 /** Representation of a change to a file. */ 4824 /** Representation of a change to a file or Team Drive. */
4365 class Change { 4825 class Change {
4366 /** Whether the file has been deleted. */ 4826 /**
4827 * Whether the file or Team Drive has been removed from this list of changes,
4828 * for example by deletion or loss of access.
4829 */
4367 core.bool deleted; 4830 core.bool deleted;
4368 /** 4831 /**
4369 * The updated state of the file. Present if the file has not been deleted. 4832 * The updated state of the file. Present if the type is file and the file has
4833 * not been removed from this list of changes.
4370 */ 4834 */
4371 File file; 4835 File file;
4372 /** The ID of the file associated with this change. */ 4836 /** The ID of the file associated with this change. */
4373 core.String fileId; 4837 core.String fileId;
4374 /** The ID of the change. */ 4838 /** The ID of the change. */
4375 core.String id; 4839 core.String id;
4376 /** This is always drive#change. */ 4840 /** This is always drive#change. */
4377 core.String kind; 4841 core.String kind;
4378 /** The time of this modification. */ 4842 /** The time of this modification. */
4379 core.DateTime modificationDate; 4843 core.DateTime modificationDate;
4380 /** A link back to this change. */ 4844 /** A link back to this change. */
4381 core.String selfLink; 4845 core.String selfLink;
4846 /**
4847 * The updated state of the Team Drive. Present if the type is teamDrive, the
4848 * user is still a member of the Team Drive, and the Team Drive has not been
4849 * deleted.
4850 */
4851 TeamDrive teamDrive;
4852 /** The ID of the Team Drive associated with this change. */
4853 core.String teamDriveId;
4854 /** The type of the change. Possible values are file and teamDrive. */
4855 core.String type;
4382 4856
4383 Change(); 4857 Change();
4384 4858
4385 Change.fromJson(core.Map _json) { 4859 Change.fromJson(core.Map _json) {
4386 if (_json.containsKey("deleted")) { 4860 if (_json.containsKey("deleted")) {
4387 deleted = _json["deleted"]; 4861 deleted = _json["deleted"];
4388 } 4862 }
4389 if (_json.containsKey("file")) { 4863 if (_json.containsKey("file")) {
4390 file = new File.fromJson(_json["file"]); 4864 file = new File.fromJson(_json["file"]);
4391 } 4865 }
4392 if (_json.containsKey("fileId")) { 4866 if (_json.containsKey("fileId")) {
4393 fileId = _json["fileId"]; 4867 fileId = _json["fileId"];
4394 } 4868 }
4395 if (_json.containsKey("id")) { 4869 if (_json.containsKey("id")) {
4396 id = _json["id"]; 4870 id = _json["id"];
4397 } 4871 }
4398 if (_json.containsKey("kind")) { 4872 if (_json.containsKey("kind")) {
4399 kind = _json["kind"]; 4873 kind = _json["kind"];
4400 } 4874 }
4401 if (_json.containsKey("modificationDate")) { 4875 if (_json.containsKey("modificationDate")) {
4402 modificationDate = core.DateTime.parse(_json["modificationDate"]); 4876 modificationDate = core.DateTime.parse(_json["modificationDate"]);
4403 } 4877 }
4404 if (_json.containsKey("selfLink")) { 4878 if (_json.containsKey("selfLink")) {
4405 selfLink = _json["selfLink"]; 4879 selfLink = _json["selfLink"];
4406 } 4880 }
4881 if (_json.containsKey("teamDrive")) {
4882 teamDrive = new TeamDrive.fromJson(_json["teamDrive"]);
4883 }
4884 if (_json.containsKey("teamDriveId")) {
4885 teamDriveId = _json["teamDriveId"];
4886 }
4887 if (_json.containsKey("type")) {
4888 type = _json["type"];
4889 }
4407 } 4890 }
4408 4891
4409 core.Map toJson() { 4892 core.Map toJson() {
4410 var _json = new core.Map(); 4893 var _json = new core.Map();
4411 if (deleted != null) { 4894 if (deleted != null) {
4412 _json["deleted"] = deleted; 4895 _json["deleted"] = deleted;
4413 } 4896 }
4414 if (file != null) { 4897 if (file != null) {
4415 _json["file"] = (file).toJson(); 4898 _json["file"] = (file).toJson();
4416 } 4899 }
4417 if (fileId != null) { 4900 if (fileId != null) {
4418 _json["fileId"] = fileId; 4901 _json["fileId"] = fileId;
4419 } 4902 }
4420 if (id != null) { 4903 if (id != null) {
4421 _json["id"] = id; 4904 _json["id"] = id;
4422 } 4905 }
4423 if (kind != null) { 4906 if (kind != null) {
4424 _json["kind"] = kind; 4907 _json["kind"] = kind;
4425 } 4908 }
4426 if (modificationDate != null) { 4909 if (modificationDate != null) {
4427 _json["modificationDate"] = (modificationDate).toIso8601String(); 4910 _json["modificationDate"] = (modificationDate).toIso8601String();
4428 } 4911 }
4429 if (selfLink != null) { 4912 if (selfLink != null) {
4430 _json["selfLink"] = selfLink; 4913 _json["selfLink"] = selfLink;
4431 } 4914 }
4915 if (teamDrive != null) {
4916 _json["teamDrive"] = (teamDrive).toJson();
4917 }
4918 if (teamDriveId != null) {
4919 _json["teamDriveId"] = teamDriveId;
4920 }
4921 if (type != null) {
4922 _json["type"] = type;
4923 }
4432 return _json; 4924 return _json;
4433 } 4925 }
4434 } 4926 }
4435 4927
4436 /** A list of changes for a user. */ 4928 /** A list of changes for a user. */
4437 class ChangeList { 4929 class ChangeList {
4438 /** The ETag of the list. */ 4930 /** The ETag of the list. */
4439 core.String etag; 4931 core.String etag;
4440 /** 4932 /**
4441 * The list of changes. If nextPageToken is populated, then this list may be 4933 * The list of changes. If nextPageToken is populated, then this list may be
4442 * incomplete and an additional page of results should be fetched. 4934 * incomplete and an additional page of results should be fetched.
4443 */ 4935 */
4444 core.List<Change> items; 4936 core.List<Change> items;
4445 /** This is always drive#changeList. */ 4937 /** This is always drive#changeList. */
4446 core.String kind; 4938 core.String kind;
4447 /** The current largest change ID. */ 4939 /** The current largest change ID. */
4448 core.String largestChangeId; 4940 core.String largestChangeId;
4941 /**
4942 * The starting page token for future changes. This will be present only if
4943 * the end of the current changes list has been reached.
4944 */
4945 core.String newStartPageToken;
4449 /** A link to the next page of changes. */ 4946 /** A link to the next page of changes. */
4450 core.String nextLink; 4947 core.String nextLink;
4451 /** 4948 /**
4452 * The page token for the next page of changes. This will be absent if the end 4949 * The page token for the next page of changes. This will be absent if the end
4453 * of the changes list has been reached. If the token is rejected for any 4950 * of the changes list has been reached. If the token is rejected for any
4454 * reason, it should be discarded, and pagination should be restarted from the 4951 * reason, it should be discarded, and pagination should be restarted from the
4455 * first page of results. 4952 * first page of results.
4456 */ 4953 */
4457 core.String nextPageToken; 4954 core.String nextPageToken;
4458 /** A link back to this list. */ 4955 /** A link back to this list. */
4459 core.String selfLink; 4956 core.String selfLink;
4460 4957
4461 ChangeList(); 4958 ChangeList();
4462 4959
4463 ChangeList.fromJson(core.Map _json) { 4960 ChangeList.fromJson(core.Map _json) {
4464 if (_json.containsKey("etag")) { 4961 if (_json.containsKey("etag")) {
4465 etag = _json["etag"]; 4962 etag = _json["etag"];
4466 } 4963 }
4467 if (_json.containsKey("items")) { 4964 if (_json.containsKey("items")) {
4468 items = _json["items"].map((value) => new Change.fromJson(value)).toList() ; 4965 items = _json["items"].map((value) => new Change.fromJson(value)).toList() ;
4469 } 4966 }
4470 if (_json.containsKey("kind")) { 4967 if (_json.containsKey("kind")) {
4471 kind = _json["kind"]; 4968 kind = _json["kind"];
4472 } 4969 }
4473 if (_json.containsKey("largestChangeId")) { 4970 if (_json.containsKey("largestChangeId")) {
4474 largestChangeId = _json["largestChangeId"]; 4971 largestChangeId = _json["largestChangeId"];
4475 } 4972 }
4973 if (_json.containsKey("newStartPageToken")) {
4974 newStartPageToken = _json["newStartPageToken"];
4975 }
4476 if (_json.containsKey("nextLink")) { 4976 if (_json.containsKey("nextLink")) {
4477 nextLink = _json["nextLink"]; 4977 nextLink = _json["nextLink"];
4478 } 4978 }
4479 if (_json.containsKey("nextPageToken")) { 4979 if (_json.containsKey("nextPageToken")) {
4480 nextPageToken = _json["nextPageToken"]; 4980 nextPageToken = _json["nextPageToken"];
4481 } 4981 }
4482 if (_json.containsKey("selfLink")) { 4982 if (_json.containsKey("selfLink")) {
4483 selfLink = _json["selfLink"]; 4983 selfLink = _json["selfLink"];
4484 } 4984 }
4485 } 4985 }
4486 4986
4487 core.Map toJson() { 4987 core.Map toJson() {
4488 var _json = new core.Map(); 4988 var _json = new core.Map();
4489 if (etag != null) { 4989 if (etag != null) {
4490 _json["etag"] = etag; 4990 _json["etag"] = etag;
4491 } 4991 }
4492 if (items != null) { 4992 if (items != null) {
4493 _json["items"] = items.map((value) => (value).toJson()).toList(); 4993 _json["items"] = items.map((value) => (value).toJson()).toList();
4494 } 4994 }
4495 if (kind != null) { 4995 if (kind != null) {
4496 _json["kind"] = kind; 4996 _json["kind"] = kind;
4497 } 4997 }
4498 if (largestChangeId != null) { 4998 if (largestChangeId != null) {
4499 _json["largestChangeId"] = largestChangeId; 4999 _json["largestChangeId"] = largestChangeId;
4500 } 5000 }
5001 if (newStartPageToken != null) {
5002 _json["newStartPageToken"] = newStartPageToken;
5003 }
4501 if (nextLink != null) { 5004 if (nextLink != null) {
4502 _json["nextLink"] = nextLink; 5005 _json["nextLink"] = nextLink;
4503 } 5006 }
4504 if (nextPageToken != null) { 5007 if (nextPageToken != null) {
4505 _json["nextPageToken"] = nextPageToken; 5008 _json["nextPageToken"] = nextPageToken;
4506 } 5009 }
4507 if (selfLink != null) { 5010 if (selfLink != null) {
4508 _json["selfLink"] = selfLink; 5011 _json["selfLink"] = selfLink;
4509 } 5012 }
4510 return _json; 5013 return _json;
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
5134 if (nextPageToken != null) { 5637 if (nextPageToken != null) {
5135 _json["nextPageToken"] = nextPageToken; 5638 _json["nextPageToken"] = nextPageToken;
5136 } 5639 }
5137 if (selfLink != null) { 5640 if (selfLink != null) {
5138 _json["selfLink"] = selfLink; 5641 _json["selfLink"] = selfLink;
5139 } 5642 }
5140 return _json; 5643 return _json;
5141 } 5644 }
5142 } 5645 }
5143 5646
5647 /**
5648 * Capabilities the current user has on the file. Each capability corresponds to
5649 * a fine-grained action that a user may take.
5650 */
5651 class FileCapabilities {
5652 /**
5653 * Whether the current user can add children to this folder. This is always
5654 * false when the item is not a folder.
5655 */
5656 core.bool canAddChildren;
5657 /** Whether the current user can comment on the file. */
5658 core.bool canComment;
5659 /**
5660 * Whether the file can be copied by the current user. For a Team Drive item,
5661 * whether non-folder descendants of this item, or this item itself if it is
5662 * not a folder, can be copied.
5663 */
5664 core.bool canCopy;
5665 /** Whether the file can be deleted by the current user. */
5666 core.bool canDelete;
5667 /** Whether the file can be downloaded by the current user. */
5668 core.bool canDownload;
5669 /** Whether the file can be edited by the current user. */
5670 core.bool canEdit;
5671 /**
5672 * Whether the current user can list the children of this folder. This is
5673 * always false when the item is not a folder.
5674 */
5675 core.bool canListChildren;
5676 /**
5677 * Whether the current user can move this item into a Team Drive. If the item
5678 * is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
5679 */
5680 core.bool canMoveItemIntoTeamDrive;
5681 /**
5682 * Whether the current user can move this Team Drive item by changing its
5683 * parent. Note that a request to change the parent for this item may still
5684 * fail depending on the new parent that is being added. Only populated for
5685 * Team Drive files.
5686 */
5687 core.bool canMoveTeamDriveItem;
5688 /**
5689 * Whether the current user has read access to the Revisions resource of the
5690 * file. For a Team Drive item, whether revisions of non-folder descendants of
5691 * this item, or this item itself if it is not a folder, can be read.
5692 */
5693 core.bool canReadRevisions;
5694 /**
5695 * Whether the current user has read access to the Team Drive to which this
5696 * file belongs. Only populated for Team Drive files.
5697 */
5698 core.bool canReadTeamDrive;
5699 /**
5700 * Whether the current user can remove children from this folder. This is
5701 * always false when the item is not a folder.
5702 */
5703 core.bool canRemoveChildren;
5704 /** Whether the file can be renamed by the current user. */
5705 core.bool canRename;
5706 /**
5707 * Whether the file's sharing settings can be modified by the current user.
5708 */
5709 core.bool canShare;
5710 /** Whether the file can be trashed by the current user. */
5711 core.bool canTrash;
5712 /** Whether the file can be restored from the trash by the current user. */
5713 core.bool canUntrash;
5714
5715 FileCapabilities();
5716
5717 FileCapabilities.fromJson(core.Map _json) {
5718 if (_json.containsKey("canAddChildren")) {
5719 canAddChildren = _json["canAddChildren"];
5720 }
5721 if (_json.containsKey("canComment")) {
5722 canComment = _json["canComment"];
5723 }
5724 if (_json.containsKey("canCopy")) {
5725 canCopy = _json["canCopy"];
5726 }
5727 if (_json.containsKey("canDelete")) {
5728 canDelete = _json["canDelete"];
5729 }
5730 if (_json.containsKey("canDownload")) {
5731 canDownload = _json["canDownload"];
5732 }
5733 if (_json.containsKey("canEdit")) {
5734 canEdit = _json["canEdit"];
5735 }
5736 if (_json.containsKey("canListChildren")) {
5737 canListChildren = _json["canListChildren"];
5738 }
5739 if (_json.containsKey("canMoveItemIntoTeamDrive")) {
5740 canMoveItemIntoTeamDrive = _json["canMoveItemIntoTeamDrive"];
5741 }
5742 if (_json.containsKey("canMoveTeamDriveItem")) {
5743 canMoveTeamDriveItem = _json["canMoveTeamDriveItem"];
5744 }
5745 if (_json.containsKey("canReadRevisions")) {
5746 canReadRevisions = _json["canReadRevisions"];
5747 }
5748 if (_json.containsKey("canReadTeamDrive")) {
5749 canReadTeamDrive = _json["canReadTeamDrive"];
5750 }
5751 if (_json.containsKey("canRemoveChildren")) {
5752 canRemoveChildren = _json["canRemoveChildren"];
5753 }
5754 if (_json.containsKey("canRename")) {
5755 canRename = _json["canRename"];
5756 }
5757 if (_json.containsKey("canShare")) {
5758 canShare = _json["canShare"];
5759 }
5760 if (_json.containsKey("canTrash")) {
5761 canTrash = _json["canTrash"];
5762 }
5763 if (_json.containsKey("canUntrash")) {
5764 canUntrash = _json["canUntrash"];
5765 }
5766 }
5767
5768 core.Map toJson() {
5769 var _json = new core.Map();
5770 if (canAddChildren != null) {
5771 _json["canAddChildren"] = canAddChildren;
5772 }
5773 if (canComment != null) {
5774 _json["canComment"] = canComment;
5775 }
5776 if (canCopy != null) {
5777 _json["canCopy"] = canCopy;
5778 }
5779 if (canDelete != null) {
5780 _json["canDelete"] = canDelete;
5781 }
5782 if (canDownload != null) {
5783 _json["canDownload"] = canDownload;
5784 }
5785 if (canEdit != null) {
5786 _json["canEdit"] = canEdit;
5787 }
5788 if (canListChildren != null) {
5789 _json["canListChildren"] = canListChildren;
5790 }
5791 if (canMoveItemIntoTeamDrive != null) {
5792 _json["canMoveItemIntoTeamDrive"] = canMoveItemIntoTeamDrive;
5793 }
5794 if (canMoveTeamDriveItem != null) {
5795 _json["canMoveTeamDriveItem"] = canMoveTeamDriveItem;
5796 }
5797 if (canReadRevisions != null) {
5798 _json["canReadRevisions"] = canReadRevisions;
5799 }
5800 if (canReadTeamDrive != null) {
5801 _json["canReadTeamDrive"] = canReadTeamDrive;
5802 }
5803 if (canRemoveChildren != null) {
5804 _json["canRemoveChildren"] = canRemoveChildren;
5805 }
5806 if (canRename != null) {
5807 _json["canRename"] = canRename;
5808 }
5809 if (canShare != null) {
5810 _json["canShare"] = canShare;
5811 }
5812 if (canTrash != null) {
5813 _json["canTrash"] = canTrash;
5814 }
5815 if (canUntrash != null) {
5816 _json["canUntrash"] = canUntrash;
5817 }
5818 return _json;
5819 }
5820 }
5821
5144 /** Geographic location information stored in the image. */ 5822 /** Geographic location information stored in the image. */
5145 class FileImageMediaMetadataLocation { 5823 class FileImageMediaMetadataLocation {
5146 /** The altitude stored in the image. */ 5824 /** The altitude stored in the image. */
5147 core.double altitude; 5825 core.double altitude;
5148 /** The latitude stored in the image. */ 5826 /** The latitude stored in the image. */
5149 core.double latitude; 5827 core.double latitude;
5150 /** The longitude stored in the image. */ 5828 /** The longitude stored in the image. */
5151 core.double longitude; 5829 core.double longitude;
5152 5830
5153 FileImageMediaMetadataLocation(); 5831 FileImageMediaMetadataLocation();
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
5540 return _json; 6218 return _json;
5541 } 6219 }
5542 } 6220 }
5543 6221
5544 /** The metadata for a file. */ 6222 /** The metadata for a file. */
5545 class File { 6223 class File {
5546 /** A link for opening the file in a relevant Google editor or viewer. */ 6224 /** A link for opening the file in a relevant Google editor or viewer. */
5547 core.String alternateLink; 6225 core.String alternateLink;
5548 /** Whether this file is in the Application Data folder. */ 6226 /** Whether this file is in the Application Data folder. */
5549 core.bool appDataContents; 6227 core.bool appDataContents;
5550 /** Whether the current user can comment on the file. */ 6228 /**
6229 * Whether the current user can comment on the file. Deprecated: use
6230 * capabilities/canComment.
6231 */
5551 core.bool canComment; 6232 core.bool canComment;
5552 /** 6233 /**
5553 * Whether the current user has read access to the Revisions resource of the 6234 * Whether the current user has read access to the Revisions resource of the
5554 * file. 6235 * file. Deprecated: use capabilities/canReadRevisions.
5555 */ 6236 */
5556 core.bool canReadRevisions; 6237 core.bool canReadRevisions;
5557 /** Whether the file can be copied by the current user. */ 6238 /**
6239 * Capabilities the current user has on the file. Each capability corresponds
6240 * to a fine-grained action that a user may take.
6241 */
6242 FileCapabilities capabilities;
6243 /**
6244 * Whether the file can be copied by the current user. Deprecated: use
6245 * capabilities/canCopy.
6246 */
5558 core.bool copyable; 6247 core.bool copyable;
5559 /** Create time for this file (formatted RFC 3339 timestamp). */ 6248 /** Create time for this file (formatted RFC 3339 timestamp). */
5560 core.DateTime createdDate; 6249 core.DateTime createdDate;
5561 /** 6250 /**
5562 * A link to open this file with the user's default app for this file. Only 6251 * A link to open this file with the user's default app for this file. Only
5563 * populated when the drive.apps.readonly scope is used. 6252 * populated when the drive.apps.readonly scope is used.
5564 */ 6253 */
5565 core.String defaultOpenWithLink; 6254 core.String defaultOpenWithLink;
5566 /** A short description of the file. */ 6255 /** A short description of the file. */
5567 core.String description; 6256 core.String description;
5568 core.String downloadUrl; 6257 core.String downloadUrl;
5569 /** Whether the file can be edited by the current user. */ 6258 /**
6259 * Whether the file can be edited by the current user. Deprecated: use
6260 * capabilities/canEdit.
6261 */
5570 core.bool editable; 6262 core.bool editable;
5571 /** A link for embedding the file. */ 6263 /** A link for embedding the file. */
5572 core.String embedLink; 6264 core.String embedLink;
5573 /** ETag of the file. */ 6265 /** ETag of the file. */
5574 core.String etag; 6266 core.String etag;
5575 /** 6267 /**
5576 * Whether this file has been explicitly trashed, as opposed to recursively 6268 * Whether this file has been explicitly trashed, as opposed to recursively
5577 * trashed. 6269 * trashed.
5578 */ 6270 */
5579 core.bool explicitlyTrashed; 6271 core.bool explicitlyTrashed;
5580 /** Links for exporting Google Docs to specific formats. */ 6272 /** Links for exporting Google Docs to specific formats. */
5581 core.Map<core.String, core.String> exportLinks; 6273 core.Map<core.String, core.String> exportLinks;
5582 /** 6274 /**
5583 * The final component of fullFileExtension with trailing text that does not 6275 * The final component of fullFileExtension with trailing text that does not
5584 * appear to be part of the extension removed. This field is only populated 6276 * appear to be part of the extension removed. This field is only populated
5585 * for files with content stored in Drive; it is not populated for Google Docs 6277 * for files with content stored in Drive; it is not populated for Google Docs
5586 * or shortcut files. 6278 * or shortcut files.
5587 */ 6279 */
5588 core.String fileExtension; 6280 core.String fileExtension;
5589 /** 6281 /**
5590 * The size of the file in bytes. This field is only populated for files with 6282 * The size of the file in bytes. This field is only populated for files with
5591 * content stored in Drive; it is not populated for Google Docs or shortcut 6283 * content stored in Drive; it is not populated for Google Docs or shortcut
5592 * files. 6284 * files.
5593 */ 6285 */
5594 core.String fileSize; 6286 core.String fileSize;
5595 /** 6287 /**
5596 * Folder color as an RGB hex string if the file is a folder. The list of 6288 * Folder color as an RGB hex string if the file is a folder. The list of
5597 * supported colors is available in the folderColorPalette field of the About 6289 * supported colors is available in the folderColorPalette field of the About
5598 * resource. If an unsupported color is specified, it will be changed to the 6290 * resource. If an unsupported color is specified, it will be changed to the
5599 * closest color in the palette. 6291 * closest color in the palette. Not populated for Team Drive files.
5600 */ 6292 */
5601 core.String folderColorRgb; 6293 core.String folderColorRgb;
5602 /** 6294 /**
5603 * The full file extension; extracted from the title. May contain multiple 6295 * The full file extension; extracted from the title. May contain multiple
5604 * concatenated extensions, such as "tar.gz". Removing an extension from the 6296 * concatenated extensions, such as "tar.gz". Removing an extension from the
5605 * title does not clear this field; however, changing the extension on the 6297 * title does not clear this field; however, changing the extension on the
5606 * title does update this field. This field is only populated for files with 6298 * title does update this field. This field is only populated for files with
5607 * content stored in Drive; it is not populated for Google Docs or shortcut 6299 * content stored in Drive; it is not populated for Google Docs or shortcut
5608 * files. 6300 * files.
5609 */ 6301 */
5610 core.String fullFileExtension; 6302 core.String fullFileExtension;
6303 /**
6304 * Whether any users are granted file access directly on this file. This field
6305 * is only populated for Team Drive files.
6306 */
6307 core.bool hasAugmentedPermissions;
5611 /** Whether this file has a thumbnail. */ 6308 /** Whether this file has a thumbnail. */
5612 core.bool hasThumbnail; 6309 core.bool hasThumbnail;
5613 /** 6310 /**
5614 * The ID of the file's head revision. This field is only populated for files 6311 * The ID of the file's head revision. This field is only populated for files
5615 * with content stored in Drive; it is not populated for Google Docs or 6312 * with content stored in Drive; it is not populated for Google Docs or
5616 * shortcut files. 6313 * shortcut files.
5617 */ 6314 */
5618 core.String headRevisionId; 6315 core.String headRevisionId;
5619 /** A link to the file's icon. */ 6316 /** A link to the file's icon. */
5620 core.String iconLink; 6317 core.String iconLink;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
5670 * A map of the id of each of the user's apps to a link to open this file with 6367 * A map of the id of each of the user's apps to a link to open this file with
5671 * that app. Only populated when the drive.apps.readonly scope is used. 6368 * that app. Only populated when the drive.apps.readonly scope is used.
5672 */ 6369 */
5673 core.Map<core.String, core.String> openWithLinks; 6370 core.Map<core.String, core.String> openWithLinks;
5674 /** 6371 /**
5675 * The original filename of the uploaded content if available, or else the 6372 * The original filename of the uploaded content if available, or else the
5676 * original value of the title field. This is only available for files with 6373 * original value of the title field. This is only available for files with
5677 * binary content in Drive. 6374 * binary content in Drive.
5678 */ 6375 */
5679 core.String originalFilename; 6376 core.String originalFilename;
5680 /** Whether the file is owned by the current user. */ 6377 /**
6378 * Whether the file is owned by the current user. Not populated for Team Drive
6379 * files.
6380 */
5681 core.bool ownedByMe; 6381 core.bool ownedByMe;
5682 /** Name(s) of the owner(s) of this file. */ 6382 /**
6383 * Name(s) of the owner(s) of this file. Not populated for Team Drive files.
6384 */
5683 core.List<core.String> ownerNames; 6385 core.List<core.String> ownerNames;
5684 /** The owner(s) of this file. */ 6386 /** The owner(s) of this file. Not populated for Team Drive files. */
5685 core.List<User> owners; 6387 core.List<User> owners;
5686 /** 6388 /**
5687 * Collection of parent folders which contain this file. 6389 * Collection of parent folders which contain this file.
5688 * Setting this field will put the file in all of the provided folders. On 6390 * Setting this field will put the file in all of the provided folders. On
5689 * insert, if no folders are provided, the file will be placed in the default 6391 * insert, if no folders are provided, the file will be placed in the default
5690 * root folder. 6392 * root folder.
5691 */ 6393 */
5692 core.List<ParentReference> parents; 6394 core.List<ParentReference> parents;
5693 /** The list of permissions for users with access to this file. */ 6395 /**
6396 * The list of permissions for users with access to this file. Not populated
6397 * for Team Drive files.
6398 */
5694 core.List<Permission> permissions; 6399 core.List<Permission> permissions;
5695 /** The list of properties. */ 6400 /** The list of properties. */
5696 core.List<Property> properties; 6401 core.List<Property> properties;
5697 /** The number of quota bytes used by this file. */ 6402 /** The number of quota bytes used by this file. */
5698 core.String quotaBytesUsed; 6403 core.String quotaBytesUsed;
5699 /** A link back to this file. */ 6404 /** A link back to this file. */
5700 core.String selfLink; 6405 core.String selfLink;
5701 /** 6406 /**
5702 * Whether the file's sharing settings can be modified by the current user. 6407 * Whether the file's sharing settings can be modified by the current user.
6408 * Deprecated: use capabilities/canShare.
5703 */ 6409 */
5704 core.bool shareable; 6410 core.bool shareable;
5705 /** Whether the file has been shared. */ 6411 /** Whether the file has been shared. Not populated for Team Drive files. */
5706 core.bool shared; 6412 core.bool shared;
5707 /** 6413 /**
5708 * Time at which this file was shared with the user (formatted RFC 3339 6414 * Time at which this file was shared with the user (formatted RFC 3339
5709 * timestamp). 6415 * timestamp).
5710 */ 6416 */
5711 core.DateTime sharedWithMeDate; 6417 core.DateTime sharedWithMeDate;
5712 /** User that shared the item with the current user, if available. */ 6418 /** User that shared the item with the current user, if available. */
5713 User sharingUser; 6419 User sharingUser;
5714 /** 6420 /**
5715 * The list of spaces which contain the file. Supported values are 'drive', 6421 * The list of spaces which contain the file. Supported values are 'drive',
5716 * 'appDataFolder' and 'photos'. 6422 * 'appDataFolder' and 'photos'.
5717 */ 6423 */
5718 core.List<core.String> spaces; 6424 core.List<core.String> spaces;
6425 /** ID of the Team Drive the file resides in. */
6426 core.String teamDriveId;
5719 /** 6427 /**
5720 * A thumbnail for the file. This will only be used if Drive cannot generate a 6428 * A thumbnail for the file. This will only be used if Drive cannot generate a
5721 * standard thumbnail. 6429 * standard thumbnail.
5722 */ 6430 */
5723 FileThumbnail thumbnail; 6431 FileThumbnail thumbnail;
5724 /** 6432 /**
5725 * A short-lived link to the file's thumbnail. Typically lasts on the order of 6433 * A short-lived link to the file's thumbnail. Typically lasts on the order of
5726 * hours. Only populated when the requesting app can access the file's 6434 * hours. Only populated when the requesting app can access the file's
5727 * content. 6435 * content.
5728 */ 6436 */
5729 core.String thumbnailLink; 6437 core.String thumbnailLink;
5730 /** The thumbnail version for use in thumbnail cache invalidation. */ 6438 /** The thumbnail version for use in thumbnail cache invalidation. */
5731 core.String thumbnailVersion; 6439 core.String thumbnailVersion;
5732 /** The title of this file. */ 6440 /** The title of this file. */
5733 core.String title; 6441 core.String title;
6442 /**
6443 * The time that the item was trashed (formatted RFC 3339 timestamp). Only
6444 * populated for Team Drive files.
6445 */
6446 core.DateTime trashedDate;
6447 /**
6448 * If the file has been explicitly trashed, the user who trashed it. Only
6449 * populated for Team Drive files.
6450 */
6451 User trashingUser;
5734 /** The permissions for the authenticated user on this file. */ 6452 /** The permissions for the authenticated user on this file. */
5735 Permission userPermission; 6453 Permission userPermission;
5736 /** 6454 /**
5737 * A monotonically increasing version number for the file. This reflects every 6455 * A monotonically increasing version number for the file. This reflects every
5738 * change made to the file on the server, even those not visible to the 6456 * change made to the file on the server, even those not visible to the
5739 * requesting user. 6457 * requesting user.
5740 */ 6458 */
5741 core.String version; 6459 core.String version;
5742 /** Metadata about video media. This will only be present for video types. */ 6460 /** Metadata about video media. This will only be present for video types. */
5743 FileVideoMediaMetadata videoMediaMetadata; 6461 FileVideoMediaMetadata videoMediaMetadata;
5744 /** 6462 /**
5745 * A link for downloading the content of the file in a browser using cookie 6463 * A link for downloading the content of the file in a browser using cookie
5746 * based authentication. In cases where the content is shared publicly, the 6464 * based authentication. In cases where the content is shared publicly, the
5747 * content can be downloaded without any credentials. 6465 * content can be downloaded without any credentials.
5748 */ 6466 */
5749 core.String webContentLink; 6467 core.String webContentLink;
5750 /** 6468 /**
5751 * A link only available on public folders for viewing their static web assets 6469 * A link only available on public folders for viewing their static web assets
5752 * (HTML, CSS, JS, etc) via Google Drive's Website Hosting. 6470 * (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
5753 */ 6471 */
5754 core.String webViewLink; 6472 core.String webViewLink;
5755 /** Whether writers can share the document with other users. */ 6473 /**
6474 * Whether writers can share the document with other users. Not populated for
6475 * Team Drive files.
6476 */
5756 core.bool writersCanShare; 6477 core.bool writersCanShare;
5757 6478
5758 File(); 6479 File();
5759 6480
5760 File.fromJson(core.Map _json) { 6481 File.fromJson(core.Map _json) {
5761 if (_json.containsKey("alternateLink")) { 6482 if (_json.containsKey("alternateLink")) {
5762 alternateLink = _json["alternateLink"]; 6483 alternateLink = _json["alternateLink"];
5763 } 6484 }
5764 if (_json.containsKey("appDataContents")) { 6485 if (_json.containsKey("appDataContents")) {
5765 appDataContents = _json["appDataContents"]; 6486 appDataContents = _json["appDataContents"];
5766 } 6487 }
5767 if (_json.containsKey("canComment")) { 6488 if (_json.containsKey("canComment")) {
5768 canComment = _json["canComment"]; 6489 canComment = _json["canComment"];
5769 } 6490 }
5770 if (_json.containsKey("canReadRevisions")) { 6491 if (_json.containsKey("canReadRevisions")) {
5771 canReadRevisions = _json["canReadRevisions"]; 6492 canReadRevisions = _json["canReadRevisions"];
5772 } 6493 }
6494 if (_json.containsKey("capabilities")) {
6495 capabilities = new FileCapabilities.fromJson(_json["capabilities"]);
6496 }
5773 if (_json.containsKey("copyable")) { 6497 if (_json.containsKey("copyable")) {
5774 copyable = _json["copyable"]; 6498 copyable = _json["copyable"];
5775 } 6499 }
5776 if (_json.containsKey("createdDate")) { 6500 if (_json.containsKey("createdDate")) {
5777 createdDate = core.DateTime.parse(_json["createdDate"]); 6501 createdDate = core.DateTime.parse(_json["createdDate"]);
5778 } 6502 }
5779 if (_json.containsKey("defaultOpenWithLink")) { 6503 if (_json.containsKey("defaultOpenWithLink")) {
5780 defaultOpenWithLink = _json["defaultOpenWithLink"]; 6504 defaultOpenWithLink = _json["defaultOpenWithLink"];
5781 } 6505 }
5782 if (_json.containsKey("description")) { 6506 if (_json.containsKey("description")) {
(...skipping 22 matching lines...) Expand all
5805 } 6529 }
5806 if (_json.containsKey("fileSize")) { 6530 if (_json.containsKey("fileSize")) {
5807 fileSize = _json["fileSize"]; 6531 fileSize = _json["fileSize"];
5808 } 6532 }
5809 if (_json.containsKey("folderColorRgb")) { 6533 if (_json.containsKey("folderColorRgb")) {
5810 folderColorRgb = _json["folderColorRgb"]; 6534 folderColorRgb = _json["folderColorRgb"];
5811 } 6535 }
5812 if (_json.containsKey("fullFileExtension")) { 6536 if (_json.containsKey("fullFileExtension")) {
5813 fullFileExtension = _json["fullFileExtension"]; 6537 fullFileExtension = _json["fullFileExtension"];
5814 } 6538 }
6539 if (_json.containsKey("hasAugmentedPermissions")) {
6540 hasAugmentedPermissions = _json["hasAugmentedPermissions"];
6541 }
5815 if (_json.containsKey("hasThumbnail")) { 6542 if (_json.containsKey("hasThumbnail")) {
5816 hasThumbnail = _json["hasThumbnail"]; 6543 hasThumbnail = _json["hasThumbnail"];
5817 } 6544 }
5818 if (_json.containsKey("headRevisionId")) { 6545 if (_json.containsKey("headRevisionId")) {
5819 headRevisionId = _json["headRevisionId"]; 6546 headRevisionId = _json["headRevisionId"];
5820 } 6547 }
5821 if (_json.containsKey("iconLink")) { 6548 if (_json.containsKey("iconLink")) {
5822 iconLink = _json["iconLink"]; 6549 iconLink = _json["iconLink"];
5823 } 6550 }
5824 if (_json.containsKey("id")) { 6551 if (_json.containsKey("id")) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
5901 } 6628 }
5902 if (_json.containsKey("sharedWithMeDate")) { 6629 if (_json.containsKey("sharedWithMeDate")) {
5903 sharedWithMeDate = core.DateTime.parse(_json["sharedWithMeDate"]); 6630 sharedWithMeDate = core.DateTime.parse(_json["sharedWithMeDate"]);
5904 } 6631 }
5905 if (_json.containsKey("sharingUser")) { 6632 if (_json.containsKey("sharingUser")) {
5906 sharingUser = new User.fromJson(_json["sharingUser"]); 6633 sharingUser = new User.fromJson(_json["sharingUser"]);
5907 } 6634 }
5908 if (_json.containsKey("spaces")) { 6635 if (_json.containsKey("spaces")) {
5909 spaces = _json["spaces"]; 6636 spaces = _json["spaces"];
5910 } 6637 }
6638 if (_json.containsKey("teamDriveId")) {
6639 teamDriveId = _json["teamDriveId"];
6640 }
5911 if (_json.containsKey("thumbnail")) { 6641 if (_json.containsKey("thumbnail")) {
5912 thumbnail = new FileThumbnail.fromJson(_json["thumbnail"]); 6642 thumbnail = new FileThumbnail.fromJson(_json["thumbnail"]);
5913 } 6643 }
5914 if (_json.containsKey("thumbnailLink")) { 6644 if (_json.containsKey("thumbnailLink")) {
5915 thumbnailLink = _json["thumbnailLink"]; 6645 thumbnailLink = _json["thumbnailLink"];
5916 } 6646 }
5917 if (_json.containsKey("thumbnailVersion")) { 6647 if (_json.containsKey("thumbnailVersion")) {
5918 thumbnailVersion = _json["thumbnailVersion"]; 6648 thumbnailVersion = _json["thumbnailVersion"];
5919 } 6649 }
5920 if (_json.containsKey("title")) { 6650 if (_json.containsKey("title")) {
5921 title = _json["title"]; 6651 title = _json["title"];
5922 } 6652 }
6653 if (_json.containsKey("trashedDate")) {
6654 trashedDate = core.DateTime.parse(_json["trashedDate"]);
6655 }
6656 if (_json.containsKey("trashingUser")) {
6657 trashingUser = new User.fromJson(_json["trashingUser"]);
6658 }
5923 if (_json.containsKey("userPermission")) { 6659 if (_json.containsKey("userPermission")) {
5924 userPermission = new Permission.fromJson(_json["userPermission"]); 6660 userPermission = new Permission.fromJson(_json["userPermission"]);
5925 } 6661 }
5926 if (_json.containsKey("version")) { 6662 if (_json.containsKey("version")) {
5927 version = _json["version"]; 6663 version = _json["version"];
5928 } 6664 }
5929 if (_json.containsKey("videoMediaMetadata")) { 6665 if (_json.containsKey("videoMediaMetadata")) {
5930 videoMediaMetadata = new FileVideoMediaMetadata.fromJson(_json["videoMedia Metadata"]); 6666 videoMediaMetadata = new FileVideoMediaMetadata.fromJson(_json["videoMedia Metadata"]);
5931 } 6667 }
5932 if (_json.containsKey("webContentLink")) { 6668 if (_json.containsKey("webContentLink")) {
(...skipping 14 matching lines...) Expand all
5947 } 6683 }
5948 if (appDataContents != null) { 6684 if (appDataContents != null) {
5949 _json["appDataContents"] = appDataContents; 6685 _json["appDataContents"] = appDataContents;
5950 } 6686 }
5951 if (canComment != null) { 6687 if (canComment != null) {
5952 _json["canComment"] = canComment; 6688 _json["canComment"] = canComment;
5953 } 6689 }
5954 if (canReadRevisions != null) { 6690 if (canReadRevisions != null) {
5955 _json["canReadRevisions"] = canReadRevisions; 6691 _json["canReadRevisions"] = canReadRevisions;
5956 } 6692 }
6693 if (capabilities != null) {
6694 _json["capabilities"] = (capabilities).toJson();
6695 }
5957 if (copyable != null) { 6696 if (copyable != null) {
5958 _json["copyable"] = copyable; 6697 _json["copyable"] = copyable;
5959 } 6698 }
5960 if (createdDate != null) { 6699 if (createdDate != null) {
5961 _json["createdDate"] = (createdDate).toIso8601String(); 6700 _json["createdDate"] = (createdDate).toIso8601String();
5962 } 6701 }
5963 if (defaultOpenWithLink != null) { 6702 if (defaultOpenWithLink != null) {
5964 _json["defaultOpenWithLink"] = defaultOpenWithLink; 6703 _json["defaultOpenWithLink"] = defaultOpenWithLink;
5965 } 6704 }
5966 if (description != null) { 6705 if (description != null) {
(...skipping 22 matching lines...) Expand all
5989 } 6728 }
5990 if (fileSize != null) { 6729 if (fileSize != null) {
5991 _json["fileSize"] = fileSize; 6730 _json["fileSize"] = fileSize;
5992 } 6731 }
5993 if (folderColorRgb != null) { 6732 if (folderColorRgb != null) {
5994 _json["folderColorRgb"] = folderColorRgb; 6733 _json["folderColorRgb"] = folderColorRgb;
5995 } 6734 }
5996 if (fullFileExtension != null) { 6735 if (fullFileExtension != null) {
5997 _json["fullFileExtension"] = fullFileExtension; 6736 _json["fullFileExtension"] = fullFileExtension;
5998 } 6737 }
6738 if (hasAugmentedPermissions != null) {
6739 _json["hasAugmentedPermissions"] = hasAugmentedPermissions;
6740 }
5999 if (hasThumbnail != null) { 6741 if (hasThumbnail != null) {
6000 _json["hasThumbnail"] = hasThumbnail; 6742 _json["hasThumbnail"] = hasThumbnail;
6001 } 6743 }
6002 if (headRevisionId != null) { 6744 if (headRevisionId != null) {
6003 _json["headRevisionId"] = headRevisionId; 6745 _json["headRevisionId"] = headRevisionId;
6004 } 6746 }
6005 if (iconLink != null) { 6747 if (iconLink != null) {
6006 _json["iconLink"] = iconLink; 6748 _json["iconLink"] = iconLink;
6007 } 6749 }
6008 if (id != null) { 6750 if (id != null) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
6085 } 6827 }
6086 if (sharedWithMeDate != null) { 6828 if (sharedWithMeDate != null) {
6087 _json["sharedWithMeDate"] = (sharedWithMeDate).toIso8601String(); 6829 _json["sharedWithMeDate"] = (sharedWithMeDate).toIso8601String();
6088 } 6830 }
6089 if (sharingUser != null) { 6831 if (sharingUser != null) {
6090 _json["sharingUser"] = (sharingUser).toJson(); 6832 _json["sharingUser"] = (sharingUser).toJson();
6091 } 6833 }
6092 if (spaces != null) { 6834 if (spaces != null) {
6093 _json["spaces"] = spaces; 6835 _json["spaces"] = spaces;
6094 } 6836 }
6837 if (teamDriveId != null) {
6838 _json["teamDriveId"] = teamDriveId;
6839 }
6095 if (thumbnail != null) { 6840 if (thumbnail != null) {
6096 _json["thumbnail"] = (thumbnail).toJson(); 6841 _json["thumbnail"] = (thumbnail).toJson();
6097 } 6842 }
6098 if (thumbnailLink != null) { 6843 if (thumbnailLink != null) {
6099 _json["thumbnailLink"] = thumbnailLink; 6844 _json["thumbnailLink"] = thumbnailLink;
6100 } 6845 }
6101 if (thumbnailVersion != null) { 6846 if (thumbnailVersion != null) {
6102 _json["thumbnailVersion"] = thumbnailVersion; 6847 _json["thumbnailVersion"] = thumbnailVersion;
6103 } 6848 }
6104 if (title != null) { 6849 if (title != null) {
6105 _json["title"] = title; 6850 _json["title"] = title;
6106 } 6851 }
6852 if (trashedDate != null) {
6853 _json["trashedDate"] = (trashedDate).toIso8601String();
6854 }
6855 if (trashingUser != null) {
6856 _json["trashingUser"] = (trashingUser).toJson();
6857 }
6107 if (userPermission != null) { 6858 if (userPermission != null) {
6108 _json["userPermission"] = (userPermission).toJson(); 6859 _json["userPermission"] = (userPermission).toJson();
6109 } 6860 }
6110 if (version != null) { 6861 if (version != null) {
6111 _json["version"] = version; 6862 _json["version"] = version;
6112 } 6863 }
6113 if (videoMediaMetadata != null) { 6864 if (videoMediaMetadata != null) {
6114 _json["videoMediaMetadata"] = (videoMediaMetadata).toJson(); 6865 _json["videoMediaMetadata"] = (videoMediaMetadata).toJson();
6115 } 6866 }
6116 if (webContentLink != null) { 6867 if (webContentLink != null) {
6117 _json["webContentLink"] = webContentLink; 6868 _json["webContentLink"] = webContentLink;
6118 } 6869 }
6119 if (webViewLink != null) { 6870 if (webViewLink != null) {
6120 _json["webViewLink"] = webViewLink; 6871 _json["webViewLink"] = webViewLink;
6121 } 6872 }
6122 if (writersCanShare != null) { 6873 if (writersCanShare != null) {
6123 _json["writersCanShare"] = writersCanShare; 6874 _json["writersCanShare"] = writersCanShare;
6124 } 6875 }
6125 return _json; 6876 return _json;
6126 } 6877 }
6127 } 6878 }
6128 6879
6129 /** A list of files. */ 6880 /** A list of files. */
6130 class FileList { 6881 class FileList {
6131 /** The ETag of the list. */ 6882 /** The ETag of the list. */
6132 core.String etag; 6883 core.String etag;
6133 /** 6884 /**
6885 * Whether the search process was incomplete. If true, then some search
6886 * results may be missing, since all documents were not searched. This may
6887 * occur when searching multiple Team Drives with the "default,allTeamDrives"
6888 * corpora, but all corpora could not be searched. When this happens, it is
6889 * suggested that clients narrow their query by choosing a different corpus
6890 * such as "default" or "teamDrive".
6891 */
6892 core.bool incompleteSearch;
6893 /**
6134 * The list of files. If nextPageToken is populated, then this list may be 6894 * The list of files. If nextPageToken is populated, then this list may be
6135 * incomplete and an additional page of results should be fetched. 6895 * incomplete and an additional page of results should be fetched.
6136 */ 6896 */
6137 core.List<File> items; 6897 core.List<File> items;
6138 /** This is always drive#fileList. */ 6898 /** This is always drive#fileList. */
6139 core.String kind; 6899 core.String kind;
6140 /** A link to the next page of files. */ 6900 /** A link to the next page of files. */
6141 core.String nextLink; 6901 core.String nextLink;
6142 /** 6902 /**
6143 * The page token for the next page of files. This will be absent if the end 6903 * The page token for the next page of files. This will be absent if the end
6144 * of the files list has been reached. If the token is rejected for any 6904 * of the files list has been reached. If the token is rejected for any
6145 * reason, it should be discarded, and pagination should be restarted from the 6905 * reason, it should be discarded, and pagination should be restarted from the
6146 * first page of results. 6906 * first page of results.
6147 */ 6907 */
6148 core.String nextPageToken; 6908 core.String nextPageToken;
6149 /** A link back to this list. */ 6909 /** A link back to this list. */
6150 core.String selfLink; 6910 core.String selfLink;
6151 6911
6152 FileList(); 6912 FileList();
6153 6913
6154 FileList.fromJson(core.Map _json) { 6914 FileList.fromJson(core.Map _json) {
6155 if (_json.containsKey("etag")) { 6915 if (_json.containsKey("etag")) {
6156 etag = _json["etag"]; 6916 etag = _json["etag"];
6157 } 6917 }
6918 if (_json.containsKey("incompleteSearch")) {
6919 incompleteSearch = _json["incompleteSearch"];
6920 }
6158 if (_json.containsKey("items")) { 6921 if (_json.containsKey("items")) {
6159 items = _json["items"].map((value) => new File.fromJson(value)).toList(); 6922 items = _json["items"].map((value) => new File.fromJson(value)).toList();
6160 } 6923 }
6161 if (_json.containsKey("kind")) { 6924 if (_json.containsKey("kind")) {
6162 kind = _json["kind"]; 6925 kind = _json["kind"];
6163 } 6926 }
6164 if (_json.containsKey("nextLink")) { 6927 if (_json.containsKey("nextLink")) {
6165 nextLink = _json["nextLink"]; 6928 nextLink = _json["nextLink"];
6166 } 6929 }
6167 if (_json.containsKey("nextPageToken")) { 6930 if (_json.containsKey("nextPageToken")) {
6168 nextPageToken = _json["nextPageToken"]; 6931 nextPageToken = _json["nextPageToken"];
6169 } 6932 }
6170 if (_json.containsKey("selfLink")) { 6933 if (_json.containsKey("selfLink")) {
6171 selfLink = _json["selfLink"]; 6934 selfLink = _json["selfLink"];
6172 } 6935 }
6173 } 6936 }
6174 6937
6175 core.Map toJson() { 6938 core.Map toJson() {
6176 var _json = new core.Map(); 6939 var _json = new core.Map();
6177 if (etag != null) { 6940 if (etag != null) {
6178 _json["etag"] = etag; 6941 _json["etag"] = etag;
6179 } 6942 }
6943 if (incompleteSearch != null) {
6944 _json["incompleteSearch"] = incompleteSearch;
6945 }
6180 if (items != null) { 6946 if (items != null) {
6181 _json["items"] = items.map((value) => (value).toJson()).toList(); 6947 _json["items"] = items.map((value) => (value).toJson()).toList();
6182 } 6948 }
6183 if (kind != null) { 6949 if (kind != null) {
6184 _json["kind"] = kind; 6950 _json["kind"] = kind;
6185 } 6951 }
6186 if (nextLink != null) { 6952 if (nextLink != null) {
6187 _json["nextLink"] = nextLink; 6953 _json["nextLink"] = nextLink;
6188 } 6954 }
6189 if (nextPageToken != null) { 6955 if (nextPageToken != null) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
6327 if (parentLink != null) { 7093 if (parentLink != null) {
6328 _json["parentLink"] = parentLink; 7094 _json["parentLink"] = parentLink;
6329 } 7095 }
6330 if (selfLink != null) { 7096 if (selfLink != null) {
6331 _json["selfLink"] = selfLink; 7097 _json["selfLink"] = selfLink;
6332 } 7098 }
6333 return _json; 7099 return _json;
6334 } 7100 }
6335 } 7101 }
6336 7102
7103 class PermissionTeamDrivePermissionDetails {
7104 /**
7105 * Additional roles for this user. Only commenter is currently possible,
7106 * though more may be supported in the future.
7107 */
7108 core.List<core.String> additionalRoles;
7109 /**
7110 * Whether this permission is inherited. This field is always populated. This
7111 * is an output-only field.
7112 */
7113 core.bool inherited;
7114 /**
7115 * The ID of the item from which this permission is inherited. This is an
7116 * output-only field and is only populated for members of the Team Drive.
7117 */
7118 core.String inheritedFrom;
7119 /**
7120 * The primary role for this user. While new values may be added in the
7121 * future, the following are currently possible:
7122 * - organizer
7123 * - reader
7124 * - writer
7125 */
7126 core.String role;
7127 /**
7128 * The Team Drive permission type for this user. While new values may be added
7129 * in future, the following are currently possible:
7130 * - file
7131 * - member
7132 */
7133 core.String teamDrivePermissionType;
7134
7135 PermissionTeamDrivePermissionDetails();
7136
7137 PermissionTeamDrivePermissionDetails.fromJson(core.Map _json) {
7138 if (_json.containsKey("additionalRoles")) {
7139 additionalRoles = _json["additionalRoles"];
7140 }
7141 if (_json.containsKey("inherited")) {
7142 inherited = _json["inherited"];
7143 }
7144 if (_json.containsKey("inheritedFrom")) {
7145 inheritedFrom = _json["inheritedFrom"];
7146 }
7147 if (_json.containsKey("role")) {
7148 role = _json["role"];
7149 }
7150 if (_json.containsKey("teamDrivePermissionType")) {
7151 teamDrivePermissionType = _json["teamDrivePermissionType"];
7152 }
7153 }
7154
7155 core.Map toJson() {
7156 var _json = new core.Map();
7157 if (additionalRoles != null) {
7158 _json["additionalRoles"] = additionalRoles;
7159 }
7160 if (inherited != null) {
7161 _json["inherited"] = inherited;
7162 }
7163 if (inheritedFrom != null) {
7164 _json["inheritedFrom"] = inheritedFrom;
7165 }
7166 if (role != null) {
7167 _json["role"] = role;
7168 }
7169 if (teamDrivePermissionType != null) {
7170 _json["teamDrivePermissionType"] = teamDrivePermissionType;
7171 }
7172 return _json;
7173 }
7174 }
7175
6337 /** A permission for a file. */ 7176 /** A permission for a file. */
6338 class Permission { 7177 class Permission {
6339 /** Additional roles for this user. Only commenter is currently allowed. */ 7178 /**
7179 * Additional roles for this user. Only commenter is currently allowed, though
7180 * more may be supported in the future.
7181 */
6340 core.List<core.String> additionalRoles; 7182 core.List<core.String> additionalRoles;
6341 /** The authkey parameter required for this permission. */ 7183 /** The authkey parameter required for this permission. */
6342 core.String authKey; 7184 core.String authKey;
6343 /** 7185 /**
6344 * The domain name of the entity this permission refers to. This is an 7186 * The domain name of the entity this permission refers to. This is an
6345 * output-only field which is present when the permission type is user, group 7187 * output-only field which is present when the permission type is user, group
6346 * or domain. 7188 * or domain.
6347 */ 7189 */
6348 core.String domain; 7190 core.String domain;
6349 /** 7191 /**
6350 * The email address of the user or group this permission refers to. This is 7192 * The email address of the user or group this permission refers to. This is
6351 * an output-only field which is present when the permission type is user or 7193 * an output-only field which is present when the permission type is user or
6352 * group. 7194 * group.
6353 */ 7195 */
6354 core.String emailAddress; 7196 core.String emailAddress;
6355 /** The ETag of the permission. */ 7197 /** The ETag of the permission. */
6356 core.String etag; 7198 core.String etag;
6357 /** The time at which this permission will expire (RFC 3339 date-time). */ 7199 /**
7200 * The time at which this permission will expire (RFC 3339 date-time).
7201 * Expiration dates have the following restrictions:
7202 * - They can only be set on user and group permissions
7203 * - The date must be in the future
7204 * - The date cannot be more than a year in the future
7205 * - The date can only be set on drive.permissions.update requests
7206 */
6358 core.DateTime expirationDate; 7207 core.DateTime expirationDate;
6359 /** 7208 /**
6360 * The ID of the user this permission refers to, and identical to the 7209 * The ID of the user this permission refers to, and identical to the
6361 * permissionId in the About and Files resources. When making a 7210 * permissionId in the About and Files resources. When making a
6362 * drive.permissions.insert request, exactly one of the id or value fields 7211 * drive.permissions.insert request, exactly one of the id or value fields
6363 * must be specified unless the permission type is anyone, in which case both 7212 * must be specified unless the permission type is anyone, in which case both
6364 * id and value are ignored. 7213 * id and value are ignored.
6365 */ 7214 */
6366 core.String id; 7215 core.String id;
6367 /** This is always drive#permission. */ 7216 /** This is always drive#permission. */
6368 core.String kind; 7217 core.String kind;
6369 /** The name for this permission. */ 7218 /** The name for this permission. */
6370 core.String name; 7219 core.String name;
6371 /** A link to the profile photo, if available. */ 7220 /** A link to the profile photo, if available. */
6372 core.String photoLink; 7221 core.String photoLink;
6373 /** 7222 /**
6374 * The primary role for this user. Allowed values are: 7223 * The primary role for this user. While new values may be supported in the
7224 * future, the following are currently allowed:
7225 * - organizer
6375 * - owner 7226 * - owner
6376 * - reader 7227 * - reader
6377 * - writer 7228 * - writer
6378 */ 7229 */
6379 core.String role; 7230 core.String role;
6380 /** A link back to this permission. */ 7231 /** A link back to this permission. */
6381 core.String selfLink; 7232 core.String selfLink;
6382 /** 7233 /**
7234 * Details of whether the Permissions on this Team Drive item are inherited or
7235 * directly on this item. This is an output-only field which is present only
7236 * for Team Drive items.
7237 */
7238 core.List<PermissionTeamDrivePermissionDetails> teamDrivePermissionDetails;
7239 /**
6383 * The account type. Allowed values are: 7240 * The account type. Allowed values are:
6384 * - user 7241 * - user
6385 * - group 7242 * - group
6386 * - domain 7243 * - domain
6387 * - anyone 7244 * - anyone
6388 */ 7245 */
6389 core.String type; 7246 core.String type;
6390 /** 7247 /**
6391 * The email address or domain name for the entity. This is used during 7248 * The email address or domain name for the entity. This is used during
6392 * inserts and is not populated in responses. When making a 7249 * inserts and is not populated in responses. When making a
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
6430 } 7287 }
6431 if (_json.containsKey("photoLink")) { 7288 if (_json.containsKey("photoLink")) {
6432 photoLink = _json["photoLink"]; 7289 photoLink = _json["photoLink"];
6433 } 7290 }
6434 if (_json.containsKey("role")) { 7291 if (_json.containsKey("role")) {
6435 role = _json["role"]; 7292 role = _json["role"];
6436 } 7293 }
6437 if (_json.containsKey("selfLink")) { 7294 if (_json.containsKey("selfLink")) {
6438 selfLink = _json["selfLink"]; 7295 selfLink = _json["selfLink"];
6439 } 7296 }
7297 if (_json.containsKey("teamDrivePermissionDetails")) {
7298 teamDrivePermissionDetails = _json["teamDrivePermissionDetails"].map((valu e) => new PermissionTeamDrivePermissionDetails.fromJson(value)).toList();
7299 }
6440 if (_json.containsKey("type")) { 7300 if (_json.containsKey("type")) {
6441 type = _json["type"]; 7301 type = _json["type"];
6442 } 7302 }
6443 if (_json.containsKey("value")) { 7303 if (_json.containsKey("value")) {
6444 value = _json["value"]; 7304 value = _json["value"];
6445 } 7305 }
6446 if (_json.containsKey("withLink")) { 7306 if (_json.containsKey("withLink")) {
6447 withLink = _json["withLink"]; 7307 withLink = _json["withLink"];
6448 } 7308 }
6449 } 7309 }
(...skipping 29 matching lines...) Expand all
6479 } 7339 }
6480 if (photoLink != null) { 7340 if (photoLink != null) {
6481 _json["photoLink"] = photoLink; 7341 _json["photoLink"] = photoLink;
6482 } 7342 }
6483 if (role != null) { 7343 if (role != null) {
6484 _json["role"] = role; 7344 _json["role"] = role;
6485 } 7345 }
6486 if (selfLink != null) { 7346 if (selfLink != null) {
6487 _json["selfLink"] = selfLink; 7347 _json["selfLink"] = selfLink;
6488 } 7348 }
7349 if (teamDrivePermissionDetails != null) {
7350 _json["teamDrivePermissionDetails"] = teamDrivePermissionDetails.map((valu e) => (value).toJson()).toList();
7351 }
6489 if (type != null) { 7352 if (type != null) {
6490 _json["type"] = type; 7353 _json["type"] = type;
6491 } 7354 }
6492 if (value != null) { 7355 if (value != null) {
6493 _json["value"] = value; 7356 _json["value"] = value;
6494 } 7357 }
6495 if (withLink != null) { 7358 if (withLink != null) {
6496 _json["withLink"] = withLink; 7359 _json["withLink"] = withLink;
6497 } 7360 }
6498 return _json; 7361 return _json;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
6530 } 7393 }
6531 7394
6532 /** A list of permissions associated with a file. */ 7395 /** A list of permissions associated with a file. */
6533 class PermissionList { 7396 class PermissionList {
6534 /** The ETag of the list. */ 7397 /** The ETag of the list. */
6535 core.String etag; 7398 core.String etag;
6536 /** The list of permissions. */ 7399 /** The list of permissions. */
6537 core.List<Permission> items; 7400 core.List<Permission> items;
6538 /** This is always drive#permissionList. */ 7401 /** This is always drive#permissionList. */
6539 core.String kind; 7402 core.String kind;
7403 /**
7404 * The page token for the next page of permissions. This field will be absent
7405 * if the end of the permissions list has been reached. If the token is
7406 * rejected for any reason, it should be discarded, and pagination should be
7407 * restarted from the first page of results.
7408 */
7409 core.String nextPageToken;
6540 /** A link back to this list. */ 7410 /** A link back to this list. */
6541 core.String selfLink; 7411 core.String selfLink;
6542 7412
6543 PermissionList(); 7413 PermissionList();
6544 7414
6545 PermissionList.fromJson(core.Map _json) { 7415 PermissionList.fromJson(core.Map _json) {
6546 if (_json.containsKey("etag")) { 7416 if (_json.containsKey("etag")) {
6547 etag = _json["etag"]; 7417 etag = _json["etag"];
6548 } 7418 }
6549 if (_json.containsKey("items")) { 7419 if (_json.containsKey("items")) {
6550 items = _json["items"].map((value) => new Permission.fromJson(value)).toLi st(); 7420 items = _json["items"].map((value) => new Permission.fromJson(value)).toLi st();
6551 } 7421 }
6552 if (_json.containsKey("kind")) { 7422 if (_json.containsKey("kind")) {
6553 kind = _json["kind"]; 7423 kind = _json["kind"];
6554 } 7424 }
7425 if (_json.containsKey("nextPageToken")) {
7426 nextPageToken = _json["nextPageToken"];
7427 }
6555 if (_json.containsKey("selfLink")) { 7428 if (_json.containsKey("selfLink")) {
6556 selfLink = _json["selfLink"]; 7429 selfLink = _json["selfLink"];
6557 } 7430 }
6558 } 7431 }
6559 7432
6560 core.Map toJson() { 7433 core.Map toJson() {
6561 var _json = new core.Map(); 7434 var _json = new core.Map();
6562 if (etag != null) { 7435 if (etag != null) {
6563 _json["etag"] = etag; 7436 _json["etag"] = etag;
6564 } 7437 }
6565 if (items != null) { 7438 if (items != null) {
6566 _json["items"] = items.map((value) => (value).toJson()).toList(); 7439 _json["items"] = items.map((value) => (value).toJson()).toList();
6567 } 7440 }
6568 if (kind != null) { 7441 if (kind != null) {
6569 _json["kind"] = kind; 7442 _json["kind"] = kind;
6570 } 7443 }
7444 if (nextPageToken != null) {
7445 _json["nextPageToken"] = nextPageToken;
7446 }
6571 if (selfLink != null) { 7447 if (selfLink != null) {
6572 _json["selfLink"] = selfLink; 7448 _json["selfLink"] = selfLink;
6573 } 7449 }
6574 return _json; 7450 return _json;
6575 } 7451 }
6576 } 7452 }
6577 7453
6578 /** 7454 /**
6579 * A key-value pair attached to a file that is either public or private to an 7455 * A key-value pair attached to a file that is either public or private to an
6580 * application. 7456 * application.
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
6967 if (kind != null) { 7843 if (kind != null) {
6968 _json["kind"] = kind; 7844 _json["kind"] = kind;
6969 } 7845 }
6970 if (startPageToken != null) { 7846 if (startPageToken != null) {
6971 _json["startPageToken"] = startPageToken; 7847 _json["startPageToken"] = startPageToken;
6972 } 7848 }
6973 return _json; 7849 return _json;
6974 } 7850 }
6975 } 7851 }
6976 7852
7853 /** Capabilities the current user has on this Team Drive. */
7854 class TeamDriveCapabilities {
7855 /**
7856 * Whether the current user can add children to folders in this Team Drive.
7857 */
7858 core.bool canAddChildren;
7859 /** Whether the current user can comment on files in this Team Drive. */
7860 core.bool canComment;
7861 /** Whether files in this Team Drive can be copied by the current user. */
7862 core.bool canCopy;
7863 /** Whether this Team Drive can be deleted by the current user. */
7864 core.bool canDeleteTeamDrive;
7865 /**
7866 * Whether files in this Team Drive can be downloaded by the current user.
7867 */
7868 core.bool canDownload;
7869 /** Whether files in this Team Drive can be edited by the current user. */
7870 core.bool canEdit;
7871 /**
7872 * Whether the current user can list the children of folders in this Team
7873 * Drive.
7874 */
7875 core.bool canListChildren;
7876 /**
7877 * Whether the current user can add members to this Team Drive or remove them
7878 * or change their role.
7879 */
7880 core.bool canManageMembers;
7881 /**
7882 * Whether the current user has read access to the Revisions resource of files
7883 * in this Team Drive.
7884 */
7885 core.bool canReadRevisions;
7886 /**
7887 * Whether the current user can remove children from folders in this Team
7888 * Drive.
7889 */
7890 core.bool canRemoveChildren;
7891 /**
7892 * Whether files or folders in this Team Drive can be renamed by the current
7893 * user.
7894 */
7895 core.bool canRename;
7896 /** Whether this Team Drive can be renamed by the current user. */
7897 core.bool canRenameTeamDrive;
7898 /**
7899 * Whether the current user can share files or folders in this Team Drive.
7900 */
7901 core.bool canShare;
7902
7903 TeamDriveCapabilities();
7904
7905 TeamDriveCapabilities.fromJson(core.Map _json) {
7906 if (_json.containsKey("canAddChildren")) {
7907 canAddChildren = _json["canAddChildren"];
7908 }
7909 if (_json.containsKey("canComment")) {
7910 canComment = _json["canComment"];
7911 }
7912 if (_json.containsKey("canCopy")) {
7913 canCopy = _json["canCopy"];
7914 }
7915 if (_json.containsKey("canDeleteTeamDrive")) {
7916 canDeleteTeamDrive = _json["canDeleteTeamDrive"];
7917 }
7918 if (_json.containsKey("canDownload")) {
7919 canDownload = _json["canDownload"];
7920 }
7921 if (_json.containsKey("canEdit")) {
7922 canEdit = _json["canEdit"];
7923 }
7924 if (_json.containsKey("canListChildren")) {
7925 canListChildren = _json["canListChildren"];
7926 }
7927 if (_json.containsKey("canManageMembers")) {
7928 canManageMembers = _json["canManageMembers"];
7929 }
7930 if (_json.containsKey("canReadRevisions")) {
7931 canReadRevisions = _json["canReadRevisions"];
7932 }
7933 if (_json.containsKey("canRemoveChildren")) {
7934 canRemoveChildren = _json["canRemoveChildren"];
7935 }
7936 if (_json.containsKey("canRename")) {
7937 canRename = _json["canRename"];
7938 }
7939 if (_json.containsKey("canRenameTeamDrive")) {
7940 canRenameTeamDrive = _json["canRenameTeamDrive"];
7941 }
7942 if (_json.containsKey("canShare")) {
7943 canShare = _json["canShare"];
7944 }
7945 }
7946
7947 core.Map toJson() {
7948 var _json = new core.Map();
7949 if (canAddChildren != null) {
7950 _json["canAddChildren"] = canAddChildren;
7951 }
7952 if (canComment != null) {
7953 _json["canComment"] = canComment;
7954 }
7955 if (canCopy != null) {
7956 _json["canCopy"] = canCopy;
7957 }
7958 if (canDeleteTeamDrive != null) {
7959 _json["canDeleteTeamDrive"] = canDeleteTeamDrive;
7960 }
7961 if (canDownload != null) {
7962 _json["canDownload"] = canDownload;
7963 }
7964 if (canEdit != null) {
7965 _json["canEdit"] = canEdit;
7966 }
7967 if (canListChildren != null) {
7968 _json["canListChildren"] = canListChildren;
7969 }
7970 if (canManageMembers != null) {
7971 _json["canManageMembers"] = canManageMembers;
7972 }
7973 if (canReadRevisions != null) {
7974 _json["canReadRevisions"] = canReadRevisions;
7975 }
7976 if (canRemoveChildren != null) {
7977 _json["canRemoveChildren"] = canRemoveChildren;
7978 }
7979 if (canRename != null) {
7980 _json["canRename"] = canRename;
7981 }
7982 if (canRenameTeamDrive != null) {
7983 _json["canRenameTeamDrive"] = canRenameTeamDrive;
7984 }
7985 if (canShare != null) {
7986 _json["canShare"] = canShare;
7987 }
7988 return _json;
7989 }
7990 }
7991
7992 /** Representation of a Team Drive. */
7993 class TeamDrive {
7994 /** Capabilities the current user has on this Team Drive. */
7995 TeamDriveCapabilities capabilities;
7996 /**
7997 * The ID of this Team Drive which is also the ID of the top level folder for
7998 * this Team Drive.
7999 */
8000 core.String id;
8001 /** This is always drive#teamDrive */
8002 core.String kind;
8003 /** The name of this Team Drive. */
8004 core.String name;
8005
8006 TeamDrive();
8007
8008 TeamDrive.fromJson(core.Map _json) {
8009 if (_json.containsKey("capabilities")) {
8010 capabilities = new TeamDriveCapabilities.fromJson(_json["capabilities"]);
8011 }
8012 if (_json.containsKey("id")) {
8013 id = _json["id"];
8014 }
8015 if (_json.containsKey("kind")) {
8016 kind = _json["kind"];
8017 }
8018 if (_json.containsKey("name")) {
8019 name = _json["name"];
8020 }
8021 }
8022
8023 core.Map toJson() {
8024 var _json = new core.Map();
8025 if (capabilities != null) {
8026 _json["capabilities"] = (capabilities).toJson();
8027 }
8028 if (id != null) {
8029 _json["id"] = id;
8030 }
8031 if (kind != null) {
8032 _json["kind"] = kind;
8033 }
8034 if (name != null) {
8035 _json["name"] = name;
8036 }
8037 return _json;
8038 }
8039 }
8040
8041 /** A list of Team Drives. */
8042 class TeamDriveList {
8043 /** The list of Team Drives. */
8044 core.List<TeamDrive> items;
8045 /** This is always drive#teamDriveList */
8046 core.String kind;
8047 /** The page token for the next page of Team Drives. */
8048 core.String nextPageToken;
8049
8050 TeamDriveList();
8051
8052 TeamDriveList.fromJson(core.Map _json) {
8053 if (_json.containsKey("items")) {
8054 items = _json["items"].map((value) => new TeamDrive.fromJson(value)).toLis t();
8055 }
8056 if (_json.containsKey("kind")) {
8057 kind = _json["kind"];
8058 }
8059 if (_json.containsKey("nextPageToken")) {
8060 nextPageToken = _json["nextPageToken"];
8061 }
8062 }
8063
8064 core.Map toJson() {
8065 var _json = new core.Map();
8066 if (items != null) {
8067 _json["items"] = items.map((value) => (value).toJson()).toList();
8068 }
8069 if (kind != null) {
8070 _json["kind"] = kind;
8071 }
8072 if (nextPageToken != null) {
8073 _json["nextPageToken"] = nextPageToken;
8074 }
8075 return _json;
8076 }
8077 }
8078
6977 /** The user's profile picture. */ 8079 /** The user's profile picture. */
6978 class UserPicture { 8080 class UserPicture {
6979 /** A URL that points to a profile picture of this user. */ 8081 /** A URL that points to a profile picture of this user. */
6980 core.String url; 8082 core.String url;
6981 8083
6982 UserPicture(); 8084 UserPicture();
6983 8085
6984 UserPicture.fromJson(core.Map _json) { 8086 UserPicture.fromJson(core.Map _json) {
6985 if (_json.containsKey("url")) { 8087 if (_json.containsKey("url")) {
6986 url = _json["url"]; 8088 url = _json["url"];
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
7053 } 8155 }
7054 if (permissionId != null) { 8156 if (permissionId != null) {
7055 _json["permissionId"] = permissionId; 8157 _json["permissionId"] = permissionId;
7056 } 8158 }
7057 if (picture != null) { 8159 if (picture != null) {
7058 _json["picture"] = (picture).toJson(); 8160 _json["picture"] = (picture).toJson();
7059 } 8161 }
7060 return _json; 8162 return _json;
7061 } 8163 }
7062 } 8164 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/doubleclickbidmanager/v1.dart ('k') | generated/googleapis/lib/drive/v3.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698