OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.drive.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 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 "DELETE", | 1143 "DELETE", |
1144 body: _body, | 1144 body: _body, |
1145 queryParams: _queryParams, | 1145 queryParams: _queryParams, |
1146 uploadOptions: _uploadOptions, | 1146 uploadOptions: _uploadOptions, |
1147 uploadMedia: _uploadMedia, | 1147 uploadMedia: _uploadMedia, |
1148 downloadOptions: _downloadOptions); | 1148 downloadOptions: _downloadOptions); |
1149 return _response.then((data) => null); | 1149 return _response.then((data) => null); |
1150 } | 1150 } |
1151 | 1151 |
1152 /** | 1152 /** |
| 1153 * Generates a set of file IDs which can be provided in insert requests. |
| 1154 * |
| 1155 * Request parameters: |
| 1156 * |
| 1157 * [maxResults] - Maximum number of IDs to return. |
| 1158 * Value must be between "1" and "1000". |
| 1159 * |
| 1160 * [space] - The space in which the IDs can be used to create new files. |
| 1161 * Supported values are 'drive' and 'appDataFolder'. |
| 1162 * |
| 1163 * Completes with a [GeneratedIds]. |
| 1164 * |
| 1165 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1166 * error. |
| 1167 * |
| 1168 * If the used [http.Client] completes with an error when making a REST call, |
| 1169 * this method will complete with the same error. |
| 1170 */ |
| 1171 async.Future<GeneratedIds> generateIds({core.int maxResults, core.String space
}) { |
| 1172 var _url = null; |
| 1173 var _queryParams = new core.Map(); |
| 1174 var _uploadMedia = null; |
| 1175 var _uploadOptions = null; |
| 1176 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1177 var _body = null; |
| 1178 |
| 1179 if (maxResults != null) { |
| 1180 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1181 } |
| 1182 if (space != null) { |
| 1183 _queryParams["space"] = [space]; |
| 1184 } |
| 1185 |
| 1186 _url = 'files/generateIds'; |
| 1187 |
| 1188 var _response = _requester.request(_url, |
| 1189 "GET", |
| 1190 body: _body, |
| 1191 queryParams: _queryParams, |
| 1192 uploadOptions: _uploadOptions, |
| 1193 uploadMedia: _uploadMedia, |
| 1194 downloadOptions: _downloadOptions); |
| 1195 return _response.then((data) => new GeneratedIds.fromJson(data)); |
| 1196 } |
| 1197 |
| 1198 /** |
1153 * Gets a file's metadata by ID. | 1199 * Gets a file's metadata by ID. |
1154 * | 1200 * |
1155 * Request parameters: | 1201 * Request parameters: |
1156 * | 1202 * |
1157 * [fileId] - The ID for the file in question. | 1203 * [fileId] - The ID for the file in question. |
1158 * | 1204 * |
1159 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of | 1205 * [acknowledgeAbuse] - Whether the user is acknowledging the risk of |
1160 * downloading known malware or other abusive files. | 1206 * downloading known malware or other abusive files. |
1161 * | 1207 * |
1162 * [projection] - This parameter is deprecated and has no function. | 1208 * [projection] - This parameter is deprecated and has no function. |
(...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3612 | 3658 |
3613 /** An item with user information and settings. */ | 3659 /** An item with user information and settings. */ |
3614 class About { | 3660 class About { |
3615 /** | 3661 /** |
3616 * Information about supported additional roles per file type. The most | 3662 * Information about supported additional roles per file type. The most |
3617 * specific type takes precedence. | 3663 * specific type takes precedence. |
3618 */ | 3664 */ |
3619 core.List<AboutAdditionalRoleInfo> additionalRoleInfo; | 3665 core.List<AboutAdditionalRoleInfo> additionalRoleInfo; |
3620 /** | 3666 /** |
3621 * The domain sharing policy for the current user. Possible values are: | 3667 * The domain sharing policy for the current user. Possible values are: |
3622 * - ALLOWED | 3668 * - allowed |
3623 * - ALLOWED_WITH_WARNING | 3669 * - allowedWithWarning |
3624 * - INCOMING_ONLY | 3670 * - incomingOnly |
3625 * - DISALLOWED | 3671 * - disallowed |
3626 */ | 3672 */ |
3627 core.String domainSharingPolicy; | 3673 core.String domainSharingPolicy; |
3628 /** The ETag of the item. */ | 3674 /** The ETag of the item. */ |
3629 core.String etag; | 3675 core.String etag; |
3630 /** The allowable export formats. */ | 3676 /** The allowable export formats. */ |
3631 core.List<AboutExportFormats> exportFormats; | 3677 core.List<AboutExportFormats> exportFormats; |
3632 /** List of additional features enabled on this account. */ | 3678 /** List of additional features enabled on this account. */ |
3633 core.List<AboutFeatures> features; | 3679 core.List<AboutFeatures> features; |
3634 /** The palette of allowable folder colors as RGB hex strings. */ | 3680 /** The palette of allowable folder colors as RGB hex strings. */ |
3635 core.List<core.String> folderColorPalette; | 3681 core.List<core.String> folderColorPalette; |
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5337 /** ETag of the file. */ | 5383 /** ETag of the file. */ |
5338 core.String etag; | 5384 core.String etag; |
5339 /** | 5385 /** |
5340 * Whether this file has been explicitly trashed, as opposed to recursively | 5386 * Whether this file has been explicitly trashed, as opposed to recursively |
5341 * trashed. | 5387 * trashed. |
5342 */ | 5388 */ |
5343 core.bool explicitlyTrashed; | 5389 core.bool explicitlyTrashed; |
5344 /** Links for exporting Google Docs to specific formats. */ | 5390 /** Links for exporting Google Docs to specific formats. */ |
5345 core.Map<core.String, core.String> exportLinks; | 5391 core.Map<core.String, core.String> exportLinks; |
5346 /** | 5392 /** |
5347 * The file extension used when downloading this file. This field is read | 5393 * The final component of fullFileExtension with trailing text that does not |
5348 * only. To set the extension, include it in the title when creating the file. | 5394 * appear to be part of the extension removed. This field is only populated |
5349 * This is only populated for files with content stored in Drive. | 5395 * for files with content stored in Drive; it is not populated for Google Docs |
| 5396 * or shortcut files. |
5350 */ | 5397 */ |
5351 core.String fileExtension; | 5398 core.String fileExtension; |
5352 /** | 5399 /** |
5353 * The size of the file in bytes. This is only populated for files with | 5400 * The size of the file in bytes. This field is only populated for files with |
5354 * content stored in Drive. | 5401 * content stored in Drive; it is not populated for Google Docs or shortcut |
| 5402 * files. |
5355 */ | 5403 */ |
5356 core.String fileSize; | 5404 core.String fileSize; |
5357 /** | 5405 /** |
5358 * Folder color as an RGB hex string if the file is a folder. The list of | 5406 * Folder color as an RGB hex string if the file is a folder. The list of |
5359 * supported colors is available in the folderColorPalette field of the About | 5407 * supported colors is available in the folderColorPalette field of the About |
5360 * resource. If an unsupported color is specified, it will be changed to the | 5408 * resource. If an unsupported color is specified, it will be changed to the |
5361 * closest color in the palette. | 5409 * closest color in the palette. |
5362 */ | 5410 */ |
5363 core.String folderColorRgb; | 5411 core.String folderColorRgb; |
5364 /** | 5412 /** |
5365 * The ID of the file's head revision. This will only be populated for files | 5413 * The full file extension; extracted from the title. May contain multiple |
5366 * with content stored in Drive. | 5414 * concatenated extensions, such as "tar.gz". Removing an extension from the |
| 5415 * title does not clear this field; however, changing the extension on the |
| 5416 * title does update this field. This field is only populated for files with |
| 5417 * content stored in Drive; it is not populated for Google Docs or shortcut |
| 5418 * files. |
| 5419 */ |
| 5420 core.String fullFileExtension; |
| 5421 /** |
| 5422 * The ID of the file's head revision. This field is only populated for files |
| 5423 * with content stored in Drive; it is not populated for Google Docs or |
| 5424 * shortcut files. |
5367 */ | 5425 */ |
5368 core.String headRevisionId; | 5426 core.String headRevisionId; |
5369 /** A link to the file's icon. */ | 5427 /** A link to the file's icon. */ |
5370 core.String iconLink; | 5428 core.String iconLink; |
5371 /** The ID of the file. */ | 5429 /** The ID of the file. */ |
5372 core.String id; | 5430 core.String id; |
5373 /** | 5431 /** |
5374 * Metadata about image media. This will only be present for image types, and | 5432 * Metadata about image media. This will only be present for image types, and |
5375 * its contents will depend on what can be parsed from the image content. | 5433 * its contents will depend on what can be parsed from the image content. |
5376 */ | 5434 */ |
(...skipping 11 matching lines...) Expand all Loading... |
5388 /** | 5446 /** |
5389 * Last time this file was viewed by the user (formatted RFC 3339 timestamp). | 5447 * Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
5390 */ | 5448 */ |
5391 core.DateTime lastViewedByMeDate; | 5449 core.DateTime lastViewedByMeDate; |
5392 /** | 5450 /** |
5393 * Time this file was explicitly marked viewed by the user (formatted RFC 3339 | 5451 * Time this file was explicitly marked viewed by the user (formatted RFC 3339 |
5394 * timestamp). | 5452 * timestamp). |
5395 */ | 5453 */ |
5396 core.DateTime markedViewedByMeDate; | 5454 core.DateTime markedViewedByMeDate; |
5397 /** | 5455 /** |
5398 * An MD5 checksum for the content of this file. This is populated only for | 5456 * An MD5 checksum for the content of this file. This field is only populated |
5399 * files with content stored in Drive. | 5457 * for files with content stored in Drive; it is not populated for Google Docs |
| 5458 * or shortcut files. |
5400 */ | 5459 */ |
5401 core.String md5Checksum; | 5460 core.String md5Checksum; |
5402 /** | 5461 /** |
5403 * The MIME type of the file. This is only mutable on update when uploading | 5462 * The MIME type of the file. This is only mutable on update when uploading |
5404 * new content. This field can be left blank, and the mimetype will be | 5463 * new content. This field can be left blank, and the mimetype will be |
5405 * determined from the uploaded content's MIME type. | 5464 * determined from the uploaded content's MIME type. |
5406 */ | 5465 */ |
5407 core.String mimeType; | 5466 core.String mimeType; |
5408 /** | 5467 /** |
5409 * Last time this file was modified by the user (formatted RFC 3339 | 5468 * Last time this file was modified by the user (formatted RFC 3339 |
5410 * timestamp). Note that setting modifiedDate will also update the | 5469 * timestamp). Note that setting modifiedDate will also update the |
5411 * modifiedByMe date for the user which set the date. | 5470 * modifiedByMe date for the user which set the date. |
5412 */ | 5471 */ |
5413 core.DateTime modifiedByMeDate; | 5472 core.DateTime modifiedByMeDate; |
5414 /** | 5473 /** |
5415 * Last time this file was modified by anyone (formatted RFC 3339 timestamp). | 5474 * Last time this file was modified by anyone (formatted RFC 3339 timestamp). |
5416 * This is only mutable on update when the setModifiedDate parameter is set. | 5475 * This is only mutable on update when the setModifiedDate parameter is set. |
5417 */ | 5476 */ |
5418 core.DateTime modifiedDate; | 5477 core.DateTime modifiedDate; |
5419 /** | 5478 /** |
5420 * A map of the id of each of the user's apps to a link to open this file with | 5479 * A map of the id of each of the user's apps to a link to open this file with |
5421 * that app. Only populated when the drive.apps.readonly scope is used. | 5480 * that app. Only populated when the drive.apps.readonly scope is used. |
5422 */ | 5481 */ |
5423 core.Map<core.String, core.String> openWithLinks; | 5482 core.Map<core.String, core.String> openWithLinks; |
5424 /** | 5483 /** |
5425 * The original filename if the file was uploaded manually, or the original | 5484 * The original filename if the file was uploaded manually, or the original |
5426 * title if the file was inserted through the API. Note that renames of the | 5485 * title if the file was inserted through the API. Note that renames of the |
5427 * title will not change the original filename. This will only be populated on | 5486 * title will not change the original filename. This field is only populated |
5428 * files with content stored in Drive. | 5487 * for files with content stored in Drive; it is not populated for Google Docs |
| 5488 * or shortcut files. |
5429 */ | 5489 */ |
5430 core.String originalFilename; | 5490 core.String originalFilename; |
5431 /** Whether the file is owned by the current user. */ | 5491 /** Whether the file is owned by the current user. */ |
5432 core.bool ownedByMe; | 5492 core.bool ownedByMe; |
5433 /** Name(s) of the owner(s) of this file. */ | 5493 /** Name(s) of the owner(s) of this file. */ |
5434 core.List<core.String> ownerNames; | 5494 core.List<core.String> ownerNames; |
5435 /** The owner(s) of this file. */ | 5495 /** The owner(s) of this file. */ |
5436 core.List<User> owners; | 5496 core.List<User> owners; |
5437 /** | 5497 /** |
5438 * Collection of parent folders which contain this file. | 5498 * Collection of parent folders which contain this file. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5547 } | 5607 } |
5548 if (_json.containsKey("fileExtension")) { | 5608 if (_json.containsKey("fileExtension")) { |
5549 fileExtension = _json["fileExtension"]; | 5609 fileExtension = _json["fileExtension"]; |
5550 } | 5610 } |
5551 if (_json.containsKey("fileSize")) { | 5611 if (_json.containsKey("fileSize")) { |
5552 fileSize = _json["fileSize"]; | 5612 fileSize = _json["fileSize"]; |
5553 } | 5613 } |
5554 if (_json.containsKey("folderColorRgb")) { | 5614 if (_json.containsKey("folderColorRgb")) { |
5555 folderColorRgb = _json["folderColorRgb"]; | 5615 folderColorRgb = _json["folderColorRgb"]; |
5556 } | 5616 } |
| 5617 if (_json.containsKey("fullFileExtension")) { |
| 5618 fullFileExtension = _json["fullFileExtension"]; |
| 5619 } |
5557 if (_json.containsKey("headRevisionId")) { | 5620 if (_json.containsKey("headRevisionId")) { |
5558 headRevisionId = _json["headRevisionId"]; | 5621 headRevisionId = _json["headRevisionId"]; |
5559 } | 5622 } |
5560 if (_json.containsKey("iconLink")) { | 5623 if (_json.containsKey("iconLink")) { |
5561 iconLink = _json["iconLink"]; | 5624 iconLink = _json["iconLink"]; |
5562 } | 5625 } |
5563 if (_json.containsKey("id")) { | 5626 if (_json.containsKey("id")) { |
5564 id = _json["id"]; | 5627 id = _json["id"]; |
5565 } | 5628 } |
5566 if (_json.containsKey("imageMediaMetadata")) { | 5629 if (_json.containsKey("imageMediaMetadata")) { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5716 } | 5779 } |
5717 if (fileExtension != null) { | 5780 if (fileExtension != null) { |
5718 _json["fileExtension"] = fileExtension; | 5781 _json["fileExtension"] = fileExtension; |
5719 } | 5782 } |
5720 if (fileSize != null) { | 5783 if (fileSize != null) { |
5721 _json["fileSize"] = fileSize; | 5784 _json["fileSize"] = fileSize; |
5722 } | 5785 } |
5723 if (folderColorRgb != null) { | 5786 if (folderColorRgb != null) { |
5724 _json["folderColorRgb"] = folderColorRgb; | 5787 _json["folderColorRgb"] = folderColorRgb; |
5725 } | 5788 } |
| 5789 if (fullFileExtension != null) { |
| 5790 _json["fullFileExtension"] = fullFileExtension; |
| 5791 } |
5726 if (headRevisionId != null) { | 5792 if (headRevisionId != null) { |
5727 _json["headRevisionId"] = headRevisionId; | 5793 _json["headRevisionId"] = headRevisionId; |
5728 } | 5794 } |
5729 if (iconLink != null) { | 5795 if (iconLink != null) { |
5730 _json["iconLink"] = iconLink; | 5796 _json["iconLink"] = iconLink; |
5731 } | 5797 } |
5732 if (id != null) { | 5798 if (id != null) { |
5733 _json["id"] = id; | 5799 _json["id"] = id; |
5734 } | 5800 } |
5735 if (imageMediaMetadata != null) { | 5801 if (imageMediaMetadata != null) { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5899 if (nextPageToken != null) { | 5965 if (nextPageToken != null) { |
5900 _json["nextPageToken"] = nextPageToken; | 5966 _json["nextPageToken"] = nextPageToken; |
5901 } | 5967 } |
5902 if (selfLink != null) { | 5968 if (selfLink != null) { |
5903 _json["selfLink"] = selfLink; | 5969 _json["selfLink"] = selfLink; |
5904 } | 5970 } |
5905 return _json; | 5971 return _json; |
5906 } | 5972 } |
5907 } | 5973 } |
5908 | 5974 |
| 5975 /** A list of generated IDs which can be provided in insert requests */ |
| 5976 class GeneratedIds { |
| 5977 /** The IDs generated for the requesting user in the specified space. */ |
| 5978 core.List<core.String> ids; |
| 5979 /** This is always drive#generatedIds */ |
| 5980 core.String kind; |
| 5981 /** The type of file that can be created with these IDs. */ |
| 5982 core.String space; |
| 5983 |
| 5984 GeneratedIds(); |
| 5985 |
| 5986 GeneratedIds.fromJson(core.Map _json) { |
| 5987 if (_json.containsKey("ids")) { |
| 5988 ids = _json["ids"]; |
| 5989 } |
| 5990 if (_json.containsKey("kind")) { |
| 5991 kind = _json["kind"]; |
| 5992 } |
| 5993 if (_json.containsKey("space")) { |
| 5994 space = _json["space"]; |
| 5995 } |
| 5996 } |
| 5997 |
| 5998 core.Map toJson() { |
| 5999 var _json = new core.Map(); |
| 6000 if (ids != null) { |
| 6001 _json["ids"] = ids; |
| 6002 } |
| 6003 if (kind != null) { |
| 6004 _json["kind"] = kind; |
| 6005 } |
| 6006 if (space != null) { |
| 6007 _json["space"] = space; |
| 6008 } |
| 6009 return _json; |
| 6010 } |
| 6011 } |
| 6012 |
5909 /** A list of a file's parents. */ | 6013 /** A list of a file's parents. */ |
5910 class ParentList { | 6014 class ParentList { |
5911 /** The ETag of the list. */ | 6015 /** The ETag of the list. */ |
5912 core.String etag; | 6016 core.String etag; |
5913 /** The actual list of parents. */ | 6017 /** The actual list of parents. */ |
5914 core.List<ParentReference> items; | 6018 core.List<ParentReference> items; |
5915 /** This is always drive#parentList. */ | 6019 /** This is always drive#parentList. */ |
5916 core.String kind; | 6020 core.String kind; |
5917 /** A link back to this list. */ | 6021 /** A link back to this list. */ |
5918 core.String selfLink; | 6022 core.String selfLink; |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6667 } | 6771 } |
6668 if (permissionId != null) { | 6772 if (permissionId != null) { |
6669 _json["permissionId"] = permissionId; | 6773 _json["permissionId"] = permissionId; |
6670 } | 6774 } |
6671 if (picture != null) { | 6775 if (picture != null) { |
6672 _json["picture"] = (picture).toJson(); | 6776 _json["picture"] = (picture).toJson(); |
6673 } | 6777 } |
6674 return _json; | 6778 return _json; |
6675 } | 6779 } |
6676 } | 6780 } |
OLD | NEW |