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

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

Issue 1268013003: Api-roll 21: 2015-08-04 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 5 years, 4 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:crypto/crypto.dart' as crypto; 10 import 'package:crypto/crypto.dart' as crypto;
(...skipping 22 matching lines...) Expand all
33 * created with this app 33 * created with this app
34 */ 34 */
35 static const DriveFileScope = "https://www.googleapis.com/auth/drive.file"; 35 static const DriveFileScope = "https://www.googleapis.com/auth/drive.file";
36 36
37 /** View and manage metadata of files in your Google Drive */ 37 /** View and manage metadata of files in your Google Drive */
38 static const DriveMetadataScope = "https://www.googleapis.com/auth/drive.metad ata"; 38 static const DriveMetadataScope = "https://www.googleapis.com/auth/drive.metad ata";
39 39
40 /** View metadata for files in your Google Drive */ 40 /** View metadata for files in your Google Drive */
41 static const DriveMetadataReadonlyScope = "https://www.googleapis.com/auth/dri ve.metadata.readonly"; 41 static const DriveMetadataReadonlyScope = "https://www.googleapis.com/auth/dri ve.metadata.readonly";
42 42
43 /** View the photos, videos and albums in your Google Photos */
44 static const DrivePhotosReadonlyScope = "https://www.googleapis.com/auth/drive .photos.readonly";
45
43 /** View the files in your Google Drive */ 46 /** View the files in your Google Drive */
44 static const DriveReadonlyScope = "https://www.googleapis.com/auth/drive.reado nly"; 47 static const DriveReadonlyScope = "https://www.googleapis.com/auth/drive.reado nly";
45 48
46 /** Modify your Google Apps Script scripts' behavior */ 49 /** Modify your Google Apps Script scripts' behavior */
47 static const DriveScriptsScope = "https://www.googleapis.com/auth/drive.script s"; 50 static const DriveScriptsScope = "https://www.googleapis.com/auth/drive.script s";
48 51
49 52
50 final commons.ApiRequester _requester; 53 final commons.ApiRequester _requester;
51 54
52 AboutResourceApi get about => new AboutResourceApi(_requester); 55 AboutResourceApi get about => new AboutResourceApi(_requester);
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 * [includeSubscribed] - Whether to include public files the user has opened 295 * [includeSubscribed] - Whether to include public files the user has opened
293 * and shared files. When set to false, the list only includes owned files 296 * and shared files. When set to false, the list only includes owned files
294 * plus any shared or public files the user has explicitly added to a folder 297 * plus any shared or public files the user has explicitly added to a folder
295 * they own. 298 * they own.
296 * 299 *
297 * [maxResults] - Maximum number of changes to return. 300 * [maxResults] - Maximum number of changes to return.
298 * 301 *
299 * [pageToken] - Page token for changes. 302 * [pageToken] - Page token for changes.
300 * 303 *
301 * [spaces] - A comma-separated list of spaces to query. Supported values are 304 * [spaces] - A comma-separated list of spaces to query. Supported values are
302 * 'drive' and 'appDataFolder'. 305 * 'drive', 'appDataFolder' and 'photos'.
303 * 306 *
304 * [startChangeId] - Change ID to start listing changes from. 307 * [startChangeId] - Change ID to start listing changes from.
305 * 308 *
306 * Completes with a [ChangeList]. 309 * Completes with a [ChangeList].
307 * 310 *
308 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 311 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
309 * error. 312 * error.
310 * 313 *
311 * If the used [http.Client] completes with an error when making a REST call, 314 * If the used [http.Client] completes with an error when making a REST call,
312 * this method will complete with the same error. 315 * this method will complete with the same error.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 * [includeSubscribed] - Whether to include public files the user has opened 365 * [includeSubscribed] - Whether to include public files the user has opened
363 * and shared files. When set to false, the list only includes owned files 366 * and shared files. When set to false, the list only includes owned files
364 * plus any shared or public files the user has explicitly added to a folder 367 * plus any shared or public files the user has explicitly added to a folder
365 * they own. 368 * they own.
366 * 369 *
367 * [maxResults] - Maximum number of changes to return. 370 * [maxResults] - Maximum number of changes to return.
368 * 371 *
369 * [pageToken] - Page token for changes. 372 * [pageToken] - Page token for changes.
370 * 373 *
371 * [spaces] - A comma-separated list of spaces to query. Supported values are 374 * [spaces] - A comma-separated list of spaces to query. Supported values are
372 * 'drive' and 'appDataFolder'. 375 * 'drive', 'appDataFolder' and 'photos'.
373 * 376 *
374 * [startChangeId] - Change ID to start listing changes from. 377 * [startChangeId] - Change ID to start listing changes from.
375 * 378 *
376 * Completes with a [Channel]. 379 * Completes with a [Channel].
377 * 380 *
378 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 381 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
379 * error. 382 * error.
380 * 383 *
381 * If the used [http.Client] completes with an error when making a REST call, 384 * If the used [http.Client] completes with an error when making a REST call,
382 * this method will complete with the same error. 385 * this method will complete with the same error.
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 * [pageToken] - Page token for files. 1346 * [pageToken] - Page token for files.
1344 * 1347 *
1345 * [projection] - This parameter is deprecated and has no function. 1348 * [projection] - This parameter is deprecated and has no function.
1346 * Possible string values are: 1349 * Possible string values are:
1347 * - "BASIC" : Deprecated 1350 * - "BASIC" : Deprecated
1348 * - "FULL" : Deprecated 1351 * - "FULL" : Deprecated
1349 * 1352 *
1350 * [q] - Query string for searching files. 1353 * [q] - Query string for searching files.
1351 * 1354 *
1352 * [spaces] - A comma-separated list of spaces to query. Supported values are 1355 * [spaces] - A comma-separated list of spaces to query. Supported values are
1353 * 'drive' and 'appDataFolder'. 1356 * 'drive', 'appDataFolder' and 'photos'.
1354 * 1357 *
1355 * Completes with a [FileList]. 1358 * Completes with a [FileList].
1356 * 1359 *
1357 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1360 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1358 * error. 1361 * error.
1359 * 1362 *
1360 * If the used [http.Client] completes with an error when making a REST call, 1363 * If the used [http.Client] completes with an error when making a REST call,
1361 * this method will complete with the same error. 1364 * this method will complete with the same error.
1362 */ 1365 */
1363 async.Future<FileList> list({core.String corpus, core.int maxResults, core.Str ing pageToken, core.String projection, core.String q, core.String spaces}) { 1366 async.Future<FileList> list({core.String corpus, core.int maxResults, core.Str ing pageToken, core.String projection, core.String q, core.String spaces}) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 * 1409 *
1407 * Request parameters: 1410 * Request parameters:
1408 * 1411 *
1409 * [fileId] - The ID of the file to update. 1412 * [fileId] - The ID of the file to update.
1410 * 1413 *
1411 * [addParents] - Comma-separated list of parent IDs to add. 1414 * [addParents] - Comma-separated list of parent IDs to add.
1412 * 1415 *
1413 * [convert] - Whether to convert this file to the corresponding Google Docs 1416 * [convert] - Whether to convert this file to the corresponding Google Docs
1414 * format. 1417 * format.
1415 * 1418 *
1419 * [modifiedDateBehavior] - How the modifiedDate field should be updated. This
1420 * overrides setModifiedDate.
1421 * Possible string values are:
1422 * - "fromBody" : Set modifiedDate to the value provided in the body of the
1423 * request. No change if no value was provided.
1424 * - "fromBodyIfNeeded" : Set modifiedDate to the value provided in the body
1425 * of the request depending on other contents of the update.
1426 * - "fromBodyOrNow" : Set modifiedDate to the value provided in the body of
1427 * the request, or to the current time if no value was provided.
1428 * - "noChange" : Maintain the previous value of modifiedDate.
1429 * - "now" : Set modifiedDate to the current time.
1430 * - "nowIfNeeded" : Set modifiedDate to the current time depending on
1431 * contents of the update.
1432 *
1416 * [newRevision] - Whether a blob upload should create a new revision. If 1433 * [newRevision] - Whether a blob upload should create a new revision. If
1417 * false, the blob data in the current head revision is replaced. If true or 1434 * false, the blob data in the current head revision is replaced. If true or
1418 * not set, a new blob is created as head revision, and previous unpinned 1435 * not set, a new blob is created as head revision, and previous unpinned
1419 * revisions are preserved for a short period of time. Pinned revisions are 1436 * revisions are preserved for a short period of time. Pinned revisions are
1420 * stored indefinitely, using additional storage quota, up to a maximum of 200 1437 * stored indefinitely, using additional storage quota, up to a maximum of 200
1421 * revisions. 1438 * revisions.
1422 * 1439 *
1423 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. 1440 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1424 * 1441 *
1425 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values 1442 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values
(...skipping 17 matching lines...) Expand all
1443 * [useContentAsIndexableText] - Whether to use the content as indexable text. 1460 * [useContentAsIndexableText] - Whether to use the content as indexable text.
1444 * 1461 *
1445 * Completes with a [File]. 1462 * Completes with a [File].
1446 * 1463 *
1447 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1464 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1448 * error. 1465 * error.
1449 * 1466 *
1450 * If the used [http.Client] completes with an error when making a REST call, 1467 * If the used [http.Client] completes with an error when making a REST call,
1451 * this method will complete with the same error. 1468 * this method will complete with the same error.
1452 */ 1469 */
1453 async.Future<File> patch(File request, core.String fileId, {core.String addPar ents, core.bool convert, core.bool newRevision, core.bool ocr, core.String ocrLa nguage, core.bool pinned, core.String removeParents, core.bool setModifiedDate, core.String timedTextLanguage, core.String timedTextTrackName, core.bool updateV iewedDate, core.bool useContentAsIndexableText}) { 1470 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 }) {
1454 var _url = null; 1471 var _url = null;
1455 var _queryParams = new core.Map(); 1472 var _queryParams = new core.Map();
1456 var _uploadMedia = null; 1473 var _uploadMedia = null;
1457 var _uploadOptions = null; 1474 var _uploadOptions = null;
1458 var _downloadOptions = commons.DownloadOptions.Metadata; 1475 var _downloadOptions = commons.DownloadOptions.Metadata;
1459 var _body = null; 1476 var _body = null;
1460 1477
1461 if (request != null) { 1478 if (request != null) {
1462 _body = convert_1.JSON.encode((request).toJson()); 1479 _body = convert_1.JSON.encode((request).toJson());
1463 } 1480 }
1464 if (fileId == null) { 1481 if (fileId == null) {
1465 throw new core.ArgumentError("Parameter fileId is required."); 1482 throw new core.ArgumentError("Parameter fileId is required.");
1466 } 1483 }
1467 if (addParents != null) { 1484 if (addParents != null) {
1468 _queryParams["addParents"] = [addParents]; 1485 _queryParams["addParents"] = [addParents];
1469 } 1486 }
1470 if (convert != null) { 1487 if (convert != null) {
1471 _queryParams["convert"] = ["${convert}"]; 1488 _queryParams["convert"] = ["${convert}"];
1472 } 1489 }
1490 if (modifiedDateBehavior != null) {
1491 _queryParams["modifiedDateBehavior"] = [modifiedDateBehavior];
1492 }
1473 if (newRevision != null) { 1493 if (newRevision != null) {
1474 _queryParams["newRevision"] = ["${newRevision}"]; 1494 _queryParams["newRevision"] = ["${newRevision}"];
1475 } 1495 }
1476 if (ocr != null) { 1496 if (ocr != null) {
1477 _queryParams["ocr"] = ["${ocr}"]; 1497 _queryParams["ocr"] = ["${ocr}"];
1478 } 1498 }
1479 if (ocrLanguage != null) { 1499 if (ocrLanguage != null) {
1480 _queryParams["ocrLanguage"] = [ocrLanguage]; 1500 _queryParams["ocrLanguage"] = [ocrLanguage];
1481 } 1501 }
1482 if (pinned != null) { 1502 if (pinned != null) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 "POST", 1566 "POST",
1547 body: _body, 1567 body: _body,
1548 queryParams: _queryParams, 1568 queryParams: _queryParams,
1549 uploadOptions: _uploadOptions, 1569 uploadOptions: _uploadOptions,
1550 uploadMedia: _uploadMedia, 1570 uploadMedia: _uploadMedia,
1551 downloadOptions: _downloadOptions); 1571 downloadOptions: _downloadOptions);
1552 return _response.then((data) => new File.fromJson(data)); 1572 return _response.then((data) => new File.fromJson(data));
1553 } 1573 }
1554 1574
1555 /** 1575 /**
1556 * Moves a file to the trash. 1576 * Moves a file to the trash. The currently authenticated user must own the
1577 * file.
1557 * 1578 *
1558 * Request parameters: 1579 * Request parameters:
1559 * 1580 *
1560 * [fileId] - The ID of the file to trash. 1581 * [fileId] - The ID of the file to trash.
1561 * 1582 *
1562 * Completes with a [File]. 1583 * Completes with a [File].
1563 * 1584 *
1564 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1585 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1565 * error. 1586 * error.
1566 * 1587 *
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 * 1658 *
1638 * Request parameters: 1659 * Request parameters:
1639 * 1660 *
1640 * [fileId] - The ID of the file to update. 1661 * [fileId] - The ID of the file to update.
1641 * 1662 *
1642 * [addParents] - Comma-separated list of parent IDs to add. 1663 * [addParents] - Comma-separated list of parent IDs to add.
1643 * 1664 *
1644 * [convert] - Whether to convert this file to the corresponding Google Docs 1665 * [convert] - Whether to convert this file to the corresponding Google Docs
1645 * format. 1666 * format.
1646 * 1667 *
1668 * [modifiedDateBehavior] - How the modifiedDate field should be updated. This
1669 * overrides setModifiedDate.
1670 * Possible string values are:
1671 * - "fromBody" : Set modifiedDate to the value provided in the body of the
1672 * request. No change if no value was provided.
1673 * - "fromBodyIfNeeded" : Set modifiedDate to the value provided in the body
1674 * of the request depending on other contents of the update.
1675 * - "fromBodyOrNow" : Set modifiedDate to the value provided in the body of
1676 * the request, or to the current time if no value was provided.
1677 * - "noChange" : Maintain the previous value of modifiedDate.
1678 * - "now" : Set modifiedDate to the current time.
1679 * - "nowIfNeeded" : Set modifiedDate to the current time depending on
1680 * contents of the update.
1681 *
1647 * [newRevision] - Whether a blob upload should create a new revision. If 1682 * [newRevision] - Whether a blob upload should create a new revision. If
1648 * false, the blob data in the current head revision is replaced. If true or 1683 * false, the blob data in the current head revision is replaced. If true or
1649 * not set, a new blob is created as head revision, and previous unpinned 1684 * not set, a new blob is created as head revision, and previous unpinned
1650 * revisions are preserved for a short period of time. Pinned revisions are 1685 * revisions are preserved for a short period of time. Pinned revisions are
1651 * stored indefinitely, using additional storage quota, up to a maximum of 200 1686 * stored indefinitely, using additional storage quota, up to a maximum of 200
1652 * revisions. 1687 * revisions.
1653 * 1688 *
1654 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. 1689 * [ocr] - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1655 * 1690 *
1656 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values 1691 * [ocrLanguage] - If ocr is true, hints at the language to use. Valid values
(...skipping 22 matching lines...) Expand all
1679 * length being known ahead of time is only supported via resumable uploads. 1714 * length being known ahead of time is only supported via resumable uploads.
1680 * 1715 *
1681 * Completes with a [File]. 1716 * Completes with a [File].
1682 * 1717 *
1683 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1718 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1684 * error. 1719 * error.
1685 * 1720 *
1686 * If the used [http.Client] completes with an error when making a REST call, 1721 * If the used [http.Client] completes with an error when making a REST call,
1687 * this method will complete with the same error. 1722 * this method will complete with the same error.
1688 */ 1723 */
1689 async.Future<File> update(File request, core.String fileId, {core.String addPa rents, core.bool convert, core.bool newRevision, core.bool ocr, core.String ocrL anguage, core.bool pinned, core.String removeParents, core.bool setModifiedDate, core.String timedTextLanguage, core.String timedTextTrackName, core.bool update ViewedDate, core.bool useContentAsIndexableText, commons.UploadOptions uploadOpt ions : commons.UploadOptions.Default, commons.Media uploadMedia}) { 1724 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}) {
1690 var _url = null; 1725 var _url = null;
1691 var _queryParams = new core.Map(); 1726 var _queryParams = new core.Map();
1692 var _uploadMedia = null; 1727 var _uploadMedia = null;
1693 var _uploadOptions = null; 1728 var _uploadOptions = null;
1694 var _downloadOptions = commons.DownloadOptions.Metadata; 1729 var _downloadOptions = commons.DownloadOptions.Metadata;
1695 var _body = null; 1730 var _body = null;
1696 1731
1697 if (request != null) { 1732 if (request != null) {
1698 _body = convert_1.JSON.encode((request).toJson()); 1733 _body = convert_1.JSON.encode((request).toJson());
1699 } 1734 }
1700 if (fileId == null) { 1735 if (fileId == null) {
1701 throw new core.ArgumentError("Parameter fileId is required."); 1736 throw new core.ArgumentError("Parameter fileId is required.");
1702 } 1737 }
1703 if (addParents != null) { 1738 if (addParents != null) {
1704 _queryParams["addParents"] = [addParents]; 1739 _queryParams["addParents"] = [addParents];
1705 } 1740 }
1706 if (convert != null) { 1741 if (convert != null) {
1707 _queryParams["convert"] = ["${convert}"]; 1742 _queryParams["convert"] = ["${convert}"];
1708 } 1743 }
1744 if (modifiedDateBehavior != null) {
1745 _queryParams["modifiedDateBehavior"] = [modifiedDateBehavior];
1746 }
1709 if (newRevision != null) { 1747 if (newRevision != null) {
1710 _queryParams["newRevision"] = ["${newRevision}"]; 1748 _queryParams["newRevision"] = ["${newRevision}"];
1711 } 1749 }
1712 if (ocr != null) { 1750 if (ocr != null) {
1713 _queryParams["ocr"] = ["${ocr}"]; 1751 _queryParams["ocr"] = ["${ocr}"];
1714 } 1752 }
1715 if (ocrLanguage != null) { 1753 if (ocrLanguage != null) {
1716 _queryParams["ocrLanguage"] = [ocrLanguage]; 1754 _queryParams["ocrLanguage"] = [ocrLanguage];
1717 } 1755 }
1718 if (pinned != null) { 1756 if (pinned != null) {
(...skipping 3699 matching lines...) Expand 10 before | Expand all | Expand 10 after
5418 /** Whether the file has been shared. */ 5456 /** Whether the file has been shared. */
5419 core.bool shared; 5457 core.bool shared;
5420 /** 5458 /**
5421 * Time at which this file was shared with the user (formatted RFC 3339 5459 * Time at which this file was shared with the user (formatted RFC 3339
5422 * timestamp). 5460 * timestamp).
5423 */ 5461 */
5424 core.DateTime sharedWithMeDate; 5462 core.DateTime sharedWithMeDate;
5425 /** User that shared the item with the current user, if available. */ 5463 /** User that shared the item with the current user, if available. */
5426 User sharingUser; 5464 User sharingUser;
5427 /** 5465 /**
5428 * The list of spaces which contain the file. Supported values are 'drive' and 5466 * The list of spaces which contain the file. Supported values are 'drive',
5429 * 'appDataFolder'. 5467 * 'appDataFolder' and 'photos'.
5430 */ 5468 */
5431 core.List<core.String> spaces; 5469 core.List<core.String> spaces;
5432 /** 5470 /**
5433 * Thumbnail for the file. Only accepted on upload and for files that are not 5471 * Thumbnail for the file. Only accepted on upload and for files that are not
5434 * already thumbnailed by Google. 5472 * already thumbnailed by Google.
5435 */ 5473 */
5436 FileThumbnail thumbnail; 5474 FileThumbnail thumbnail;
5437 /** 5475 /**
5438 * A short-lived link to the file's thumbnail. Typically lasts on the order of 5476 * A short-lived link to the file's thumbnail. Typically lasts on the order of
5439 * hours. 5477 * hours.
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
6629 } 6667 }
6630 if (permissionId != null) { 6668 if (permissionId != null) {
6631 _json["permissionId"] = permissionId; 6669 _json["permissionId"] = permissionId;
6632 } 6670 }
6633 if (picture != null) { 6671 if (picture != null) {
6634 _json["picture"] = (picture).toJson(); 6672 _json["picture"] = (picture).toJson();
6635 } 6673 }
6636 return _json; 6674 return _json;
6637 } 6675 }
6638 } 6676 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698