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.v3; | 3 library googleapis.drive.v3; |
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; | 7 import 'dart:convert' as convert; |
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 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 * | 1107 * |
1108 * [orderBy] - A comma-separated list of sort keys. Valid keys are | 1108 * [orderBy] - A comma-separated list of sort keys. Valid keys are |
1109 * 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', | 1109 * 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', |
1110 * 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and | 1110 * 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and |
1111 * 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed | 1111 * 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed |
1112 * with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime | 1112 * with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime |
1113 * desc,name. Please note that there is a current limitation for users with | 1113 * desc,name. Please note that there is a current limitation for users with |
1114 * approximately one million files in which the requested sort order is | 1114 * approximately one million files in which the requested sort order is |
1115 * ignored. | 1115 * ignored. |
1116 * | 1116 * |
1117 * [pageSize] - The maximum number of files to return per page. | 1117 * [pageSize] - The maximum number of files to return per page. Partial or |
| 1118 * empty result pages are possible even before the end of the files list has |
| 1119 * been reached. |
1118 * Value must be between "1" and "1000". | 1120 * Value must be between "1" and "1000". |
1119 * | 1121 * |
1120 * [pageToken] - The token for continuing a previous list request on the next | 1122 * [pageToken] - The token for continuing a previous list request on the next |
1121 * page. This should be set to the value of 'nextPageToken' from the previous | 1123 * page. This should be set to the value of 'nextPageToken' from the previous |
1122 * response. | 1124 * response. |
1123 * | 1125 * |
1124 * [q] - A query for filtering the file results. See the "Search for Files" | 1126 * [q] - A query for filtering the file results. See the "Search for Files" |
1125 * guide for supported syntax. | 1127 * guide for supported syntax. |
1126 * | 1128 * |
1127 * [spaces] - A comma-separated list of spaces to query within the corpus. | 1129 * [spaces] - A comma-separated list of spaces to query within the corpus. |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 if (usageInDrive != null) { | 2440 if (usageInDrive != null) { |
2439 _json["usageInDrive"] = usageInDrive; | 2441 _json["usageInDrive"] = usageInDrive; |
2440 } | 2442 } |
2441 if (usageInDriveTrash != null) { | 2443 if (usageInDriveTrash != null) { |
2442 _json["usageInDriveTrash"] = usageInDriveTrash; | 2444 _json["usageInDriveTrash"] = usageInDriveTrash; |
2443 } | 2445 } |
2444 return _json; | 2446 return _json; |
2445 } | 2447 } |
2446 } | 2448 } |
2447 | 2449 |
| 2450 class AboutTeamDriveThemes { |
| 2451 /** A link to this Team Drive theme's background image. */ |
| 2452 core.String backgroundImageLink; |
| 2453 /** The color of this Team Drive theme as an RGB hex string. */ |
| 2454 core.String colorRgb; |
| 2455 /** The ID of the theme. */ |
| 2456 core.String id; |
| 2457 |
| 2458 AboutTeamDriveThemes(); |
| 2459 |
| 2460 AboutTeamDriveThemes.fromJson(core.Map _json) { |
| 2461 if (_json.containsKey("backgroundImageLink")) { |
| 2462 backgroundImageLink = _json["backgroundImageLink"]; |
| 2463 } |
| 2464 if (_json.containsKey("colorRgb")) { |
| 2465 colorRgb = _json["colorRgb"]; |
| 2466 } |
| 2467 if (_json.containsKey("id")) { |
| 2468 id = _json["id"]; |
| 2469 } |
| 2470 } |
| 2471 |
| 2472 core.Map toJson() { |
| 2473 var _json = new core.Map(); |
| 2474 if (backgroundImageLink != null) { |
| 2475 _json["backgroundImageLink"] = backgroundImageLink; |
| 2476 } |
| 2477 if (colorRgb != null) { |
| 2478 _json["colorRgb"] = colorRgb; |
| 2479 } |
| 2480 if (id != null) { |
| 2481 _json["id"] = id; |
| 2482 } |
| 2483 return _json; |
| 2484 } |
| 2485 } |
| 2486 |
2448 /** Information about the user, the user's Drive, and system capabilities. */ | 2487 /** Information about the user, the user's Drive, and system capabilities. */ |
2449 class About { | 2488 class About { |
2450 /** Whether the user has installed the requesting app. */ | 2489 /** Whether the user has installed the requesting app. */ |
2451 core.bool appInstalled; | 2490 core.bool appInstalled; |
2452 /** | 2491 /** |
2453 * A map of source MIME type to possible targets for all supported exports. | 2492 * A map of source MIME type to possible targets for all supported exports. |
2454 */ | 2493 */ |
2455 core.Map<core.String, core.List<core.String>> exportFormats; | 2494 core.Map<core.String, core.List<core.String>> exportFormats; |
2456 /** The currently supported folder colors as RGB hex strings. */ | 2495 /** The currently supported folder colors as RGB hex strings. */ |
2457 core.List<core.String> folderColorPalette; | 2496 core.List<core.String> folderColorPalette; |
2458 /** | 2497 /** |
2459 * A map of source MIME type to possible targets for all supported imports. | 2498 * A map of source MIME type to possible targets for all supported imports. |
2460 */ | 2499 */ |
2461 core.Map<core.String, core.List<core.String>> importFormats; | 2500 core.Map<core.String, core.List<core.String>> importFormats; |
2462 /** | 2501 /** |
2463 * Identifies what kind of resource this is. Value: the fixed string | 2502 * Identifies what kind of resource this is. Value: the fixed string |
2464 * "drive#about". | 2503 * "drive#about". |
2465 */ | 2504 */ |
2466 core.String kind; | 2505 core.String kind; |
2467 /** A map of maximum import sizes by MIME type, in bytes. */ | 2506 /** A map of maximum import sizes by MIME type, in bytes. */ |
2468 core.Map<core.String, core.String> maxImportSizes; | 2507 core.Map<core.String, core.String> maxImportSizes; |
2469 /** The maximum upload size in bytes. */ | 2508 /** The maximum upload size in bytes. */ |
2470 core.String maxUploadSize; | 2509 core.String maxUploadSize; |
2471 /** | 2510 /** |
2472 * The user's storage quota limits and usage. All fields are measured in | 2511 * The user's storage quota limits and usage. All fields are measured in |
2473 * bytes. | 2512 * bytes. |
2474 */ | 2513 */ |
2475 AboutStorageQuota storageQuota; | 2514 AboutStorageQuota storageQuota; |
| 2515 /** A list of themes that are supported for Team Drives. */ |
| 2516 core.List<AboutTeamDriveThemes> teamDriveThemes; |
2476 /** The authenticated user. */ | 2517 /** The authenticated user. */ |
2477 User user; | 2518 User user; |
2478 | 2519 |
2479 About(); | 2520 About(); |
2480 | 2521 |
2481 About.fromJson(core.Map _json) { | 2522 About.fromJson(core.Map _json) { |
2482 if (_json.containsKey("appInstalled")) { | 2523 if (_json.containsKey("appInstalled")) { |
2483 appInstalled = _json["appInstalled"]; | 2524 appInstalled = _json["appInstalled"]; |
2484 } | 2525 } |
2485 if (_json.containsKey("exportFormats")) { | 2526 if (_json.containsKey("exportFormats")) { |
(...skipping 10 matching lines...) Expand all Loading... |
2496 } | 2537 } |
2497 if (_json.containsKey("maxImportSizes")) { | 2538 if (_json.containsKey("maxImportSizes")) { |
2498 maxImportSizes = _json["maxImportSizes"]; | 2539 maxImportSizes = _json["maxImportSizes"]; |
2499 } | 2540 } |
2500 if (_json.containsKey("maxUploadSize")) { | 2541 if (_json.containsKey("maxUploadSize")) { |
2501 maxUploadSize = _json["maxUploadSize"]; | 2542 maxUploadSize = _json["maxUploadSize"]; |
2502 } | 2543 } |
2503 if (_json.containsKey("storageQuota")) { | 2544 if (_json.containsKey("storageQuota")) { |
2504 storageQuota = new AboutStorageQuota.fromJson(_json["storageQuota"]); | 2545 storageQuota = new AboutStorageQuota.fromJson(_json["storageQuota"]); |
2505 } | 2546 } |
| 2547 if (_json.containsKey("teamDriveThemes")) { |
| 2548 teamDriveThemes = _json["teamDriveThemes"].map((value) => new AboutTeamDri
veThemes.fromJson(value)).toList(); |
| 2549 } |
2506 if (_json.containsKey("user")) { | 2550 if (_json.containsKey("user")) { |
2507 user = new User.fromJson(_json["user"]); | 2551 user = new User.fromJson(_json["user"]); |
2508 } | 2552 } |
2509 } | 2553 } |
2510 | 2554 |
2511 core.Map toJson() { | 2555 core.Map toJson() { |
2512 var _json = new core.Map(); | 2556 var _json = new core.Map(); |
2513 if (appInstalled != null) { | 2557 if (appInstalled != null) { |
2514 _json["appInstalled"] = appInstalled; | 2558 _json["appInstalled"] = appInstalled; |
2515 } | 2559 } |
(...skipping 11 matching lines...) Expand all Loading... |
2527 } | 2571 } |
2528 if (maxImportSizes != null) { | 2572 if (maxImportSizes != null) { |
2529 _json["maxImportSizes"] = maxImportSizes; | 2573 _json["maxImportSizes"] = maxImportSizes; |
2530 } | 2574 } |
2531 if (maxUploadSize != null) { | 2575 if (maxUploadSize != null) { |
2532 _json["maxUploadSize"] = maxUploadSize; | 2576 _json["maxUploadSize"] = maxUploadSize; |
2533 } | 2577 } |
2534 if (storageQuota != null) { | 2578 if (storageQuota != null) { |
2535 _json["storageQuota"] = (storageQuota).toJson(); | 2579 _json["storageQuota"] = (storageQuota).toJson(); |
2536 } | 2580 } |
| 2581 if (teamDriveThemes != null) { |
| 2582 _json["teamDriveThemes"] = teamDriveThemes.map((value) => (value).toJson()
).toList(); |
| 2583 } |
2537 if (user != null) { | 2584 if (user != null) { |
2538 _json["user"] = (user).toJson(); | 2585 _json["user"] = (user).toJson(); |
2539 } | 2586 } |
2540 return _json; | 2587 return _json; |
2541 } | 2588 } |
2542 } | 2589 } |
2543 | 2590 |
2544 /** A change to a file or Team Drive. */ | 2591 /** A change to a file or Team Drive. */ |
2545 class Change { | 2592 class Change { |
2546 /** | 2593 /** |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3006 _json["kind"] = kind; | 3053 _json["kind"] = kind; |
3007 } | 3054 } |
3008 if (nextPageToken != null) { | 3055 if (nextPageToken != null) { |
3009 _json["nextPageToken"] = nextPageToken; | 3056 _json["nextPageToken"] = nextPageToken; |
3010 } | 3057 } |
3011 return _json; | 3058 return _json; |
3012 } | 3059 } |
3013 } | 3060 } |
3014 | 3061 |
3015 /** | 3062 /** |
3016 * Capabilities the current user has on the file. Each capability corresponds to | 3063 * Capabilities the current user has on this file. Each capability corresponds |
3017 * a fine-grained action that a user may take. | 3064 * to a fine-grained action that a user may take. |
3018 */ | 3065 */ |
3019 class FileCapabilities { | 3066 class FileCapabilities { |
3020 /** | 3067 /** |
3021 * Whether the user can add children to this folder. This is always false when | 3068 * Whether the current user can add children to this folder. This is always |
3022 * the item is not a folder. | 3069 * false when the item is not a folder. |
3023 */ | 3070 */ |
3024 core.bool canAddChildren; | 3071 core.bool canAddChildren; |
3025 /** Whether the user can comment on the file. */ | 3072 /** Whether the current user can comment on this file. */ |
3026 core.bool canComment; | 3073 core.bool canComment; |
3027 /** | 3074 /** |
3028 * Whether the user can copy the file. For a Team Drive item, whether | 3075 * Whether the current user can copy this file. For a Team Drive item, whether |
3029 * non-folder descendants of this item, or this item itself if it is not a | 3076 * the current user can copy non-folder descendants of this item, or this item |
3030 * folder, can be copied. | 3077 * itself if it is not a folder. |
3031 */ | 3078 */ |
3032 core.bool canCopy; | 3079 core.bool canCopy; |
3033 /** Whether the file can be deleted by the user. */ | 3080 /** Whether the current user can delete this file. */ |
3034 core.bool canDelete; | 3081 core.bool canDelete; |
3035 /** Whether the file can be downloaded by the user. */ | 3082 /** Whether the current user can download this file. */ |
3036 core.bool canDownload; | 3083 core.bool canDownload; |
3037 /** Whether the user can edit the file's content. */ | 3084 /** Whether the current user can edit this file. */ |
3038 core.bool canEdit; | 3085 core.bool canEdit; |
3039 /** | 3086 /** |
3040 * Whether the user can list the children of this folder. This is always false | 3087 * Whether the current user can list the children of this folder. This is |
3041 * when the item is not a folder. | 3088 * always false when the item is not a folder. |
3042 */ | 3089 */ |
3043 core.bool canListChildren; | 3090 core.bool canListChildren; |
3044 /** | 3091 /** |
3045 * Whether the current user can move this item into a Team Drive. If the item | 3092 * Whether the current user can move this item into a Team Drive. If the item |
3046 * is in a Team Drive, this field is equivalent to canMoveTeamDriveItem. | 3093 * is in a Team Drive, this field is equivalent to canMoveTeamDriveItem. |
3047 */ | 3094 */ |
3048 core.bool canMoveItemIntoTeamDrive; | 3095 core.bool canMoveItemIntoTeamDrive; |
3049 /** | 3096 /** |
3050 * Whether the user can move this Team Drive item by changing its parent. Note | 3097 * Whether the current user can move this Team Drive item by changing its |
3051 * that a request to change the parent for this item may still fail depending | 3098 * parent. Note that a request to change the parent for this item may still |
3052 * on the new parent that is being added. Only populated for Team Drive files. | 3099 * fail depending on the new parent that is being added. Only populated for |
| 3100 * Team Drive files. |
3053 */ | 3101 */ |
3054 core.bool canMoveTeamDriveItem; | 3102 core.bool canMoveTeamDriveItem; |
3055 /** | 3103 /** |
3056 * Whether the user has read access to the Revisions resource of the file. For | 3104 * Whether the current user can read the revisions resource of this file. For |
3057 * a Team Drive item, whether revisions of non-folder descendants of this | 3105 * a Team Drive item, whether revisions of non-folder descendants of this |
3058 * item, or this item itself if it is not a folder, can be read. | 3106 * item, or this item itself if it is not a folder, can be read. |
3059 */ | 3107 */ |
3060 core.bool canReadRevisions; | 3108 core.bool canReadRevisions; |
3061 /** | 3109 /** |
3062 * Whether the user has read access to the Team Drive to which this file | 3110 * Whether the current user can read the Team Drive to which this file |
3063 * belongs. Only populated for Team Drive files. | 3111 * belongs. Only populated for Team Drive files. |
3064 */ | 3112 */ |
3065 core.bool canReadTeamDrive; | 3113 core.bool canReadTeamDrive; |
3066 /** | 3114 /** |
3067 * Whether the user can remove children from this folder. This is always false | 3115 * Whether the current user can remove children from this folder. This is |
3068 * when the item is not a folder. | 3116 * always false when the item is not a folder. |
3069 */ | 3117 */ |
3070 core.bool canRemoveChildren; | 3118 core.bool canRemoveChildren; |
3071 /** Whether the file can be renamed by the user. */ | 3119 /** Whether the current user can rename this file. */ |
3072 core.bool canRename; | 3120 core.bool canRename; |
3073 /** | 3121 /** |
3074 * Whether the user can modify the file's permissions and sharing settings. | 3122 * Whether the current user can modify the sharing settings for this file. |
3075 */ | 3123 */ |
3076 core.bool canShare; | 3124 core.bool canShare; |
3077 /** Whether the file can be trashed by the user. */ | 3125 /** Whether the current user can move this file to trash. */ |
3078 core.bool canTrash; | 3126 core.bool canTrash; |
3079 /** Whether the file can be restored from the trash by the current user. */ | 3127 /** Whether the current user can restore this file from trash. */ |
3080 core.bool canUntrash; | 3128 core.bool canUntrash; |
3081 | 3129 |
3082 FileCapabilities(); | 3130 FileCapabilities(); |
3083 | 3131 |
3084 FileCapabilities.fromJson(core.Map _json) { | 3132 FileCapabilities.fromJson(core.Map _json) { |
3085 if (_json.containsKey("canAddChildren")) { | 3133 if (_json.containsKey("canAddChildren")) { |
3086 canAddChildren = _json["canAddChildren"]; | 3134 canAddChildren = _json["canAddChildren"]; |
3087 } | 3135 } |
3088 if (_json.containsKey("canComment")) { | 3136 if (_json.containsKey("canComment")) { |
3089 canComment = _json["canComment"]; | 3137 canComment = _json["canComment"]; |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3533 | 3581 |
3534 /** The metadata for a file. */ | 3582 /** The metadata for a file. */ |
3535 class File { | 3583 class File { |
3536 /** | 3584 /** |
3537 * A collection of arbitrary key-value pairs which are private to the | 3585 * A collection of arbitrary key-value pairs which are private to the |
3538 * requesting app. | 3586 * requesting app. |
3539 * Entries with null values are cleared in update and copy requests. | 3587 * Entries with null values are cleared in update and copy requests. |
3540 */ | 3588 */ |
3541 core.Map<core.String, core.String> appProperties; | 3589 core.Map<core.String, core.String> appProperties; |
3542 /** | 3590 /** |
3543 * Capabilities the current user has on the file. Each capability corresponds | 3591 * Capabilities the current user has on this file. Each capability corresponds |
3544 * to a fine-grained action that a user may take. | 3592 * to a fine-grained action that a user may take. |
3545 */ | 3593 */ |
3546 FileCapabilities capabilities; | 3594 FileCapabilities capabilities; |
3547 /** | 3595 /** |
3548 * Additional information about the content of the file. These fields are | 3596 * Additional information about the content of the file. These fields are |
3549 * never populated in responses. | 3597 * never populated in responses. |
3550 */ | 3598 */ |
3551 FileContentHints contentHints; | 3599 FileContentHints contentHints; |
3552 /** The time at which the file was created (RFC 3339 date-time). */ | 3600 /** The time at which the file was created (RFC 3339 date-time). */ |
3553 core.DateTime createdTime; | 3601 core.DateTime createdTime; |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4242 /** | 4290 /** |
4243 * A permission for a file. A permission grants a user, group, domain or the | 4291 * A permission for a file. A permission grants a user, group, domain or the |
4244 * world access to a file or a folder hierarchy. | 4292 * world access to a file or a folder hierarchy. |
4245 */ | 4293 */ |
4246 class Permission { | 4294 class Permission { |
4247 /** | 4295 /** |
4248 * Whether the permission allows the file to be discovered through search. | 4296 * Whether the permission allows the file to be discovered through search. |
4249 * This is only applicable for permissions of type domain or anyone. | 4297 * This is only applicable for permissions of type domain or anyone. |
4250 */ | 4298 */ |
4251 core.bool allowFileDiscovery; | 4299 core.bool allowFileDiscovery; |
| 4300 /** |
| 4301 * Whether the account of the permission has been deleted. This field only |
| 4302 * pertains to user and group permissions. |
| 4303 */ |
| 4304 core.bool deleted; |
4252 /** A displayable name for users, groups or domains. */ | 4305 /** A displayable name for users, groups or domains. */ |
4253 core.String displayName; | 4306 core.String displayName; |
4254 /** The domain to which this permission refers. */ | 4307 /** The domain to which this permission refers. */ |
4255 core.String domain; | 4308 core.String domain; |
4256 /** | 4309 /** |
4257 * The email address of the user or group to which this permission refers. | 4310 * The email address of the user or group to which this permission refers. |
4258 */ | 4311 */ |
4259 core.String emailAddress; | 4312 core.String emailAddress; |
4260 /** | 4313 /** |
4261 * The time at which this permission will expire (RFC 3339 date-time). | 4314 * The time at which this permission will expire (RFC 3339 date-time). |
(...skipping 19 matching lines...) Expand all Loading... |
4281 * The role granted by this permission. While new values may be supported in | 4334 * The role granted by this permission. While new values may be supported in |
4282 * the future, the following are currently allowed: | 4335 * the future, the following are currently allowed: |
4283 * - organizer | 4336 * - organizer |
4284 * - owner | 4337 * - owner |
4285 * - writer | 4338 * - writer |
4286 * - commenter | 4339 * - commenter |
4287 * - reader | 4340 * - reader |
4288 */ | 4341 */ |
4289 core.String role; | 4342 core.String role; |
4290 /** | 4343 /** |
4291 * Details of whether the Permissions on this Team Drive item are inherited or | 4344 * Details of whether the permissions on this Team Drive item are inherited or |
4292 * directly on this item. This is an output-only field which is present only | 4345 * directly on this item. This is an output-only field which is present only |
4293 * for Team Drive items. | 4346 * for Team Drive items. |
4294 */ | 4347 */ |
4295 core.List<PermissionTeamDrivePermissionDetails> teamDrivePermissionDetails; | 4348 core.List<PermissionTeamDrivePermissionDetails> teamDrivePermissionDetails; |
4296 /** | 4349 /** |
4297 * The type of the grantee. Valid values are: | 4350 * The type of the grantee. Valid values are: |
4298 * - user | 4351 * - user |
4299 * - group | 4352 * - group |
4300 * - domain | 4353 * - domain |
4301 * - anyone | 4354 * - anyone |
4302 */ | 4355 */ |
4303 core.String type; | 4356 core.String type; |
4304 | 4357 |
4305 Permission(); | 4358 Permission(); |
4306 | 4359 |
4307 Permission.fromJson(core.Map _json) { | 4360 Permission.fromJson(core.Map _json) { |
4308 if (_json.containsKey("allowFileDiscovery")) { | 4361 if (_json.containsKey("allowFileDiscovery")) { |
4309 allowFileDiscovery = _json["allowFileDiscovery"]; | 4362 allowFileDiscovery = _json["allowFileDiscovery"]; |
4310 } | 4363 } |
| 4364 if (_json.containsKey("deleted")) { |
| 4365 deleted = _json["deleted"]; |
| 4366 } |
4311 if (_json.containsKey("displayName")) { | 4367 if (_json.containsKey("displayName")) { |
4312 displayName = _json["displayName"]; | 4368 displayName = _json["displayName"]; |
4313 } | 4369 } |
4314 if (_json.containsKey("domain")) { | 4370 if (_json.containsKey("domain")) { |
4315 domain = _json["domain"]; | 4371 domain = _json["domain"]; |
4316 } | 4372 } |
4317 if (_json.containsKey("emailAddress")) { | 4373 if (_json.containsKey("emailAddress")) { |
4318 emailAddress = _json["emailAddress"]; | 4374 emailAddress = _json["emailAddress"]; |
4319 } | 4375 } |
4320 if (_json.containsKey("expirationTime")) { | 4376 if (_json.containsKey("expirationTime")) { |
(...skipping 17 matching lines...) Expand all Loading... |
4338 if (_json.containsKey("type")) { | 4394 if (_json.containsKey("type")) { |
4339 type = _json["type"]; | 4395 type = _json["type"]; |
4340 } | 4396 } |
4341 } | 4397 } |
4342 | 4398 |
4343 core.Map toJson() { | 4399 core.Map toJson() { |
4344 var _json = new core.Map(); | 4400 var _json = new core.Map(); |
4345 if (allowFileDiscovery != null) { | 4401 if (allowFileDiscovery != null) { |
4346 _json["allowFileDiscovery"] = allowFileDiscovery; | 4402 _json["allowFileDiscovery"] = allowFileDiscovery; |
4347 } | 4403 } |
| 4404 if (deleted != null) { |
| 4405 _json["deleted"] = deleted; |
| 4406 } |
4348 if (displayName != null) { | 4407 if (displayName != null) { |
4349 _json["displayName"] = displayName; | 4408 _json["displayName"] = displayName; |
4350 } | 4409 } |
4351 if (domain != null) { | 4410 if (domain != null) { |
4352 _json["domain"] = domain; | 4411 _json["domain"] = domain; |
4353 } | 4412 } |
4354 if (emailAddress != null) { | 4413 if (emailAddress != null) { |
4355 _json["emailAddress"] = emailAddress; | 4414 _json["emailAddress"] = emailAddress; |
4356 } | 4415 } |
4357 if (expirationTime != null) { | 4416 if (expirationTime != null) { |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4784 if (kind != null) { | 4843 if (kind != null) { |
4785 _json["kind"] = kind; | 4844 _json["kind"] = kind; |
4786 } | 4845 } |
4787 if (startPageToken != null) { | 4846 if (startPageToken != null) { |
4788 _json["startPageToken"] = startPageToken; | 4847 _json["startPageToken"] = startPageToken; |
4789 } | 4848 } |
4790 return _json; | 4849 return _json; |
4791 } | 4850 } |
4792 } | 4851 } |
4793 | 4852 |
| 4853 /** |
| 4854 * An image file and cropping parameters from which a background image for this |
| 4855 * Team Drive is set. This is a write only field that can only be set on a |
| 4856 * drive.teamdrives.update request that does not set themeId. When specified, |
| 4857 * all fields of the backgroundImageFile must be set. |
| 4858 */ |
| 4859 class TeamDriveBackgroundImageFile { |
| 4860 /** The ID of an image file in Drive to use for the background image. */ |
| 4861 core.String id; |
| 4862 /** |
| 4863 * The width of the cropped image in the closed range of 0 to 1, which is the |
| 4864 * width of the cropped image divided by the width of the entire image. The |
| 4865 * height is computed by applying a width to height aspect ratio of 80 to 9. |
| 4866 * The resulting image must be at least 1280 pixels wide and 144 pixels high. |
| 4867 */ |
| 4868 core.double width; |
| 4869 /** |
| 4870 * The X coordinate of the upper left corner of the cropping area in the |
| 4871 * background image. This is a value in the closed range of 0 to 1 which is |
| 4872 * the horizontal distance from the left side of the entire image to the left |
| 4873 * side of the cropping area divided by the width of the entire image. |
| 4874 */ |
| 4875 core.double xCoordinate; |
| 4876 /** |
| 4877 * The Y coordinate of the upper left corner of the cropping area in the |
| 4878 * background image. This is a value in the closed range of 0 to 1 which is |
| 4879 * the vertical distance from the top side of the entire image to the top side |
| 4880 * of the cropping area divided by the height of the entire image. |
| 4881 */ |
| 4882 core.double yCoordinate; |
| 4883 |
| 4884 TeamDriveBackgroundImageFile(); |
| 4885 |
| 4886 TeamDriveBackgroundImageFile.fromJson(core.Map _json) { |
| 4887 if (_json.containsKey("id")) { |
| 4888 id = _json["id"]; |
| 4889 } |
| 4890 if (_json.containsKey("width")) { |
| 4891 width = _json["width"]; |
| 4892 } |
| 4893 if (_json.containsKey("xCoordinate")) { |
| 4894 xCoordinate = _json["xCoordinate"]; |
| 4895 } |
| 4896 if (_json.containsKey("yCoordinate")) { |
| 4897 yCoordinate = _json["yCoordinate"]; |
| 4898 } |
| 4899 } |
| 4900 |
| 4901 core.Map toJson() { |
| 4902 var _json = new core.Map(); |
| 4903 if (id != null) { |
| 4904 _json["id"] = id; |
| 4905 } |
| 4906 if (width != null) { |
| 4907 _json["width"] = width; |
| 4908 } |
| 4909 if (xCoordinate != null) { |
| 4910 _json["xCoordinate"] = xCoordinate; |
| 4911 } |
| 4912 if (yCoordinate != null) { |
| 4913 _json["yCoordinate"] = yCoordinate; |
| 4914 } |
| 4915 return _json; |
| 4916 } |
| 4917 } |
| 4918 |
4794 /** Capabilities the current user has on this Team Drive. */ | 4919 /** Capabilities the current user has on this Team Drive. */ |
4795 class TeamDriveCapabilities { | 4920 class TeamDriveCapabilities { |
4796 /** | 4921 /** |
4797 * Whether the current user can add children to folders in this Team Drive. | 4922 * Whether the current user can add children to folders in this Team Drive. |
4798 */ | 4923 */ |
4799 core.bool canAddChildren; | 4924 core.bool canAddChildren; |
| 4925 /** Whether the current user can change the background of this Team Drive. */ |
| 4926 core.bool canChangeTeamDriveBackground; |
4800 /** Whether the current user can comment on files in this Team Drive. */ | 4927 /** Whether the current user can comment on files in this Team Drive. */ |
4801 core.bool canComment; | 4928 core.bool canComment; |
4802 /** Whether files in this Team Drive can be copied by the current user. */ | 4929 /** Whether the current user can copy files in this Team Drive. */ |
4803 core.bool canCopy; | 4930 core.bool canCopy; |
4804 /** Whether this Team Drive can be deleted by the current user. */ | 4931 /** |
| 4932 * Whether the current user can delete this Team Drive. Attempting to delete |
| 4933 * the Team Drive may still fail if there are untrashed items inside the Team |
| 4934 * Drive. |
| 4935 */ |
4805 core.bool canDeleteTeamDrive; | 4936 core.bool canDeleteTeamDrive; |
4806 /** | 4937 /** Whether the current user can download files in this Team Drive. */ |
4807 * Whether files in this Team Drive can be downloaded by the current user. | |
4808 */ | |
4809 core.bool canDownload; | 4938 core.bool canDownload; |
4810 /** Whether files in this Team Drive can be edited by the current user. */ | 4939 /** Whether the current user can edit files in this Team Drive */ |
4811 core.bool canEdit; | 4940 core.bool canEdit; |
4812 /** | 4941 /** |
4813 * Whether the current user can list the children of folders in this Team | 4942 * Whether the current user can list the children of folders in this Team |
4814 * Drive. | 4943 * Drive. |
4815 */ | 4944 */ |
4816 core.bool canListChildren; | 4945 core.bool canListChildren; |
4817 /** | 4946 /** |
4818 * Whether the current user can add members to this Team Drive or remove them | 4947 * Whether the current user can add members to this Team Drive or remove them |
4819 * or change their role. | 4948 * or change their role. |
4820 */ | 4949 */ |
4821 core.bool canManageMembers; | 4950 core.bool canManageMembers; |
4822 /** | 4951 /** |
4823 * Whether the current user has read access to the Revisions resource of files | 4952 * Whether the current user can read the revisions resource of files in this |
4824 * in this Team Drive. | 4953 * Team Drive. |
4825 */ | 4954 */ |
4826 core.bool canReadRevisions; | 4955 core.bool canReadRevisions; |
4827 /** | 4956 /** |
4828 * Whether the current user can remove children from folders in this Team | 4957 * Whether the current user can remove children from folders in this Team |
4829 * Drive. | 4958 * Drive. |
4830 */ | 4959 */ |
4831 core.bool canRemoveChildren; | 4960 core.bool canRemoveChildren; |
4832 /** | 4961 /** |
4833 * Whether files or folders in this Team Drive can be renamed by the current | 4962 * Whether the current user can rename files or folders in this Team Drive. |
4834 * user. | |
4835 */ | 4963 */ |
4836 core.bool canRename; | 4964 core.bool canRename; |
4837 /** Whether this Team Drive can be renamed by the current user. */ | 4965 /** Whether the current user can rename this Team Drive. */ |
4838 core.bool canRenameTeamDrive; | 4966 core.bool canRenameTeamDrive; |
4839 /** | 4967 /** |
4840 * Whether the current user can share files or folders in this Team Drive. | 4968 * Whether the current user can share files or folders in this Team Drive. |
4841 */ | 4969 */ |
4842 core.bool canShare; | 4970 core.bool canShare; |
4843 | 4971 |
4844 TeamDriveCapabilities(); | 4972 TeamDriveCapabilities(); |
4845 | 4973 |
4846 TeamDriveCapabilities.fromJson(core.Map _json) { | 4974 TeamDriveCapabilities.fromJson(core.Map _json) { |
4847 if (_json.containsKey("canAddChildren")) { | 4975 if (_json.containsKey("canAddChildren")) { |
4848 canAddChildren = _json["canAddChildren"]; | 4976 canAddChildren = _json["canAddChildren"]; |
4849 } | 4977 } |
| 4978 if (_json.containsKey("canChangeTeamDriveBackground")) { |
| 4979 canChangeTeamDriveBackground = _json["canChangeTeamDriveBackground"]; |
| 4980 } |
4850 if (_json.containsKey("canComment")) { | 4981 if (_json.containsKey("canComment")) { |
4851 canComment = _json["canComment"]; | 4982 canComment = _json["canComment"]; |
4852 } | 4983 } |
4853 if (_json.containsKey("canCopy")) { | 4984 if (_json.containsKey("canCopy")) { |
4854 canCopy = _json["canCopy"]; | 4985 canCopy = _json["canCopy"]; |
4855 } | 4986 } |
4856 if (_json.containsKey("canDeleteTeamDrive")) { | 4987 if (_json.containsKey("canDeleteTeamDrive")) { |
4857 canDeleteTeamDrive = _json["canDeleteTeamDrive"]; | 4988 canDeleteTeamDrive = _json["canDeleteTeamDrive"]; |
4858 } | 4989 } |
4859 if (_json.containsKey("canDownload")) { | 4990 if (_json.containsKey("canDownload")) { |
(...skipping 23 matching lines...) Expand all Loading... |
4883 if (_json.containsKey("canShare")) { | 5014 if (_json.containsKey("canShare")) { |
4884 canShare = _json["canShare"]; | 5015 canShare = _json["canShare"]; |
4885 } | 5016 } |
4886 } | 5017 } |
4887 | 5018 |
4888 core.Map toJson() { | 5019 core.Map toJson() { |
4889 var _json = new core.Map(); | 5020 var _json = new core.Map(); |
4890 if (canAddChildren != null) { | 5021 if (canAddChildren != null) { |
4891 _json["canAddChildren"] = canAddChildren; | 5022 _json["canAddChildren"] = canAddChildren; |
4892 } | 5023 } |
| 5024 if (canChangeTeamDriveBackground != null) { |
| 5025 _json["canChangeTeamDriveBackground"] = canChangeTeamDriveBackground; |
| 5026 } |
4893 if (canComment != null) { | 5027 if (canComment != null) { |
4894 _json["canComment"] = canComment; | 5028 _json["canComment"] = canComment; |
4895 } | 5029 } |
4896 if (canCopy != null) { | 5030 if (canCopy != null) { |
4897 _json["canCopy"] = canCopy; | 5031 _json["canCopy"] = canCopy; |
4898 } | 5032 } |
4899 if (canDeleteTeamDrive != null) { | 5033 if (canDeleteTeamDrive != null) { |
4900 _json["canDeleteTeamDrive"] = canDeleteTeamDrive; | 5034 _json["canDeleteTeamDrive"] = canDeleteTeamDrive; |
4901 } | 5035 } |
4902 if (canDownload != null) { | 5036 if (canDownload != null) { |
(...skipping 22 matching lines...) Expand all Loading... |
4925 } | 5059 } |
4926 if (canShare != null) { | 5060 if (canShare != null) { |
4927 _json["canShare"] = canShare; | 5061 _json["canShare"] = canShare; |
4928 } | 5062 } |
4929 return _json; | 5063 return _json; |
4930 } | 5064 } |
4931 } | 5065 } |
4932 | 5066 |
4933 /** Representation of a Team Drive. */ | 5067 /** Representation of a Team Drive. */ |
4934 class TeamDrive { | 5068 class TeamDrive { |
| 5069 /** |
| 5070 * An image file and cropping parameters from which a background image for |
| 5071 * this Team Drive is set. This is a write only field that can only be set on |
| 5072 * a drive.teamdrives.update request that does not set themeId. When |
| 5073 * specified, all fields of the backgroundImageFile must be set. |
| 5074 */ |
| 5075 TeamDriveBackgroundImageFile backgroundImageFile; |
| 5076 /** A short-lived link to this Team Drive's background image. */ |
| 5077 core.String backgroundImageLink; |
4935 /** Capabilities the current user has on this Team Drive. */ | 5078 /** Capabilities the current user has on this Team Drive. */ |
4936 TeamDriveCapabilities capabilities; | 5079 TeamDriveCapabilities capabilities; |
4937 /** | 5080 /** |
| 5081 * The color of this Team Drive as an RGB hex string. It can only be set on a |
| 5082 * drive.teamdrives.update request that does not set themeId. |
| 5083 */ |
| 5084 core.String colorRgb; |
| 5085 /** |
4938 * The ID of this Team Drive which is also the ID of the top level folder for | 5086 * The ID of this Team Drive which is also the ID of the top level folder for |
4939 * this Team Drive. | 5087 * this Team Drive. |
4940 */ | 5088 */ |
4941 core.String id; | 5089 core.String id; |
4942 /** | 5090 /** |
4943 * Identifies what kind of resource this is. Value: the fixed string | 5091 * Identifies what kind of resource this is. Value: the fixed string |
4944 * "drive#teamDrive". | 5092 * "drive#teamDrive". |
4945 */ | 5093 */ |
4946 core.String kind; | 5094 core.String kind; |
4947 /** The name of this Team Drive. */ | 5095 /** The name of this Team Drive. */ |
4948 core.String name; | 5096 core.String name; |
| 5097 /** |
| 5098 * The ID of the theme from which the background image and color will be set. |
| 5099 * The set of possible teamDriveThemes can be retrieved from a drive.about.get |
| 5100 * response. When not specified on a drive.teamdrives.create request, a random |
| 5101 * theme is chosen from which the background image and color are set. This is |
| 5102 * a write only field that can only be set on a request that does not set |
| 5103 * colorRgb or backgroundImageFile. |
| 5104 */ |
| 5105 core.String themeId; |
4949 | 5106 |
4950 TeamDrive(); | 5107 TeamDrive(); |
4951 | 5108 |
4952 TeamDrive.fromJson(core.Map _json) { | 5109 TeamDrive.fromJson(core.Map _json) { |
| 5110 if (_json.containsKey("backgroundImageFile")) { |
| 5111 backgroundImageFile = new TeamDriveBackgroundImageFile.fromJson(_json["bac
kgroundImageFile"]); |
| 5112 } |
| 5113 if (_json.containsKey("backgroundImageLink")) { |
| 5114 backgroundImageLink = _json["backgroundImageLink"]; |
| 5115 } |
4953 if (_json.containsKey("capabilities")) { | 5116 if (_json.containsKey("capabilities")) { |
4954 capabilities = new TeamDriveCapabilities.fromJson(_json["capabilities"]); | 5117 capabilities = new TeamDriveCapabilities.fromJson(_json["capabilities"]); |
4955 } | 5118 } |
| 5119 if (_json.containsKey("colorRgb")) { |
| 5120 colorRgb = _json["colorRgb"]; |
| 5121 } |
4956 if (_json.containsKey("id")) { | 5122 if (_json.containsKey("id")) { |
4957 id = _json["id"]; | 5123 id = _json["id"]; |
4958 } | 5124 } |
4959 if (_json.containsKey("kind")) { | 5125 if (_json.containsKey("kind")) { |
4960 kind = _json["kind"]; | 5126 kind = _json["kind"]; |
4961 } | 5127 } |
4962 if (_json.containsKey("name")) { | 5128 if (_json.containsKey("name")) { |
4963 name = _json["name"]; | 5129 name = _json["name"]; |
4964 } | 5130 } |
| 5131 if (_json.containsKey("themeId")) { |
| 5132 themeId = _json["themeId"]; |
| 5133 } |
4965 } | 5134 } |
4966 | 5135 |
4967 core.Map toJson() { | 5136 core.Map toJson() { |
4968 var _json = new core.Map(); | 5137 var _json = new core.Map(); |
| 5138 if (backgroundImageFile != null) { |
| 5139 _json["backgroundImageFile"] = (backgroundImageFile).toJson(); |
| 5140 } |
| 5141 if (backgroundImageLink != null) { |
| 5142 _json["backgroundImageLink"] = backgroundImageLink; |
| 5143 } |
4969 if (capabilities != null) { | 5144 if (capabilities != null) { |
4970 _json["capabilities"] = (capabilities).toJson(); | 5145 _json["capabilities"] = (capabilities).toJson(); |
4971 } | 5146 } |
| 5147 if (colorRgb != null) { |
| 5148 _json["colorRgb"] = colorRgb; |
| 5149 } |
4972 if (id != null) { | 5150 if (id != null) { |
4973 _json["id"] = id; | 5151 _json["id"] = id; |
4974 } | 5152 } |
4975 if (kind != null) { | 5153 if (kind != null) { |
4976 _json["kind"] = kind; | 5154 _json["kind"] = kind; |
4977 } | 5155 } |
4978 if (name != null) { | 5156 if (name != null) { |
4979 _json["name"] = name; | 5157 _json["name"] = name; |
4980 } | 5158 } |
| 5159 if (themeId != null) { |
| 5160 _json["themeId"] = themeId; |
| 5161 } |
4981 return _json; | 5162 return _json; |
4982 } | 5163 } |
4983 } | 5164 } |
4984 | 5165 |
4985 /** A list of Team Drives. */ | 5166 /** A list of Team Drives. */ |
4986 class TeamDriveList { | 5167 class TeamDriveList { |
4987 /** | 5168 /** |
4988 * Identifies what kind of resource this is. Value: the fixed string | 5169 * Identifies what kind of resource this is. Value: the fixed string |
4989 * "drive#teamDriveList". | 5170 * "drive#teamDriveList". |
4990 */ | 5171 */ |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5091 } | 5272 } |
5092 if (permissionId != null) { | 5273 if (permissionId != null) { |
5093 _json["permissionId"] = permissionId; | 5274 _json["permissionId"] = permissionId; |
5094 } | 5275 } |
5095 if (photoLink != null) { | 5276 if (photoLink != null) { |
5096 _json["photoLink"] = photoLink; | 5277 _json["photoLink"] = photoLink; |
5097 } | 5278 } |
5098 return _json; | 5279 return _json; |
5099 } | 5280 } |
5100 } | 5281 } |
OLD | NEW |