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.storage.v1; | 3 library googleapis.storage.v1; |
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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 "GET", | 448 "GET", |
449 body: _body, | 449 body: _body, |
450 queryParams: _queryParams, | 450 queryParams: _queryParams, |
451 uploadOptions: _uploadOptions, | 451 uploadOptions: _uploadOptions, |
452 uploadMedia: _uploadMedia, | 452 uploadMedia: _uploadMedia, |
453 downloadOptions: _downloadOptions); | 453 downloadOptions: _downloadOptions); |
454 return _response.then((data) => new Bucket.fromJson(data)); | 454 return _response.then((data) => new Bucket.fromJson(data)); |
455 } | 455 } |
456 | 456 |
457 /** | 457 /** |
| 458 * Returns an IAM policy for the specified bucket. |
| 459 * |
| 460 * Request parameters: |
| 461 * |
| 462 * [bucket] - Name of a bucket. |
| 463 * |
| 464 * Completes with a [Policy]. |
| 465 * |
| 466 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 467 * error. |
| 468 * |
| 469 * If the used [http.Client] completes with an error when making a REST call, |
| 470 * this method will complete with the same error. |
| 471 */ |
| 472 async.Future<Policy> getIamPolicy(core.String bucket) { |
| 473 var _url = null; |
| 474 var _queryParams = new core.Map(); |
| 475 var _uploadMedia = null; |
| 476 var _uploadOptions = null; |
| 477 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 478 var _body = null; |
| 479 |
| 480 if (bucket == null) { |
| 481 throw new core.ArgumentError("Parameter bucket is required."); |
| 482 } |
| 483 |
| 484 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/iam'; |
| 485 |
| 486 var _response = _requester.request(_url, |
| 487 "GET", |
| 488 body: _body, |
| 489 queryParams: _queryParams, |
| 490 uploadOptions: _uploadOptions, |
| 491 uploadMedia: _uploadMedia, |
| 492 downloadOptions: _downloadOptions); |
| 493 return _response.then((data) => new Policy.fromJson(data)); |
| 494 } |
| 495 |
| 496 /** |
458 * Creates a new bucket. | 497 * Creates a new bucket. |
459 * | 498 * |
460 * [request] - The metadata request object. | 499 * [request] - The metadata request object. |
461 * | 500 * |
462 * Request parameters: | 501 * Request parameters: |
463 * | 502 * |
464 * [project] - A valid API project identifier. | 503 * [project] - A valid API project identifier. |
465 * | 504 * |
466 * [predefinedAcl] - Apply a predefined set of access controls to this bucket. | 505 * [predefinedAcl] - Apply a predefined set of access controls to this bucket. |
467 * Possible string values are: | 506 * Possible string values are: |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 "PATCH", | 741 "PATCH", |
703 body: _body, | 742 body: _body, |
704 queryParams: _queryParams, | 743 queryParams: _queryParams, |
705 uploadOptions: _uploadOptions, | 744 uploadOptions: _uploadOptions, |
706 uploadMedia: _uploadMedia, | 745 uploadMedia: _uploadMedia, |
707 downloadOptions: _downloadOptions); | 746 downloadOptions: _downloadOptions); |
708 return _response.then((data) => new Bucket.fromJson(data)); | 747 return _response.then((data) => new Bucket.fromJson(data)); |
709 } | 748 } |
710 | 749 |
711 /** | 750 /** |
| 751 * Updates an IAM policy for the specified bucket. |
| 752 * |
| 753 * [request] - The metadata request object. |
| 754 * |
| 755 * Request parameters: |
| 756 * |
| 757 * [bucket] - Name of a bucket. |
| 758 * |
| 759 * Completes with a [Policy]. |
| 760 * |
| 761 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 762 * error. |
| 763 * |
| 764 * If the used [http.Client] completes with an error when making a REST call, |
| 765 * this method will complete with the same error. |
| 766 */ |
| 767 async.Future<Policy> setIamPolicy(Policy request, core.String bucket) { |
| 768 var _url = null; |
| 769 var _queryParams = new core.Map(); |
| 770 var _uploadMedia = null; |
| 771 var _uploadOptions = null; |
| 772 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 773 var _body = null; |
| 774 |
| 775 if (request != null) { |
| 776 _body = convert.JSON.encode((request).toJson()); |
| 777 } |
| 778 if (bucket == null) { |
| 779 throw new core.ArgumentError("Parameter bucket is required."); |
| 780 } |
| 781 |
| 782 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/iam'; |
| 783 |
| 784 var _response = _requester.request(_url, |
| 785 "PUT", |
| 786 body: _body, |
| 787 queryParams: _queryParams, |
| 788 uploadOptions: _uploadOptions, |
| 789 uploadMedia: _uploadMedia, |
| 790 downloadOptions: _downloadOptions); |
| 791 return _response.then((data) => new Policy.fromJson(data)); |
| 792 } |
| 793 |
| 794 /** |
| 795 * Tests a set of permissions on the given bucket to see which, if any, are |
| 796 * held by the caller. |
| 797 * |
| 798 * Request parameters: |
| 799 * |
| 800 * [bucket] - Name of a bucket. |
| 801 * |
| 802 * [permissions] - Permissions to test. |
| 803 * |
| 804 * Completes with a [TestIamPermissionsResponse]. |
| 805 * |
| 806 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 807 * error. |
| 808 * |
| 809 * If the used [http.Client] completes with an error when making a REST call, |
| 810 * this method will complete with the same error. |
| 811 */ |
| 812 async.Future<TestIamPermissionsResponse> testIamPermissions(core.String bucket
, core.List<core.String> permissions) { |
| 813 var _url = null; |
| 814 var _queryParams = new core.Map(); |
| 815 var _uploadMedia = null; |
| 816 var _uploadOptions = null; |
| 817 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 818 var _body = null; |
| 819 |
| 820 if (bucket == null) { |
| 821 throw new core.ArgumentError("Parameter bucket is required."); |
| 822 } |
| 823 if (permissions == null || permissions.isEmpty) { |
| 824 throw new core.ArgumentError("Parameter permissions is required."); |
| 825 } |
| 826 _queryParams["permissions"] = permissions; |
| 827 |
| 828 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/iam/testPermissio
ns'; |
| 829 |
| 830 var _response = _requester.request(_url, |
| 831 "GET", |
| 832 body: _body, |
| 833 queryParams: _queryParams, |
| 834 uploadOptions: _uploadOptions, |
| 835 uploadMedia: _uploadMedia, |
| 836 downloadOptions: _downloadOptions); |
| 837 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); |
| 838 } |
| 839 |
| 840 /** |
712 * Updates a bucket. Changes to the bucket will be readable immediately after | 841 * Updates a bucket. Changes to the bucket will be readable immediately after |
713 * writing, but configuration changes may take time to propagate. | 842 * writing, but configuration changes may take time to propagate. |
714 * | 843 * |
715 * [request] - The metadata request object. | 844 * [request] - The metadata request object. |
716 * | 845 * |
717 * Request parameters: | 846 * Request parameters: |
718 * | 847 * |
719 * [bucket] - Name of a bucket. | 848 * [bucket] - Name of a bucket. |
720 * | 849 * |
721 * [ifMetagenerationMatch] - Makes the return of the bucket metadata | 850 * [ifMetagenerationMatch] - Makes the return of the bucket metadata |
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1953 downloadOptions: _downloadOptions); | 2082 downloadOptions: _downloadOptions); |
1954 if (_downloadOptions == null || | 2083 if (_downloadOptions == null || |
1955 _downloadOptions == commons.DownloadOptions.Metadata) { | 2084 _downloadOptions == commons.DownloadOptions.Metadata) { |
1956 return _response.then((data) => new Object.fromJson(data)); | 2085 return _response.then((data) => new Object.fromJson(data)); |
1957 } else { | 2086 } else { |
1958 return _response; | 2087 return _response; |
1959 } | 2088 } |
1960 } | 2089 } |
1961 | 2090 |
1962 /** | 2091 /** |
| 2092 * Returns an IAM policy for the specified object. |
| 2093 * |
| 2094 * Request parameters: |
| 2095 * |
| 2096 * [bucket] - Name of the bucket in which the object resides. |
| 2097 * |
| 2098 * [object] - Name of the object. For information about how to URL encode |
| 2099 * object names to be path safe, see Encoding URI Path Parts. |
| 2100 * |
| 2101 * [generation] - If present, selects a specific revision of this object (as |
| 2102 * opposed to the latest version, the default). |
| 2103 * |
| 2104 * Completes with a [Policy]. |
| 2105 * |
| 2106 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2107 * error. |
| 2108 * |
| 2109 * If the used [http.Client] completes with an error when making a REST call, |
| 2110 * this method will complete with the same error. |
| 2111 */ |
| 2112 async.Future<Policy> getIamPolicy(core.String bucket, core.String object, {cor
e.String generation}) { |
| 2113 var _url = null; |
| 2114 var _queryParams = new core.Map(); |
| 2115 var _uploadMedia = null; |
| 2116 var _uploadOptions = null; |
| 2117 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2118 var _body = null; |
| 2119 |
| 2120 if (bucket == null) { |
| 2121 throw new core.ArgumentError("Parameter bucket is required."); |
| 2122 } |
| 2123 if (object == null) { |
| 2124 throw new core.ArgumentError("Parameter object is required."); |
| 2125 } |
| 2126 if (generation != null) { |
| 2127 _queryParams["generation"] = [generation]; |
| 2128 } |
| 2129 |
| 2130 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object') + '/iam'; |
| 2131 |
| 2132 var _response = _requester.request(_url, |
| 2133 "GET", |
| 2134 body: _body, |
| 2135 queryParams: _queryParams, |
| 2136 uploadOptions: _uploadOptions, |
| 2137 uploadMedia: _uploadMedia, |
| 2138 downloadOptions: _downloadOptions); |
| 2139 return _response.then((data) => new Policy.fromJson(data)); |
| 2140 } |
| 2141 |
| 2142 /** |
1963 * Stores a new object and metadata. | 2143 * Stores a new object and metadata. |
1964 * | 2144 * |
1965 * [request] - The metadata request object. | 2145 * [request] - The metadata request object. |
1966 * | 2146 * |
1967 * Request parameters: | 2147 * Request parameters: |
1968 * | 2148 * |
1969 * [bucket] - Name of the bucket in which to store the new object. Overrides | 2149 * [bucket] - Name of the bucket in which to store the new object. Overrides |
1970 * the provided object metadata's bucket value, if any. | 2150 * the provided object metadata's bucket value, if any. |
1971 * | 2151 * |
1972 * [contentEncoding] - If set, sets the contentEncoding property of the final | 2152 * [contentEncoding] - If set, sets the contentEncoding property of the final |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2448 "POST", | 2628 "POST", |
2449 body: _body, | 2629 body: _body, |
2450 queryParams: _queryParams, | 2630 queryParams: _queryParams, |
2451 uploadOptions: _uploadOptions, | 2631 uploadOptions: _uploadOptions, |
2452 uploadMedia: _uploadMedia, | 2632 uploadMedia: _uploadMedia, |
2453 downloadOptions: _downloadOptions); | 2633 downloadOptions: _downloadOptions); |
2454 return _response.then((data) => new RewriteResponse.fromJson(data)); | 2634 return _response.then((data) => new RewriteResponse.fromJson(data)); |
2455 } | 2635 } |
2456 | 2636 |
2457 /** | 2637 /** |
| 2638 * Updates an IAM policy for the specified object. |
| 2639 * |
| 2640 * [request] - The metadata request object. |
| 2641 * |
| 2642 * Request parameters: |
| 2643 * |
| 2644 * [bucket] - Name of the bucket in which the object resides. |
| 2645 * |
| 2646 * [object] - Name of the object. For information about how to URL encode |
| 2647 * object names to be path safe, see Encoding URI Path Parts. |
| 2648 * |
| 2649 * [generation] - If present, selects a specific revision of this object (as |
| 2650 * opposed to the latest version, the default). |
| 2651 * |
| 2652 * Completes with a [Policy]. |
| 2653 * |
| 2654 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2655 * error. |
| 2656 * |
| 2657 * If the used [http.Client] completes with an error when making a REST call, |
| 2658 * this method will complete with the same error. |
| 2659 */ |
| 2660 async.Future<Policy> setIamPolicy(Policy request, core.String bucket, core.Str
ing object, {core.String generation}) { |
| 2661 var _url = null; |
| 2662 var _queryParams = new core.Map(); |
| 2663 var _uploadMedia = null; |
| 2664 var _uploadOptions = null; |
| 2665 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2666 var _body = null; |
| 2667 |
| 2668 if (request != null) { |
| 2669 _body = convert.JSON.encode((request).toJson()); |
| 2670 } |
| 2671 if (bucket == null) { |
| 2672 throw new core.ArgumentError("Parameter bucket is required."); |
| 2673 } |
| 2674 if (object == null) { |
| 2675 throw new core.ArgumentError("Parameter object is required."); |
| 2676 } |
| 2677 if (generation != null) { |
| 2678 _queryParams["generation"] = [generation]; |
| 2679 } |
| 2680 |
| 2681 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object') + '/iam'; |
| 2682 |
| 2683 var _response = _requester.request(_url, |
| 2684 "PUT", |
| 2685 body: _body, |
| 2686 queryParams: _queryParams, |
| 2687 uploadOptions: _uploadOptions, |
| 2688 uploadMedia: _uploadMedia, |
| 2689 downloadOptions: _downloadOptions); |
| 2690 return _response.then((data) => new Policy.fromJson(data)); |
| 2691 } |
| 2692 |
| 2693 /** |
| 2694 * Tests a set of permissions on the given object to see which, if any, are |
| 2695 * held by the caller. |
| 2696 * |
| 2697 * Request parameters: |
| 2698 * |
| 2699 * [bucket] - Name of the bucket in which the object resides. |
| 2700 * |
| 2701 * [object] - Name of the object. For information about how to URL encode |
| 2702 * object names to be path safe, see Encoding URI Path Parts. |
| 2703 * |
| 2704 * [permissions] - Permissions to test. |
| 2705 * |
| 2706 * [generation] - If present, selects a specific revision of this object (as |
| 2707 * opposed to the latest version, the default). |
| 2708 * |
| 2709 * Completes with a [TestIamPermissionsResponse]. |
| 2710 * |
| 2711 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2712 * error. |
| 2713 * |
| 2714 * If the used [http.Client] completes with an error when making a REST call, |
| 2715 * this method will complete with the same error. |
| 2716 */ |
| 2717 async.Future<TestIamPermissionsResponse> testIamPermissions(core.String bucket
, core.String object, core.List<core.String> permissions, {core.String generatio
n}) { |
| 2718 var _url = null; |
| 2719 var _queryParams = new core.Map(); |
| 2720 var _uploadMedia = null; |
| 2721 var _uploadOptions = null; |
| 2722 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2723 var _body = null; |
| 2724 |
| 2725 if (bucket == null) { |
| 2726 throw new core.ArgumentError("Parameter bucket is required."); |
| 2727 } |
| 2728 if (object == null) { |
| 2729 throw new core.ArgumentError("Parameter object is required."); |
| 2730 } |
| 2731 if (permissions == null || permissions.isEmpty) { |
| 2732 throw new core.ArgumentError("Parameter permissions is required."); |
| 2733 } |
| 2734 _queryParams["permissions"] = permissions; |
| 2735 if (generation != null) { |
| 2736 _queryParams["generation"] = [generation]; |
| 2737 } |
| 2738 |
| 2739 _url = 'b/' + commons.Escaper.ecapeVariable('$bucket') + '/o/' + commons.Esc
aper.ecapeVariable('$object') + '/iam/testPermissions'; |
| 2740 |
| 2741 var _response = _requester.request(_url, |
| 2742 "GET", |
| 2743 body: _body, |
| 2744 queryParams: _queryParams, |
| 2745 uploadOptions: _uploadOptions, |
| 2746 uploadMedia: _uploadMedia, |
| 2747 downloadOptions: _downloadOptions); |
| 2748 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); |
| 2749 } |
| 2750 |
| 2751 /** |
2458 * Updates an object's metadata. | 2752 * Updates an object's metadata. |
2459 * | 2753 * |
2460 * [request] - The metadata request object. | 2754 * [request] - The metadata request object. |
2461 * | 2755 * |
2462 * Request parameters: | 2756 * Request parameters: |
2463 * | 2757 * |
2464 * [bucket] - Name of the bucket in which the object resides. | 2758 * [bucket] - Name of the bucket in which the object resides. |
2465 * | 2759 * |
2466 * [object] - Name of the object. For information about how to URL encode | 2760 * [object] - Name of the object. For information about how to URL encode |
2467 * object names to be path safe, see Encoding URI Path Parts. | 2761 * object names to be path safe, see Encoding URI Path Parts. |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4227 if (nextPageToken != null) { | 4521 if (nextPageToken != null) { |
4228 _json["nextPageToken"] = nextPageToken; | 4522 _json["nextPageToken"] = nextPageToken; |
4229 } | 4523 } |
4230 if (prefixes != null) { | 4524 if (prefixes != null) { |
4231 _json["prefixes"] = prefixes; | 4525 _json["prefixes"] = prefixes; |
4232 } | 4526 } |
4233 return _json; | 4527 return _json; |
4234 } | 4528 } |
4235 } | 4529 } |
4236 | 4530 |
| 4531 class PolicyBindings { |
| 4532 /** |
| 4533 * A collection of identifiers for members who may assume the provided role. |
| 4534 * Recognized identifiers are as follows: |
| 4535 * - allUsers — A special identifier that represents anyone on the internet; |
| 4536 * with or without a Google account. |
| 4537 * - allAuthenticatedUsers — A special identifier that represents anyone who |
| 4538 * is authenticated with a Google account or a service account. |
| 4539 * - user:emailid — An email address that represents a specific account. For |
| 4540 * example, user:alice@gmail.com or user:joe@example.com. |
| 4541 * - serviceAccount:emailid — An email address that represents a service |
| 4542 * account. For example, |
| 4543 * serviceAccount:my-other-app@appspot.gserviceaccount.com . |
| 4544 * - group:emailid — An email address that represents a Google group. For |
| 4545 * example, group:admins@example.com. |
| 4546 * - domain:domain — A Google Apps domain name that represents all the users |
| 4547 * of that domain. For example, domain:google.com or domain:example.com. |
| 4548 * - projectOwner:projectid — Owners of the given project. For example, |
| 4549 * projectOwner:my-example-project |
| 4550 * - projectEditor:projectid — Editors of the given project. For example, |
| 4551 * projectEditor:my-example-project |
| 4552 * - projectViewer:projectid — Viewers of the given project. For example, |
| 4553 * projectViewer:my-example-project |
| 4554 */ |
| 4555 core.List<core.String> members; |
| 4556 /** |
| 4557 * The role to which members belong. Two types of roles are supported: new IAM |
| 4558 * roles, which grant permissions that do not map directly to those provided |
| 4559 * by ACLs, and legacy IAM roles, which do map directly to ACL permissions. |
| 4560 * All roles are of the format roles/storage.specificRole. |
| 4561 * The new IAM roles are: |
| 4562 * - roles/storage.admin — Full control of Google Cloud Storage resources. |
| 4563 * - roles/storage.objectViewer — Read-Only access to Google Cloud Storage |
| 4564 * objects. |
| 4565 * - roles/storage.objectCreator — Access to create objects in Google Cloud |
| 4566 * Storage. |
| 4567 * - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. |
| 4568 * The legacy IAM roles are: |
| 4569 * - roles/storage.legacyObjectReader — Read-only access to objects without |
| 4570 * listing. Equivalent to an ACL entry on an object with the READER role. |
| 4571 * - roles/storage.legacyObjectOwner — Read/write access to existing objects |
| 4572 * without listing. Equivalent to an ACL entry on an object with the OWNER |
| 4573 * role. |
| 4574 * - roles/storage.legacyBucketReader — Read access to buckets with object |
| 4575 * listing. Equivalent to an ACL entry on a bucket with the READER role. |
| 4576 * - roles/storage.legacyBucketWriter — Read access to buckets with object |
| 4577 * listing/creation/deletion. Equivalent to an ACL entry on a bucket with the |
| 4578 * WRITER role. |
| 4579 * - roles/storage.legacyBucketOwner — Read and write access to existing |
| 4580 * buckets with object listing/creation/deletion. Equivalent to an ACL entry |
| 4581 * on a bucket with the OWNER role. |
| 4582 */ |
| 4583 core.String role; |
| 4584 |
| 4585 PolicyBindings(); |
| 4586 |
| 4587 PolicyBindings.fromJson(core.Map _json) { |
| 4588 if (_json.containsKey("members")) { |
| 4589 members = _json["members"]; |
| 4590 } |
| 4591 if (_json.containsKey("role")) { |
| 4592 role = _json["role"]; |
| 4593 } |
| 4594 } |
| 4595 |
| 4596 core.Map toJson() { |
| 4597 var _json = new core.Map(); |
| 4598 if (members != null) { |
| 4599 _json["members"] = members; |
| 4600 } |
| 4601 if (role != null) { |
| 4602 _json["role"] = role; |
| 4603 } |
| 4604 return _json; |
| 4605 } |
| 4606 } |
| 4607 |
| 4608 /** A bucket/object IAM policy. */ |
| 4609 class Policy { |
| 4610 /** |
| 4611 * An association between a role, which comes with a set of permissions, and |
| 4612 * members who may assume that role. |
| 4613 */ |
| 4614 core.List<PolicyBindings> bindings; |
| 4615 /** HTTP 1.1 Entity tag for the policy. */ |
| 4616 core.String etag; |
| 4617 core.List<core.int> get etagAsBytes { |
| 4618 return convert.BASE64.decode(etag); |
| 4619 } |
| 4620 |
| 4621 void set etagAsBytes(core.List<core.int> _bytes) { |
| 4622 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
| 4623 } |
| 4624 /** |
| 4625 * The kind of item this is. For policies, this is always storage#policy. This |
| 4626 * field is ignored on input. |
| 4627 */ |
| 4628 core.String kind; |
| 4629 /** |
| 4630 * The ID of the resource to which this policy belongs. Will be of the form |
| 4631 * buckets/bucket for buckets, and buckets/bucket/objects/object for objects. |
| 4632 * A specific generation may be specified by appending #generationNumber to |
| 4633 * the end of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The |
| 4634 * current generation can be denoted with #0. This field is ignored on input. |
| 4635 */ |
| 4636 core.String resourceId; |
| 4637 |
| 4638 Policy(); |
| 4639 |
| 4640 Policy.fromJson(core.Map _json) { |
| 4641 if (_json.containsKey("bindings")) { |
| 4642 bindings = _json["bindings"].map((value) => new PolicyBindings.fromJson(va
lue)).toList(); |
| 4643 } |
| 4644 if (_json.containsKey("etag")) { |
| 4645 etag = _json["etag"]; |
| 4646 } |
| 4647 if (_json.containsKey("kind")) { |
| 4648 kind = _json["kind"]; |
| 4649 } |
| 4650 if (_json.containsKey("resourceId")) { |
| 4651 resourceId = _json["resourceId"]; |
| 4652 } |
| 4653 } |
| 4654 |
| 4655 core.Map toJson() { |
| 4656 var _json = new core.Map(); |
| 4657 if (bindings != null) { |
| 4658 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); |
| 4659 } |
| 4660 if (etag != null) { |
| 4661 _json["etag"] = etag; |
| 4662 } |
| 4663 if (kind != null) { |
| 4664 _json["kind"] = kind; |
| 4665 } |
| 4666 if (resourceId != null) { |
| 4667 _json["resourceId"] = resourceId; |
| 4668 } |
| 4669 return _json; |
| 4670 } |
| 4671 } |
| 4672 |
4237 /** A rewrite response. */ | 4673 /** A rewrite response. */ |
4238 class RewriteResponse { | 4674 class RewriteResponse { |
4239 /** | 4675 /** |
4240 * true if the copy is finished; otherwise, false if the copy is in progress. | 4676 * true if the copy is finished; otherwise, false if the copy is in progress. |
4241 * This property is always present in the response. | 4677 * This property is always present in the response. |
4242 */ | 4678 */ |
4243 core.bool done; | 4679 core.bool done; |
4244 /** The kind of item this is. */ | 4680 /** The kind of item this is. */ |
4245 core.String kind; | 4681 core.String kind; |
4246 /** | 4682 /** |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4303 } | 4739 } |
4304 if (rewriteToken != null) { | 4740 if (rewriteToken != null) { |
4305 _json["rewriteToken"] = rewriteToken; | 4741 _json["rewriteToken"] = rewriteToken; |
4306 } | 4742 } |
4307 if (totalBytesRewritten != null) { | 4743 if (totalBytesRewritten != null) { |
4308 _json["totalBytesRewritten"] = totalBytesRewritten; | 4744 _json["totalBytesRewritten"] = totalBytesRewritten; |
4309 } | 4745 } |
4310 return _json; | 4746 return _json; |
4311 } | 4747 } |
4312 } | 4748 } |
| 4749 |
| 4750 /** A storage.(buckets|objects).testIamPermissions response. */ |
| 4751 class TestIamPermissionsResponse { |
| 4752 /** The kind of item this is. */ |
| 4753 core.String kind; |
| 4754 /** |
| 4755 * The permissions held by the caller. Permissions are always of the format |
| 4756 * storage.resource.capability, where resource is one of buckets or objects. |
| 4757 * The supported permissions are as follows: |
| 4758 * - storage.buckets.delete — Delete bucket. |
| 4759 * - storage.buckets.get — Read bucket metadata. |
| 4760 * - storage.buckets.getIamPolicy — Read bucket IAM policy. |
| 4761 * - storage.buckets.create — Create bucket. |
| 4762 * - storage.buckets.list — List buckets. |
| 4763 * - storage.buckets.setIamPolicy — Update bucket IAM policy. |
| 4764 * - storage.buckets.update — Update bucket metadata. |
| 4765 * - storage.objects.delete — Delete object. |
| 4766 * - storage.objects.get — Read object data and metadata. |
| 4767 * - storage.objects.getIamPolicy — Read object IAM policy. |
| 4768 * - storage.objects.create — Create object. |
| 4769 * - storage.objects.list — List objects. |
| 4770 * - storage.objects.setIamPolicy — Update object IAM policy. |
| 4771 * - storage.objects.update — Update object metadata. |
| 4772 */ |
| 4773 core.List<core.String> permissions; |
| 4774 |
| 4775 TestIamPermissionsResponse(); |
| 4776 |
| 4777 TestIamPermissionsResponse.fromJson(core.Map _json) { |
| 4778 if (_json.containsKey("kind")) { |
| 4779 kind = _json["kind"]; |
| 4780 } |
| 4781 if (_json.containsKey("permissions")) { |
| 4782 permissions = _json["permissions"]; |
| 4783 } |
| 4784 } |
| 4785 |
| 4786 core.Map toJson() { |
| 4787 var _json = new core.Map(); |
| 4788 if (kind != null) { |
| 4789 _json["kind"] = kind; |
| 4790 } |
| 4791 if (permissions != null) { |
| 4792 _json["permissions"] = permissions; |
| 4793 } |
| 4794 return _json; |
| 4795 } |
| 4796 } |
OLD | NEW |