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:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 3396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3407 } | 3407 } |
3408 | 3408 |
3409 /** | 3409 /** |
3410 * Lists a file's revisions. | 3410 * Lists a file's revisions. |
3411 * | 3411 * |
3412 * Request parameters: | 3412 * Request parameters: |
3413 * | 3413 * |
3414 * [fileId] - The ID of the file. | 3414 * [fileId] - The ID of the file. |
3415 * | 3415 * |
3416 * [maxResults] - Maximum number of revisions to return. | 3416 * [maxResults] - Maximum number of revisions to return. |
| 3417 * Value must be between "1" and "1000". |
3417 * | 3418 * |
3418 * [pageToken] - Page token for revisions. To get the next page of results, | 3419 * [pageToken] - Page token for revisions. To get the next page of results, |
3419 * set this parameter to the value of "nextPageToken" from the previous | 3420 * set this parameter to the value of "nextPageToken" from the previous |
3420 * response. | 3421 * response. |
3421 * | 3422 * |
3422 * Completes with a [RevisionList]. | 3423 * Completes with a [RevisionList]. |
3423 * | 3424 * |
3424 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3425 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3425 * error. | 3426 * error. |
3426 * | 3427 * |
(...skipping 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5383 _json["trashed"] = trashed; | 5384 _json["trashed"] = trashed; |
5384 } | 5385 } |
5385 if (viewed != null) { | 5386 if (viewed != null) { |
5386 _json["viewed"] = viewed; | 5387 _json["viewed"] = viewed; |
5387 } | 5388 } |
5388 return _json; | 5389 return _json; |
5389 } | 5390 } |
5390 } | 5391 } |
5391 | 5392 |
5392 /** | 5393 /** |
5393 * Thumbnail for the file. Only accepted on upload and for files that are not | 5394 * A thumbnail for the file. This will only be used if Drive cannot generate a |
5394 * already thumbnailed by Google. | 5395 * standard thumbnail. |
5395 */ | 5396 */ |
5396 class FileThumbnail { | 5397 class FileThumbnail { |
5397 /** | 5398 /** |
5398 * The URL-safe Base64 encoded bytes of the thumbnail image. It should conform | 5399 * The URL-safe Base64 encoded bytes of the thumbnail image. It should conform |
5399 * to RFC 4648 section 5. | 5400 * to RFC 4648 section 5. |
5400 */ | 5401 */ |
5401 core.String image; | 5402 core.String image; |
5402 core.List<core.int> get imageAsBytes { | 5403 core.List<core.int> get imageAsBytes { |
5403 return convert_1.BASE64.decode(image); | 5404 return convert_1.BASE64.decode(image); |
5404 } | 5405 } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5530 core.String folderColorRgb; | 5531 core.String folderColorRgb; |
5531 /** | 5532 /** |
5532 * The full file extension; extracted from the title. May contain multiple | 5533 * The full file extension; extracted from the title. May contain multiple |
5533 * concatenated extensions, such as "tar.gz". Removing an extension from the | 5534 * concatenated extensions, such as "tar.gz". Removing an extension from the |
5534 * title does not clear this field; however, changing the extension on the | 5535 * title does not clear this field; however, changing the extension on the |
5535 * title does update this field. This field is only populated for files with | 5536 * title does update this field. This field is only populated for files with |
5536 * content stored in Drive; it is not populated for Google Docs or shortcut | 5537 * content stored in Drive; it is not populated for Google Docs or shortcut |
5537 * files. | 5538 * files. |
5538 */ | 5539 */ |
5539 core.String fullFileExtension; | 5540 core.String fullFileExtension; |
| 5541 /** Whether this file has a thumbnail. */ |
| 5542 core.bool hasThumbnail; |
5540 /** | 5543 /** |
5541 * The ID of the file's head revision. This field is only populated for files | 5544 * The ID of the file's head revision. This field is only populated for files |
5542 * with content stored in Drive; it is not populated for Google Docs or | 5545 * with content stored in Drive; it is not populated for Google Docs or |
5543 * shortcut files. | 5546 * shortcut files. |
5544 */ | 5547 */ |
5545 core.String headRevisionId; | 5548 core.String headRevisionId; |
5546 /** A link to the file's icon. */ | 5549 /** A link to the file's icon. */ |
5547 core.String iconLink; | 5550 core.String iconLink; |
5548 /** The ID of the file. */ | 5551 /** The ID of the file. */ |
5549 core.String id; | 5552 core.String id; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5637 */ | 5640 */ |
5638 core.DateTime sharedWithMeDate; | 5641 core.DateTime sharedWithMeDate; |
5639 /** User that shared the item with the current user, if available. */ | 5642 /** User that shared the item with the current user, if available. */ |
5640 User sharingUser; | 5643 User sharingUser; |
5641 /** | 5644 /** |
5642 * The list of spaces which contain the file. Supported values are 'drive', | 5645 * The list of spaces which contain the file. Supported values are 'drive', |
5643 * 'appDataFolder' and 'photos'. | 5646 * 'appDataFolder' and 'photos'. |
5644 */ | 5647 */ |
5645 core.List<core.String> spaces; | 5648 core.List<core.String> spaces; |
5646 /** | 5649 /** |
5647 * Thumbnail for the file. Only accepted on upload and for files that are not | 5650 * A thumbnail for the file. This will only be used if Drive cannot generate a |
5648 * already thumbnailed by Google. | 5651 * standard thumbnail. |
5649 */ | 5652 */ |
5650 FileThumbnail thumbnail; | 5653 FileThumbnail thumbnail; |
5651 /** | 5654 /** |
5652 * A short-lived link to the file's thumbnail. Typically lasts on the order of | 5655 * A short-lived link to the file's thumbnail. Typically lasts on the order of |
5653 * hours. | 5656 * hours. Only populated when the requesting app can access the file's |
| 5657 * content. |
5654 */ | 5658 */ |
5655 core.String thumbnailLink; | 5659 core.String thumbnailLink; |
| 5660 /** |
| 5661 * The thumbnail version for use in client-contructable thumbnail URLs or |
| 5662 * thumbnail cache invalidation. |
| 5663 */ |
| 5664 core.String thumbnailVersion; |
5656 /** The title of this file. */ | 5665 /** The title of this file. */ |
5657 core.String title; | 5666 core.String title; |
5658 /** The permissions for the authenticated user on this file. */ | 5667 /** The permissions for the authenticated user on this file. */ |
5659 Permission userPermission; | 5668 Permission userPermission; |
5660 /** | 5669 /** |
5661 * A monotonically increasing version number for the file. This reflects every | 5670 * A monotonically increasing version number for the file. This reflects every |
5662 * change made to the file on the server, even those not visible to the | 5671 * change made to the file on the server, even those not visible to the |
5663 * requesting user. | 5672 * requesting user. |
5664 */ | 5673 */ |
5665 core.String version; | 5674 core.String version; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5729 } | 5738 } |
5730 if (_json.containsKey("fileSize")) { | 5739 if (_json.containsKey("fileSize")) { |
5731 fileSize = _json["fileSize"]; | 5740 fileSize = _json["fileSize"]; |
5732 } | 5741 } |
5733 if (_json.containsKey("folderColorRgb")) { | 5742 if (_json.containsKey("folderColorRgb")) { |
5734 folderColorRgb = _json["folderColorRgb"]; | 5743 folderColorRgb = _json["folderColorRgb"]; |
5735 } | 5744 } |
5736 if (_json.containsKey("fullFileExtension")) { | 5745 if (_json.containsKey("fullFileExtension")) { |
5737 fullFileExtension = _json["fullFileExtension"]; | 5746 fullFileExtension = _json["fullFileExtension"]; |
5738 } | 5747 } |
| 5748 if (_json.containsKey("hasThumbnail")) { |
| 5749 hasThumbnail = _json["hasThumbnail"]; |
| 5750 } |
5739 if (_json.containsKey("headRevisionId")) { | 5751 if (_json.containsKey("headRevisionId")) { |
5740 headRevisionId = _json["headRevisionId"]; | 5752 headRevisionId = _json["headRevisionId"]; |
5741 } | 5753 } |
5742 if (_json.containsKey("iconLink")) { | 5754 if (_json.containsKey("iconLink")) { |
5743 iconLink = _json["iconLink"]; | 5755 iconLink = _json["iconLink"]; |
5744 } | 5756 } |
5745 if (_json.containsKey("id")) { | 5757 if (_json.containsKey("id")) { |
5746 id = _json["id"]; | 5758 id = _json["id"]; |
5747 } | 5759 } |
5748 if (_json.containsKey("imageMediaMetadata")) { | 5760 if (_json.containsKey("imageMediaMetadata")) { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5828 } | 5840 } |
5829 if (_json.containsKey("spaces")) { | 5841 if (_json.containsKey("spaces")) { |
5830 spaces = _json["spaces"]; | 5842 spaces = _json["spaces"]; |
5831 } | 5843 } |
5832 if (_json.containsKey("thumbnail")) { | 5844 if (_json.containsKey("thumbnail")) { |
5833 thumbnail = new FileThumbnail.fromJson(_json["thumbnail"]); | 5845 thumbnail = new FileThumbnail.fromJson(_json["thumbnail"]); |
5834 } | 5846 } |
5835 if (_json.containsKey("thumbnailLink")) { | 5847 if (_json.containsKey("thumbnailLink")) { |
5836 thumbnailLink = _json["thumbnailLink"]; | 5848 thumbnailLink = _json["thumbnailLink"]; |
5837 } | 5849 } |
| 5850 if (_json.containsKey("thumbnailVersion")) { |
| 5851 thumbnailVersion = _json["thumbnailVersion"]; |
| 5852 } |
5838 if (_json.containsKey("title")) { | 5853 if (_json.containsKey("title")) { |
5839 title = _json["title"]; | 5854 title = _json["title"]; |
5840 } | 5855 } |
5841 if (_json.containsKey("userPermission")) { | 5856 if (_json.containsKey("userPermission")) { |
5842 userPermission = new Permission.fromJson(_json["userPermission"]); | 5857 userPermission = new Permission.fromJson(_json["userPermission"]); |
5843 } | 5858 } |
5844 if (_json.containsKey("version")) { | 5859 if (_json.containsKey("version")) { |
5845 version = _json["version"]; | 5860 version = _json["version"]; |
5846 } | 5861 } |
5847 if (_json.containsKey("videoMediaMetadata")) { | 5862 if (_json.containsKey("videoMediaMetadata")) { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5907 } | 5922 } |
5908 if (fileSize != null) { | 5923 if (fileSize != null) { |
5909 _json["fileSize"] = fileSize; | 5924 _json["fileSize"] = fileSize; |
5910 } | 5925 } |
5911 if (folderColorRgb != null) { | 5926 if (folderColorRgb != null) { |
5912 _json["folderColorRgb"] = folderColorRgb; | 5927 _json["folderColorRgb"] = folderColorRgb; |
5913 } | 5928 } |
5914 if (fullFileExtension != null) { | 5929 if (fullFileExtension != null) { |
5915 _json["fullFileExtension"] = fullFileExtension; | 5930 _json["fullFileExtension"] = fullFileExtension; |
5916 } | 5931 } |
| 5932 if (hasThumbnail != null) { |
| 5933 _json["hasThumbnail"] = hasThumbnail; |
| 5934 } |
5917 if (headRevisionId != null) { | 5935 if (headRevisionId != null) { |
5918 _json["headRevisionId"] = headRevisionId; | 5936 _json["headRevisionId"] = headRevisionId; |
5919 } | 5937 } |
5920 if (iconLink != null) { | 5938 if (iconLink != null) { |
5921 _json["iconLink"] = iconLink; | 5939 _json["iconLink"] = iconLink; |
5922 } | 5940 } |
5923 if (id != null) { | 5941 if (id != null) { |
5924 _json["id"] = id; | 5942 _json["id"] = id; |
5925 } | 5943 } |
5926 if (imageMediaMetadata != null) { | 5944 if (imageMediaMetadata != null) { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6006 } | 6024 } |
6007 if (spaces != null) { | 6025 if (spaces != null) { |
6008 _json["spaces"] = spaces; | 6026 _json["spaces"] = spaces; |
6009 } | 6027 } |
6010 if (thumbnail != null) { | 6028 if (thumbnail != null) { |
6011 _json["thumbnail"] = (thumbnail).toJson(); | 6029 _json["thumbnail"] = (thumbnail).toJson(); |
6012 } | 6030 } |
6013 if (thumbnailLink != null) { | 6031 if (thumbnailLink != null) { |
6014 _json["thumbnailLink"] = thumbnailLink; | 6032 _json["thumbnailLink"] = thumbnailLink; |
6015 } | 6033 } |
| 6034 if (thumbnailVersion != null) { |
| 6035 _json["thumbnailVersion"] = thumbnailVersion; |
| 6036 } |
6016 if (title != null) { | 6037 if (title != null) { |
6017 _json["title"] = title; | 6038 _json["title"] = title; |
6018 } | 6039 } |
6019 if (userPermission != null) { | 6040 if (userPermission != null) { |
6020 _json["userPermission"] = (userPermission).toJson(); | 6041 _json["userPermission"] = (userPermission).toJson(); |
6021 } | 6042 } |
6022 if (version != null) { | 6043 if (version != null) { |
6023 _json["version"] = version; | 6044 _json["version"] = version; |
6024 } | 6045 } |
6025 if (videoMediaMetadata != null) { | 6046 if (videoMediaMetadata != null) { |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6257 */ | 6278 */ |
6258 core.String emailAddress; | 6279 core.String emailAddress; |
6259 /** The ETag of the permission. */ | 6280 /** The ETag of the permission. */ |
6260 core.String etag; | 6281 core.String etag; |
6261 /** The time at which this permission will expire (RFC 3339 date-time). */ | 6282 /** The time at which this permission will expire (RFC 3339 date-time). */ |
6262 core.DateTime expirationDate; | 6283 core.DateTime expirationDate; |
6263 /** | 6284 /** |
6264 * The ID of the user this permission refers to, and identical to the | 6285 * The ID of the user this permission refers to, and identical to the |
6265 * permissionId in the About and Files resources. When making a | 6286 * permissionId in the About and Files resources. When making a |
6266 * drive.permissions.insert request, exactly one of the id or value fields | 6287 * drive.permissions.insert request, exactly one of the id or value fields |
6267 * must be specified unless the permission type anyone, in which case both id | 6288 * must be specified unless the permission type is anyone, in which case both |
6268 * and value are ignored. | 6289 * id and value are ignored. |
6269 */ | 6290 */ |
6270 core.String id; | 6291 core.String id; |
6271 /** This is always drive#permission. */ | 6292 /** This is always drive#permission. */ |
6272 core.String kind; | 6293 core.String kind; |
6273 /** The name for this permission. */ | 6294 /** The name for this permission. */ |
6274 core.String name; | 6295 core.String name; |
6275 /** A link to the profile photo, if available. */ | 6296 /** A link to the profile photo, if available. */ |
6276 core.String photoLink; | 6297 core.String photoLink; |
6277 /** | 6298 /** |
6278 * The primary role for this user. Allowed values are: | 6299 * The primary role for this user. Allowed values are: |
6279 * - owner | 6300 * - owner |
6280 * - reader | 6301 * - reader |
6281 * - writer | 6302 * - writer |
6282 */ | 6303 */ |
6283 core.String role; | 6304 core.String role; |
6284 /** A link back to this permission. */ | 6305 /** A link back to this permission. */ |
6285 core.String selfLink; | 6306 core.String selfLink; |
6286 /** | 6307 /** |
6287 * The account type. Allowed values are: | 6308 * The account type. Allowed values are: |
6288 * - user | 6309 * - user |
6289 * - group | 6310 * - group |
6290 * - domain | 6311 * - domain |
6291 * - anyone | 6312 * - anyone |
6292 */ | 6313 */ |
6293 core.String type; | 6314 core.String type; |
6294 /** | 6315 /** |
6295 * The email address or domain name for the entity. This is used during | 6316 * The email address or domain name for the entity. This is used during |
6296 * inserts and is not populated in responses. When making a | 6317 * inserts and is not populated in responses. When making a |
6297 * drive.permissions.insert request, exactly one of the id or value fields | 6318 * drive.permissions.insert request, exactly one of the id or value fields |
6298 * must be specified unless the permission type anyone, in which case both id | 6319 * must be specified unless the permission type is anyone, in which case both |
6299 * and value are ignored. | 6320 * id and value are ignored. |
6300 */ | 6321 */ |
6301 core.String value; | 6322 core.String value; |
6302 /** Whether the link is required for this permission. */ | 6323 /** Whether the link is required for this permission. */ |
6303 core.bool withLink; | 6324 core.bool withLink; |
6304 | 6325 |
6305 Permission(); | 6326 Permission(); |
6306 | 6327 |
6307 Permission.fromJson(core.Map _json) { | 6328 Permission.fromJson(core.Map _json) { |
6308 if (_json.containsKey("additionalRoles")) { | 6329 if (_json.containsKey("additionalRoles")) { |
6309 additionalRoles = _json["additionalRoles"]; | 6330 additionalRoles = _json["additionalRoles"]; |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6922 } | 6943 } |
6923 if (permissionId != null) { | 6944 if (permissionId != null) { |
6924 _json["permissionId"] = permissionId; | 6945 _json["permissionId"] = permissionId; |
6925 } | 6946 } |
6926 if (picture != null) { | 6947 if (picture != null) { |
6927 _json["picture"] = (picture).toJson(); | 6948 _json["picture"] = (picture).toJson(); |
6928 } | 6949 } |
6929 return _json; | 6950 return _json; |
6930 } | 6951 } |
6931 } | 6952 } |
OLD | NEW |