Index: generated/googleapis/lib/drive/v2.dart |
diff --git a/generated/googleapis/lib/drive/v2.dart b/generated/googleapis/lib/drive/v2.dart |
index 018e5a8b6bb97ea7576cbe6e1853b5113b9e8237..80f5af6be211e32902e286b40f70329458a7676f 100644 |
--- a/generated/googleapis/lib/drive/v2.dart |
+++ b/generated/googleapis/lib/drive/v2.dart |
@@ -67,6 +67,7 @@ class DriveApi { |
RealtimeResourceApi get realtime => new RealtimeResourceApi(_requester); |
RepliesResourceApi get replies => new RepliesResourceApi(_requester); |
RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester); |
+ TeamdrivesResourceApi get teamdrives => new TeamdrivesResourceApi(_requester); |
DriveApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com/", core.String servicePath: "drive/v2/"}) : |
_requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
@@ -255,6 +256,11 @@ class ChangesResourceApi { |
* |
* [changeId] - The ID of the change. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
+ * [teamDriveId] - The Team Drive from which the change will be returned. |
+ * |
* Completes with a [Change]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -263,7 +269,7 @@ class ChangesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<Change> get(core.String changeId) { |
+ async.Future<Change> get(core.String changeId, {core.bool supportsTeamDrives, core.String teamDriveId}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -274,6 +280,12 @@ class ChangesResourceApi { |
if (changeId == null) { |
throw new core.ArgumentError("Parameter changeId is required."); |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
+ if (teamDriveId != null) { |
+ _queryParams["teamDriveId"] = [teamDriveId]; |
+ } |
_url = 'changes/' + commons.Escaper.ecapeVariable('$changeId'); |
@@ -292,6 +304,12 @@ class ChangesResourceApi { |
* |
* Request parameters: |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
+ * [teamDriveId] - The ID of the Team Drive for which the starting pageToken |
+ * for listing future changes from that Team Drive will be returned. |
+ * |
* Completes with a [StartPageToken]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -300,7 +318,7 @@ class ChangesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<StartPageToken> getStartPageToken() { |
+ async.Future<StartPageToken> getStartPageToken({core.bool supportsTeamDrives, core.String teamDriveId}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -308,6 +326,12 @@ class ChangesResourceApi { |
var _downloadOptions = commons.DownloadOptions.Metadata; |
var _body = null; |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
+ if (teamDriveId != null) { |
+ _queryParams["teamDriveId"] = [teamDriveId]; |
+ } |
_url = 'changes/startPageToken'; |
@@ -322,17 +346,27 @@ class ChangesResourceApi { |
} |
/** |
- * Lists the changes for a user. |
+ * Lists the changes for a user or Team Drive. |
* |
* Request parameters: |
* |
- * [includeDeleted] - Whether to include deleted items. |
+ * [includeCorpusRemovals] - Whether changes should include the file resource |
+ * if the file is still accessible by the user at the time of the request, |
+ * even when a file was removed from the list of changes and there will be no |
+ * further change entries for this file. |
+ * |
+ * [includeDeleted] - Whether to include changes indicating that items have |
+ * been removed from the list of changes, for example by deletion or loss of |
+ * access. |
* |
* [includeSubscribed] - Whether to include public files the user has opened |
* and shared files. When set to false, the list only includes owned files |
* plus any shared or public files the user has explicitly added to a folder |
* they own. |
* |
+ * [includeTeamDriveItems] - Whether Team Drive files or changes should be |
+ * included in results. |
+ * |
* [maxResults] - Maximum number of changes to return. |
* |
* [pageToken] - The token for continuing a previous list request on the next |
@@ -344,6 +378,13 @@ class ChangesResourceApi { |
* |
* [startChangeId] - Change ID to start listing changes from. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
+ * [teamDriveId] - The Team Drive from which changes will be returned. If |
+ * specified the change IDs will be reflective of the Team Drive; use the |
+ * combined Team Drive ID and change ID as an identifier. |
+ * |
* Completes with a [ChangeList]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -352,7 +393,7 @@ class ChangesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<ChangeList> list({core.bool includeDeleted, core.bool includeSubscribed, core.int maxResults, core.String pageToken, core.String spaces, core.String startChangeId}) { |
+ async.Future<ChangeList> list({core.bool includeCorpusRemovals, core.bool includeDeleted, core.bool includeSubscribed, core.bool includeTeamDriveItems, core.int maxResults, core.String pageToken, core.String spaces, core.String startChangeId, core.bool supportsTeamDrives, core.String teamDriveId}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -360,12 +401,18 @@ class ChangesResourceApi { |
var _downloadOptions = commons.DownloadOptions.Metadata; |
var _body = null; |
+ if (includeCorpusRemovals != null) { |
+ _queryParams["includeCorpusRemovals"] = ["${includeCorpusRemovals}"]; |
+ } |
if (includeDeleted != null) { |
_queryParams["includeDeleted"] = ["${includeDeleted}"]; |
} |
if (includeSubscribed != null) { |
_queryParams["includeSubscribed"] = ["${includeSubscribed}"]; |
} |
+ if (includeTeamDriveItems != null) { |
+ _queryParams["includeTeamDriveItems"] = ["${includeTeamDriveItems}"]; |
+ } |
if (maxResults != null) { |
_queryParams["maxResults"] = ["${maxResults}"]; |
} |
@@ -378,6 +425,12 @@ class ChangesResourceApi { |
if (startChangeId != null) { |
_queryParams["startChangeId"] = [startChangeId]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
+ if (teamDriveId != null) { |
+ _queryParams["teamDriveId"] = [teamDriveId]; |
+ } |
_url = 'changes'; |
@@ -398,13 +451,23 @@ class ChangesResourceApi { |
* |
* Request parameters: |
* |
- * [includeDeleted] - Whether to include deleted items. |
+ * [includeCorpusRemovals] - Whether changes should include the file resource |
+ * if the file is still accessible by the user at the time of the request, |
+ * even when a file was removed from the list of changes and there will be no |
+ * further change entries for this file. |
+ * |
+ * [includeDeleted] - Whether to include changes indicating that items have |
+ * been removed from the list of changes, for example by deletion or loss of |
+ * access. |
* |
* [includeSubscribed] - Whether to include public files the user has opened |
* and shared files. When set to false, the list only includes owned files |
* plus any shared or public files the user has explicitly added to a folder |
* they own. |
* |
+ * [includeTeamDriveItems] - Whether Team Drive files or changes should be |
+ * included in results. |
+ * |
* [maxResults] - Maximum number of changes to return. |
* |
* [pageToken] - The token for continuing a previous list request on the next |
@@ -416,6 +479,13 @@ class ChangesResourceApi { |
* |
* [startChangeId] - Change ID to start listing changes from. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
+ * [teamDriveId] - The Team Drive from which changes will be returned. If |
+ * specified the change IDs will be reflective of the Team Drive; use the |
+ * combined Team Drive ID and change ID as an identifier. |
+ * |
* Completes with a [Channel]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -424,7 +494,7 @@ class ChangesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<Channel> watch(Channel request, {core.bool includeDeleted, core.bool includeSubscribed, core.int maxResults, core.String pageToken, core.String spaces, core.String startChangeId}) { |
+ async.Future<Channel> watch(Channel request, {core.bool includeCorpusRemovals, core.bool includeDeleted, core.bool includeSubscribed, core.bool includeTeamDriveItems, core.int maxResults, core.String pageToken, core.String spaces, core.String startChangeId, core.bool supportsTeamDrives, core.String teamDriveId}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -435,12 +505,18 @@ class ChangesResourceApi { |
if (request != null) { |
_body = convert_1.JSON.encode((request).toJson()); |
} |
+ if (includeCorpusRemovals != null) { |
+ _queryParams["includeCorpusRemovals"] = ["${includeCorpusRemovals}"]; |
+ } |
if (includeDeleted != null) { |
_queryParams["includeDeleted"] = ["${includeDeleted}"]; |
} |
if (includeSubscribed != null) { |
_queryParams["includeSubscribed"] = ["${includeSubscribed}"]; |
} |
+ if (includeTeamDriveItems != null) { |
+ _queryParams["includeTeamDriveItems"] = ["${includeTeamDriveItems}"]; |
+ } |
if (maxResults != null) { |
_queryParams["maxResults"] = ["${maxResults}"]; |
} |
@@ -453,6 +529,12 @@ class ChangesResourceApi { |
if (startChangeId != null) { |
_queryParams["startChangeId"] = [startChangeId]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
+ if (teamDriveId != null) { |
+ _queryParams["teamDriveId"] = [teamDriveId]; |
+ } |
_url = 'changes/watch'; |
@@ -620,6 +702,9 @@ class ChildrenResourceApi { |
* |
* [folderId] - The ID of the folder. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* Completes with a [ChildReference]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -628,7 +713,7 @@ class ChildrenResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<ChildReference> insert(ChildReference request, core.String folderId) { |
+ async.Future<ChildReference> insert(ChildReference request, core.String folderId, {core.bool supportsTeamDrives}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -642,6 +727,9 @@ class ChildrenResourceApi { |
if (folderId == null) { |
throw new core.ArgumentError("Parameter folderId is required."); |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
_url = 'files/' + commons.Escaper.ecapeVariable('$folderId') + '/children'; |
@@ -1060,6 +1148,9 @@ class FilesResourceApi { |
* [pinned] - Whether to pin the head revision of the new copy. A file can |
* have a maximum of 200 pinned revisions. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* [timedTextLanguage] - The language of the timed text. |
* |
* [timedTextTrackName] - The timed text track name. |
@@ -1079,7 +1170,7 @@ class FilesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<File> copy(File request, core.String fileId, {core.bool convert, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String timedTextLanguage, core.String timedTextTrackName, core.String visibility}) { |
+ async.Future<File> copy(File request, core.String fileId, {core.bool convert, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.bool supportsTeamDrives, core.String timedTextLanguage, core.String timedTextTrackName, core.String visibility}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -1105,6 +1196,9 @@ class FilesResourceApi { |
if (pinned != null) { |
_queryParams["pinned"] = ["${pinned}"]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
if (timedTextLanguage != null) { |
_queryParams["timedTextLanguage"] = [timedTextLanguage]; |
} |
@@ -1129,19 +1223,23 @@ class FilesResourceApi { |
/** |
* Permanently deletes a file by ID. Skips the trash. The currently |
- * authenticated user must own the file. |
+ * authenticated user must own the file or be an organizer on the parent for |
+ * Team Drive files. |
* |
* Request parameters: |
* |
* [fileId] - The ID of the file to delete. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
* error. |
* |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future delete(core.String fileId) { |
+ async.Future delete(core.String fileId, {core.bool supportsTeamDrives}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -1152,6 +1250,9 @@ class FilesResourceApi { |
if (fileId == null) { |
throw new core.ArgumentError("Parameter fileId is required."); |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
_downloadOptions = null; |
@@ -1320,6 +1421,9 @@ class FilesResourceApi { |
* [revisionId] - Specifies the Revision ID that should be downloaded. Ignored |
* unless alt=media is specified. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* [updateViewedDate] - Deprecated: Use files.update with |
* modifiedDateBehavior=noChange, updateViewedDate=true and an empty request |
* body. |
@@ -1340,7 +1444,7 @@ class FilesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future get(core.String fileId, {core.bool acknowledgeAbuse, core.String projection, core.String revisionId, core.bool updateViewedDate, commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
+ async.Future get(core.String fileId, {core.bool acknowledgeAbuse, core.String projection, core.String revisionId, core.bool supportsTeamDrives, core.bool updateViewedDate, commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -1360,6 +1464,9 @@ class FilesResourceApi { |
if (revisionId != null) { |
_queryParams["revisionId"] = [revisionId]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
if (updateViewedDate != null) { |
_queryParams["updateViewedDate"] = ["${updateViewedDate}"]; |
} |
@@ -1401,6 +1508,9 @@ class FilesResourceApi { |
* [pinned] - Whether to pin the head revision of the uploaded file. A file |
* can have a maximum of 200 pinned revisions. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* [timedTextLanguage] - The language of the timed text. |
* |
* [timedTextTrackName] - The timed text track name. |
@@ -1427,7 +1537,7 @@ class FilesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<File> insert(File request, {core.bool convert, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String timedTextLanguage, core.String timedTextTrackName, core.bool useContentAsIndexableText, core.String visibility, commons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Media uploadMedia}) { |
+ async.Future<File> insert(File request, {core.bool convert, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.bool supportsTeamDrives, core.String timedTextLanguage, core.String timedTextTrackName, core.bool useContentAsIndexableText, core.String visibility, commons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Media uploadMedia}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -1450,6 +1560,9 @@ class FilesResourceApi { |
if (pinned != null) { |
_queryParams["pinned"] = ["${pinned}"]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
if (timedTextLanguage != null) { |
_queryParams["timedTextLanguage"] = [timedTextLanguage]; |
} |
@@ -1490,11 +1603,21 @@ class FilesResourceApi { |
* |
* Request parameters: |
* |
+ * [corpora] - Comma-separated list of bodies of items (files/documents) to |
+ * which the query applies. Supported bodies are 'default', 'domain', |
+ * 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with |
+ * 'default'; all other values must be used in isolation. Prefer 'default' or |
+ * 'teamDrive' to 'allTeamDrives' for efficiency. |
+ * |
* [corpus] - The body of items (files/documents) to which the query applies. |
+ * Deprecated: use 'corpora' instead. |
* Possible string values are: |
* - "DEFAULT" : The items that the user has accessed. |
* - "DOMAIN" : Items shared to the user's domain. |
* |
+ * [includeTeamDriveItems] - Whether Team Drive items should be included in |
+ * results. |
+ * |
* [maxResults] - Maximum number of files to return. |
* |
* [orderBy] - A comma-separated list of sort keys. Valid keys are |
@@ -1518,6 +1641,11 @@ class FilesResourceApi { |
* [spaces] - A comma-separated list of spaces to query. Supported values are |
* 'drive', 'appDataFolder' and 'photos'. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
+ * [teamDriveId] - ID of Team Drive to search. |
+ * |
* Completes with a [FileList]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -1526,7 +1654,7 @@ class FilesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<FileList> list({core.String corpus, core.int maxResults, core.String orderBy, core.String pageToken, core.String projection, core.String q, core.String spaces}) { |
+ async.Future<FileList> list({core.String corpora, core.String corpus, core.bool includeTeamDriveItems, core.int maxResults, core.String orderBy, core.String pageToken, core.String projection, core.String q, core.String spaces, core.bool supportsTeamDrives, core.String teamDriveId}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -1534,9 +1662,15 @@ class FilesResourceApi { |
var _downloadOptions = commons.DownloadOptions.Metadata; |
var _body = null; |
+ if (corpora != null) { |
+ _queryParams["corpora"] = [corpora]; |
+ } |
if (corpus != null) { |
_queryParams["corpus"] = [corpus]; |
} |
+ if (includeTeamDriveItems != null) { |
+ _queryParams["includeTeamDriveItems"] = ["${includeTeamDriveItems}"]; |
+ } |
if (maxResults != null) { |
_queryParams["maxResults"] = ["${maxResults}"]; |
} |
@@ -1555,6 +1689,12 @@ class FilesResourceApi { |
if (spaces != null) { |
_queryParams["spaces"] = [spaces]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
+ if (teamDriveId != null) { |
+ _queryParams["teamDriveId"] = [teamDriveId]; |
+ } |
_url = 'files'; |
@@ -1616,6 +1756,9 @@ class FilesResourceApi { |
* [setModifiedDate] - Whether to set the modified date with the supplied |
* modified date. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* [timedTextLanguage] - The language of the timed text. |
* |
* [timedTextTrackName] - The timed text track name. |
@@ -1633,7 +1776,7 @@ class FilesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<File> patch(File request, core.String fileId, {core.String addParents, core.bool convert, core.String modifiedDateBehavior, core.bool newRevision, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String removeParents, core.bool setModifiedDate, core.String timedTextLanguage, core.String timedTextTrackName, core.bool updateViewedDate, core.bool useContentAsIndexableText}) { |
+ async.Future<File> patch(File request, core.String fileId, {core.String addParents, core.bool convert, core.String modifiedDateBehavior, core.bool newRevision, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String removeParents, core.bool setModifiedDate, core.bool supportsTeamDrives, core.String timedTextLanguage, core.String timedTextTrackName, core.bool updateViewedDate, core.bool useContentAsIndexableText}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -1674,6 +1817,9 @@ class FilesResourceApi { |
if (setModifiedDate != null) { |
_queryParams["setModifiedDate"] = ["${setModifiedDate}"]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
if (timedTextLanguage != null) { |
_queryParams["timedTextLanguage"] = [timedTextLanguage]; |
} |
@@ -1706,6 +1852,9 @@ class FilesResourceApi { |
* |
* [fileId] - The ID of the file to update. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* Completes with a [File]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -1714,7 +1863,7 @@ class FilesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<File> touch(core.String fileId) { |
+ async.Future<File> touch(core.String fileId, {core.bool supportsTeamDrives}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -1725,6 +1874,9 @@ class FilesResourceApi { |
if (fileId == null) { |
throw new core.ArgumentError("Parameter fileId is required."); |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
_url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/touch'; |
@@ -1740,12 +1892,15 @@ class FilesResourceApi { |
/** |
* Moves a file to the trash. The currently authenticated user must own the |
- * file. |
+ * file or be an organizer on the parent for Team Drive files. |
* |
* Request parameters: |
* |
* [fileId] - The ID of the file to trash. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* Completes with a [File]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -1754,7 +1909,7 @@ class FilesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<File> trash(core.String fileId) { |
+ async.Future<File> trash(core.String fileId, {core.bool supportsTeamDrives}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -1765,6 +1920,9 @@ class FilesResourceApi { |
if (fileId == null) { |
throw new core.ArgumentError("Parameter fileId is required."); |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
_url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/trash'; |
@@ -1785,6 +1943,9 @@ class FilesResourceApi { |
* |
* [fileId] - The ID of the file to untrash. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* Completes with a [File]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -1793,7 +1954,7 @@ class FilesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<File> untrash(core.String fileId) { |
+ async.Future<File> untrash(core.String fileId, {core.bool supportsTeamDrives}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -1804,6 +1965,9 @@ class FilesResourceApi { |
if (fileId == null) { |
throw new core.ArgumentError("Parameter fileId is required."); |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
_url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/untrash'; |
@@ -1865,6 +2029,9 @@ class FilesResourceApi { |
* [setModifiedDate] - Whether to set the modified date with the supplied |
* modified date. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* [timedTextLanguage] - The language of the timed text. |
* |
* [timedTextTrackName] - The timed text track name. |
@@ -1887,7 +2054,7 @@ class FilesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<File> update(File request, core.String fileId, {core.String addParents, core.bool convert, core.String modifiedDateBehavior, core.bool newRevision, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String removeParents, core.bool setModifiedDate, core.String timedTextLanguage, core.String timedTextTrackName, core.bool updateViewedDate, core.bool useContentAsIndexableText, commons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Media uploadMedia}) { |
+ async.Future<File> update(File request, core.String fileId, {core.String addParents, core.bool convert, core.String modifiedDateBehavior, core.bool newRevision, core.bool ocr, core.String ocrLanguage, core.bool pinned, core.String removeParents, core.bool setModifiedDate, core.bool supportsTeamDrives, core.String timedTextLanguage, core.String timedTextTrackName, core.bool updateViewedDate, core.bool useContentAsIndexableText, commons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Media uploadMedia}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -1928,6 +2095,9 @@ class FilesResourceApi { |
if (setModifiedDate != null) { |
_queryParams["setModifiedDate"] = ["${setModifiedDate}"]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
if (timedTextLanguage != null) { |
_queryParams["timedTextLanguage"] = [timedTextLanguage]; |
} |
@@ -1983,6 +2153,9 @@ class FilesResourceApi { |
* [revisionId] - Specifies the Revision ID that should be downloaded. Ignored |
* unless alt=media is specified. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* [updateViewedDate] - Deprecated: Use files.update with |
* modifiedDateBehavior=noChange, updateViewedDate=true and an empty request |
* body. |
@@ -2003,7 +2176,7 @@ class FilesResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future watch(Channel request, core.String fileId, {core.bool acknowledgeAbuse, core.String projection, core.String revisionId, core.bool updateViewedDate, commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
+ async.Future watch(Channel request, core.String fileId, {core.bool acknowledgeAbuse, core.String projection, core.String revisionId, core.bool supportsTeamDrives, core.bool updateViewedDate, commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -2026,6 +2199,9 @@ class FilesResourceApi { |
if (revisionId != null) { |
_queryParams["revisionId"] = [revisionId]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
if (updateViewedDate != null) { |
_queryParams["updateViewedDate"] = ["${updateViewedDate}"]; |
} |
@@ -2155,6 +2331,9 @@ class ParentsResourceApi { |
* |
* [fileId] - The ID of the file. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* Completes with a [ParentReference]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -2163,7 +2342,7 @@ class ParentsResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<ParentReference> insert(ParentReference request, core.String fileId) { |
+ async.Future<ParentReference> insert(ParentReference request, core.String fileId, {core.bool supportsTeamDrives}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -2177,6 +2356,9 @@ class ParentsResourceApi { |
if (fileId == null) { |
throw new core.ArgumentError("Parameter fileId is required."); |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
_url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/parents'; |
@@ -2239,21 +2421,24 @@ class PermissionsResourceApi { |
_requester = client; |
/** |
- * Deletes a permission from a file. |
+ * Deletes a permission from a file or Team Drive. |
* |
* Request parameters: |
* |
- * [fileId] - The ID for the file. |
+ * [fileId] - The ID for the file or Team Drive. |
* |
* [permissionId] - The ID for the permission. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
* error. |
* |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future delete(core.String fileId, core.String permissionId) { |
+ async.Future delete(core.String fileId, core.String permissionId, {core.bool supportsTeamDrives}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -2267,6 +2452,9 @@ class PermissionsResourceApi { |
if (permissionId == null) { |
throw new core.ArgumentError("Parameter permissionId is required."); |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
_downloadOptions = null; |
@@ -2287,10 +2475,13 @@ class PermissionsResourceApi { |
* |
* Request parameters: |
* |
- * [fileId] - The ID for the file. |
+ * [fileId] - The ID for the file or Team Drive. |
* |
* [permissionId] - The ID for the permission. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* Completes with a [Permission]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -2299,7 +2490,7 @@ class PermissionsResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<Permission> get(core.String fileId, core.String permissionId) { |
+ async.Future<Permission> get(core.String fileId, core.String permissionId, {core.bool supportsTeamDrives}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -2313,6 +2504,9 @@ class PermissionsResourceApi { |
if (permissionId == null) { |
throw new core.ArgumentError("Parameter permissionId is required."); |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
_url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId'); |
@@ -2366,13 +2560,13 @@ class PermissionsResourceApi { |
} |
/** |
- * Inserts a permission for a file. |
+ * Inserts a permission for a file or Team Drive. |
* |
* [request] - The metadata request object. |
* |
* Request parameters: |
* |
- * [fileId] - The ID for the file. |
+ * [fileId] - The ID for the file or Team Drive. |
* |
* [emailMessage] - A custom message to include in notification emails. |
* |
@@ -2380,6 +2574,9 @@ class PermissionsResourceApi { |
* to users or groups. This parameter is ignored and an email is sent if the |
* role is owner. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* Completes with a [Permission]. |
* |
* Completes with a [commons.ApiRequestError] if the API endpoint returned an |
@@ -2388,7 +2585,7 @@ class PermissionsResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<Permission> insert(Permission request, core.String fileId, {core.String emailMessage, core.bool sendNotificationEmails}) { |
+ async.Future<Permission> insert(Permission request, core.String fileId, {core.String emailMessage, core.bool sendNotificationEmails, core.bool supportsTeamDrives}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -2408,6 +2605,9 @@ class PermissionsResourceApi { |
if (sendNotificationEmails != null) { |
_queryParams["sendNotificationEmails"] = ["${sendNotificationEmails}"]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
_url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions'; |
@@ -2422,11 +2622,24 @@ class PermissionsResourceApi { |
} |
/** |
- * Lists a file's permissions. |
+ * Lists a file's or Team Drive's permissions. |
* |
* Request parameters: |
* |
- * [fileId] - The ID for the file. |
+ * [fileId] - The ID for the file or Team Drive. |
+ * |
+ * [maxResults] - The maximum number of permissions to return per page. When |
+ * not set for files in a Team Drive, at most 100 results will be returned. |
+ * When not set for files that are not in a Team Drive, the entire list will |
+ * be returned. |
+ * Value must be between "1" and "100". |
+ * |
+ * [pageToken] - The token for continuing a previous list request on the next |
+ * page. This should be set to the value of 'nextPageToken' from the previous |
+ * response. |
+ * |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
* |
* Completes with a [PermissionList]. |
* |
@@ -2436,7 +2649,7 @@ class PermissionsResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<PermissionList> list(core.String fileId) { |
+ async.Future<PermissionList> list(core.String fileId, {core.int maxResults, core.String pageToken, core.bool supportsTeamDrives}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -2447,6 +2660,15 @@ class PermissionsResourceApi { |
if (fileId == null) { |
throw new core.ArgumentError("Parameter fileId is required."); |
} |
+ if (maxResults != null) { |
+ _queryParams["maxResults"] = ["${maxResults}"]; |
+ } |
+ if (pageToken != null) { |
+ _queryParams["pageToken"] = [pageToken]; |
+ } |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
_url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions'; |
@@ -2467,12 +2689,15 @@ class PermissionsResourceApi { |
* |
* Request parameters: |
* |
- * [fileId] - The ID for the file. |
+ * [fileId] - The ID for the file or Team Drive. |
* |
* [permissionId] - The ID for the permission. |
* |
* [removeExpiration] - Whether to remove the expiration date. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* [transferOwnership] - Whether changing a role to 'owner' downgrades the |
* current owners to writers. Does nothing if the specified role is not |
* 'owner'. |
@@ -2485,7 +2710,7 @@ class PermissionsResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<Permission> patch(Permission request, core.String fileId, core.String permissionId, {core.bool removeExpiration, core.bool transferOwnership}) { |
+ async.Future<Permission> patch(Permission request, core.String fileId, core.String permissionId, {core.bool removeExpiration, core.bool supportsTeamDrives, core.bool transferOwnership}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -2505,6 +2730,9 @@ class PermissionsResourceApi { |
if (removeExpiration != null) { |
_queryParams["removeExpiration"] = ["${removeExpiration}"]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
if (transferOwnership != null) { |
_queryParams["transferOwnership"] = ["${transferOwnership}"]; |
} |
@@ -2528,12 +2756,15 @@ class PermissionsResourceApi { |
* |
* Request parameters: |
* |
- * [fileId] - The ID for the file. |
+ * [fileId] - The ID for the file or Team Drive. |
* |
* [permissionId] - The ID for the permission. |
* |
* [removeExpiration] - Whether to remove the expiration date. |
* |
+ * [supportsTeamDrives] - Whether the requesting application supports Team |
+ * Drives. |
+ * |
* [transferOwnership] - Whether changing a role to 'owner' downgrades the |
* current owners to writers. Does nothing if the specified role is not |
* 'owner'. |
@@ -2546,7 +2777,7 @@ class PermissionsResourceApi { |
* If the used [http.Client] completes with an error when making a REST call, |
* this method will complete with the same error. |
*/ |
- async.Future<Permission> update(Permission request, core.String fileId, core.String permissionId, {core.bool removeExpiration, core.bool transferOwnership}) { |
+ async.Future<Permission> update(Permission request, core.String fileId, core.String permissionId, {core.bool removeExpiration, core.bool supportsTeamDrives, core.bool transferOwnership}) { |
var _url = null; |
var _queryParams = new core.Map(); |
var _uploadMedia = null; |
@@ -2566,6 +2797,9 @@ class PermissionsResourceApi { |
if (removeExpiration != null) { |
_queryParams["removeExpiration"] = ["${removeExpiration}"]; |
} |
+ if (supportsTeamDrives != null) { |
+ _queryParams["supportsTeamDrives"] = ["${supportsTeamDrives}"]; |
+ } |
if (transferOwnership != null) { |
_queryParams["transferOwnership"] = ["${transferOwnership}"]; |
} |
@@ -3597,113 +3831,339 @@ class RevisionsResourceApi { |
} |
+class TeamdrivesResourceApi { |
+ final commons.ApiRequester _requester; |
-class AboutAdditionalRoleInfoRoleSets { |
- /** The supported additional roles with the primary role. */ |
- core.List<core.String> additionalRoles; |
- /** A primary permission role. */ |
- core.String primaryRole; |
- |
- AboutAdditionalRoleInfoRoleSets(); |
+ TeamdrivesResourceApi(commons.ApiRequester client) : |
+ _requester = client; |
- AboutAdditionalRoleInfoRoleSets.fromJson(core.Map _json) { |
- if (_json.containsKey("additionalRoles")) { |
- additionalRoles = _json["additionalRoles"]; |
- } |
- if (_json.containsKey("primaryRole")) { |
- primaryRole = _json["primaryRole"]; |
- } |
- } |
+ /** |
+ * Permanently deletes a Team Drive for which the user is an organizer. The |
+ * Team Drive cannot contain any untrashed items. |
+ * |
+ * Request parameters: |
+ * |
+ * [teamDriveId] - The ID of the Team Drive |
+ * |
+ * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
+ * error. |
+ * |
+ * If the used [http.Client] completes with an error when making a REST call, |
+ * this method will complete with the same error. |
+ */ |
+ async.Future delete(core.String teamDriveId) { |
+ var _url = null; |
+ var _queryParams = new core.Map(); |
+ var _uploadMedia = null; |
+ var _uploadOptions = null; |
+ var _downloadOptions = commons.DownloadOptions.Metadata; |
+ var _body = null; |
- core.Map toJson() { |
- var _json = new core.Map(); |
- if (additionalRoles != null) { |
- _json["additionalRoles"] = additionalRoles; |
- } |
- if (primaryRole != null) { |
- _json["primaryRole"] = primaryRole; |
+ if (teamDriveId == null) { |
+ throw new core.ArgumentError("Parameter teamDriveId is required."); |
} |
- return _json; |
- } |
-} |
-class AboutAdditionalRoleInfo { |
- /** The supported additional roles per primary role. */ |
- core.List<AboutAdditionalRoleInfoRoleSets> roleSets; |
- /** The content type that this additional role info applies to. */ |
- core.String type; |
+ _downloadOptions = null; |
- AboutAdditionalRoleInfo(); |
+ _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); |
- AboutAdditionalRoleInfo.fromJson(core.Map _json) { |
- if (_json.containsKey("roleSets")) { |
- roleSets = _json["roleSets"].map((value) => new AboutAdditionalRoleInfoRoleSets.fromJson(value)).toList(); |
- } |
- if (_json.containsKey("type")) { |
- type = _json["type"]; |
- } |
+ var _response = _requester.request(_url, |
+ "DELETE", |
+ body: _body, |
+ queryParams: _queryParams, |
+ uploadOptions: _uploadOptions, |
+ uploadMedia: _uploadMedia, |
+ downloadOptions: _downloadOptions); |
+ return _response.then((data) => null); |
} |
- core.Map toJson() { |
- var _json = new core.Map(); |
- if (roleSets != null) { |
- _json["roleSets"] = roleSets.map((value) => (value).toJson()).toList(); |
- } |
- if (type != null) { |
- _json["type"] = type; |
- } |
- return _json; |
- } |
-} |
+ /** |
+ * Gets a Team Drive's metadata by ID. |
+ * |
+ * Request parameters: |
+ * |
+ * [teamDriveId] - The ID of the Team Drive |
+ * |
+ * Completes with a [TeamDrive]. |
+ * |
+ * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
+ * error. |
+ * |
+ * If the used [http.Client] completes with an error when making a REST call, |
+ * this method will complete with the same error. |
+ */ |
+ async.Future<TeamDrive> get(core.String teamDriveId) { |
+ var _url = null; |
+ var _queryParams = new core.Map(); |
+ var _uploadMedia = null; |
+ var _uploadOptions = null; |
+ var _downloadOptions = commons.DownloadOptions.Metadata; |
+ var _body = null; |
-class AboutExportFormats { |
- /** The content type to convert from. */ |
- core.String source; |
- /** The possible content types to convert to. */ |
- core.List<core.String> targets; |
+ if (teamDriveId == null) { |
+ throw new core.ArgumentError("Parameter teamDriveId is required."); |
+ } |
- AboutExportFormats(); |
+ _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); |
- AboutExportFormats.fromJson(core.Map _json) { |
- if (_json.containsKey("source")) { |
- source = _json["source"]; |
- } |
- if (_json.containsKey("targets")) { |
- targets = _json["targets"]; |
- } |
+ var _response = _requester.request(_url, |
+ "GET", |
+ body: _body, |
+ queryParams: _queryParams, |
+ uploadOptions: _uploadOptions, |
+ uploadMedia: _uploadMedia, |
+ downloadOptions: _downloadOptions); |
+ return _response.then((data) => new TeamDrive.fromJson(data)); |
} |
- core.Map toJson() { |
- var _json = new core.Map(); |
- if (source != null) { |
- _json["source"] = source; |
+ /** |
+ * Creates a new Team Drive. |
+ * |
+ * [request] - The metadata request object. |
+ * |
+ * Request parameters: |
+ * |
+ * [requestId] - An ID, such as a random UUID, which uniquely identifies this |
+ * user's request for idempotent creation of a Team Drive. A repeated request |
+ * by the same user and with the same request ID will avoid creating |
+ * duplicates by attempting to create the same Team Drive. If the Team Drive |
+ * already exists a 409 error will be returned. |
+ * |
+ * Completes with a [TeamDrive]. |
+ * |
+ * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
+ * error. |
+ * |
+ * If the used [http.Client] completes with an error when making a REST call, |
+ * this method will complete with the same error. |
+ */ |
+ async.Future<TeamDrive> insert(TeamDrive request, core.String requestId) { |
+ var _url = null; |
+ var _queryParams = new core.Map(); |
+ var _uploadMedia = null; |
+ var _uploadOptions = null; |
+ var _downloadOptions = commons.DownloadOptions.Metadata; |
+ var _body = null; |
+ |
+ if (request != null) { |
+ _body = convert_1.JSON.encode((request).toJson()); |
} |
- if (targets != null) { |
- _json["targets"] = targets; |
+ if (requestId == null) { |
+ throw new core.ArgumentError("Parameter requestId is required."); |
} |
- return _json; |
- } |
-} |
- |
-class AboutFeatures { |
- /** The name of the feature. */ |
- core.String featureName; |
- /** The request limit rate for this feature, in queries per second. */ |
- core.double featureRate; |
+ _queryParams["requestId"] = [requestId]; |
- AboutFeatures(); |
+ _url = 'teamdrives'; |
- AboutFeatures.fromJson(core.Map _json) { |
- if (_json.containsKey("featureName")) { |
- featureName = _json["featureName"]; |
- } |
- if (_json.containsKey("featureRate")) { |
- featureRate = _json["featureRate"]; |
- } |
+ var _response = _requester.request(_url, |
+ "POST", |
+ body: _body, |
+ queryParams: _queryParams, |
+ uploadOptions: _uploadOptions, |
+ uploadMedia: _uploadMedia, |
+ downloadOptions: _downloadOptions); |
+ return _response.then((data) => new TeamDrive.fromJson(data)); |
} |
- core.Map toJson() { |
- var _json = new core.Map(); |
+ /** |
+ * Lists the user's Team Drives. |
+ * |
+ * Request parameters: |
+ * |
+ * [maxResults] - Maximum number of Team Drives to return. |
+ * Value must be between "1" and "100". |
+ * |
+ * [pageToken] - Page token for Team Drives. |
+ * |
+ * Completes with a [TeamDriveList]. |
+ * |
+ * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
+ * error. |
+ * |
+ * If the used [http.Client] completes with an error when making a REST call, |
+ * this method will complete with the same error. |
+ */ |
+ async.Future<TeamDriveList> list({core.int maxResults, core.String pageToken}) { |
+ var _url = null; |
+ var _queryParams = new core.Map(); |
+ var _uploadMedia = null; |
+ var _uploadOptions = null; |
+ var _downloadOptions = commons.DownloadOptions.Metadata; |
+ var _body = null; |
+ |
+ if (maxResults != null) { |
+ _queryParams["maxResults"] = ["${maxResults}"]; |
+ } |
+ if (pageToken != null) { |
+ _queryParams["pageToken"] = [pageToken]; |
+ } |
+ |
+ _url = 'teamdrives'; |
+ |
+ var _response = _requester.request(_url, |
+ "GET", |
+ body: _body, |
+ queryParams: _queryParams, |
+ uploadOptions: _uploadOptions, |
+ uploadMedia: _uploadMedia, |
+ downloadOptions: _downloadOptions); |
+ return _response.then((data) => new TeamDriveList.fromJson(data)); |
+ } |
+ |
+ /** |
+ * Updates a Team Drive's metadata |
+ * |
+ * [request] - The metadata request object. |
+ * |
+ * Request parameters: |
+ * |
+ * [teamDriveId] - The ID of the Team Drive |
+ * |
+ * Completes with a [TeamDrive]. |
+ * |
+ * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
+ * error. |
+ * |
+ * If the used [http.Client] completes with an error when making a REST call, |
+ * this method will complete with the same error. |
+ */ |
+ async.Future<TeamDrive> update(TeamDrive request, core.String teamDriveId) { |
+ var _url = null; |
+ var _queryParams = new core.Map(); |
+ var _uploadMedia = null; |
+ var _uploadOptions = null; |
+ var _downloadOptions = commons.DownloadOptions.Metadata; |
+ var _body = null; |
+ |
+ if (request != null) { |
+ _body = convert_1.JSON.encode((request).toJson()); |
+ } |
+ if (teamDriveId == null) { |
+ throw new core.ArgumentError("Parameter teamDriveId is required."); |
+ } |
+ |
+ _url = 'teamdrives/' + commons.Escaper.ecapeVariable('$teamDriveId'); |
+ |
+ var _response = _requester.request(_url, |
+ "PUT", |
+ body: _body, |
+ queryParams: _queryParams, |
+ uploadOptions: _uploadOptions, |
+ uploadMedia: _uploadMedia, |
+ downloadOptions: _downloadOptions); |
+ return _response.then((data) => new TeamDrive.fromJson(data)); |
+ } |
+ |
+} |
+ |
+ |
+ |
+class AboutAdditionalRoleInfoRoleSets { |
+ /** The supported additional roles with the primary role. */ |
+ core.List<core.String> additionalRoles; |
+ /** A primary permission role. */ |
+ core.String primaryRole; |
+ |
+ AboutAdditionalRoleInfoRoleSets(); |
+ |
+ AboutAdditionalRoleInfoRoleSets.fromJson(core.Map _json) { |
+ if (_json.containsKey("additionalRoles")) { |
+ additionalRoles = _json["additionalRoles"]; |
+ } |
+ if (_json.containsKey("primaryRole")) { |
+ primaryRole = _json["primaryRole"]; |
+ } |
+ } |
+ |
+ core.Map toJson() { |
+ var _json = new core.Map(); |
+ if (additionalRoles != null) { |
+ _json["additionalRoles"] = additionalRoles; |
+ } |
+ if (primaryRole != null) { |
+ _json["primaryRole"] = primaryRole; |
+ } |
+ return _json; |
+ } |
+} |
+ |
+class AboutAdditionalRoleInfo { |
+ /** The supported additional roles per primary role. */ |
+ core.List<AboutAdditionalRoleInfoRoleSets> roleSets; |
+ /** The content type that this additional role info applies to. */ |
+ core.String type; |
+ |
+ AboutAdditionalRoleInfo(); |
+ |
+ AboutAdditionalRoleInfo.fromJson(core.Map _json) { |
+ if (_json.containsKey("roleSets")) { |
+ roleSets = _json["roleSets"].map((value) => new AboutAdditionalRoleInfoRoleSets.fromJson(value)).toList(); |
+ } |
+ if (_json.containsKey("type")) { |
+ type = _json["type"]; |
+ } |
+ } |
+ |
+ core.Map toJson() { |
+ var _json = new core.Map(); |
+ if (roleSets != null) { |
+ _json["roleSets"] = roleSets.map((value) => (value).toJson()).toList(); |
+ } |
+ if (type != null) { |
+ _json["type"] = type; |
+ } |
+ return _json; |
+ } |
+} |
+ |
+class AboutExportFormats { |
+ /** The content type to convert from. */ |
+ core.String source; |
+ /** The possible content types to convert to. */ |
+ core.List<core.String> targets; |
+ |
+ AboutExportFormats(); |
+ |
+ AboutExportFormats.fromJson(core.Map _json) { |
+ if (_json.containsKey("source")) { |
+ source = _json["source"]; |
+ } |
+ if (_json.containsKey("targets")) { |
+ targets = _json["targets"]; |
+ } |
+ } |
+ |
+ core.Map toJson() { |
+ var _json = new core.Map(); |
+ if (source != null) { |
+ _json["source"] = source; |
+ } |
+ if (targets != null) { |
+ _json["targets"] = targets; |
+ } |
+ return _json; |
+ } |
+} |
+ |
+class AboutFeatures { |
+ /** The name of the feature. */ |
+ core.String featureName; |
+ /** The request limit rate for this feature, in queries per second. */ |
+ core.double featureRate; |
+ |
+ AboutFeatures(); |
+ |
+ AboutFeatures.fromJson(core.Map _json) { |
+ if (_json.containsKey("featureName")) { |
+ featureName = _json["featureName"]; |
+ } |
+ if (_json.containsKey("featureRate")) { |
+ featureRate = _json["featureRate"]; |
+ } |
+ } |
+ |
+ core.Map toJson() { |
+ var _json = new core.Map(); |
if (featureName != null) { |
_json["featureName"] = featureName; |
} |
@@ -4361,12 +4821,16 @@ class AppList { |
} |
} |
-/** Representation of a change to a file. */ |
+/** Representation of a change to a file or Team Drive. */ |
class Change { |
- /** Whether the file has been deleted. */ |
+ /** |
+ * Whether the file or Team Drive has been removed from this list of changes, |
+ * for example by deletion or loss of access. |
+ */ |
core.bool deleted; |
/** |
- * The updated state of the file. Present if the file has not been deleted. |
+ * The updated state of the file. Present if the type is file and the file has |
+ * not been removed from this list of changes. |
*/ |
File file; |
/** The ID of the file associated with this change. */ |
@@ -4379,6 +4843,16 @@ class Change { |
core.DateTime modificationDate; |
/** A link back to this change. */ |
core.String selfLink; |
+ /** |
+ * The updated state of the Team Drive. Present if the type is teamDrive, the |
+ * user is still a member of the Team Drive, and the Team Drive has not been |
+ * deleted. |
+ */ |
+ TeamDrive teamDrive; |
+ /** The ID of the Team Drive associated with this change. */ |
+ core.String teamDriveId; |
+ /** The type of the change. Possible values are file and teamDrive. */ |
+ core.String type; |
Change(); |
@@ -4404,6 +4878,15 @@ class Change { |
if (_json.containsKey("selfLink")) { |
selfLink = _json["selfLink"]; |
} |
+ if (_json.containsKey("teamDrive")) { |
+ teamDrive = new TeamDrive.fromJson(_json["teamDrive"]); |
+ } |
+ if (_json.containsKey("teamDriveId")) { |
+ teamDriveId = _json["teamDriveId"]; |
+ } |
+ if (_json.containsKey("type")) { |
+ type = _json["type"]; |
+ } |
} |
core.Map toJson() { |
@@ -4429,6 +4912,15 @@ class Change { |
if (selfLink != null) { |
_json["selfLink"] = selfLink; |
} |
+ if (teamDrive != null) { |
+ _json["teamDrive"] = (teamDrive).toJson(); |
+ } |
+ if (teamDriveId != null) { |
+ _json["teamDriveId"] = teamDriveId; |
+ } |
+ if (type != null) { |
+ _json["type"] = type; |
+ } |
return _json; |
} |
} |
@@ -4446,6 +4938,11 @@ class ChangeList { |
core.String kind; |
/** The current largest change ID. */ |
core.String largestChangeId; |
+ /** |
+ * The starting page token for future changes. This will be present only if |
+ * the end of the current changes list has been reached. |
+ */ |
+ core.String newStartPageToken; |
/** A link to the next page of changes. */ |
core.String nextLink; |
/** |
@@ -4473,6 +4970,9 @@ class ChangeList { |
if (_json.containsKey("largestChangeId")) { |
largestChangeId = _json["largestChangeId"]; |
} |
+ if (_json.containsKey("newStartPageToken")) { |
+ newStartPageToken = _json["newStartPageToken"]; |
+ } |
if (_json.containsKey("nextLink")) { |
nextLink = _json["nextLink"]; |
} |
@@ -4498,6 +4998,9 @@ class ChangeList { |
if (largestChangeId != null) { |
_json["largestChangeId"] = largestChangeId; |
} |
+ if (newStartPageToken != null) { |
+ _json["newStartPageToken"] = newStartPageToken; |
+ } |
if (nextLink != null) { |
_json["nextLink"] = nextLink; |
} |
@@ -5141,6 +5644,181 @@ class CommentReplyList { |
} |
} |
+/** |
+ * Capabilities the current user has on the file. Each capability corresponds to |
+ * a fine-grained action that a user may take. |
+ */ |
+class FileCapabilities { |
+ /** |
+ * Whether the current user can add children to this folder. This is always |
+ * false when the item is not a folder. |
+ */ |
+ core.bool canAddChildren; |
+ /** Whether the current user can comment on the file. */ |
+ core.bool canComment; |
+ /** |
+ * Whether the file can be copied by the current user. For a Team Drive item, |
+ * whether non-folder descendants of this item, or this item itself if it is |
+ * not a folder, can be copied. |
+ */ |
+ core.bool canCopy; |
+ /** Whether the file can be deleted by the current user. */ |
+ core.bool canDelete; |
+ /** Whether the file can be downloaded by the current user. */ |
+ core.bool canDownload; |
+ /** Whether the file can be edited by the current user. */ |
+ core.bool canEdit; |
+ /** |
+ * Whether the current user can list the children of this folder. This is |
+ * always false when the item is not a folder. |
+ */ |
+ core.bool canListChildren; |
+ /** |
+ * Whether the current user can move this item into a Team Drive. If the item |
+ * is in a Team Drive, this field is equivalent to canMoveTeamDriveItem. |
+ */ |
+ core.bool canMoveItemIntoTeamDrive; |
+ /** |
+ * Whether the current user can move this Team Drive item by changing its |
+ * parent. Note that a request to change the parent for this item may still |
+ * fail depending on the new parent that is being added. Only populated for |
+ * Team Drive files. |
+ */ |
+ core.bool canMoveTeamDriveItem; |
+ /** |
+ * Whether the current user has read access to the Revisions resource of the |
+ * file. For a Team Drive item, whether revisions of non-folder descendants of |
+ * this item, or this item itself if it is not a folder, can be read. |
+ */ |
+ core.bool canReadRevisions; |
+ /** |
+ * Whether the current user has read access to the Team Drive to which this |
+ * file belongs. Only populated for Team Drive files. |
+ */ |
+ core.bool canReadTeamDrive; |
+ /** |
+ * Whether the current user can remove children from this folder. This is |
+ * always false when the item is not a folder. |
+ */ |
+ core.bool canRemoveChildren; |
+ /** Whether the file can be renamed by the current user. */ |
+ core.bool canRename; |
+ /** |
+ * Whether the file's sharing settings can be modified by the current user. |
+ */ |
+ core.bool canShare; |
+ /** Whether the file can be trashed by the current user. */ |
+ core.bool canTrash; |
+ /** Whether the file can be restored from the trash by the current user. */ |
+ core.bool canUntrash; |
+ |
+ FileCapabilities(); |
+ |
+ FileCapabilities.fromJson(core.Map _json) { |
+ if (_json.containsKey("canAddChildren")) { |
+ canAddChildren = _json["canAddChildren"]; |
+ } |
+ if (_json.containsKey("canComment")) { |
+ canComment = _json["canComment"]; |
+ } |
+ if (_json.containsKey("canCopy")) { |
+ canCopy = _json["canCopy"]; |
+ } |
+ if (_json.containsKey("canDelete")) { |
+ canDelete = _json["canDelete"]; |
+ } |
+ if (_json.containsKey("canDownload")) { |
+ canDownload = _json["canDownload"]; |
+ } |
+ if (_json.containsKey("canEdit")) { |
+ canEdit = _json["canEdit"]; |
+ } |
+ if (_json.containsKey("canListChildren")) { |
+ canListChildren = _json["canListChildren"]; |
+ } |
+ if (_json.containsKey("canMoveItemIntoTeamDrive")) { |
+ canMoveItemIntoTeamDrive = _json["canMoveItemIntoTeamDrive"]; |
+ } |
+ if (_json.containsKey("canMoveTeamDriveItem")) { |
+ canMoveTeamDriveItem = _json["canMoveTeamDriveItem"]; |
+ } |
+ if (_json.containsKey("canReadRevisions")) { |
+ canReadRevisions = _json["canReadRevisions"]; |
+ } |
+ if (_json.containsKey("canReadTeamDrive")) { |
+ canReadTeamDrive = _json["canReadTeamDrive"]; |
+ } |
+ if (_json.containsKey("canRemoveChildren")) { |
+ canRemoveChildren = _json["canRemoveChildren"]; |
+ } |
+ if (_json.containsKey("canRename")) { |
+ canRename = _json["canRename"]; |
+ } |
+ if (_json.containsKey("canShare")) { |
+ canShare = _json["canShare"]; |
+ } |
+ if (_json.containsKey("canTrash")) { |
+ canTrash = _json["canTrash"]; |
+ } |
+ if (_json.containsKey("canUntrash")) { |
+ canUntrash = _json["canUntrash"]; |
+ } |
+ } |
+ |
+ core.Map toJson() { |
+ var _json = new core.Map(); |
+ if (canAddChildren != null) { |
+ _json["canAddChildren"] = canAddChildren; |
+ } |
+ if (canComment != null) { |
+ _json["canComment"] = canComment; |
+ } |
+ if (canCopy != null) { |
+ _json["canCopy"] = canCopy; |
+ } |
+ if (canDelete != null) { |
+ _json["canDelete"] = canDelete; |
+ } |
+ if (canDownload != null) { |
+ _json["canDownload"] = canDownload; |
+ } |
+ if (canEdit != null) { |
+ _json["canEdit"] = canEdit; |
+ } |
+ if (canListChildren != null) { |
+ _json["canListChildren"] = canListChildren; |
+ } |
+ if (canMoveItemIntoTeamDrive != null) { |
+ _json["canMoveItemIntoTeamDrive"] = canMoveItemIntoTeamDrive; |
+ } |
+ if (canMoveTeamDriveItem != null) { |
+ _json["canMoveTeamDriveItem"] = canMoveTeamDriveItem; |
+ } |
+ if (canReadRevisions != null) { |
+ _json["canReadRevisions"] = canReadRevisions; |
+ } |
+ if (canReadTeamDrive != null) { |
+ _json["canReadTeamDrive"] = canReadTeamDrive; |
+ } |
+ if (canRemoveChildren != null) { |
+ _json["canRemoveChildren"] = canRemoveChildren; |
+ } |
+ if (canRename != null) { |
+ _json["canRename"] = canRename; |
+ } |
+ if (canShare != null) { |
+ _json["canShare"] = canShare; |
+ } |
+ if (canTrash != null) { |
+ _json["canTrash"] = canTrash; |
+ } |
+ if (canUntrash != null) { |
+ _json["canUntrash"] = canUntrash; |
+ } |
+ return _json; |
+ } |
+} |
+ |
/** Geographic location information stored in the image. */ |
class FileImageMediaMetadataLocation { |
/** The altitude stored in the image. */ |
@@ -5547,14 +6225,25 @@ class File { |
core.String alternateLink; |
/** Whether this file is in the Application Data folder. */ |
core.bool appDataContents; |
- /** Whether the current user can comment on the file. */ |
+ /** |
+ * Whether the current user can comment on the file. Deprecated: use |
+ * capabilities/canComment. |
+ */ |
core.bool canComment; |
/** |
* Whether the current user has read access to the Revisions resource of the |
- * file. |
+ * file. Deprecated: use capabilities/canReadRevisions. |
*/ |
core.bool canReadRevisions; |
- /** Whether the file can be copied by the current user. */ |
+ /** |
+ * Capabilities the current user has on the file. Each capability corresponds |
+ * to a fine-grained action that a user may take. |
+ */ |
+ FileCapabilities capabilities; |
+ /** |
+ * Whether the file can be copied by the current user. Deprecated: use |
+ * capabilities/canCopy. |
+ */ |
core.bool copyable; |
/** Create time for this file (formatted RFC 3339 timestamp). */ |
core.DateTime createdDate; |
@@ -5566,7 +6255,10 @@ class File { |
/** A short description of the file. */ |
core.String description; |
core.String downloadUrl; |
- /** Whether the file can be edited by the current user. */ |
+ /** |
+ * Whether the file can be edited by the current user. Deprecated: use |
+ * capabilities/canEdit. |
+ */ |
core.bool editable; |
/** A link for embedding the file. */ |
core.String embedLink; |
@@ -5596,7 +6288,7 @@ class File { |
* Folder color as an RGB hex string if the file is a folder. The list of |
* supported colors is available in the folderColorPalette field of the About |
* resource. If an unsupported color is specified, it will be changed to the |
- * closest color in the palette. |
+ * closest color in the palette. Not populated for Team Drive files. |
*/ |
core.String folderColorRgb; |
/** |
@@ -5608,6 +6300,11 @@ class File { |
* files. |
*/ |
core.String fullFileExtension; |
+ /** |
+ * Whether any users are granted file access directly on this file. This field |
+ * is only populated for Team Drive files. |
+ */ |
+ core.bool hasAugmentedPermissions; |
/** Whether this file has a thumbnail. */ |
core.bool hasThumbnail; |
/** |
@@ -5677,11 +6374,16 @@ class File { |
* binary content in Drive. |
*/ |
core.String originalFilename; |
- /** Whether the file is owned by the current user. */ |
+ /** |
+ * Whether the file is owned by the current user. Not populated for Team Drive |
+ * files. |
+ */ |
core.bool ownedByMe; |
- /** Name(s) of the owner(s) of this file. */ |
+ /** |
+ * Name(s) of the owner(s) of this file. Not populated for Team Drive files. |
+ */ |
core.List<core.String> ownerNames; |
- /** The owner(s) of this file. */ |
+ /** The owner(s) of this file. Not populated for Team Drive files. */ |
core.List<User> owners; |
/** |
* Collection of parent folders which contain this file. |
@@ -5690,7 +6392,10 @@ class File { |
* root folder. |
*/ |
core.List<ParentReference> parents; |
- /** The list of permissions for users with access to this file. */ |
+ /** |
+ * The list of permissions for users with access to this file. Not populated |
+ * for Team Drive files. |
+ */ |
core.List<Permission> permissions; |
/** The list of properties. */ |
core.List<Property> properties; |
@@ -5700,9 +6405,10 @@ class File { |
core.String selfLink; |
/** |
* Whether the file's sharing settings can be modified by the current user. |
+ * Deprecated: use capabilities/canShare. |
*/ |
core.bool shareable; |
- /** Whether the file has been shared. */ |
+ /** Whether the file has been shared. Not populated for Team Drive files. */ |
core.bool shared; |
/** |
* Time at which this file was shared with the user (formatted RFC 3339 |
@@ -5716,6 +6422,8 @@ class File { |
* 'appDataFolder' and 'photos'. |
*/ |
core.List<core.String> spaces; |
+ /** ID of the Team Drive the file resides in. */ |
+ core.String teamDriveId; |
/** |
* A thumbnail for the file. This will only be used if Drive cannot generate a |
* standard thumbnail. |
@@ -5731,6 +6439,16 @@ class File { |
core.String thumbnailVersion; |
/** The title of this file. */ |
core.String title; |
+ /** |
+ * The time that the item was trashed (formatted RFC 3339 timestamp). Only |
+ * populated for Team Drive files. |
+ */ |
+ core.DateTime trashedDate; |
+ /** |
+ * If the file has been explicitly trashed, the user who trashed it. Only |
+ * populated for Team Drive files. |
+ */ |
+ User trashingUser; |
/** The permissions for the authenticated user on this file. */ |
Permission userPermission; |
/** |
@@ -5752,7 +6470,10 @@ class File { |
* (HTML, CSS, JS, etc) via Google Drive's Website Hosting. |
*/ |
core.String webViewLink; |
- /** Whether writers can share the document with other users. */ |
+ /** |
+ * Whether writers can share the document with other users. Not populated for |
+ * Team Drive files. |
+ */ |
core.bool writersCanShare; |
File(); |
@@ -5770,6 +6491,9 @@ class File { |
if (_json.containsKey("canReadRevisions")) { |
canReadRevisions = _json["canReadRevisions"]; |
} |
+ if (_json.containsKey("capabilities")) { |
+ capabilities = new FileCapabilities.fromJson(_json["capabilities"]); |
+ } |
if (_json.containsKey("copyable")) { |
copyable = _json["copyable"]; |
} |
@@ -5812,6 +6536,9 @@ class File { |
if (_json.containsKey("fullFileExtension")) { |
fullFileExtension = _json["fullFileExtension"]; |
} |
+ if (_json.containsKey("hasAugmentedPermissions")) { |
+ hasAugmentedPermissions = _json["hasAugmentedPermissions"]; |
+ } |
if (_json.containsKey("hasThumbnail")) { |
hasThumbnail = _json["hasThumbnail"]; |
} |
@@ -5908,6 +6635,9 @@ class File { |
if (_json.containsKey("spaces")) { |
spaces = _json["spaces"]; |
} |
+ if (_json.containsKey("teamDriveId")) { |
+ teamDriveId = _json["teamDriveId"]; |
+ } |
if (_json.containsKey("thumbnail")) { |
thumbnail = new FileThumbnail.fromJson(_json["thumbnail"]); |
} |
@@ -5920,6 +6650,12 @@ class File { |
if (_json.containsKey("title")) { |
title = _json["title"]; |
} |
+ if (_json.containsKey("trashedDate")) { |
+ trashedDate = core.DateTime.parse(_json["trashedDate"]); |
+ } |
+ if (_json.containsKey("trashingUser")) { |
+ trashingUser = new User.fromJson(_json["trashingUser"]); |
+ } |
if (_json.containsKey("userPermission")) { |
userPermission = new Permission.fromJson(_json["userPermission"]); |
} |
@@ -5954,6 +6690,9 @@ class File { |
if (canReadRevisions != null) { |
_json["canReadRevisions"] = canReadRevisions; |
} |
+ if (capabilities != null) { |
+ _json["capabilities"] = (capabilities).toJson(); |
+ } |
if (copyable != null) { |
_json["copyable"] = copyable; |
} |
@@ -5996,6 +6735,9 @@ class File { |
if (fullFileExtension != null) { |
_json["fullFileExtension"] = fullFileExtension; |
} |
+ if (hasAugmentedPermissions != null) { |
+ _json["hasAugmentedPermissions"] = hasAugmentedPermissions; |
+ } |
if (hasThumbnail != null) { |
_json["hasThumbnail"] = hasThumbnail; |
} |
@@ -6092,6 +6834,9 @@ class File { |
if (spaces != null) { |
_json["spaces"] = spaces; |
} |
+ if (teamDriveId != null) { |
+ _json["teamDriveId"] = teamDriveId; |
+ } |
if (thumbnail != null) { |
_json["thumbnail"] = (thumbnail).toJson(); |
} |
@@ -6104,6 +6849,12 @@ class File { |
if (title != null) { |
_json["title"] = title; |
} |
+ if (trashedDate != null) { |
+ _json["trashedDate"] = (trashedDate).toIso8601String(); |
+ } |
+ if (trashingUser != null) { |
+ _json["trashingUser"] = (trashingUser).toJson(); |
+ } |
if (userPermission != null) { |
_json["userPermission"] = (userPermission).toJson(); |
} |
@@ -6131,6 +6882,15 @@ class FileList { |
/** The ETag of the list. */ |
core.String etag; |
/** |
+ * Whether the search process was incomplete. If true, then some search |
+ * results may be missing, since all documents were not searched. This may |
+ * occur when searching multiple Team Drives with the "default,allTeamDrives" |
+ * corpora, but all corpora could not be searched. When this happens, it is |
+ * suggested that clients narrow their query by choosing a different corpus |
+ * such as "default" or "teamDrive". |
+ */ |
+ core.bool incompleteSearch; |
+ /** |
* The list of files. If nextPageToken is populated, then this list may be |
* incomplete and an additional page of results should be fetched. |
*/ |
@@ -6155,6 +6915,9 @@ class FileList { |
if (_json.containsKey("etag")) { |
etag = _json["etag"]; |
} |
+ if (_json.containsKey("incompleteSearch")) { |
+ incompleteSearch = _json["incompleteSearch"]; |
+ } |
if (_json.containsKey("items")) { |
items = _json["items"].map((value) => new File.fromJson(value)).toList(); |
} |
@@ -6177,6 +6940,9 @@ class FileList { |
if (etag != null) { |
_json["etag"] = etag; |
} |
+ if (incompleteSearch != null) { |
+ _json["incompleteSearch"] = incompleteSearch; |
+ } |
if (items != null) { |
_json["items"] = items.map((value) => (value).toJson()).toList(); |
} |
@@ -6334,9 +7100,85 @@ class ParentReference { |
} |
} |
+class PermissionTeamDrivePermissionDetails { |
+ /** |
+ * Additional roles for this user. Only commenter is currently possible, |
+ * though more may be supported in the future. |
+ */ |
+ core.List<core.String> additionalRoles; |
+ /** |
+ * Whether this permission is inherited. This field is always populated. This |
+ * is an output-only field. |
+ */ |
+ core.bool inherited; |
+ /** |
+ * The ID of the item from which this permission is inherited. This is an |
+ * output-only field and is only populated for members of the Team Drive. |
+ */ |
+ core.String inheritedFrom; |
+ /** |
+ * The primary role for this user. While new values may be added in the |
+ * future, the following are currently possible: |
+ * - organizer |
+ * - reader |
+ * - writer |
+ */ |
+ core.String role; |
+ /** |
+ * The Team Drive permission type for this user. While new values may be added |
+ * in future, the following are currently possible: |
+ * - file |
+ * - member |
+ */ |
+ core.String teamDrivePermissionType; |
+ |
+ PermissionTeamDrivePermissionDetails(); |
+ |
+ PermissionTeamDrivePermissionDetails.fromJson(core.Map _json) { |
+ if (_json.containsKey("additionalRoles")) { |
+ additionalRoles = _json["additionalRoles"]; |
+ } |
+ if (_json.containsKey("inherited")) { |
+ inherited = _json["inherited"]; |
+ } |
+ if (_json.containsKey("inheritedFrom")) { |
+ inheritedFrom = _json["inheritedFrom"]; |
+ } |
+ if (_json.containsKey("role")) { |
+ role = _json["role"]; |
+ } |
+ if (_json.containsKey("teamDrivePermissionType")) { |
+ teamDrivePermissionType = _json["teamDrivePermissionType"]; |
+ } |
+ } |
+ |
+ core.Map toJson() { |
+ var _json = new core.Map(); |
+ if (additionalRoles != null) { |
+ _json["additionalRoles"] = additionalRoles; |
+ } |
+ if (inherited != null) { |
+ _json["inherited"] = inherited; |
+ } |
+ if (inheritedFrom != null) { |
+ _json["inheritedFrom"] = inheritedFrom; |
+ } |
+ if (role != null) { |
+ _json["role"] = role; |
+ } |
+ if (teamDrivePermissionType != null) { |
+ _json["teamDrivePermissionType"] = teamDrivePermissionType; |
+ } |
+ return _json; |
+ } |
+} |
+ |
/** A permission for a file. */ |
class Permission { |
- /** Additional roles for this user. Only commenter is currently allowed. */ |
+ /** |
+ * Additional roles for this user. Only commenter is currently allowed, though |
+ * more may be supported in the future. |
+ */ |
core.List<core.String> additionalRoles; |
/** The authkey parameter required for this permission. */ |
core.String authKey; |
@@ -6354,7 +7196,14 @@ class Permission { |
core.String emailAddress; |
/** The ETag of the permission. */ |
core.String etag; |
- /** The time at which this permission will expire (RFC 3339 date-time). */ |
+ /** |
+ * The time at which this permission will expire (RFC 3339 date-time). |
+ * Expiration dates have the following restrictions: |
+ * - They can only be set on user and group permissions |
+ * - The date must be in the future |
+ * - The date cannot be more than a year in the future |
+ * - The date can only be set on drive.permissions.update requests |
+ */ |
core.DateTime expirationDate; |
/** |
* The ID of the user this permission refers to, and identical to the |
@@ -6371,7 +7220,9 @@ class Permission { |
/** A link to the profile photo, if available. */ |
core.String photoLink; |
/** |
- * The primary role for this user. Allowed values are: |
+ * The primary role for this user. While new values may be supported in the |
+ * future, the following are currently allowed: |
+ * - organizer |
* - owner |
* - reader |
* - writer |
@@ -6380,6 +7231,12 @@ class Permission { |
/** A link back to this permission. */ |
core.String selfLink; |
/** |
+ * Details of whether the Permissions on this Team Drive item are inherited or |
+ * directly on this item. This is an output-only field which is present only |
+ * for Team Drive items. |
+ */ |
+ core.List<PermissionTeamDrivePermissionDetails> teamDrivePermissionDetails; |
+ /** |
* The account type. Allowed values are: |
* - user |
* - group |
@@ -6437,6 +7294,9 @@ class Permission { |
if (_json.containsKey("selfLink")) { |
selfLink = _json["selfLink"]; |
} |
+ if (_json.containsKey("teamDrivePermissionDetails")) { |
+ teamDrivePermissionDetails = _json["teamDrivePermissionDetails"].map((value) => new PermissionTeamDrivePermissionDetails.fromJson(value)).toList(); |
+ } |
if (_json.containsKey("type")) { |
type = _json["type"]; |
} |
@@ -6486,6 +7346,9 @@ class Permission { |
if (selfLink != null) { |
_json["selfLink"] = selfLink; |
} |
+ if (teamDrivePermissionDetails != null) { |
+ _json["teamDrivePermissionDetails"] = teamDrivePermissionDetails.map((value) => (value).toJson()).toList(); |
+ } |
if (type != null) { |
_json["type"] = type; |
} |
@@ -6537,6 +7400,13 @@ class PermissionList { |
core.List<Permission> items; |
/** This is always drive#permissionList. */ |
core.String kind; |
+ /** |
+ * The page token for the next page of permissions. This field will be absent |
+ * if the end of the permissions list has been reached. If the token is |
+ * rejected for any reason, it should be discarded, and pagination should be |
+ * restarted from the first page of results. |
+ */ |
+ core.String nextPageToken; |
/** A link back to this list. */ |
core.String selfLink; |
@@ -6552,6 +7422,9 @@ class PermissionList { |
if (_json.containsKey("kind")) { |
kind = _json["kind"]; |
} |
+ if (_json.containsKey("nextPageToken")) { |
+ nextPageToken = _json["nextPageToken"]; |
+ } |
if (_json.containsKey("selfLink")) { |
selfLink = _json["selfLink"]; |
} |
@@ -6568,6 +7441,9 @@ class PermissionList { |
if (kind != null) { |
_json["kind"] = kind; |
} |
+ if (nextPageToken != null) { |
+ _json["nextPageToken"] = nextPageToken; |
+ } |
if (selfLink != null) { |
_json["selfLink"] = selfLink; |
} |
@@ -6974,6 +7850,232 @@ class StartPageToken { |
} |
} |
+/** Capabilities the current user has on this Team Drive. */ |
+class TeamDriveCapabilities { |
+ /** |
+ * Whether the current user can add children to folders in this Team Drive. |
+ */ |
+ core.bool canAddChildren; |
+ /** Whether the current user can comment on files in this Team Drive. */ |
+ core.bool canComment; |
+ /** Whether files in this Team Drive can be copied by the current user. */ |
+ core.bool canCopy; |
+ /** Whether this Team Drive can be deleted by the current user. */ |
+ core.bool canDeleteTeamDrive; |
+ /** |
+ * Whether files in this Team Drive can be downloaded by the current user. |
+ */ |
+ core.bool canDownload; |
+ /** Whether files in this Team Drive can be edited by the current user. */ |
+ core.bool canEdit; |
+ /** |
+ * Whether the current user can list the children of folders in this Team |
+ * Drive. |
+ */ |
+ core.bool canListChildren; |
+ /** |
+ * Whether the current user can add members to this Team Drive or remove them |
+ * or change their role. |
+ */ |
+ core.bool canManageMembers; |
+ /** |
+ * Whether the current user has read access to the Revisions resource of files |
+ * in this Team Drive. |
+ */ |
+ core.bool canReadRevisions; |
+ /** |
+ * Whether the current user can remove children from folders in this Team |
+ * Drive. |
+ */ |
+ core.bool canRemoveChildren; |
+ /** |
+ * Whether files or folders in this Team Drive can be renamed by the current |
+ * user. |
+ */ |
+ core.bool canRename; |
+ /** Whether this Team Drive can be renamed by the current user. */ |
+ core.bool canRenameTeamDrive; |
+ /** |
+ * Whether the current user can share files or folders in this Team Drive. |
+ */ |
+ core.bool canShare; |
+ |
+ TeamDriveCapabilities(); |
+ |
+ TeamDriveCapabilities.fromJson(core.Map _json) { |
+ if (_json.containsKey("canAddChildren")) { |
+ canAddChildren = _json["canAddChildren"]; |
+ } |
+ if (_json.containsKey("canComment")) { |
+ canComment = _json["canComment"]; |
+ } |
+ if (_json.containsKey("canCopy")) { |
+ canCopy = _json["canCopy"]; |
+ } |
+ if (_json.containsKey("canDeleteTeamDrive")) { |
+ canDeleteTeamDrive = _json["canDeleteTeamDrive"]; |
+ } |
+ if (_json.containsKey("canDownload")) { |
+ canDownload = _json["canDownload"]; |
+ } |
+ if (_json.containsKey("canEdit")) { |
+ canEdit = _json["canEdit"]; |
+ } |
+ if (_json.containsKey("canListChildren")) { |
+ canListChildren = _json["canListChildren"]; |
+ } |
+ if (_json.containsKey("canManageMembers")) { |
+ canManageMembers = _json["canManageMembers"]; |
+ } |
+ if (_json.containsKey("canReadRevisions")) { |
+ canReadRevisions = _json["canReadRevisions"]; |
+ } |
+ if (_json.containsKey("canRemoveChildren")) { |
+ canRemoveChildren = _json["canRemoveChildren"]; |
+ } |
+ if (_json.containsKey("canRename")) { |
+ canRename = _json["canRename"]; |
+ } |
+ if (_json.containsKey("canRenameTeamDrive")) { |
+ canRenameTeamDrive = _json["canRenameTeamDrive"]; |
+ } |
+ if (_json.containsKey("canShare")) { |
+ canShare = _json["canShare"]; |
+ } |
+ } |
+ |
+ core.Map toJson() { |
+ var _json = new core.Map(); |
+ if (canAddChildren != null) { |
+ _json["canAddChildren"] = canAddChildren; |
+ } |
+ if (canComment != null) { |
+ _json["canComment"] = canComment; |
+ } |
+ if (canCopy != null) { |
+ _json["canCopy"] = canCopy; |
+ } |
+ if (canDeleteTeamDrive != null) { |
+ _json["canDeleteTeamDrive"] = canDeleteTeamDrive; |
+ } |
+ if (canDownload != null) { |
+ _json["canDownload"] = canDownload; |
+ } |
+ if (canEdit != null) { |
+ _json["canEdit"] = canEdit; |
+ } |
+ if (canListChildren != null) { |
+ _json["canListChildren"] = canListChildren; |
+ } |
+ if (canManageMembers != null) { |
+ _json["canManageMembers"] = canManageMembers; |
+ } |
+ if (canReadRevisions != null) { |
+ _json["canReadRevisions"] = canReadRevisions; |
+ } |
+ if (canRemoveChildren != null) { |
+ _json["canRemoveChildren"] = canRemoveChildren; |
+ } |
+ if (canRename != null) { |
+ _json["canRename"] = canRename; |
+ } |
+ if (canRenameTeamDrive != null) { |
+ _json["canRenameTeamDrive"] = canRenameTeamDrive; |
+ } |
+ if (canShare != null) { |
+ _json["canShare"] = canShare; |
+ } |
+ return _json; |
+ } |
+} |
+ |
+/** Representation of a Team Drive. */ |
+class TeamDrive { |
+ /** Capabilities the current user has on this Team Drive. */ |
+ TeamDriveCapabilities capabilities; |
+ /** |
+ * The ID of this Team Drive which is also the ID of the top level folder for |
+ * this Team Drive. |
+ */ |
+ core.String id; |
+ /** This is always drive#teamDrive */ |
+ core.String kind; |
+ /** The name of this Team Drive. */ |
+ core.String name; |
+ |
+ TeamDrive(); |
+ |
+ TeamDrive.fromJson(core.Map _json) { |
+ if (_json.containsKey("capabilities")) { |
+ capabilities = new TeamDriveCapabilities.fromJson(_json["capabilities"]); |
+ } |
+ if (_json.containsKey("id")) { |
+ id = _json["id"]; |
+ } |
+ if (_json.containsKey("kind")) { |
+ kind = _json["kind"]; |
+ } |
+ if (_json.containsKey("name")) { |
+ name = _json["name"]; |
+ } |
+ } |
+ |
+ core.Map toJson() { |
+ var _json = new core.Map(); |
+ if (capabilities != null) { |
+ _json["capabilities"] = (capabilities).toJson(); |
+ } |
+ if (id != null) { |
+ _json["id"] = id; |
+ } |
+ if (kind != null) { |
+ _json["kind"] = kind; |
+ } |
+ if (name != null) { |
+ _json["name"] = name; |
+ } |
+ return _json; |
+ } |
+} |
+ |
+/** A list of Team Drives. */ |
+class TeamDriveList { |
+ /** The list of Team Drives. */ |
+ core.List<TeamDrive> items; |
+ /** This is always drive#teamDriveList */ |
+ core.String kind; |
+ /** The page token for the next page of Team Drives. */ |
+ core.String nextPageToken; |
+ |
+ TeamDriveList(); |
+ |
+ TeamDriveList.fromJson(core.Map _json) { |
+ if (_json.containsKey("items")) { |
+ items = _json["items"].map((value) => new TeamDrive.fromJson(value)).toList(); |
+ } |
+ if (_json.containsKey("kind")) { |
+ kind = _json["kind"]; |
+ } |
+ if (_json.containsKey("nextPageToken")) { |
+ nextPageToken = _json["nextPageToken"]; |
+ } |
+ } |
+ |
+ core.Map toJson() { |
+ var _json = new core.Map(); |
+ if (items != null) { |
+ _json["items"] = items.map((value) => (value).toJson()).toList(); |
+ } |
+ if (kind != null) { |
+ _json["kind"] = kind; |
+ } |
+ if (nextPageToken != null) { |
+ _json["nextPageToken"] = nextPageToken; |
+ } |
+ return _json; |
+ } |
+} |
+ |
/** The user's profile picture. */ |
class UserPicture { |
/** A URL that points to a profile picture of this user. */ |