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

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

Issue 2039113004: Api-roll 37: 2016-06-06 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « generated/googleapis/lib/drive/v2.dart ('k') | generated/googleapis/lib/firebaserules/v1.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.drive.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:crypto/crypto.dart' as crypto;
11 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
12 11
13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
14 ApiRequestError, DetailedApiRequestError, Media, UploadOptions, 13 ApiRequestError, DetailedApiRequestError, Media, UploadOptions,
15 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, 14 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions,
16 ByteRange; 15 ByteRange;
17 16
18 const core.String USER_AGENT = 'dart-api-client drive/v3'; 17 const core.String USER_AGENT = 'dart-api-client drive/v3';
19 18
20 /** 19 /**
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 * Updates a permission with patch semantics. 1429 * Updates a permission with patch semantics.
1431 * 1430 *
1432 * [request] - The metadata request object. 1431 * [request] - The metadata request object.
1433 * 1432 *
1434 * Request parameters: 1433 * Request parameters:
1435 * 1434 *
1436 * [fileId] - The ID of the file. 1435 * [fileId] - The ID of the file.
1437 * 1436 *
1438 * [permissionId] - The ID of the permission. 1437 * [permissionId] - The ID of the permission.
1439 * 1438 *
1439 * [removeExpiration] - Whether to remove the expiration date.
1440 *
1440 * [transferOwnership] - Whether to transfer ownership to the specified user 1441 * [transferOwnership] - Whether to transfer ownership to the specified user
1441 * and downgrade the current owner to a writer. This parameter is required as 1442 * and downgrade the current owner to a writer. This parameter is required as
1442 * an acknowledgement of the side effect. 1443 * an acknowledgement of the side effect.
1443 * 1444 *
1444 * Completes with a [Permission]. 1445 * Completes with a [Permission].
1445 * 1446 *
1446 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1447 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1447 * error. 1448 * error.
1448 * 1449 *
1449 * If the used [http.Client] completes with an error when making a REST call, 1450 * If the used [http.Client] completes with an error when making a REST call,
1450 * this method will complete with the same error. 1451 * this method will complete with the same error.
1451 */ 1452 */
1452 async.Future<Permission> update(Permission request, core.String fileId, core.S tring permissionId, {core.bool transferOwnership}) { 1453 async.Future<Permission> update(Permission request, core.String fileId, core.S tring permissionId, {core.bool removeExpiration, core.bool transferOwnership}) {
1453 var _url = null; 1454 var _url = null;
1454 var _queryParams = new core.Map(); 1455 var _queryParams = new core.Map();
1455 var _uploadMedia = null; 1456 var _uploadMedia = null;
1456 var _uploadOptions = null; 1457 var _uploadOptions = null;
1457 var _downloadOptions = commons.DownloadOptions.Metadata; 1458 var _downloadOptions = commons.DownloadOptions.Metadata;
1458 var _body = null; 1459 var _body = null;
1459 1460
1460 if (request != null) { 1461 if (request != null) {
1461 _body = convert.JSON.encode((request).toJson()); 1462 _body = convert.JSON.encode((request).toJson());
1462 } 1463 }
1463 if (fileId == null) { 1464 if (fileId == null) {
1464 throw new core.ArgumentError("Parameter fileId is required."); 1465 throw new core.ArgumentError("Parameter fileId is required.");
1465 } 1466 }
1466 if (permissionId == null) { 1467 if (permissionId == null) {
1467 throw new core.ArgumentError("Parameter permissionId is required."); 1468 throw new core.ArgumentError("Parameter permissionId is required.");
1468 } 1469 }
1470 if (removeExpiration != null) {
1471 _queryParams["removeExpiration"] = ["${removeExpiration}"];
1472 }
1469 if (transferOwnership != null) { 1473 if (transferOwnership != null) {
1470 _queryParams["transferOwnership"] = ["${transferOwnership}"]; 1474 _queryParams["transferOwnership"] = ["${transferOwnership}"];
1471 } 1475 }
1472 1476
1473 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId'); 1477 _url = 'files/' + commons.Escaper.ecapeVariable('$fileId') + '/permissions/' + commons.Escaper.ecapeVariable('$permissionId');
1474 1478
1475 var _response = _requester.request(_url, 1479 var _response = _requester.request(_url,
1476 "PATCH", 1480 "PATCH",
1477 body: _body, 1481 body: _body,
1478 queryParams: _queryParams, 1482 queryParams: _queryParams,
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2597 } 2601 }
2598 2602
2599 /** 2603 /**
2600 * A thumbnail for the file. This will only be used if Drive cannot generate a 2604 * A thumbnail for the file. This will only be used if Drive cannot generate a
2601 * standard thumbnail. 2605 * standard thumbnail.
2602 */ 2606 */
2603 class FileContentHintsThumbnail { 2607 class FileContentHintsThumbnail {
2604 /** The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). */ 2608 /** The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). */
2605 core.String image; 2609 core.String image;
2606 core.List<core.int> get imageAsBytes { 2610 core.List<core.int> get imageAsBytes {
2607 return crypto.CryptoUtils.base64StringToBytes(image); 2611 return convert.BASE64.decode(image);
2608 } 2612 }
2609 2613
2610 void set imageAsBytes(core.List<core.int> _bytes) { 2614 void set imageAsBytes(core.List<core.int> _bytes) {
2611 image = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); 2615 image = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", " -");
2612 } 2616 }
2613 /** The MIME type of the thumbnail. */ 2617 /** The MIME type of the thumbnail. */
2614 core.String mimeType; 2618 core.String mimeType;
2615 2619
2616 FileContentHintsThumbnail(); 2620 FileContentHintsThumbnail();
2617 2621
2618 FileContentHintsThumbnail.fromJson(core.Map _json) { 2622 FileContentHintsThumbnail.fromJson(core.Map _json) {
2619 if (_json.containsKey("image")) { 2623 if (_json.containsKey("image")) {
2620 image = _json["image"]; 2624 image = _json["image"];
2621 } 2625 }
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
3494 */ 3498 */
3495 core.bool allowFileDiscovery; 3499 core.bool allowFileDiscovery;
3496 /** A displayable name for users, groups or domains. */ 3500 /** A displayable name for users, groups or domains. */
3497 core.String displayName; 3501 core.String displayName;
3498 /** The domain to which this permission refers. */ 3502 /** The domain to which this permission refers. */
3499 core.String domain; 3503 core.String domain;
3500 /** 3504 /**
3501 * The email address of the user or group to which this permission refers. 3505 * The email address of the user or group to which this permission refers.
3502 */ 3506 */
3503 core.String emailAddress; 3507 core.String emailAddress;
3508 /** The time at which this permission will expire (RFC 3339 date-time). */
3509 core.DateTime expirationTime;
3504 /** 3510 /**
3505 * The ID of this permission. This is a unique identifier for the grantee, and 3511 * The ID of this permission. This is a unique identifier for the grantee, and
3506 * is published in User resources as permissionId. 3512 * is published in User resources as permissionId.
3507 */ 3513 */
3508 core.String id; 3514 core.String id;
3509 /** This is always drive#permission. */ 3515 /** This is always drive#permission. */
3510 core.String kind; 3516 core.String kind;
3511 /** A link to the user's profile photo, if available. */ 3517 /** A link to the user's profile photo, if available. */
3512 core.String photoLink; 3518 core.String photoLink;
3513 /** 3519 /**
(...skipping 21 matching lines...) Expand all
3535 } 3541 }
3536 if (_json.containsKey("displayName")) { 3542 if (_json.containsKey("displayName")) {
3537 displayName = _json["displayName"]; 3543 displayName = _json["displayName"];
3538 } 3544 }
3539 if (_json.containsKey("domain")) { 3545 if (_json.containsKey("domain")) {
3540 domain = _json["domain"]; 3546 domain = _json["domain"];
3541 } 3547 }
3542 if (_json.containsKey("emailAddress")) { 3548 if (_json.containsKey("emailAddress")) {
3543 emailAddress = _json["emailAddress"]; 3549 emailAddress = _json["emailAddress"];
3544 } 3550 }
3551 if (_json.containsKey("expirationTime")) {
3552 expirationTime = core.DateTime.parse(_json["expirationTime"]);
3553 }
3545 if (_json.containsKey("id")) { 3554 if (_json.containsKey("id")) {
3546 id = _json["id"]; 3555 id = _json["id"];
3547 } 3556 }
3548 if (_json.containsKey("kind")) { 3557 if (_json.containsKey("kind")) {
3549 kind = _json["kind"]; 3558 kind = _json["kind"];
3550 } 3559 }
3551 if (_json.containsKey("photoLink")) { 3560 if (_json.containsKey("photoLink")) {
3552 photoLink = _json["photoLink"]; 3561 photoLink = _json["photoLink"];
3553 } 3562 }
3554 if (_json.containsKey("role")) { 3563 if (_json.containsKey("role")) {
(...skipping 11 matching lines...) Expand all
3566 } 3575 }
3567 if (displayName != null) { 3576 if (displayName != null) {
3568 _json["displayName"] = displayName; 3577 _json["displayName"] = displayName;
3569 } 3578 }
3570 if (domain != null) { 3579 if (domain != null) {
3571 _json["domain"] = domain; 3580 _json["domain"] = domain;
3572 } 3581 }
3573 if (emailAddress != null) { 3582 if (emailAddress != null) {
3574 _json["emailAddress"] = emailAddress; 3583 _json["emailAddress"] = emailAddress;
3575 } 3584 }
3585 if (expirationTime != null) {
3586 _json["expirationTime"] = (expirationTime).toIso8601String();
3587 }
3576 if (id != null) { 3588 if (id != null) {
3577 _json["id"] = id; 3589 _json["id"] = id;
3578 } 3590 }
3579 if (kind != null) { 3591 if (kind != null) {
3580 _json["kind"] = kind; 3592 _json["kind"] = kind;
3581 } 3593 }
3582 if (photoLink != null) { 3594 if (photoLink != null) {
3583 _json["photoLink"] = photoLink; 3595 _json["photoLink"] = photoLink;
3584 } 3596 }
3585 if (role != null) { 3597 if (role != null) {
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
4006 } 4018 }
4007 if (permissionId != null) { 4019 if (permissionId != null) {
4008 _json["permissionId"] = permissionId; 4020 _json["permissionId"] = permissionId;
4009 } 4021 }
4010 if (photoLink != null) { 4022 if (photoLink != null) {
4011 _json["photoLink"] = photoLink; 4023 _json["photoLink"] = photoLink;
4012 } 4024 }
4013 return _json; 4025 return _json;
4014 } 4026 }
4015 } 4027 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/drive/v2.dart ('k') | generated/googleapis/lib/firebaserules/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698