OLD | NEW |
1 library googleapis.storage.v1; | 1 library googleapis.storage.v1; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 final common_internal.ApiRequester _requester; | 31 final common_internal.ApiRequester _requester; |
32 | 32 |
33 BucketAccessControlsResourceApi get bucketAccessControls => new BucketAccessCo
ntrolsResourceApi(_requester); | 33 BucketAccessControlsResourceApi get bucketAccessControls => new BucketAccessCo
ntrolsResourceApi(_requester); |
34 BucketsResourceApi get buckets => new BucketsResourceApi(_requester); | 34 BucketsResourceApi get buckets => new BucketsResourceApi(_requester); |
35 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); | 35 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); |
36 DefaultObjectAccessControlsResourceApi get defaultObjectAccessControls => new
DefaultObjectAccessControlsResourceApi(_requester); | 36 DefaultObjectAccessControlsResourceApi get defaultObjectAccessControls => new
DefaultObjectAccessControlsResourceApi(_requester); |
37 ObjectAccessControlsResourceApi get objectAccessControls => new ObjectAccessCo
ntrolsResourceApi(_requester); | 37 ObjectAccessControlsResourceApi get objectAccessControls => new ObjectAccessCo
ntrolsResourceApi(_requester); |
38 ObjectsResourceApi get objects => new ObjectsResourceApi(_requester); | 38 ObjectsResourceApi get objects => new ObjectsResourceApi(_requester); |
39 | 39 |
40 StorageApi(http.Client client) : | 40 StorageApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c
om/", core.String servicePath: "storage/v1/"}) : |
41 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "storage/v1/"); | 41 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); |
42 } | 42 } |
43 | 43 |
44 | 44 |
45 /** Not documented yet. */ | 45 /** Not documented yet. */ |
46 class BucketAccessControlsResourceApi { | 46 class BucketAccessControlsResourceApi { |
47 final common_internal.ApiRequester _requester; | 47 final common_internal.ApiRequester _requester; |
48 | 48 |
49 BucketAccessControlsResourceApi(common_internal.ApiRequester client) : | 49 BucketAccessControlsResourceApi(common_internal.ApiRequester client) : |
50 _requester = client; | 50 _requester = client; |
51 | 51 |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 * - "authenticatedRead" : Project team owners get OWNER access, and | 470 * - "authenticatedRead" : Project team owners get OWNER access, and |
471 * allAuthenticatedUsers get READER access. | 471 * allAuthenticatedUsers get READER access. |
472 * - "private" : Project team owners get OWNER access. | 472 * - "private" : Project team owners get OWNER access. |
473 * - "projectPrivate" : Project team members get access according to their | 473 * - "projectPrivate" : Project team members get access according to their |
474 * roles. | 474 * roles. |
475 * - "publicRead" : Project team owners get OWNER access, and allUsers get | 475 * - "publicRead" : Project team owners get OWNER access, and allUsers get |
476 * READER access. | 476 * READER access. |
477 * - "publicReadWrite" : Project team owners get OWNER access, and allUsers | 477 * - "publicReadWrite" : Project team owners get OWNER access, and allUsers |
478 * get WRITER access. | 478 * get WRITER access. |
479 * | 479 * |
| 480 * [predefinedDefaultObjectAcl] - Apply a predefined set of default object |
| 481 * access controls to this bucket. |
| 482 * Possible string values are: |
| 483 * - "authenticatedRead" : Object owner gets OWNER access, and |
| 484 * allAuthenticatedUsers get READER access. |
| 485 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project |
| 486 * team owners get OWNER access. |
| 487 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team |
| 488 * owners get READER access. |
| 489 * - "private" : Object owner gets OWNER access. |
| 490 * - "projectPrivate" : Object owner gets OWNER access, and project team |
| 491 * members get access according to their roles. |
| 492 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER |
| 493 * access. |
| 494 * |
480 * [projection] - Set of properties to return. Defaults to noAcl, unless the | 495 * [projection] - Set of properties to return. Defaults to noAcl, unless the |
481 * bucket resource specifies acl or defaultObjectAcl properties, when it | 496 * bucket resource specifies acl or defaultObjectAcl properties, when it |
482 * defaults to full. | 497 * defaults to full. |
483 * Possible string values are: | 498 * Possible string values are: |
484 * - "full" : Include all properties. | 499 * - "full" : Include all properties. |
485 * - "noAcl" : Omit acl and defaultObjectAcl properties. | 500 * - "noAcl" : Omit acl and defaultObjectAcl properties. |
486 * | 501 * |
487 * Completes with a [Bucket]. | 502 * Completes with a [Bucket]. |
488 * | 503 * |
489 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 504 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
490 * error. | 505 * error. |
491 * | 506 * |
492 * If the used [http.Client] completes with an error when making a REST call, | 507 * If the used [http.Client] completes with an error when making a REST call, |
493 * this method will complete with the same error. | 508 * this method will complete with the same error. |
494 */ | 509 */ |
495 async.Future<Bucket> insert(Bucket request, core.String project, {core.String
predefinedAcl, core.String projection}) { | 510 async.Future<Bucket> insert(Bucket request, core.String project, {core.String
predefinedAcl, core.String predefinedDefaultObjectAcl, core.String projection})
{ |
496 var _url = null; | 511 var _url = null; |
497 var _queryParams = new core.Map(); | 512 var _queryParams = new core.Map(); |
498 var _uploadMedia = null; | 513 var _uploadMedia = null; |
499 var _uploadOptions = null; | 514 var _uploadOptions = null; |
500 var _downloadOptions = common.DownloadOptions.Metadata; | 515 var _downloadOptions = common.DownloadOptions.Metadata; |
501 var _body = null; | 516 var _body = null; |
502 | 517 |
503 if (request != null) { | 518 if (request != null) { |
504 _body = convert.JSON.encode((request).toJson()); | 519 _body = convert.JSON.encode((request).toJson()); |
505 } | 520 } |
506 if (project == null) { | 521 if (project == null) { |
507 throw new core.ArgumentError("Parameter project is required."); | 522 throw new core.ArgumentError("Parameter project is required."); |
508 } | 523 } |
509 _queryParams["project"] = [project]; | 524 _queryParams["project"] = [project]; |
510 if (predefinedAcl != null) { | 525 if (predefinedAcl != null) { |
511 _queryParams["predefinedAcl"] = [predefinedAcl]; | 526 _queryParams["predefinedAcl"] = [predefinedAcl]; |
512 } | 527 } |
| 528 if (predefinedDefaultObjectAcl != null) { |
| 529 _queryParams["predefinedDefaultObjectAcl"] = [predefinedDefaultObjectAcl]; |
| 530 } |
513 if (projection != null) { | 531 if (projection != null) { |
514 _queryParams["projection"] = [projection]; | 532 _queryParams["projection"] = [projection]; |
515 } | 533 } |
516 | 534 |
517 | 535 |
518 _url = 'b'; | 536 _url = 'b'; |
519 | 537 |
520 var _response = _requester.request(_url, | 538 var _response = _requester.request(_url, |
521 "POST", | 539 "POST", |
522 body: _body, | 540 body: _body, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 * - "authenticatedRead" : Project team owners get OWNER access, and | 627 * - "authenticatedRead" : Project team owners get OWNER access, and |
610 * allAuthenticatedUsers get READER access. | 628 * allAuthenticatedUsers get READER access. |
611 * - "private" : Project team owners get OWNER access. | 629 * - "private" : Project team owners get OWNER access. |
612 * - "projectPrivate" : Project team members get access according to their | 630 * - "projectPrivate" : Project team members get access according to their |
613 * roles. | 631 * roles. |
614 * - "publicRead" : Project team owners get OWNER access, and allUsers get | 632 * - "publicRead" : Project team owners get OWNER access, and allUsers get |
615 * READER access. | 633 * READER access. |
616 * - "publicReadWrite" : Project team owners get OWNER access, and allUsers | 634 * - "publicReadWrite" : Project team owners get OWNER access, and allUsers |
617 * get WRITER access. | 635 * get WRITER access. |
618 * | 636 * |
| 637 * [predefinedDefaultObjectAcl] - Apply a predefined set of default object |
| 638 * access controls to this bucket. |
| 639 * Possible string values are: |
| 640 * - "authenticatedRead" : Object owner gets OWNER access, and |
| 641 * allAuthenticatedUsers get READER access. |
| 642 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project |
| 643 * team owners get OWNER access. |
| 644 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team |
| 645 * owners get READER access. |
| 646 * - "private" : Object owner gets OWNER access. |
| 647 * - "projectPrivate" : Object owner gets OWNER access, and project team |
| 648 * members get access according to their roles. |
| 649 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER |
| 650 * access. |
| 651 * |
619 * [projection] - Set of properties to return. Defaults to full. | 652 * [projection] - Set of properties to return. Defaults to full. |
620 * Possible string values are: | 653 * Possible string values are: |
621 * - "full" : Include all properties. | 654 * - "full" : Include all properties. |
622 * - "noAcl" : Omit acl and defaultObjectAcl properties. | 655 * - "noAcl" : Omit acl and defaultObjectAcl properties. |
623 * | 656 * |
624 * Completes with a [Bucket]. | 657 * Completes with a [Bucket]. |
625 * | 658 * |
626 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 659 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
627 * error. | 660 * error. |
628 * | 661 * |
629 * If the used [http.Client] completes with an error when making a REST call, | 662 * If the used [http.Client] completes with an error when making a REST call, |
630 * this method will complete with the same error. | 663 * this method will complete with the same error. |
631 */ | 664 */ |
632 async.Future<Bucket> patch(Bucket request, core.String bucket, {core.String if
MetagenerationMatch, core.String ifMetagenerationNotMatch, core.String predefine
dAcl, core.String projection}) { | 665 async.Future<Bucket> patch(Bucket request, core.String bucket, {core.String if
MetagenerationMatch, core.String ifMetagenerationNotMatch, core.String predefine
dAcl, core.String predefinedDefaultObjectAcl, core.String projection}) { |
633 var _url = null; | 666 var _url = null; |
634 var _queryParams = new core.Map(); | 667 var _queryParams = new core.Map(); |
635 var _uploadMedia = null; | 668 var _uploadMedia = null; |
636 var _uploadOptions = null; | 669 var _uploadOptions = null; |
637 var _downloadOptions = common.DownloadOptions.Metadata; | 670 var _downloadOptions = common.DownloadOptions.Metadata; |
638 var _body = null; | 671 var _body = null; |
639 | 672 |
640 if (request != null) { | 673 if (request != null) { |
641 _body = convert.JSON.encode((request).toJson()); | 674 _body = convert.JSON.encode((request).toJson()); |
642 } | 675 } |
643 if (bucket == null) { | 676 if (bucket == null) { |
644 throw new core.ArgumentError("Parameter bucket is required."); | 677 throw new core.ArgumentError("Parameter bucket is required."); |
645 } | 678 } |
646 if (ifMetagenerationMatch != null) { | 679 if (ifMetagenerationMatch != null) { |
647 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 680 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
648 } | 681 } |
649 if (ifMetagenerationNotMatch != null) { | 682 if (ifMetagenerationNotMatch != null) { |
650 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 683 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
651 } | 684 } |
652 if (predefinedAcl != null) { | 685 if (predefinedAcl != null) { |
653 _queryParams["predefinedAcl"] = [predefinedAcl]; | 686 _queryParams["predefinedAcl"] = [predefinedAcl]; |
654 } | 687 } |
| 688 if (predefinedDefaultObjectAcl != null) { |
| 689 _queryParams["predefinedDefaultObjectAcl"] = [predefinedDefaultObjectAcl]; |
| 690 } |
655 if (projection != null) { | 691 if (projection != null) { |
656 _queryParams["projection"] = [projection]; | 692 _queryParams["projection"] = [projection]; |
657 } | 693 } |
658 | 694 |
659 | 695 |
660 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket'); | 696 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket'); |
661 | 697 |
662 var _response = _requester.request(_url, | 698 var _response = _requester.request(_url, |
663 "PATCH", | 699 "PATCH", |
664 body: _body, | 700 body: _body, |
(...skipping 26 matching lines...) Expand all Loading... |
691 * - "authenticatedRead" : Project team owners get OWNER access, and | 727 * - "authenticatedRead" : Project team owners get OWNER access, and |
692 * allAuthenticatedUsers get READER access. | 728 * allAuthenticatedUsers get READER access. |
693 * - "private" : Project team owners get OWNER access. | 729 * - "private" : Project team owners get OWNER access. |
694 * - "projectPrivate" : Project team members get access according to their | 730 * - "projectPrivate" : Project team members get access according to their |
695 * roles. | 731 * roles. |
696 * - "publicRead" : Project team owners get OWNER access, and allUsers get | 732 * - "publicRead" : Project team owners get OWNER access, and allUsers get |
697 * READER access. | 733 * READER access. |
698 * - "publicReadWrite" : Project team owners get OWNER access, and allUsers | 734 * - "publicReadWrite" : Project team owners get OWNER access, and allUsers |
699 * get WRITER access. | 735 * get WRITER access. |
700 * | 736 * |
| 737 * [predefinedDefaultObjectAcl] - Apply a predefined set of default object |
| 738 * access controls to this bucket. |
| 739 * Possible string values are: |
| 740 * - "authenticatedRead" : Object owner gets OWNER access, and |
| 741 * allAuthenticatedUsers get READER access. |
| 742 * - "bucketOwnerFullControl" : Object owner gets OWNER access, and project |
| 743 * team owners get OWNER access. |
| 744 * - "bucketOwnerRead" : Object owner gets OWNER access, and project team |
| 745 * owners get READER access. |
| 746 * - "private" : Object owner gets OWNER access. |
| 747 * - "projectPrivate" : Object owner gets OWNER access, and project team |
| 748 * members get access according to their roles. |
| 749 * - "publicRead" : Object owner gets OWNER access, and allUsers get READER |
| 750 * access. |
| 751 * |
701 * [projection] - Set of properties to return. Defaults to full. | 752 * [projection] - Set of properties to return. Defaults to full. |
702 * Possible string values are: | 753 * Possible string values are: |
703 * - "full" : Include all properties. | 754 * - "full" : Include all properties. |
704 * - "noAcl" : Omit acl and defaultObjectAcl properties. | 755 * - "noAcl" : Omit acl and defaultObjectAcl properties. |
705 * | 756 * |
706 * Completes with a [Bucket]. | 757 * Completes with a [Bucket]. |
707 * | 758 * |
708 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 759 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
709 * error. | 760 * error. |
710 * | 761 * |
711 * If the used [http.Client] completes with an error when making a REST call, | 762 * If the used [http.Client] completes with an error when making a REST call, |
712 * this method will complete with the same error. | 763 * this method will complete with the same error. |
713 */ | 764 */ |
714 async.Future<Bucket> update(Bucket request, core.String bucket, {core.String i
fMetagenerationMatch, core.String ifMetagenerationNotMatch, core.String predefin
edAcl, core.String projection}) { | 765 async.Future<Bucket> update(Bucket request, core.String bucket, {core.String i
fMetagenerationMatch, core.String ifMetagenerationNotMatch, core.String predefin
edAcl, core.String predefinedDefaultObjectAcl, core.String projection}) { |
715 var _url = null; | 766 var _url = null; |
716 var _queryParams = new core.Map(); | 767 var _queryParams = new core.Map(); |
717 var _uploadMedia = null; | 768 var _uploadMedia = null; |
718 var _uploadOptions = null; | 769 var _uploadOptions = null; |
719 var _downloadOptions = common.DownloadOptions.Metadata; | 770 var _downloadOptions = common.DownloadOptions.Metadata; |
720 var _body = null; | 771 var _body = null; |
721 | 772 |
722 if (request != null) { | 773 if (request != null) { |
723 _body = convert.JSON.encode((request).toJson()); | 774 _body = convert.JSON.encode((request).toJson()); |
724 } | 775 } |
725 if (bucket == null) { | 776 if (bucket == null) { |
726 throw new core.ArgumentError("Parameter bucket is required."); | 777 throw new core.ArgumentError("Parameter bucket is required."); |
727 } | 778 } |
728 if (ifMetagenerationMatch != null) { | 779 if (ifMetagenerationMatch != null) { |
729 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; | 780 _queryParams["ifMetagenerationMatch"] = [ifMetagenerationMatch]; |
730 } | 781 } |
731 if (ifMetagenerationNotMatch != null) { | 782 if (ifMetagenerationNotMatch != null) { |
732 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; | 783 _queryParams["ifMetagenerationNotMatch"] = [ifMetagenerationNotMatch]; |
733 } | 784 } |
734 if (predefinedAcl != null) { | 785 if (predefinedAcl != null) { |
735 _queryParams["predefinedAcl"] = [predefinedAcl]; | 786 _queryParams["predefinedAcl"] = [predefinedAcl]; |
736 } | 787 } |
| 788 if (predefinedDefaultObjectAcl != null) { |
| 789 _queryParams["predefinedDefaultObjectAcl"] = [predefinedDefaultObjectAcl]; |
| 790 } |
737 if (projection != null) { | 791 if (projection != null) { |
738 _queryParams["projection"] = [projection]; | 792 _queryParams["projection"] = [projection]; |
739 } | 793 } |
740 | 794 |
741 | 795 |
742 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket'); | 796 _url = 'b/' + common_internal.Escaper.ecapeVariable('$bucket'); |
743 | 797 |
744 var _response = _requester.request(_url, | 798 var _response = _requester.request(_url, |
745 "PUT", | 799 "PUT", |
746 body: _body, | 800 body: _body, |
(...skipping 3275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4022 _json["nextPageToken"] = nextPageToken; | 4076 _json["nextPageToken"] = nextPageToken; |
4023 } | 4077 } |
4024 if (prefixes != null) { | 4078 if (prefixes != null) { |
4025 _json["prefixes"] = prefixes; | 4079 _json["prefixes"] = prefixes; |
4026 } | 4080 } |
4027 return _json; | 4081 return _json; |
4028 } | 4082 } |
4029 } | 4083 } |
4030 | 4084 |
4031 | 4085 |
OLD | NEW |